Skip to content

Commit 2808634

Browse files
committed
Update access to _get_ndarray_c_version
Also removes special case for old unsupported numpy 1.16
1 parent fc3437f commit 2808634

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytensor/link/c/basic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,8 +1371,8 @@ def cmodule_key_(
13711371

13721372
# We must always add the numpy ABI version here as
13731373
# DynamicModule always add the include <numpy/arrayobject.h>
1374-
if np.lib.NumpyVersion(np.__version__) < "1.16.0a":
1375-
ndarray_c_version = np.core.multiarray._get_ndarray_c_version()
1374+
if np.lib.NumpyVersion(np.__version__) >= "2.0.0rc":
1375+
ndarray_c_version = np._core._multiarray_umath._get_ndarray_c_version()
13761376
else:
13771377
ndarray_c_version = np.core._multiarray_umath._get_ndarray_c_version()
13781378
sig.append(f"NPY_ABI_VERSION=0x{ndarray_c_version:X}")

0 commit comments

Comments
 (0)