arviz_stats.numba.array_stats.kde

Contents

arviz_stats.numba.array_stats.kde#

array_stats.kde(ary, axis=-1, circular=False, grid_len=512, **kwargs)#

Compute the guvectorized kde.

Parameters:
aryarray_like

Input array.

axisint, sequence of int or None, default -1

Axis or axes along which the KDE is computed.

circularbool, default False

Whether the data is circular (e.g., angles).

grid_lenint, default 512

Number of points on the KDE grid.

**kwargsdict, optional

Additional keyword arguments passed to the KDE implementation. Supported arguments include:

  • bwstr or float, optional

    The bandwidth of the kernel. Options include “scott” (default), “silverman”, “isj”, and “experimental”, or a positive float.

  • adaptivebool, optional

    Whether to use an adaptive KDE. Defaults to False.

Notes

There currenly is no jit compiling of the kde computation steps other than the histogram computation. Numba is only used for ufunc generation. The ufunc is cached the first time to avoid unnecessary compilation while ensuring the proper method of the initialized class is the one being guvectorized.