Skip to content

Instantly share code, notes, and snippets.

@pitrou
Created October 12, 2015 19:36
Show Gist options
  • Save pitrou/5a629da1c8d6e1f824cd to your computer and use it in GitHub Desktop.
Save pitrou/5a629da1c8d6e1f824cd to your computer and use it in GitHub Desktop.
diff --git a/numba/cuda/tests/cudapy/test_record_dtype.py b/numba/cuda/tests/cudapy/test_record_dtype.py
index cbe44c1..a457b04 100644
--- a/numba/cuda/tests/cudapy/test_record_dtype.py
+++ b/numba/cuda/tests/cudapy/test_record_dtype.py
@@ -127,8 +127,11 @@ class TestRecordDtype(unittest.TestCase):
for i in range(self.sample1d.size):
got = self.sample1d.copy()
- expect = np.recarray(got.shape, got.dtype)
- expect[:] = got
+ if numpy_support.version <= (1, 9):
+ expect = np.recarray(got.shape, got.dtype)
+ expect[:] = got
+ else:
+ expect = got.copy()
cfunc(got, i, value)
pyfunc(expect, i, value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment