How much memory in numpy array? Is RAM a limiting factor?

前端 未结 2 1794
一整个雨季
一整个雨季 2020-12-28 10:21

I\'m using numpy to create a cube array with sides of length 100, thus containing 1 million entries total. For each of the million entries, I am inserting a 100x100 matrix w

2条回答
  •  温柔的废话
    2020-12-28 11:11

    for the "inner" part of your function, look at the numpy.random module

    import numpy as np
    matrix = np.random.random((100,100))*100
    

提交回复
热议问题