broadcastable_method#
- movement.utils.broadcasting.broadcastable_method(only_broadcastable_along=None, new_dimension_name=None)[source]#
Broadcast a class method along a
xarray.DataArray
dimension.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 appliesf
along thebroadcast_dimension
ofdata
.*args
and**kwargs
match those passed tof
, and retain the same interpretations.- Return type:
Callable
See also
make_broadcastable
The aliased decorator function.