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 of str) – 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 or BufferBase, optional) – Optional target to write the expanded data into. If a FieldComponent, its shape and units will be checked. If a BufferBase, 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, default False) – 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.