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
👀 Some source code analysis tools can help to find opportunities for improving software components. 💭 I propose to increase the usage of augmented assignment statements accordingly.
diff --git a/sparse/_compressed/indexing.py b/sparse/_compressed/indexing.py index df35a6c..abe270a 100644 --- a/sparse/_compressed/indexing.py +++ b/sparse/_compressed/indexing.py @@ -151,7 +151,7 @@ def getitem(x, key): indptr = np.empty(shape[0] + 1, dtype=x.indptr.dtype) indptr[0] = 0 np.cumsum(np.bincount(uncompressed, minlength=shape[0]), out=indptr[1:]) - indices = indices % size + indices %= size arg = (data, indices, indptr) diff --git a/sparse/_slicing.py b/sparse/_slicing.py index 4e46244..7169ead 100644 --- a/sparse/_slicing.py +++ b/sparse/_slicing.py @@ -40,7 +40,7 @@ def normalize_index(idx, shape): continue else: n_sliced_dims += 1 - idx = idx + (slice(None),) * (len(shape) - n_sliced_dims) + idx += (slice(None),) * (len(shape) - n_sliced_dims) if len([i for i in idx if i is not None]) > len(shape): raise IndexError("Too many indices for array")
The text was updated successfully, but these errors were encountered:
Hey, would you be willing to make a PR?
Sorry, something went wrong.
Convert two assignments to augmented source code #531 (#586)
1826ad9
This was closed.
No branches or pull requests
👀 Some source code analysis tools can help to find opportunities for improving software components.
💭 I propose to increase the usage of augmented assignment statements accordingly.
The text was updated successfully, but these errors were encountered: