1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
#![allow(unused_parens)] #![allow(non_snake_case)] use arrayfire; use RayBNN_DataLoader; const BACK_END: arrayfire::Backend = arrayfire::Backend::CUDA; const DEVICE: i32 = 0; use rayon::prelude::*; use rand::{distributions::Standard, Rng}; use std::collections::HashMap; #[test] fn test_dataset_csv3() { arrayfire::set_backend(BACK_END); arrayfire::set_device(DEVICE); let mut neuron_pos = RayBNN_DataLoader::Dataset::CSV::file_to_arrayfire::<f64>( "./test_data/neuron_pos3.csv", ); arrayfire::print_gen("neuron_pos".to_string(), &neuron_pos,Some(6)); assert_eq!(neuron_pos.dims()[0],13); assert_eq!(neuron_pos.dims()[1],3); }