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.
- axis
int, sequence ofintorNone, default -1 Axis or axes along which the KDE is computed.
- circularbool, default
False Whether the data is circular (e.g., angles).
- grid_len
int, default 512 Number of points on the KDE grid.
- **kwargs
dict, 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
histogramcomputation. 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.