weldx.util.xr_interp_like(da1, da2, interp_coords=None, broadcast_missing=False, fillna=True, method='linear', assume_sorted=False)#

Interpolate DataArray along dimensions of another DataArray.

Provides some utility options for handling out of range values and broadcasting.

  • da1 (DataArray) – xarray object with data to interpolate

  • da2 (DataArray | dict[str, Any]) – xarray or dict-like object along which dimensions to interpolate

  • interp_coords (Optional[list[str]]) – if not None, only interpolate along these coordinates of da2 (Default value = None)

  • broadcast_missing (bool) – broadcast da1 along all additional dimensions of da2 (Default value = False)

  • fillna (bool) – fill out of range NaN values (Default value = True)

  • method (str) – interpolation method to pass on to xarray.interp_like (Default value = “linear”)

  • assume_sorted (bool) – assume_sorted flag to pass on to xarray.interp_like (Default value = False)


The interpolated DataArray. Important: All unit information (data and coordinates) is stored in quantified, form, meaning: The xarray data will be a quantity and coordinates will have a Unit object in their attributes.

Return type: