scipy.special.chndtrinc#
- scipy.special.chndtrinc(x, df, p, out=None) = <wrapped_ufunc 'chndtrinc'>#
Inverse of
chndtrwith respect to nc.Finds the non-centrality parameter nc such that
\[\operatorname{chndtr}(x, df, nc) = p.\]- Parameters:
- xarray_like
Upper bound of the integral; must satisfy
x >= 0.- dfarray_like
Degrees of freedom; must satisfy
df > 0.- parray_like
Probability; must satisfy
0 <= p < 1.- outndarray, optional
Optional output array for the function results.
- Returns:
- ncscalar or ndarray
Non-centrality parameter.
See also
Notes
The noncentral chi squared distribution is also available in
scipy.stats.ncx2.This function wraps routines from the Boost Math C++ library [1].
Array API Standard Support
chndtrinchas support for Python Array API Standard compatible backends in addition to NumPy. The following combinations of backend and device (or other capability) are supported.Library
CPU
GPU
NumPy
✅
n/a
CuPy
n/a
⛔
PyTorch
✅
⛔
JAX
✅
⛔
Dask
✅
n/a
For the NumPy backend, this function supports all NumPy ufunc keyword arguments. Other backends may support
out, but typically none of the other ufunc kwargs.outis typically supported for CuPy and PyTorch, but not currently in cases where SciPy relies on a generic Array API implementation or, for PyTorch on CPU, falls back to the NumPy backend.outis never supported for JAX because JAX arrays are immutable.chndtrincdoes not currently supportoutfor the PyTorch backend.See Array API coverage for more information.
References
[1]The Boost Developers. “Boost C++ Libraries”. https://www.boost.org/.
Examples