exp
Compute the exponentiale**x for each element.
| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Input array (exponents). |
NDArray — Element-wise e**x.
exp2
Compute2**x for each element.
| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Input array (exponents). |
NDArray — Element-wise 2**x.
expm1
Computeexp(x) - 1 for each element. More accurate than exp(x) - 1 for small values of x.
| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Input array. |
NDArray — Element-wise e**x - 1.
log
Natural logarithm, element-wise. The natural log is the inverse of the exponential function: ify = exp(x), then x = log(y).
| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Input array. Values must be positive. |
NDArray — Element-wise natural logarithm (base e).
log2
Base-2 logarithm, element-wise.| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Input array. Values must be positive. |
NDArray — Element-wise base-2 logarithm.
log10
Base-10 logarithm, element-wise.| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Input array. Values must be positive. |
NDArray — Element-wise base-10 logarithm.
log1p
Natural logarithm of1 + x, element-wise. More accurate than log(1 + x) for small values of x.
| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Input array. Values must be greater than -1. |
NDArray — Element-wise ln(1 + x).
logaddexp
Logarithm of the sum of exponentiations:log(exp(x1) + exp(x2)). Useful for computing log-probabilities.
This is a binary operation.
| Name | Type | Default | Description |
|---|---|---|---|
x1 | ArrayLike | - | First input array. |
x2 | ArrayLike | number | - | Second input array or scalar. |
NDArray — Element-wise log(exp(x1) + exp(x2)).
logaddexp2
Logarithm base 2 of the sum of exponentiations:log2(2**x1 + 2**x2).
This is a binary operation.
| Name | Type | Default | Description |
|---|---|---|---|
x1 | ArrayLike | - | First input array. |
x2 | ArrayLike | number | - | Second input array or scalar. |
NDArray — Element-wise log2(2**x1 + 2**x2).