77
88from . import dtypes , duck_array_ops , nputils , ops
99from .arithmetic import SupportsArithmetic
10- from .common import ALL_DIMS , ImplementsArrayReduce , ImplementsDatasetReduce
10+ from .common import ImplementsArrayReduce , ImplementsDatasetReduce
1111from .concat import concat
1212from .formatting import format_array_flat
1313from .options import _get_keep_attrs
@@ -712,7 +712,7 @@ def quantile(self, q, dim=None, interpolation="linear", keep_attrs=None):
712712 q : float in range of [0,1] (or sequence of floats)
713713 Quantile to compute, which must be between 0 and 1
714714 inclusive.
715- dim : xarray.ALL_DIMS , str or sequence of str, optional
715+ dim : `...` , str or sequence of str, optional
716716 Dimension(s) over which to apply quantile.
717717 Defaults to the grouped dimension.
718718 interpolation : {'linear', 'lower', 'higher', 'midpoint', 'nearest'}
@@ -769,7 +769,7 @@ def reduce(
769769 Function which can be called in the form
770770 `func(x, axis=axis, **kwargs)` to return the result of collapsing
771771 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
773773 Dimension(s) over which to apply `func`.
774774 axis : int or sequence of int, optional
775775 Axis(es) over which to apply `func`. Only one of the 'dimension'
@@ -794,9 +794,9 @@ def reduce(
794794 if keep_attrs is None :
795795 keep_attrs = _get_keep_attrs (default = False )
796796
797- if dim is not ALL_DIMS and dim not in self .dims :
797+ if dim is not ... and dim not in self .dims :
798798 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."
800800 % (dim , self .dims )
801801 )
802802
@@ -867,7 +867,7 @@ def reduce(self, func, dim=None, keep_attrs=None, **kwargs):
867867 Function which can be called in the form
868868 `func(x, axis=axis, **kwargs)` to return the result of collapsing
869869 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
871871 Dimension(s) over which to apply `func`.
872872 axis : int or sequence of int, optional
873873 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):
895895 def reduce_dataset (ds ):
896896 return ds .reduce (func , dim , keep_attrs , ** kwargs )
897897
898- if dim is not ALL_DIMS and dim not in self .dims :
898+ if dim is not ... and dim not in self .dims :
899899 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."
901901 % (dim , self .dims )
902902 )
903903
0 commit comments