Trigonometric Functions
numpy.sin
x: array_like - Angle, in radians ( rad equals 360 degrees).out: ndarray, optional - A location into which the result is stored.where: array_like, optional - Condition to broadcast over the input.
y: array_like - The sine of each element of x.
numpy.cos
x: array_like - Input array in radians.out: ndarray, optional - A location into which the result is stored.where: array_like, optional - Condition to broadcast over the input.
y: ndarray - The corresponding cosine values.
numpy.tan
x: array_like - Input array in radians.out: ndarray, optional - A location into which the result is stored.where: array_like, optional - Condition to broadcast over the input.
y: ndarray - The tangent of each element of x.
np.sin(x)/np.cos(x) element-wise.
Inverse Trigonometric Functions
numpy.arcsin
x: array_like - y-coordinate on the unit circle.out: ndarray, optional - A location into which the result is stored.where: array_like, optional - Condition to broadcast over the input.
angle: ndarray - The inverse sine of each element inx, in radians and in the closed interval .
- For real-valued input, domain is .
arcsinis a multivalued function. The convention is to return the angle whose real part lies in .- For complex-valued input, has branch cuts and .
numpy.arccos
x: array_like - x-coordinate on the unit circle. For real arguments, domain is .out: ndarray, optional - A location into which the result is stored.where: array_like, optional - Condition to broadcast over the input.
angle: ndarray - The angle of the ray intersecting the unit circle at the given x-coordinate in radians .
cos so that if y = cos(x), then x = arccos(y).
Examples:
numpy.arctan
x: array_like - Input values.out: ndarray, optional - A location into which the result is stored.where: array_like, optional - Condition to broadcast over the input.
out: ndarray - The inverse tangent of each element inx, in radians and in the closed interval .
numpy.arctan2
x1/x2 choosing the quadrant correctly.
Parameters:
x1: array_like - y-coordinates.x2: array_like - x-coordinates.out: ndarray, optional - A location into which the result is stored.where: array_like, optional - Condition to broadcast over the input.
angle: ndarray - Angle in radians, in the range .
x1 and x2.
Notes:
arctan2 is useful for converting Cartesian coordinates to polar coordinates . The result respects the signs of both inputs to determine the correct quadrant.
numpy.hypot
x1, x2: array_like - Leg of the triangle(s).out: ndarray, optional - A location into which the result is stored.where: array_like, optional - Condition to broadcast over the input.
z: ndarray - The hypotenuse of the triangle(s).
sqrt(x1**2 + x2**2), but avoids overflow for large values.
Examples:
Hyperbolic Functions
numpy.sinh
x: array_like - Input array.out: ndarray, optional - A location into which the result is stored.where: array_like, optional - Condition to broadcast over the input.
y: ndarray - The corresponding hyperbolic sine values.
1/2 * (np.exp(x) - np.exp(-x)) or -1j * np.sin(1j*x).
Examples:
numpy.cosh
x: array_like - Input array.out: ndarray, optional - A location into which the result is stored.where: array_like, optional - Condition to broadcast over the input.
out: ndarray or scalar - Output array of same shape asx.
1/2 * (np.exp(x) + np.exp(-x)) and np.cos(1j*x).
Examples:
numpy.tanh
x: array_like - Input array.out: ndarray, optional - A location into which the result is stored.where: array_like, optional - Condition to broadcast over the input.
y: ndarray - The corresponding hyperbolic tangent values.
Inverse Hyperbolic Functions
numpy.arcsinh
numpy.arccosh
x: array_like - Input array.out: ndarray, optional - A location into which the result is stored.where: array_like, optional - Condition to broadcast over the input.
arccosh: ndarray - Array of the same shape asx.
arccosh is a multivalued function. The convention is to return the z whose imaginary part lies in and the real part in .
Examples:
numpy.arctanh
See Also
Arithmetic Functions
Basic arithmetic operations
Exponential Functions
exp, log, and power functions
Rounding Functions
floor, ceil, round, and truncation
Special Functions
sqrt, square, gcd, and lcm
