space_broadcastable#

movement.utils.broadcasting.space_broadcastable(is_classmethod=False, new_dimension_name=None)[source]#

Broadcast a 1D function along the ‘space’ dimension.

This is a convenience wrapper for make_broadcastable(only_broadcastable_along='space'), and is primarily useful when we want to write a function that acts on coordinates, that can only be cast across the ‘space’ dimension of an xarray.DataArray.

Returns:

Callable with signature (self,) data, *args, broadcast_dimension = str, **kwargs, that applies f along the broadcast_dimension of data. *args and **kwargs match those passed to f, and retain the same interpretations.

Return type:

Callable

See also

make_broadcastable

The aliased decorator function.