From bf5def59063dcb66fd1c52e2e6323e82b00bb8aa Mon Sep 17 00:00:00 2001 From: Marcin Rogowski Date: Sun, 23 Jun 2024 17:30:49 +0200 Subject: [PATCH] Fix for numpy-2.0 (#38) --- src/shmem4py/shmem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shmem4py/shmem.py b/src/shmem4py/shmem.py index 3d373b7..d56e37a 100644 --- a/src/shmem4py/shmem.py +++ b/src/shmem4py/shmem.py @@ -883,7 +883,7 @@ def array( Valid hints are defined as enumerations in `MALLOC` and can be combined using the bitwise OR operator. Keyword argument only. """ - tmp = np.array(obj, dtype, copy=False, order=order) + tmp = np.asarray(obj, dtype, order=order) a = new_array(tmp.size, tmp.dtype, align=align, hints=hints, clear=False) a.shape = tmp.shape if tmp.ndim > 1: