summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index be0571d..bba61f1 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -42,8 +42,7 @@ fn main() {
assert_eq!(c.permute([1, 0]), c.transpose());
// Arrays with rank > 6:
- let d: Vec<f64> = (0..128).map(|x| x as f64).collect();
- let d: md::DTensor<f64, 1> = d.into();
+ let d: md::DTensor<f64, 1> = (0..128).map(f64::from).collect::<Vec<_>>().into();
let d = d.into_dyn();
let d = d.reshape(&[2; 7]);
let d = d.permute(&[6, 5, 4, 3, 2, 1, 0]);