-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sparse implementation for attr_matrix #5195
Comments
I think this is related to #4217 . It makes sense to me that sparse arrays be the default data structure (i.e. I guess this issue becomes much bigger when expanded -- perhaps it is better to just make the change you suggest. Afterall, it is an improvement and it doesn't tackle so much that it gets messy. But it'd be nice to figure out how to move data to and from the Graph classes more effectively. |
Agreed - there's definitely a lot of discussion to be had on this topic. In the I'll go ahead and submit a PR for the |
This is thematically similar to the discussion in #5193.
There are two functions in the
attrmatrix
module:attr_matrix
andattr_sparse_matrix
. These perform essentially the same function, except one returns a numpy matrix and the other returns a scipy.sparse matrix. IMO it would be an improvement to only have one function for this. What makes the most sense to me would be to use the sparse implementation fromattr_sparse_matrix
forattr_matrix
, so thatattr_matrix
will return a sparse array instead of a numpy.matrix (we can put a FutureWarning on this for now to notify that it will change). Then theattr_sparse_matrix
name can be deprecated. Thoughts?The text was updated successfully, but these errors were encountered: