exp
Description
Calculate the base-e exponential of each element in the input. That is,
.
Mandatory Input Parameters
Parameter |
Type |
Description |
|---|---|---|
x |
array_like |
Input array or scalar |
Optional Input Parameters
Return Value
Type |
Description |
|---|---|
ndarray/scalar |
Element-wise base-e exponential of x |
Examples
>>> import numpy as np >>> np.exp(1.0) 2.718281828459045 >>> >>> x = np.arange(4) >>> x array([0, 1, 2, 3]) >>> np.exp(x) array([ 1. , 2.71828183, 7.3890561 , 20.08553692]) >>>
Parent topic: Basic Operation Functions