sin
sin(x: &Tensor<T>) -> Result<Tensor<C>, TensorError>
Trigonometric sine
Parameters:
x
: Angle(radians)
Returns:
Tensor with type C
Examples:
use hpt::{ops::FloatUnaryOps, Tensor, error::TensorError};
fn main() -> Result<(), TensorError> {
let a = Tensor::<f32>::new([10.0]);
let b = a.sin()?;
println!("{}", b);
Ok(())
}
Backend Support
Backend | Supported |
---|---|
CPU | ✅ |
Cuda | ✅ |