Tagged Questions
0
votes
0answers
53 views
What is the fastest way to slice a scipy.sparse matrix?
I normally use
matrix[:, i:]
It seems not work as fast as I expected.
1
vote
3answers
188 views
Norm of sparse python vectors
Is it possible to effectively obtain the norm of a sparse vector in python?
I tried the following:
from scipy import sparse
from numpy.linalg import norm
vector1 = sparse.csr_matrix([ 0 for i in ...
0
votes
1answer
66 views
Storing functions in a sparse array with Python
I have a relatively large enum wherein each member represents a message type. A client will receive a message containing the integer value associated with the msg type in the enum. For each msg type ...
3
votes
3answers
493 views
Loading Matlab sparse matrix saved with -v7.3 (HDF5) into Python and operating on it
I'm new to python, coming from matlab. I have a large sparse matrix saved in matlab v7.3 (HDF5) format. I've so far found two ways of loading in the file, using h5py and tables. However operating on ...
2
votes
1answer
731 views
Load sparse array from npy file
I am trying load a sparse array that I have previously saved. Saving the sparse array was easy enough. Trying to read it though is a pain. scipy.load returns a 0d array around my sparse array.
...
4
votes
5answers
935 views
Anyone Know a Great Sparse One Dimensional Array Library in Python?
I am working on an algorithm in Python that uses arrays of int64s heavily. The arrays are typically sparse and are read from and written to constantly. I am currently using relatively large native ...