Skip to content

Commit

Permalink
MNT: Handle normalize_axis_index for old numpy
Browse files Browse the repository at this point in the history
It's just a nice helper for better error messages, so we can just
backport as a noop.
  • Loading branch information
dopplershift committed Jan 3, 2018
1 parent 379a8bf commit f73d4b8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion metpy/calc/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
import warnings

import numpy as np
from numpy.core.numeric import normalize_axis_index
try:
from numpy.core.numeric import normalize_axis_index
except ImportError: # Only available in numpy >=1.13.0
def normalize_axis_index(a, n):
"""No op version of :func:`numpy.core.numeric.normalize_axis_index`."""
return a
import numpy.ma as ma
from scipy.spatial import cKDTree

Expand Down

0 comments on commit f73d4b8

Please sign in to comment.