Broadcast this DataArray against another Dataset or DataArray. This is equivalent to xr.broadcast(other, self)[1] Parameters ---------- other : Dataset or DataArray Object against which to broadcast this array. exclude : iterable of hashable, opti
(
self,
other: T_DataArrayOrSet,
exclude: Iterable[Hashable] | None = None,
)
| 3334 | return self.isel(indexers_slices) |
| 3335 | |
| 3336 | def broadcast_like( |
| 3337 | self, |
| 3338 | other: T_DataArrayOrSet, |
| 3339 | exclude: Iterable[Hashable] | None = None, |
| 3340 | ) -> Self: |
| 3341 | """Broadcast this DataArray against another Dataset or DataArray. |
| 3342 | This is equivalent to xr.broadcast(other, self)[1] |
| 3343 | |
| 3344 | Parameters |
| 3345 | ---------- |
| 3346 | other : Dataset or DataArray |
| 3347 | Object against which to broadcast this array. |
| 3348 | exclude : iterable of hashable, optional |
| 3349 | Dimensions that must not be broadcasted |
| 3350 | |
| 3351 | """ |
| 3352 | if exclude is None: |
| 3353 | exclude = set() |
| 3354 | else: |
| 3355 | exclude = set(exclude) |
| 3356 | args = align(other, self, join="outer", copy=False, exclude=exclude) |
| 3357 | |
| 3358 | dims_map, common_coords = _get_broadcast_dims_map_common_coords(args, exclude) |
| 3359 | |
| 3360 | return _broadcast_helper(args[1], exclude, dims_map, common_coords) |
| 3361 | |
| 3362 | def _reindex_callback( |
| 3363 | self, |