dpnp.log1p
- dpnp.log1p(x, /, out=None, *, order='K', where=True, dtype=None, subok=True, **kwargs)[source]
Return the natural logarithm of one plus the input array, element-wise.
For full documentation refer to
numpy.log1p
.- Returns:
out – The natural logarithm of 1+x, element-wise.
- Return type:
dpnp.ndarray
Limitations
Parameter x is only supported as either
dpnp.ndarray
ordpctl.tensor.usm_ndarray
. Parameters where, dtype and subok are supported with their default values. Keyword argument kwargs is currently unsupported. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP Data types.See also
dpnp.expm1
exp(x) - 1
, the inverse ofdpnp.log1p
.dpnp.log
Natural logarithm, element-wise.
dpnp.log10
Return the base 10 logarithm of the input array, element-wise.
dpnp.log2
Return the base 2 logarithm of the input array, element-wise.
Examples
>>> import dpnp as np >>> x = np.arange(3.) >>> np.log1p(x) array([0.0, 0.69314718, 1.09861229])
>>> np.log1p(array(1e-99)) array(1e-99)
>>> np.log(array(1 + 1e-99)) array(0.0)