@@ -5804,74 +5804,6 @@ def min(self, axis=None, out=None, fill_value=None, keepdims=np._NoValue):
5804
5804
np .copyto (out , np .nan , where = newmask )
5805
5805
return out
5806
5806
5807
- # unique to masked arrays
5808
- def mini (self , axis = None ):
5809
- """
5810
- Return the array minimum along the specified axis.
5811
-
5812
- .. deprecated:: 1.13.0
5813
- This function is identical to both:
5814
-
5815
- * ``self.min(keepdims=True, axis=axis).squeeze(axis=axis)``
5816
- * ``np.ma.minimum.reduce(self, axis=axis)``
5817
-
5818
- Typically though, ``self.min(axis=axis)`` is sufficient.
5819
-
5820
- Parameters
5821
- ----------
5822
- axis : int, optional
5823
- The axis along which to find the minima. Default is None, in which case
5824
- the minimum value in the whole array is returned.
5825
-
5826
- Returns
5827
- -------
5828
- min : scalar or MaskedArray
5829
- If `axis` is None, the result is a scalar. Otherwise, if `axis` is
5830
- given and the array is at least 2-D, the result is a masked array with
5831
- dimension one smaller than the array on which `mini` is called.
5832
-
5833
- Examples
5834
- --------
5835
- >>> x = np.ma.array(np.arange(6), mask=[0 ,1, 0, 0, 0 ,1]).reshape(3, 2)
5836
- >>> x
5837
- masked_array(
5838
- data=[[0, --],
5839
- [2, 3],
5840
- [4, --]],
5841
- mask=[[False, True],
5842
- [False, False],
5843
- [False, True]],
5844
- fill_value=999999)
5845
- >>> x.mini()
5846
- masked_array(data=0,
5847
- mask=False,
5848
- fill_value=999999)
5849
- >>> x.mini(axis=0)
5850
- masked_array(data=[0, 3],
5851
- mask=[False, False],
5852
- fill_value=999999)
5853
- >>> x.mini(axis=1)
5854
- masked_array(data=[0, 2, 4],
5855
- mask=[False, False, False],
5856
- fill_value=999999)
5857
-
5858
- There is a small difference between `mini` and `min`:
5859
-
5860
- >>> x[:,1].mini(axis=0)
5861
- masked_array(data=3,
5862
- mask=False,
5863
- fill_value=999999)
5864
- >>> x[:,1].min(axis=0)
5865
- 3
5866
- """
5867
-
5868
- # 2016-04-13, 1.13.0, gh-8764
5869
- warnings .warn (
5870
- "`mini` is deprecated; use the `min` method or "
5871
- "`np.ma.minimum.reduce instead." ,
5872
- DeprecationWarning , stacklevel = 2 )
5873
- return minimum .reduce (self , axis )
5874
-
5875
5807
def max (self , axis = None , out = None , fill_value = None , keepdims = np ._NoValue ):
5876
5808
"""
5877
5809
Return the maximum along a given axis.
@@ -6719,15 +6651,9 @@ def __init__(self, ufunc, compare, fill_value):
6719
6651
self .compare = compare
6720
6652
self .fill_value_func = fill_value
6721
6653
6722
- def __call__ (self , a , b = None ):
6654
+ def __call__ (self , a , b ):
6723
6655
"Executes the call behavior."
6724
- if b is None :
6725
- # 2016-04-13, 1.13.0
6726
- warnings .warn (
6727
- f"Single-argument form of np.ma.{ self .__name__ } is deprecated. Use "
6728
- f"np.ma.{ self .__name__ } .reduce instead." ,
6729
- DeprecationWarning , stacklevel = 2 )
6730
- return self .reduce (a )
6656
+
6731
6657
return where (self .compare (a , b ), a , b )
6732
6658
6733
6659
def reduce (self , target , axis = np ._NoValue ):
@@ -8090,12 +8016,6 @@ def asanyarray(a, dtype=None):
8090
8016
# Pickling #
8091
8017
##############################################################################
8092
8018
8093
- def _pickle_warn (method ):
8094
- # NumPy 1.15.0, 2017-12-10
8095
- warnings .warn (
8096
- f"np.ma.{ method } is deprecated, use pickle.{ method } instead" ,
8097
- DeprecationWarning , stacklevel = 3 )
8098
-
8099
8019
8100
8020
def fromfile (file , dtype = float , count = - 1 , sep = '' ):
8101
8021
raise NotImplementedError (
0 commit comments