len(矩阵)

输出的是矩阵的行数

len(M[0])输出列数,类似二维数组的存储,numpy.ones((行数,列数))里面要再加括号

猜你喜欢

转载自blog.csdn.net/weixin_42165786/article/details/89388009
今日推荐