import numpy as npimport osa=bytearray(os.urandom(27))# for i in range(21):# print(a[i])a=np.array(a)print(a)b=a.reshape((-1,3))print(b)c=bytearray(b)print(c)for i in range(27): print(a[i])
import numpy as npimport osa=bytearray(os.urandom(27))# for i in range(21):# print(a[i])a=np.array(a)print(a)b=a.reshape((3,3,3))print(b)print(b[0,:,:])c=bytearray(b)print(c)
原文地址:https://www.cnblogs.com/tangjunjun/p/11226615.html
时间: 2024-10-18 00:43:00