import numpy as np
x = np.array([1., 2., 3., 4.], np.float32)
print("Original array: ")
print(x)
print("\ne^x, element-wise of the said:")
r = np.exp(x)
print(r)
Sample Output:
Original array:
[1. 2. 3. 4.]
e^x, element-wise of the said:
[ 2.7182817 7.389056 20.085537 54.59815 ]
Sample Output: