//! TDD tests for randn shape parameter //! These tests define expected behavior for creating random tensors use rtx_tensor::{Device, Tensor}; #[test] fn test_randn_with_slice_not_vec() { // randn expects &[usize], not Vec let device = Device::cpu(); // Wrong: passing Vec directly // let tensor = Tensor::randn(vec![2, 3], &device); // Correct: passing slice reference let shape = vec![2, 3]; let tensor = Tensor::randn(&shape, &device).unwrap(); // Or directly with array slice let tensor2 = Tensor::randn(&[2, 3], &device).unwrap(); assert_eq!(tensor.shape().dims(), &[2, 3]); assert_eq!(tensor2.shape().dims(), &[2, 3]); }