uxarray.UxDataset.to_array

uxarray.UxDataset.to_array#

UxDataset.to_array(dim='variable', name=None)#

Convert this uxarray.UxDataset into a uxarray.UxDataArray, attaching this UxDataset’s uxgrid to the result.

Similarly to xarray.Dataset.to_array(), the data variables will be broadcast against each other and stacked along the first axis of the new array. All coordinates of this dataset will remain coordinates.

Parameters:
  • dim (Hashable, optional) – Name of the new dimension. Defaults to “variable”

  • name (Hashable or None, optional) – Name of the new data array.

Returns:

The uxarray.UxDataset represented as a uxarray.UxDataArray

Return type:

UxDataArray