Python/Numpy MemoryError

Rewrite to

p *= alpha
u += p

and this will use much less memory. Whereas p = p*alpha allocates a whole new matrix for the result of p*alpha and then discards the old pp*= alpha does the same thing in place.

In general, with big matrices, try to use op= assignment.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)