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:
- func
callable()
- n_dims
int
, optional Number of core dimensions not broadcasted. Dimensions are skipped from the end. At minimum n_dims > 0.
- n_output
int
, optional Select number of results returned by
func
. If n_output > 1, ufunc returns a tuple of objects else returns an object.- n_input
int
, optional Number of array inputs to func, i.e.
n_input=2
means that func is called withfunc(ary1, ary2, *args, **kwargs)
- index
int
, optional Slice ndarray with
index
. Defaults toEllipsis
.- 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.
- func
- Returns:
callable()
ufunc wrapper for
func
.