scipy.special.inv_boxcox#
- scipy.special.inv_boxcox(y, lmbda, out=None) = <ufunc 'inv_boxcox'>#
Compute the inverse of the Box-Cox transformation.
Find
x
such that:y = (x**lmbda - 1) / lmbda if lmbda != 0 log(x) if lmbda == 0
- Parameters:
- yarray_like
Data to be transformed.
- lmbdaarray_like
Power parameter of the Box-Cox transform.
- outndarray, optional
Optional output array for the function values
- Returns:
- xscalar or ndarray
Transformed data.
Notes
Added in version 0.16.0.
inv_boxcox
has experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variableSCIPY_ARRAY_API=1
and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported.Library
CPU
GPU
NumPy
✅
n/a
CuPy
n/a
✅
PyTorch
✅
⛔
JAX
⚠️ no JIT
⛔
Dask
✅
n/a
See Support for the array API standard for more information.
Examples
>>> from scipy.special import boxcox, inv_boxcox >>> y = boxcox([1, 4, 10], 2.5) >>> inv_boxcox(y, 2.5) array([1., 4., 10.])