DTensorFieldCoreMixin#

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

Core mixin methods for the DenseTensorField 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[, signature])

Construct a FieldComponent from an existing array-like object.

from_function(*args[, signature])

Construct a FieldComponent by evaluating a function on the grid.

full(*args[, signature])

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[, signature])

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[, signature])

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.