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

Wrong nnz value in COO constructed from Numpy scalar #510

Closed
sayandip18 opened this issue Aug 16, 2021 · 0 comments · Fixed by #511
Closed

Wrong nnz value in COO constructed from Numpy scalar #510

sayandip18 opened this issue Aug 16, 2021 · 0 comments · Fixed by #511
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@sayandip18
Copy link
Contributor

Describe the bug
COO array constructed from the Numpy scalar equal to float 0.0 should have nnz=0 instead of 1.

To Reproduce

>>> ar = sparse.COO.from_numpy(np.array(0.))
>>> ar
<COO: shape=(), dtype=float64, nnz=1, fill_value=0.0>

System

  • OS and version: Ubuntu 20.04.1
  • sparse version: master
  • NumPy version: 1.20.1
@sayandip18 sayandip18 added the bug Indicates an unexpected problem or unintended behavior label Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant