From 1ab529a16b492617770e0791fcc60e3296095320 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Mon, 22 Dec 2025 18:36:13 -0500 Subject: [PATCH] Fix #1417: Fix test for Numpy 2.4.0 (#1418) * Fix #1417: Fix test for Numpy 2.4.0 * Slightly improve logic (cherry picked from commit 46470cae54e152d726b4f0b1f107654bde45e805) --- cuda_core/tests/test_utils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cuda_core/tests/test_utils.py b/cuda_core/tests/test_utils.py index b185489df2..a3c62a6aee 100644 --- a/cuda_core/tests/test_utils.py +++ b/cuda_core/tests/test_utils.py @@ -96,10 +96,7 @@ def _check_view(self, view, in_arr): assert view.shape == in_arr.shape assert view.size == in_arr.size strides_in_counts = convert_strides_to_counts(in_arr.strides, in_arr.dtype.itemsize) - if in_arr.flags.c_contiguous: - assert view.strides is None - else: - assert view.strides == strides_in_counts + assert (in_arr.flags.c_contiguous and view.strides is None) or view.strides == strides_in_counts assert view.dtype == in_arr.dtype assert view.device_id == -1 assert view.is_device_accessible is False