log#

rbc.stdlib.elementwise_functions.log(x)#

Calculates an implementation-dependent approximation to the natural (base e) logarithm, having domain [0, +infinity] and codomain [-infinity, +infinity], for each element x_i of the input array x.

Examples

>>> from rbc.stdlib import array_api
>>> @heavydb('double[](double[])')
... def array_api_log(x):
...     return array_api.log(x)
>>> array_api_log([1.0, np.e, np.e**2, 0.0]).execute()
array([  0.,   1.,   2., -inf], dtype=float32)

Array-API ‘log’ doc