Skip to content

Commit

Permalink
use module_available in nputils as well
Browse files Browse the repository at this point in the history
  • Loading branch information
keewis committed Jan 12, 2024
1 parent 2e4a4c3 commit c54b7fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xarray/core/nputils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
from xarray.core.utils import module_available

# remove once numpy 2.0 is the oldest supported version
try:
if module_available("numpy", minversion="2.0.0.dev0"):
from numpy.lib.array_utils import normalize_axis_index
except ImportError:
else:
from numpy.core.multiarray import normalize_axis_index # type: ignore[attr-defined]

# remove once numpy 2.0 is the oldest supported version
Expand Down

0 comments on commit c54b7fa

Please sign in to comment.