7
7
8
8
from . import dtypes , duck_array_ops , nputils , ops
9
9
from .arithmetic import SupportsArithmetic
10
- from .common import ALL_DIMS , ImplementsArrayReduce , ImplementsDatasetReduce
10
+ from .common import ImplementsArrayReduce , ImplementsDatasetReduce
11
11
from .concat import concat
12
12
from .formatting import format_array_flat
13
13
from .options import _get_keep_attrs
@@ -712,7 +712,7 @@ def quantile(self, q, dim=None, interpolation="linear", keep_attrs=None):
712
712
q : float in range of [0,1] (or sequence of floats)
713
713
Quantile to compute, which must be between 0 and 1
714
714
inclusive.
715
- dim : xarray.ALL_DIMS , str or sequence of str, optional
715
+ dim : `...` , str or sequence of str, optional
716
716
Dimension(s) over which to apply quantile.
717
717
Defaults to the grouped dimension.
718
718
interpolation : {'linear', 'lower', 'higher', 'midpoint', 'nearest'}
@@ -769,7 +769,7 @@ def reduce(
769
769
Function which can be called in the form
770
770
`func(x, axis=axis, **kwargs)` to return the result of collapsing
771
771
an np.ndarray over an integer valued axis.
772
- dim : xarray.ALL_DIMS , str or sequence of str, optional
772
+ dim : `...` , str or sequence of str, optional
773
773
Dimension(s) over which to apply `func`.
774
774
axis : int or sequence of int, optional
775
775
Axis(es) over which to apply `func`. Only one of the 'dimension'
@@ -794,9 +794,9 @@ def reduce(
794
794
if keep_attrs is None :
795
795
keep_attrs = _get_keep_attrs (default = False )
796
796
797
- if dim is not ALL_DIMS and dim not in self .dims :
797
+ if dim is not ... and dim not in self .dims :
798
798
raise ValueError (
799
- "cannot reduce over dimension %r. expected either xarray.ALL_DIMS to reduce over all dimensions or one or more of %r."
799
+ "cannot reduce over dimension %r. expected either '...' to reduce over all dimensions or one or more of %r."
800
800
% (dim , self .dims )
801
801
)
802
802
@@ -867,7 +867,7 @@ def reduce(self, func, dim=None, keep_attrs=None, **kwargs):
867
867
Function which can be called in the form
868
868
`func(x, axis=axis, **kwargs)` to return the result of collapsing
869
869
an np.ndarray over an integer valued axis.
870
- dim : xarray.ALL_DIMS , str or sequence of str, optional
870
+ dim : `...` , str or sequence of str, optional
871
871
Dimension(s) over which to apply `func`.
872
872
axis : int or sequence of int, optional
873
873
Axis(es) over which to apply `func`. Only one of the 'dimension'
@@ -895,9 +895,9 @@ def reduce(self, func, dim=None, keep_attrs=None, **kwargs):
895
895
def reduce_dataset (ds ):
896
896
return ds .reduce (func , dim , keep_attrs , ** kwargs )
897
897
898
- if dim is not ALL_DIMS and dim not in self .dims :
898
+ if dim is not ... and dim not in self .dims :
899
899
raise ValueError (
900
- "cannot reduce over dimension %r. expected either xarray.ALL_DIMS to reduce over all dimensions or one or more of %r."
900
+ "cannot reduce over dimension %r. expected either '...' to reduce over all dimensions or one or more of %r."
901
901
% (dim , self .dims )
902
902
)
903
903
0 commit comments