numpy.lib.scimath.arccos
-
lib.scimath.arccos(x)
[source] -
Compute the inverse cosine of x.
Return the “principal value” (for a description of this, see
numpy.arccos
) of the inverse cosine ofx
. For realx
such thatabs(x) <= 1
, this is a real number in the closed interval \([0, \pi]\). Otherwise, the complex principle value is returned.- Parameters
-
-
xarray_like or scalar
-
The value(s) whose arccos is (are) required.
-
- Returns
-
-
outndarray or scalar
-
The inverse cosine(s) of the
x
value(s). Ifx
was a scalar, so isout
, otherwise an array object is returned.
-
See also
Notes
For an arccos() that returns
NAN
when realx
is not in the interval[-1,1]
, usenumpy.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])
© 2005–2021 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/1.21/reference/generated/numpy.lib.scimath.arccos.html