Array API compatible wrapper for :py:func:`np.exp `. See its docstring for more information.
(x: Array, /)
| 301 | |
| 302 | |
| 303 | def 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 | |
| 314 | def expm1(x: Array, /) -> Array: |