dpnp.expm1
- dpnp.expm1(x, /, out=None, *, order='K', where=True, dtype=None, subok=True, **kwargs)[source]
Return the exponential of the input array minus one, element-wise.
For full documentation refer to
numpy.expm1.- Returns:
out – The exponential of x minus one, element-wise.
- Return type:
dpnp.ndarray
Limitations
Parameter x is only supported as either
dpnp.ndarrayordpctl.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.expCalculate exponential for all elements in the array.
dpnp.exp2Calculate 2**x for all elements in the array.
dpnp.log1pCallculate
log(1 + x), the inverse of expm1.
Examples
>>> import dpnp as np >>> x = np.arange(3.) >>> np.expm1(x) array([0.0, 1.718281828, 6.389056099])
>>> np.expm1(np.array(1e-10)) array(1.00000000005e-10)
>>> np.exp(np.array(1e-10)) - 1 array(1.000000082740371e-10)