Skip to content

Commit ba454fb

Browse files
committed
Make array_api_strict importable in both NumPy 1 and 2
1 parent 9b26969 commit ba454fb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

array_api_strict/linalg.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
from ._elementwise_functions import conj
1414
from ._array_object import Array
1515

16-
from numpy._core.numeric import normalize_axis_tuple
16+
try:
17+
from numpy._core.numeric import normalize_axis_tuple
18+
except ImportError:
19+
from numpy.core.numeric import normalize_axis_tuple
1720

1821
from typing import TYPE_CHECKING
1922
if TYPE_CHECKING:

0 commit comments

Comments
 (0)