We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Indexing DOK with slices does not give the expected results
To Reproduce
>>> import sparse; shape=(3,3); density=0.11111111111111119; indices=(slice(1, None, -1), slice(None, None, 1)) >>> s = sparse.random(shape, density, format="dok") >>> x = s.todense() >>> x array([[0. , 0. , 0. ], [0. , 0. , 0.32402132], [0. , 0. , 0. ]]) >>> s <DOK: shape=(3, 3), dtype=float64, nnz=1, fill_value=0.0> >>> s.todense() array([[0. , 0. , 0. ], [0. , 0. , 0.32402132], [0. , 0. , 0. ]]) >>> s[indices] <DOK: shape=(2, 3), dtype=float64, nnz=0, fill_value=0.0> >>> s[indices].todense() array([[0., 0., 0.], [0., 0., 0.]]) >>> x[indices] array([[0. , 0. , 0.32402132], [0. , 0. , 0. ]])
Expected behavior s[indices][0,2] should be 0.32402132
s[indices][0,2]
0.32402132
System
sparse
master
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
Indexing DOK with slices does not give the expected results
To Reproduce
Expected behavior
s[indices][0,2]
should be0.32402132
System
sparse
version:master
The text was updated successfully, but these errors were encountered: