Skip to content

Commit e0a11ef

Browse files
Fix #1417: Fix test for Numpy 2.4.0 (#1418) (#1476)
Co-authored-by: Michael Droettboom <mdboom@gmail.com> Fix #1417: Fix test for Numpy 2.4.0
1 parent 81c83f2 commit e0a11ef

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cuda_core/tests/test_utils.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,7 @@ def _check_view(self, view, in_arr):
9696
assert view.shape == in_arr.shape
9797
assert view.size == in_arr.size
9898
strides_in_counts = convert_strides_to_counts(in_arr.strides, in_arr.dtype.itemsize)
99-
if in_arr.flags.c_contiguous:
100-
assert view.strides is None
101-
else:
102-
assert view.strides == strides_in_counts
99+
assert (in_arr.flags.c_contiguous and view.strides is None) or view.strides == strides_in_counts
103100
assert view.dtype == in_arr.dtype
104101
assert view.device_id == -1
105102
assert view.is_device_accessible is False

0 commit comments

Comments
 (0)