broadcastable_method#
- movement.utils.broadcasting.broadcastable_method(only_broadcastable_along=None, new_dimension_name=None)[source]#
Broadcast a class method along a
xarray.DataArraydimension.This is a convenience wrapper for
make_broadcastable(is_classmethod = True), for use when extending class methods that act on coordinates, that we wish to cast across the axes of anxarray.DataArray.- Returns:
Callable with signature
(self,) data, *args, broadcast_dimension = str, **kwargs, that appliesfalong thebroadcast_dimensionofdata.*argsand**kwargsmatch those passed tof, and retain the same interpretations.- Return type:
Callable[[Callable[[Concatenate[TypeVar(Self),TypeAliasType,ParamSpec(P, bound=None)]],TypeVar(ScalarOr1D,float,int,bool,TypeAliasType)]],Callable[[Concatenate[TypeVar(Self),DataArray,ParamSpec(P, bound=None)]],DataArray]]
See also
make_broadcastableThe aliased decorator function.