8000 [WIP] CSR/ CSC Elemwise by ivirshup · Pull Request #465 · pydata/sparse · GitHub
[go: up one dir, main page]

Skip to content

[WIP] CSR/ CSC Elemwise #465

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

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
temp print statement
  • Loading branch information
ivirshup committed Apr 22, 2021
commit 7f2d2ed6738c6ffaf1b5fdf20185eeca701966f2
4 changes: 4 additions & 0 deletions sparse/_umath.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,12 @@ def _resolve_result_type(args: "list[ArrayLike]") -> "Type":
from ._compressed import GCXS, CSR, CSC
from ._coo import COO
from ._dok import DOK
from ._sparse_array import SparseArray
from ._compressed.compressed import _Compressed2d

args = [arg for arg in args if isinstance(arg, SparseArray)]
print([type(arg) for arg in args])

if all(isinstance(arg, DOK) for arg in args):
out_type = DOK
elif all(isinstance(arg, CSR) for arg in args):
Expand Down
0