fields.mixins.components.FieldComponentCoreMixin.broadcast_to_unyt_array_in_axes#

FieldComponentCoreMixin.broadcast_to_unyt_array_in_axes(axes: AxesInput, **kwargs) unyt_array[source]#

Return the field data as a unit-aware unyt_array broadcasted to specified axes.

This reshapes the array to match the specified axes, preserving any attached units.

Parameters:
  • axes (list of str) – Target axes to broadcast over.

  • **kwargs – Additional keyword arguments passed to np.broadcast_to.

Returns:

The field data as a unit-aware array aligned with the given axes.

Return type:

unyt.unyt_array