fields.components.FieldComponent.as_buffer_repr#

FieldComponent.as_buffer_repr() Any[source]#

Return a NumPy-compatible representation of the buffer.

This representation is used for NumPy ufunc compatibility and typically returns a view or copy of the data suitable for elementwise operations.

For unit-aware buffers, this may return a unyt_array; for others, a NumPy array.

Returns:

A NumPy-compatible array suitable for broadcasting and ufunc evaluation.

Return type:

Any