I have a large array K
(29000 x 29000):
K= numpy.random.random((29000, 29000))
I want to apply the following operation on K:
output = K* (1.5 - 0.5 * K* K)
To try preventing 'MemoryError
' , I am doing my computations as suggested on the answer from this thread.
However, when I try to do the assignment operation on the large array as follows, I still get the MemoryError
:
K *= 1.5 - 0.5 * K * K
Any help welcome.
NOTE: this is not a duplicate post. There is a suggestion on this post using cython. But I am looking for alternative solutions which may not rely on Cython.