fields.components.FieldComponent.as_unyt_array#

FieldComponent.as_unyt_array() unyt_array[source]#

Return the buffer as a unit-aware unyt_array.

This includes the physical units associated with the buffer (if any), allowing for unit-aware operations using the unyt library.

Returns:

A unyt array view of the buffer, with units preserved.

Return type:

unyt.unyt_array