/* Appellation: tensor Contrib: FL03 */ #![cfg(test)] extern crate ndarray as nd; extern crate ndtensor; use ndtensor::Tensor; #[test] fn test_tensor() { let tensor = Tensor::ndtensor(nd::array![[0f64, 1f64], [2f64, 3f64]]); assert!(tensor.op().is_none()); } #[test] fn test_index() { let tensor = Tensor::::linshape((3, 3, 3)).unwrap(); assert_eq!(tensor[[0, 0, 0]], 0f64); }