sin
Compute the sine, element-wise.| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Angle in radians. |
NDArray — Sine of each element.
cos
Compute the cosine, element-wise.| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Angle in radians. |
NDArray — Cosine of each element.
tan
Compute the tangent, element-wise.| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Angle in radians. |
NDArray — Tangent of each element.
arcsin
Compute the inverse sine, element-wise. Also available as the aliasasin.
| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Values in the range [-1, 1]. |
NDArray — Angle in radians, in the range [-pi/2, pi/2].
arccos
Compute the inverse cosine, element-wise. Also available as the aliasacos.
| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Values in the range [-1, 1]. |
NDArray — Angle in radians, in the range [0, pi].
arctan
Compute the inverse tangent, element-wise. Also available as the aliasatan.
| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Input values. |
NDArray — Angle in radians, in the range [-pi/2, pi/2].
arctan2
Compute the two-argument inverse tangent, element-wise. Returns the angle of the point(x2, x1) with the positive x-axis. Also available as the alias atan2.
| Name | Type | Default | Description |
|---|---|---|---|
x1 | ArrayLike | - | y-coordinates. |
x2 | ArrayLike | number | - | x-coordinates. |
NDArray — Angle in radians, in the range [-pi, pi].
hypot
Compute the hypotenusesqrt(x1**2 + x2**2), element-wise. Avoids overflow for large values.
| Name | Type | Default | Description |
|---|---|---|---|
x1 | ArrayLike | - | First leg of the triangle. |
x2 | ArrayLike | number | - | Second leg of the triangle. |
NDArray — Element-wise hypotenuse.
degrees
Convert angles from radians to degrees. Equivalent torad2deg.
| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Angles in radians. |
NDArray — Angles in degrees.
radians
Convert angles from degrees to radians. Equivalent todeg2rad.
| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Angles in degrees. |
NDArray — Angles in radians.
deg2rad
Convert angles from degrees to radians. Equivalent toradians.
| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Angles in degrees. |
NDArray — Angles in radians.
rad2deg
Convert angles from radians to degrees. Equivalent todegrees.
| Name | Type | Default | Description |
|---|---|---|---|
x | ArrayLike | - | Angles in radians. |
NDArray — Angles in degrees.