This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use core::ops::Add; | |
| use std::fmt::Debug; | |
| use std::ops::AddAssign; | |
| use nalgebra::DMatrix; | |
| /// matrix add with broadcasting | |
| /// like the numpy add operation | |
| /// not sure I even need it anymore, after fixing inconsistencies with the matrix shapes | |
| /// TODO see if it's still needed, or that standard matrix addition suffices | |
| pub fn add<T>(v1: DMatrix<T>, v2: DMatrix<T>) -> Result<DMatrix<T>, String> |