xugrid.Ugrid2d.create_data_array#

Ugrid2d.create_data_array(data: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], facet: str) UgridDataArray[source]#

Create a UgridDataArray from this grid and a 1D array of values.

Parameters:
  • data (array like) – Values for this array. Must be a numpy.ndarray or castable to it.

  • grid (Ugrid1d, Ugrid2d)

  • facet (str) – With which facet to associate the data. Options for Ugrid1d are, "node" or "edge". Options for Ugrid2d are "node", "edge", or "face".

Returns:

uda

Return type:

UgridDataArray