Skip to content

Commit

Permalink
Merge pull request #63 from tylerjereddy/treddy_numpy_2_axis_tuple
Browse files Browse the repository at this point in the history
MAINT: NumPy normalize_axis_tuple
  • Loading branch information
asmeurer authored Oct 18, 2023
2 parents 5c82ea3 + 8117a4b commit affd3a5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion array_api_compat/common/_linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
from typing import Literal, Optional, Sequence, Tuple, Union
from ._typing import ndarray

from numpy.core.numeric import normalize_axis_tuple
import numpy as np
if np.__version__[0] == "2":
from numpy.lib.array_utils import normalize_axis_tuple
else:
from numpy.core.numeric import normalize_axis_tuple

from ._aliases import matmul, matrix_transpose, tensordot, vecdot
from .._internal import get_xp
Expand Down

0 comments on commit affd3a5

Please sign in to comment.