Can anyone recommend any python packages for using Sparse Arrays with more than 2 dimensions. I'm looking for something similar to a numpy.array with dimension n1xn2xn3xn4xn5. The array is basically a 3 dimensional grid where each grid entry contains a sparse matrix.


Numpy works fine. Simply do:

numpy.zeros((100, 100, 100, 100, 100)) - you'll get a 5D array with all zeros.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.