numpy.shape用法

xiaoxiao2021-02-28  71

shape[0]表示取行数,shape[1]表示列数

data = numpy.arange(10).reshape(2,5) print(data) print(data.shape[0]) print(data.shape[1])

打印结果:

[[0 1 2 3 4]  [5 6 7 8 9]] 2 5
转载请注明原文地址: https://www.6miu.com/read-2400305.html

最新回复(0)