The numpy.log() is a mathematical function that helps user to calculate Natural logarithm of x where x belongs to all the input array elements. Natural logarithm log is the inverse of the exp(), so that log(exp(x)) = x. The natural logarithm is log in base e.
Syntax :numpy.log(x[, out] = ufunc ‘log1p’) Parameters : array : [array_like] Input array or object. out : [ndarray, optional] Output array with same dimensions as Input array, placed with result. Return : An array with Natural logarithmic value of x; where x belongs to all elements of input array.
Code #1 : Working
Python3
import numpy as np
in_array = [ 1 , 3 , 5 , 2 * * 8 ]
print<
|