Я запускал программу в записной книжке Jupyter.
import numpy as np
import scipy as sp
import matplotlib.pyplot as plt
f=sp.fromfile(open("RSM_07_02_2019_lpf_v1"),dtype=sp.float32)
samp_250000=f[1:350001]
samp_250000_reshp=np.reshape(samp_250000,[7,50000])
unit_250000=np.ones([50000,50000])
cmul=(1/35000)*np.matmul(unit_250000,np.transpose(samp_250000_reshp))
diff=np.transpose(samp_250000_reshp)-cmul
cov=np.matmul(np.transpose(diff),diff)
print(cov)
При ее запуске возникает ошибка
MemoryError Traceback (most recent call last)
<ipython-input-5-ab4aadfd66e1> in <module>()
6 samp_250000=f[1:350001]
7 samp_250000_reshp=np.reshape(samp_250000,[7,50000])
----> 8 unit_250000=np.ones([50000,50000])
9 cmul=(1/35000)*np.matmul(unit_250000,np.transpose(samp_250000_reshp))
10 diff=np.transpose(samp_250000_reshp)-cmul
~/anaconda3/lib/python3.7/site-packages/numpy/core/numeric.py in ones(shape, dtype, order)
201
202 """
--> 203 a = empty(shape, dtype, order)
204 multiarray.copyto(a, 1, casting='unsafe')
205 return a
MemoryError:
в чем могут быть возможные причины?