pymc.math.arctan#
- pymc.math.arctan = Elemwise(scalar_op=arctan,inplace_pattern=<frozendict {}>)[source]#
arctangent of a
Computes element-wise inverse tangent (arc tangent) of a tensor.
- Parameters:
- a
TensorLike
Input tensor
- a
- Returns:
TensorVariable
Output tensor with the arc tangent of each element in radians, in the range [-π/2, π/2]
Notes
This function corresponds to NumPy’s np.arctan function. The values returned are in the range [-π/2, π/2]. For the two-argument inverse tangent function, see arctan2.
Examples
>>> import pytensor >>> import pytensor.tensor as pt >>> x = pt.vector("x") >>> f = pytensor.function([x], pt.arctan(x)) >>> f([-1, 0, 1]) array([-0.78539816, 0. , 0.78539816])