回答編集履歴
1
コードの修正
test
CHANGED
@@ -13,6 +13,12 @@
|
|
13
13
|
|
14
14
|
|
15
15
|
```rust
|
16
|
+
|
17
|
+
extern crate ndarray; // 0.14.0
|
18
|
+
|
19
|
+
use ndarray::prelude::*;
|
20
|
+
|
21
|
+
|
16
22
|
|
17
23
|
fn main() {
|
18
24
|
|
@@ -58,16 +64,6 @@
|
|
58
64
|
|
59
65
|
println!("--- assign_with_loop ---");
|
60
66
|
|
61
|
-
let mut a: Array2<f64> = array![[1., 1.], [2., 2.], [3., 3.]];
|
62
|
-
|
63
|
-
let axis: usize = 0usize;
|
64
|
-
|
65
|
-
let idx: usize = 1usize;
|
66
|
-
|
67
|
-
let b: Array1<f64> = array![10., 10.];
|
68
|
-
|
69
|
-
|
70
|
-
|
71
67
|
println!("before assigning:");
|
72
68
|
|
73
69
|
println!("{:?}", a);
|
@@ -85,6 +81,8 @@
|
|
85
81
|
println!("{:?}", a);
|
86
82
|
|
87
83
|
}
|
84
|
+
|
85
|
+
|
88
86
|
|
89
87
|
```
|
90
88
|
|