Array API compatible wrapper for :py:func:`np.cos `. See its docstring for more information.
(x: Array, /)
| 253 | |
| 254 | |
| 255 | def cos(x: Array, /) -> Array: |
| 256 | """ |
| 257 | Array API compatible wrapper for :py:func:`np.cos <numpy.cos>`. |
| 258 | |
| 259 | See its docstring for more information. |
| 260 | """ |
| 261 | if x.dtype not in _floating_dtypes: |
| 262 | raise TypeError("Only floating-point dtypes are allowed in cos") |
| 263 | return Array._new(np.cos(x._array)) |
| 264 | |
| 265 | |
| 266 | def cosh(x: Array, /) -> Array: |