We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd42256 commit 21817d5Copy full SHA for 21817d5
sparse/compressed/convert.py
@@ -40,8 +40,8 @@ def transform_shape(shape):
40
"""
41
shape_bins = np.empty(len(shape),dtype=np.intp)
42
shape_bins[-1] = 1
43
- for i in range(len(shape)-1):
44
- shape_bins[i] = np.prod(shape[i:-1])
+ for i in range(len(shape)-2,-1,-1):
+ shape_bins[i] = np.prod(shape[i+1:])
45
return shape_bins
46
47
@numba.jit(nopython=True, nogil=True)
0 commit comments