peroxide 0.33.3

Rust comprehensive scientific computation library contains linear algebra, numerical analysis, statistics and machine learning tools with farmiliar syntax
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate peroxide;
use peroxide::fuga::*;

#[test]
fn test_type_cast() {
    let mut a = DataFrame::new(vec![]);
    a.push("x", Series::new(vec![1,2,3,4]));
    a.push("y", Series::new(vec![true,false,false,true]));

    let mut b = DataFrame::new(vec![]);
    b.push("x", Series::new(vec![1usize, 2, 3, 4]));
    b.push("y", Series::new(vec![true, false, false, true]));

    a.as_types(vec![USIZE, U8]);
    a.as_types(vec![USIZE, Bool]);

    assert_eq!(a, b);
}