I am trying to run some simple calculations on a quite large matrix; roughly, 200Kx200K or real numbers. I need to obtain:
results = np.abs(mtx).sum(dim='rows')
Unfortunately, the code crushes even on the server, allocating a lot of memory.
What would be the efficient way to handle this?