pymc.math.sin#
- pymc.math.sin = Elemwise(scalar_op=sin,inplace_pattern=<frozendict {}>)[source]#
sine of a
Computes element-wise sine of a tensor in radians.
- Parameters:
- a
TensorLike
Input tensor in radians
- a
- Returns:
TensorVariable
Output tensor with the sine of each element
Notes
This function corresponds to NumPy’s np.sin function.
Examples
>>> import pytensor >>> import pytensor.tensor as pt >>> import numpy as np >>> x = pt.vector("x") >>> f = pytensor.function([x], pt.sin(x)) >>> f([0, np.pi / 2, np.pi]) array([ 0.00000000e+00, 1.00000000e+00, 1.22464680e-16])