回答編集履歴
1
追記
answer
CHANGED
@@ -6,4 +6,20 @@
|
|
6
6
|
必要な引数を指定してあげてください。
|
7
7
|
|
8
8
|
> numpy.insert(arr, obj, values, axis=None)
|
9
|
-
[numpy.insert](https://numpy.org/doc/stable/reference/generated/numpy.insert.html)
|
9
|
+
[numpy.insert](https://numpy.org/doc/stable/reference/generated/numpy.insert.html)
|
10
|
+
|
11
|
+
## 追記
|
12
|
+
```python3
|
13
|
+
import numpy as np
|
14
|
+
autoscaled_x_train_pre = np.array([[1.1,1.4],[5.8,6.2]])
|
15
|
+
# array([[1.1, 1.4],
|
16
|
+
# [5.8, 6.2]])
|
17
|
+
|
18
|
+
x2_train = np.array([[0,1],[0,1]])
|
19
|
+
# array([[0, 1],
|
20
|
+
# [0, 1]])
|
21
|
+
|
22
|
+
autoscaled_x_train =np.concatenate([autoscaled_x_train_pre, x2_train],axis=1)
|
23
|
+
# array([[1.1, 1.4, 0. , 1. ],
|
24
|
+
# [5.8, 6.2, 0. , 1. ]])
|
25
|
+
```
|