numpy 1.22.4 Pypi GitHub Homepage
Other Docs
NotesParametersReturns
arccos(x)

Return the "principal value" (for a description of this, see :None:None:`numpy.arccos`) of the inverse cosine of x. For real x such that :None:None:`abs(x) <= 1`, this is a real number in the closed interval $[0, \pi]$ . Otherwise, the complex principle value is returned.

Notes

For an arccos() that returns NAN when real x is not in the interval [-1,1] , use :None:None:`numpy.arccos`.

Parameters

x : array_like or scalar

The value(s) whose arccos is (are) required.

Returns

out : ndarray or scalar

The inverse cosine(s) of the x value(s). If x was a scalar, so is :None:None:`out`, otherwise an array object is returned.

Compute the inverse cosine of x.

See Also

numpy.arccos

Examples

>>> np.set_printoptions(precision=4)
>>> np.emath.arccos(1) # a scalar is returned
0.0
>>> np.emath.arccos([1,2])
array([0.-0.j   , 0.-1.317j])
See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /numpy/lib/scimath.py#477
type: <class 'function'>
Commit: