rotta_rs 0.0.5

a Deep Learning library with rust language
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::rotta_rs_module::arrayy::*;

pub fn to_shape_arr(arr: &Arrayy, reshape: Vec<usize>) -> Arrayy {
    let arr_length = arr.value.len();
    let reshape_length = reshape.as_slice().multiple_sum();
    if arr_length != reshape_length {
        panic!("error, array have length {} but reshape to {:?}", arr_length, reshape);
    }

    Arrayy::from_vector(reshape, arr.value.clone())
}