@@ -1055,9 +1055,9 @@ def dot(*arrays, dims=None, **kwargs):
10551055 ----------
10561056 arrays: DataArray (or Variable) objects
10571057 Arrays to compute.
1058- dims: str or tuple of strings, optional
1059- Which dimensions to sum over.
1060- If not speciified , then all the common dimensions are summed over.
1058+ dims: '...', str or tuple of strings, optional
1059+ Which dimensions to sum over. Ellipsis ('...') sums over all dimensions.
1060+ If not specified , then all the common dimensions are summed over.
10611061 **kwargs: dict
10621062 Additional keyword arguments passed to numpy.einsum or
10631063 dask.array.einsum
@@ -1070,7 +1070,7 @@ def dot(*arrays, dims=None, **kwargs):
10701070 --------
10711071
10721072 >>> import numpy as np
1073- >>> import xarray as xp
1073+ >>> import xarray as xr
10741074 >>> da_a = xr.DataArray(np.arange(3 * 2).reshape(3, 2), dims=['a', 'b'])
10751075 >>> da_b = xr.DataArray(np.arange(3 * 2 * 2).reshape(3, 2, 2),
10761076 ... dims=['a', 'b', 'c'])
@@ -1117,6 +1117,14 @@ def dot(*arrays, dims=None, **kwargs):
11171117 [273, 446, 619]])
11181118 Dimensions without coordinates: a, d
11191119
1120+ >>> xr.dot(da_a, da_b)
1121+ <xarray.DataArray (c: 2)>
1122+ array([110, 125])
1123+ Dimensions without coordinates: c
1124+
1125+ >>> xr.dot(da_a, da_b, dims=...)
1126+ <xarray.DataArray ()>
1127+ array(235)
11201128 """
11211129 from .dataarray import DataArray
11221130 from .variable import Variable
@@ -1141,7 +1149,9 @@ def dot(*arrays, dims=None, **kwargs):
11411149 einsum_axes = "abcdefghijklmnopqrstuvwxyz"
11421150 dim_map = {d : einsum_axes [i ] for i , d in enumerate (all_dims )}
11431151
1144- if dims is None :
1152+ if dims is ...:
1153+ dims = all_dims
1154+ elif dims is None :
11451155 # find dimensions that occur more than one times
11461156 dim_counts = Counter ()
11471157 for arr in arrays :
0 commit comments