MCPcopy Index your code
hub / github.com/pydata/xarray / _broadcast_compat_variables

Function _broadcast_compat_variables

xarray/core/variable.py:3030–3037  ·  view source on GitHub ↗

Create broadcast compatible variables, with the same dimensions. Unlike the result of broadcast_variables(), some variables may have dimensions of size 1 instead of the size of the broadcast dimension.

(*variables)

Source from the content-addressed store, hash-verified

3028
3029
3030def _broadcast_compat_variables(*variables):
3031 """Create broadcast compatible variables, with the same dimensions.
3032
3033 Unlike the result of broadcast_variables(), some variables may have
3034 dimensions of size 1 instead of the size of the broadcast dimension.
3035 """
3036 dims = tuple(_unified_dims(variables))
3037 return tuple(var.set_dims(dims) if var.dims != dims else var for var in variables)
3038
3039
3040def broadcast_variables(*variables: Variable) -> tuple[Variable, ...]:

Callers 2

_broadcast_compat_dataFunction · 0.85

Calls 2

_unified_dimsFunction · 0.85
set_dimsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…