Skip to content

Commit

Permalink
keep compressed_axes if it's consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestwebber committed Jan 5, 2024
1 parent 1311e4c commit 0d04116
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sparse/_umath.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ def __init__(self, func, *args, **kwargs):
out_type = DOK
elif all(isinstance(arg, GCXS) for arg in sparse_args):
out_type = GCXS
out_kwargs["compressed_axes"] = sparse_args[0].compressed_axes
if len({arg.compressed_axes for arg in sparse_args}) == 1:
out_kwargs["compressed_axes"] = sparse_args[0].compressed_axes
else:
out_type = COO

Expand Down

0 comments on commit 0d04116

Please sign in to comment.