After some research, I could not use function sum of Numpy successfully to solve my problem. I give here a really basic example (the matrix I am targetting is huge