总结:

首先 

import numpy as np

A = np.random.randint(1,100,size = (4,5))


>>A
>>array([[56, 96, 27, 38, 33],
       [86, 64, 52, 21, 66],
       [97, 84, 94, 20, 82],
       [65, 17, 77,  9, 17]])

 

 

Python 求“元组、列表、字典、数组和矩阵”的大小

通常情况下,列表、元组、字典采用len(A),而数组、矩阵采用np.size(A)或A.size

相关文章:

  • 2021-10-21
  • 2022-12-23
  • 2022-12-23
  • 2021-09-02
  • 2021-08-23
  • 2022-01-12
  • 2021-10-26
  • 2021-11-24
猜你喜欢
  • 2021-04-22
  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案