Skip to content

Commit

Permalink
Update access to _get_ndarray_c_version
Browse files Browse the repository at this point in the history
Also removes special case for old unsupported numpy 1.16
  • Loading branch information
ricardoV94 committed Apr 5, 2024
1 parent fc3437f commit 2808634
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytensor/link/c/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1371,8 +1371,8 @@ def cmodule_key_(

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

0 comments on commit 2808634

Please sign in to comment.