import numpy as np
array=np.array([[1,2,3],[2,3,4]])
print(array)
print('number of dim:',array.ndim)
print('shape:',array.shape)
print('size:',array.size)
运行结果:
import numpy as np
array=np.array([[1,2,3],[2,3,4]])
print(array)
print('number of dim:',array.ndim)
print('shape:',array.shape)
print('size:',array.size)
运行结果: