Rate This Document
Findability
Accuracy
Completeness
Readability

arctan

Description

Calculate the arctangent of each element, that is, tan-1(x).

Mandatory Input Parameters

Parameter

Type

Description

x

array_like

Input array or scalar

Optional Input Parameters

Parameter

Type

Default Value

Description

out

ndarray or ndarray tuple

None

Location where the calculation result is stored. If provided, it must have a shape which the inputs broadcast to. If not provided, a freshly-allocated array is returned.

where

array_like

None

This condition is broadcast over the input. At locations where the condition is true, the out array stores the result. Elsewhere, the out array retains its original value.

**kwargs

-

-

Other keyword arguments. Refer to the NumPy official document Universal functions (ufunc).

Return Value

Type

Description

ndarray/scalar

Arctangent of each element, in radians. The value range of the real part is [–π/2, π/2].

Examples

1
2
3
4
5
6
7
8
9
>>> import numpy as np
>>> np.pi / 4
0.7853981633974483
>>> np.tan([0., np.pi / 4])
array([0., 1.])
>>>
>>> np.arctan([0., 1.])
array([0.        , 0.78539816])
>>>