chela 0.0.2

High-performance Machine Learning, Auto-Differentiation and Tensor Algebra crate for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::{NdArray, RawDataType};
use std::ops::Neg;
use crate::unary_ops::UnaryOps;

impl<T: RawDataType + Neg<Output=T>> Neg for NdArray<'_, T> {
    type Output = NdArray<'static, T>;

    fn neg(self) -> Self::Output { -&self }
}

impl<T: RawDataType + Neg<Output=T>> Neg for &NdArray<'_, T> {
    type Output = NdArray<'static, T>;

    fn neg(self) -> Self::Output { <T as UnaryOps<T>>::neg(self) }
}