[][src]Function peroxide::structure::matrix::py_matrix

pub fn py_matrix<T>(v: Vec<Vec<T>>) -> Matrix where
    T: Into<f64> + Copy

Python-like matrix constructor

Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;

fn main() {
    let a = py_matrix(vec![c!(1,2), c!(3,4)]);
    let b = matrix(c!(1,2,3,4), 2, 2, Row);
    assert_eq!(a, b);
}