fields.mixins.base.DTensorFieldCoreMixin.full#

classmethod DTensorFieldCoreMixin.full(*args, signature: SignatureInput | None = None, **kwargs) _SupDTFieldCore[source]#

Create a dense field filled with a fill value.

This is a convenience constructor that builds a FieldComponent using the provided grid and axes, then wraps it in a DenseField.

Parameters:
  • grid (GridBase) – The structured grid over which the field is defined.

  • axes (list of str) – The spatial axes of the underlying coordinate system over which the field is defined. This must be some subset of the axes available in the coordinate system of grid.

  • rank (int, optional) – The rank of the tensor field being generated. This can be supplemented by specifying the signature below to determine the variance of each rank index.

  • *args – Additional positional arguments forwarded to the buffer constructor. The specific available args will depend on buffer_class and buffer_registry.

  • signature (int or list of int, optional) – The signature of the tensor field being generated. This should be a sequence of 1 and -1 with 1 marking a contravariant index and -1 a covariant index. The length must match that of rank. If not specified, signature defaults to a fully contravariant form.

  • buffer_class (str or BufferBase, optional) –

    The buffer class to use for holding the data. This may be specified as a string, in which case the buffer_registry is queried for a matching class or it may be a specific buffer class.

    The relevant *args and **kwargs arguments will be passed underlying buffer class’s .full() method.

  • buffer_registry (BufferRegistry, optional) – Custom registry to use for resolving buffer class strings. By default, the standard registry is used.

  • **kwargs – Additional keyword arguments forwarded to the buffer constructor (e.g., dtype, units).

Returns:

A new field object filled with fill_value and defined over the specified grid and axes.

Return type:

DenseField