DFieldCoreMixin#

class fields.mixins.base.DFieldCoreMixin[source]#

Core mixin methods for the DenseField class.

Methods

__init__()

as_array()

Return the underlying buffer as a NumPy array.

as_unyt_array()

Return the underlying buffer as a unyt array with units.

from_array(*args, **kwargs)

Construct a FieldComponent from an existing array-like object.

from_function(*args, **kwargs)

Construct a FieldComponent by evaluating a function on the grid.

full(*args, **kwargs)

Create a dense field filled with a fill value.

full_like(other, *args, **kwargs)

Create a full-valued component with the same grid, axes, and element shape as another.

ones(*args, **kwargs)

Create a dense field filled with ones.

ones_like(other, *args, **kwargs)

Create a one-filled component with the same grid, axes, and element shape as another.

zeros(*args, **kwargs)

Create a dense field filled with zeros.

zeros_like(other, *args, **kwargs)

Create a zero-filled component with the same grid, axes, and element shape as another.