bundles / scipy latest / scipy / special / _basic / softplus
function
scipy.special._basic:softplus
source: build-install/usr/lib/python3.14/site-packages/scipy/special/_basic.py:3784
Signature
def softplus(x, **kwargs)Summary
Compute the softplus function element-wise.
Extended Summary
The softplus function is defined as: softplus(x) = log(1 + exp(x)). It is a smooth approximation of the rectifier function (ReLU).
Parameters
x: array_likeInput value.
**kwargsFor other keyword-only arguments, see the ufunc docs.
Returns
softplus: ndarrayLogarithm of
exp(0) + exp(x).
Examples
from scipy import special
✓special.softplus(0)
✗np.float64(0.6931471805599453)
special.softplus([-1, 0, 1])
✗array([0.31326, 0.69315, 1.31326])
Aliases
scipy.special.softplus