mxnet.np.arccos¶
-
arccos
(x, out=None, **kwargs)¶ Trigonometric inverse cosine, element-wise. The inverse of cos so that, if y = cos(x), then x = acos(y).
>>>np.acos is np.arccos True
- Parameters
x (ndarray) – x-coordinate on the unit circle. For real arguments, the domain is [-1, 1].
out (ndarray, optional) – A location into which the result is stored. If provided, it must have a shape that the inputs broadcast to. If not provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs.
- Returns
angle – The angle of the ray intersecting the unit circle at the given x-coordinate in radians [0, pi]. This is a scalar if x is a scalar.
- Return type
ndarray
Notes
acos is a alias for arccos. It is a standard API in https://data-apis.org/array-api/latest/API_specification/generated/signatures.elementwise_functions.acos.html instead of an official NumPy operator.
acos is a multivalued function: for each x there are infinitely many numbers z such that cos(z) = x. The convention is to return the angle z whose real part lies in [0, pi]. For real-valued input data types, acos always returns real output. For each value that cannot be expressed as a real number or infinity, it yields nan and sets the invalid floating point error flag. The inverse cos is also known as acos or cos^-1.
Examples
>>> np.acos([1, -1]) array([ 0. , 3.14159265])