fields.mixins.base.DTensorFieldCoreMixin.as_unyt_array#

DTensorFieldCoreMixin.as_unyt_array()#

Return the underlying buffer as a unyt array with units.

This method extracts the field’s data buffer and returns it as a unyt.unyt_array, preserving physical units and dimensionality.

Returns:

The unit-aware array representing the field’s data.

Return type:

unyt.unyt_array