arviz.wrap_xarray_ufunc#

arviz.wrap_xarray_ufunc(ufunc, *datasets, ufunc_kwargs=None, func_args=None, func_kwargs=None, dask_kwargs=None, **kwargs)[source]#

Wrap make_ufunc with xarray.apply_ufunc.

Parameters:
ufunccallable()
*datasetsxarray.Dataset
ufunc_kwargsdict
Keyword arguments passed to make_ufunc.
  • ‘n_dims’, int, by default 2

  • ‘n_output’, int, by default 1

  • ‘n_input’, int, by default len(datasets)

  • ‘index’, slice, by default Ellipsis

  • ‘ravel’, bool, by default True

func_argstuple

Arguments passed to ‘ufunc’.

func_kwargsdict
Keyword arguments passed to ‘ufunc’.
  • ‘out_shape’, int, by default None

dask_kwargsdict

Dask related kwargs passed to xarray.apply_ufunc(). Use enable_dask method of arviz.Dask to set default kwargs.

**kwargs

Passed to xarray.apply_ufunc().

Returns:
xarray.Dataset