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

Function sin

numpy/array_api/_elementwise_functions.py:674–682  ·  view source on GitHub ↗

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

(x: Array, /)

Source from the content-addressed store, hash-verified

672
673
674def sin(x: Array, /) -> Array:
675 """
676 Array API compatible wrapper for :py:func:`np.sin <numpy.sin>`.
677
678 See its docstring for more information.
679 """
680 if x.dtype not in _floating_dtypes:
681 raise TypeError("Only floating-point dtypes are allowed in sin")
682 return Array._new(np.sin(x._array))
683
684
685def sinh(x: Array, /) -> Array:

Callers 4

sincFunction · 0.85
user_array.pyFile · 0.85
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