diff --git a/xarray/core/computation.py b/xarray/core/computation.py index bbaae1f5b36..7f60da7e1b2 100644 --- a/xarray/core/computation.py +++ b/xarray/core/computation.py @@ -1529,7 +1529,7 @@ def dot(*arrays, dims=None, **kwargs): join=join, dask="allowed", ) - return result.transpose(*[d for d in all_dims if d in result.dims]) + return result.transpose(*all_dims, missing_dims="ignore") def where(cond, x, y):