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

Function cosh

numpy/array_api/_elementwise_functions.py:266–274  ·  view source on GitHub ↗

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

(x: Array, /)

Source from the content-addressed store, hash-verified

264
265
266def cosh(x: Array, /) -> Array:
267 """
268 Array API compatible wrapper for :py:func:`np.cosh <numpy.cosh>`.
269
270 See its docstring for more information.
271 """
272 if x.dtype not in _floating_dtypes:
273 raise TypeError("Only floating-point dtypes are allowed in cosh")
274 return Array._new(np.cosh(x._array))
275
276
277def divide(x1: Array, x2: Array, /) -> Array:

Callers 2

test_testUfuncs1Method · 0.85
test_basic_ufuncsMethod · 0.85

Calls 1

_newMethod · 0.80

Tested by 2

test_testUfuncs1Method · 0.68
test_basic_ufuncsMethod · 0.68