Skip to content

Commit 73c8b3c

Browse files
committed
assert instead of raise
1 parent 9cc059f commit 73c8b3c

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

cupy/cuda/cub.pyx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ cpdef _preprocess_array(ndarray arr, axis, bint keepdims, str order):
7474
axis_permutes = out_axis + reduce_axis
7575
elif order == 'F':
7676
axis_permutes = reduce_axis + out_axis
77-
if axis_permutes != tuple(range(len(arr.shape))):
78-
raise ValueError('should not happen')
77+
assert axis_permutes == tuple(range(len(arr.shape)))
7978

8079
for axis in reduce_axis:
8180
contiguous_size *= arr.shape[axis]

0 commit comments

Comments
 (0)