ones_ref¶
- xarray_einstats.ones_ref(*args, dims, dtype=None)[source]¶
Create a ones DataArray from reference object(s).
Creates a DataArray filled with ones from reference DataArrays or Datasets and a list with the desired dimensions.
- Parameters:
- *argsiterable of (
xarray.DataArrayorxarray.Dataset) Reference objects from which the lengths and coordinate values (if any) of the given dims will be taken.
- dimssequence of hashable
List of dimensions of the output DataArray. Passed as is to the
DataArrayconstructor.- dtype
dtype, optional The dtype of the output array. If it is not provided it will be inferred from the reference DataArrays in args with
numpy.result_type.
- *argsiterable of (
- Returns: