File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323
2424import numpy as np
2525
26+ try :
27+ from numpy .exceptions import VisibleDeprecationWarning # numpy >= 1.25
28+ except ImportError :
29+ from numpy import VisibleDeprecationWarning
30+
2631import matplotlib
2732from matplotlib import _api , _c_internal_utils
2833
@@ -1064,7 +1069,7 @@ def _combine_masks(*args):
10641069 raise ValueError ("Masked arrays must be 1-D" )
10651070 try :
10661071 x = np .asanyarray (x )
1067- except (np . VisibleDeprecationWarning , ValueError ):
1072+ except (VisibleDeprecationWarning , ValueError ):
10681073 # NumPy 1.19 raises a warning about ragged arrays, but we want
10691074 # to accept basically anything here.
10701075 x = np .asanyarray (x , dtype = object )
@@ -1658,7 +1663,7 @@ def index_of(y):
16581663 pass
16591664 try :
16601665 y = _check_1d (y )
1661- except (np . VisibleDeprecationWarning , ValueError ):
1666+ except (VisibleDeprecationWarning , ValueError ):
16621667 # NumPy 1.19 will warn on ragged input, and we can't actually use it.
16631668 pass
16641669 else :
You can’t perform that action at this time.
0 commit comments