pub fn fromfunction<T, F>(func: F, shape: &[usize]) -> Result<Tensor<T>>where T: Clone + Default + Send + Sync + 'static, F: Fn(&[usize]) -> T + Send + Sync,
Create array from function