arviz.make_ufunc#

arviz.make_ufunc(func, n_dims=2, n_output=1, n_input=1, index=Ellipsis, ravel=True, check_shape=None)[source]#

Make ufunc from a function taking 1D array input.

Parameters:
funccallable()
n_dimsint, optional

Number of core dimensions not broadcasted. Dimensions are skipped from the end. At minimum n_dims > 0.

n_outputint, optional

Select number of results returned by func. If n_output > 1, ufunc returns a tuple of objects else returns an object.

n_inputint, optional

Number of array inputs to func, i.e. n_input=2 means that func is called with func(ary1, ary2, *args, **kwargs)

indexint, optional

Slice ndarray with index. Defaults to Ellipsis.

ravelbool, optional

If true, ravel the ndarray before calling func.

check_shape: bool, optional

If false, do not check if the shape of the output is compatible with n_dims and n_output. By default, True only for n_input=1. If n_input is larger than 1, the last input array is used to check the shape, however, shape checking with multiple inputs may not be correct.

Returns:
callable()

ufunc wrapper for func.