MCPcopy Create free account
hub / github.com/numpy/numpy / exp

Function exp

numpy/array_api/_elementwise_functions.py:303–311  ·  view source on GitHub ↗

Array API compatible wrapper for :py:func:`np.exp `. See its docstring for more information.

(x: Array, /)

Source from the content-addressed store, hash-verified

301
302
303def exp(x: Array, /) -> Array:
304 """
305 Array API compatible wrapper for :py:func:`np.exp <numpy.exp>`.
306
307 See its docstring for more information.
308 """
309 if x.dtype not in _floating_dtypes:
310 raise TypeError("Only floating-point dtypes are allowed in exp")
311 return Array._new(np.exp(x._array))
312
313
314def expm1(x: Array, /) -> Array:

Callers 15

legacy_paretoFunction · 0.85
legacy_powerFunction · 0.85
legacy_lognormalFunction · 0.85
legacy_betaFunction · 0.85
legacy_logseriesFunction · 0.85
random_standard_normalFunction · 0.85
random_standard_normal_fFunction · 0.85
random_betaFunction · 0.85
random_lognormalFunction · 0.85
random_poisson_multFunction · 0.85

Calls 1

_newMethod · 0.80

Tested by 3

test_testUfuncs1Method · 0.68
test_basic_ufuncsMethod · 0.68