fields.mixins.components.FieldComponentCoreMixin.expand_axes#
- FieldComponentCoreMixin.expand_axes(axes: AxesInput, *args, out: _SupFCCore | BufferBase | None = None, buffer_class: Type[BufferBase] | None = None, buffer_registry: BufferRegistry | None = None, check_units: bool = False, **kwargs) _SupFCCore [source]#
Broadcast and tile an existing
FieldComponent
to an expanded set of axes.- Parameters:
axes (
list
ofstr
) – The full set of axes to expand to. Must include all existing axes. All axes must be coordinate axes of the underlying coordinate system.out (
FieldComponent
orBufferBase
, optional) – Optional target to write the expanded data into. If aFieldComponent
, its shape and units will be checked. If aBufferBase
, only the buffer is reused.buffer_class (
type
, optional) – If no out is given, this buffer class is used to construct a new one.buffer_registry (
BufferRegistry
, optional) – Registry used to resolve string buffer types.check_units (
bool
, defaultFalse
) – If True and out is a FieldComponent, units must match.*args – Forwarded to buffer constructor if a new one is created.
**kwargs – Forwarded to buffer constructor if a new one is created.
- Returns:
A new field component with fully realized axes.
- Return type:
FieldComponent
- Raises:
ValueError – If axes are not compatible or out is incompatible.