Skip to content
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

interoperation with scipy.sparse #6

Open
ev-br opened this issue Mar 16, 2016 · 2 comments
Open

interoperation with scipy.sparse #6

ev-br opened this issue Mar 16, 2016 · 2 comments
Labels

Comments

@ev-br
Copy link
Owner

ev-br commented Mar 16, 2016

Just wait for __numpy_ufunc__ or is there something one can sensibly do (converting to csr and handling that?)

@ev-br
Copy link
Owner Author

ev-br commented Mar 17, 2016

One option: if it has a tocsr() attribute, use it and convert the result from csr to map_array.

@ev-br ev-br mentioned this issue Mar 25, 2016
2 tasks
@ev-br
Copy link
Owner Author

ev-br commented Mar 25, 2016

#29 implements a partial solution: check for a .tocoo attribute and try converting the result to a MapArray. This mostly works, with two weird corner cases:

  • multiplication with csr_matrix on the left. This fails because it checks dimension for matmul before giving up. This way, map*csr is always elementwise, but csr*map fails with a ValueError for non-square matrices. Maybe just prohibit multiplication altogether?
  • comparions with csr on the left. map > csr is OK, but csr > map isn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant