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

Function tan

numpy/array_api/_elementwise_functions.py:732–740  ·  view source on GitHub ↗

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

(x: Array, /)

Source from the content-addressed store, hash-verified

730
731
732def tan(x: Array, /) -> Array:
733 """
734 Array API compatible wrapper for :py:func:`np.tan <numpy.tan>`.
735
736 See its docstring for more information.
737 """
738 if x.dtype not in _floating_dtypes:
739 raise TypeError("Only floating-point dtypes are allowed in tan")
740 return Array._new(np.tan(x._array))
741
742
743def tanh(x: Array, /) -> Array:

Callers 3

test_testUfuncs1Method · 0.85
test_basic_ufuncsMethod · 0.85

Calls 1

_newMethod · 0.80

Tested by 3

test_testUfuncs1Method · 0.68
test_basic_ufuncsMethod · 0.68