質問編集履歴
12
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -39,6 +39,36 @@
|
|
39
39
|
|
40
40
|
|
41
41
|
```
|
42
|
+
|
43
|
+
###修正してみたコード
|
44
|
+
|
45
|
+
```
|
46
|
+
|
47
|
+
burden_hight = pd.read_csv('burdenhight.csv', header=None)
|
48
|
+
|
49
|
+
cf_lst = pd.DataFrame(cf_lst)
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
cf_layer_X = []
|
54
|
+
|
55
|
+
for i in range(11):
|
56
|
+
|
57
|
+
burdenhight = burden_hight.iloc[i]
|
58
|
+
|
59
|
+
cf_X = cf_lst.apply(lambda r: (sum(r[7+28*i:14+28*i]) - sum(r[21+28*i:28+28*i]))/(0.1*0.3*burdenhight), axis=1)
|
60
|
+
|
61
|
+
print(len(cf_layer_X))
|
62
|
+
|
63
|
+
cf_layer_X.append(cf_X)
|
64
|
+
|
65
|
+
cf_layer_X = np.array(cf_layer_X).T
|
66
|
+
|
67
|
+
cf_layer_X_with_label = pd.DataFrame(cf_layer_X)
|
68
|
+
|
69
|
+
```
|
70
|
+
|
71
|
+
|
42
72
|
|
43
73
|
|
44
74
|
|
11
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -79,3 +79,33 @@
|
|
79
79
|
TypeError: 'numpy.int64' object is not iterable
|
80
80
|
|
81
81
|
```
|
82
|
+
|
83
|
+
burdenhight.csvの中身
|
84
|
+
|
85
|
+
```
|
86
|
+
|
87
|
+
0.01375
|
88
|
+
|
89
|
+
0.0175
|
90
|
+
|
91
|
+
0.02625
|
92
|
+
|
93
|
+
0.035
|
94
|
+
|
95
|
+
0.035
|
96
|
+
|
97
|
+
0.035
|
98
|
+
|
99
|
+
0.035
|
100
|
+
|
101
|
+
0.035
|
102
|
+
|
103
|
+
0.02625
|
104
|
+
|
105
|
+
0.0175
|
106
|
+
|
107
|
+
0.02375
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
```
|
10
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
burdenhight = burden_hight.iloc[i]
|
34
34
|
|
35
|
-
cf_X = cf_lst.apply(lambda r: (sum(r[7+28*i:14+28*i]) - sum(r[21+28*i:28+28*i]))/(0.1*0.3), axis=1)
|
35
|
+
cf_X = cf_lst.apply(lambda r: (sum(r[7+28*i:14+28*i]) - sum(r[21+28*i:28+28*i]))/(0.1*0.3*burdenhight), axis=1)
|
36
36
|
|
37
37
|
cf_layer_X.append(cf_X)
|
38
38
|
|
9
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -23,10 +23,6 @@
|
|
23
23
|
burden_hight = pd.read_csv('burdenhight.csv', header=None)
|
24
24
|
|
25
25
|
cf_lst = pd.DataFrame(cf_lst)
|
26
|
-
|
27
|
-
print("width_build=" +str(width_build))
|
28
|
-
|
29
|
-
print("highth_build=" +str(highth_build))
|
30
26
|
|
31
27
|
|
32
28
|
|
8
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -36,13 +36,13 @@
|
|
36
36
|
|
37
37
|
burdenhight = burden_hight.iloc[i]
|
38
38
|
|
39
|
-
print(i)
|
40
|
-
|
41
|
-
print(burdenhight)
|
42
|
-
|
43
39
|
cf_X = cf_lst.apply(lambda r: (sum(r[7+28*i:14+28*i]) - sum(r[21+28*i:28+28*i]))/(0.1*0.3), axis=1)
|
44
40
|
|
45
41
|
cf_layer_X.append(cf_X)
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
```
|
46
46
|
|
47
47
|
|
48
48
|
|
7
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -44,18 +44,6 @@
|
|
44
44
|
|
45
45
|
cf_layer_X.append(cf_X)
|
46
46
|
|
47
|
-
cf_layer_X = np.array(cf_layer_X).T
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
cf_layer_X_with_label = pd.DataFrame(cf_layer_X, columns = header_layer, index = index)
|
52
|
-
|
53
|
-
cf_layer_X_with_label.to_csv('layer_force_X.csv', header=True, index=True, float_format='%.6f')
|
54
|
-
|
55
|
-
```
|
56
|
-
|
57
|
-
|
58
|
-
|
59
47
|
|
60
48
|
|
61
49
|
```
|
6
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -60,22 +60,6 @@
|
|
60
60
|
|
61
61
|
```
|
62
62
|
|
63
|
-
width_build=0.1
|
64
|
-
|
65
|
-
highth_build=0.3
|
66
|
-
|
67
|
-
0
|
68
|
-
|
69
|
-
0 0.01375
|
70
|
-
|
71
|
-
Name: 0, dtype: float64
|
72
|
-
|
73
|
-
Traceback (most recent call last):
|
74
|
-
|
75
|
-
File ".\all.py", line 138, in <module>
|
76
|
-
|
77
|
-
cf_X = cf_lst.apply(lambda r: (sum(r[7+28*i:14+28*i]) - sum(r[21+28*i:28+28*i]))/(width_build * burden_hight * average_dypre), axis=1)
|
78
|
-
|
79
63
|
File "C:\Python27_2017\lib\site-packages\pandas\core\frame.py", line 4152, in apply
|
80
64
|
|
81
65
|
return self._apply_standard(f, axis, reduce=reduce)
|
5
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -56,48 +56,6 @@
|
|
56
56
|
|
57
57
|
|
58
58
|
|
59
|
-
```
|
60
|
-
|
61
|
-
Traceback (most recent call last):
|
62
|
-
|
63
|
-
File ".\all.py", line 137, in <module>
|
64
|
-
|
65
|
-
cf_X = cf_lst.apply(lambda r: (sum(r[7+28*i:14+28*i]) - sum(r[21+28*i:28+28*i]))/(width_build * burden_hight * average_dypre), axis=1)
|
66
|
-
|
67
|
-
File "C:\Python27_2017\lib\site-packages\pandas\core\frame.py", line 4152, in apply
|
68
|
-
|
69
|
-
return self._apply_standard(f, axis, reduce=reduce)
|
70
|
-
|
71
|
-
File "C:\Python27_2017\lib\site-packages\pandas\core\frame.py", line 4265, in _apply_standard
|
72
|
-
|
73
|
-
result = self._constructor(data=results, index=index)
|
74
|
-
|
75
|
-
File "C:\Python27_2017\lib\site-packages\pandas\core\frame.py", line 266, in __init__
|
76
|
-
|
77
|
-
mgr = self._init_dict(data, index, columns, dtype=dtype)
|
78
|
-
|
79
|
-
File "C:\Python27_2017\lib\site-packages\pandas\core\frame.py", line 402, in _init_dict
|
80
|
-
|
81
|
-
return _arrays_to_mgr(arrays, data_names, index, columns, dtype=dtype)
|
82
|
-
|
83
|
-
File "C:\Python27_2017\lib\site-packages\pandas\core\frame.py", line 5408, in _arrays_to_mgr
|
84
|
-
|
85
|
-
return create_block_manager_from_arrays(arrays, arr_names, axes)
|
86
|
-
|
87
|
-
File "C:\Python27_2017\lib\site-packages\pandas\core\internals.py", line 4267, in create_block_manager_from_arrays
|
88
|
-
|
89
|
-
construction_error(len(arrays), arrays[0].shape, axes, e)
|
90
|
-
|
91
|
-
File "C:\Python27_2017\lib\site-packages\pandas\core\internals.py", line 4233, in construction_error
|
92
|
-
|
93
|
-
passed, implied))
|
94
|
-
|
95
|
-
ValueError: Shape of passed values is (4, 10), indices imply (4, 309)
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
```
|
100
|
-
|
101
59
|
|
102
60
|
|
103
61
|
```
|
4
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -40,7 +40,7 @@
|
|
40
40
|
|
41
41
|
print(burdenhight)
|
42
42
|
|
43
|
-
cf_X = cf_lst.apply(lambda r: (sum(r[7+28*i:14+28*i]) - sum(r[21+28*i:28+28*i]))/(
|
43
|
+
cf_X = cf_lst.apply(lambda r: (sum(r[7+28*i:14+28*i]) - sum(r[21+28*i:28+28*i]))/(0.1*0.3), axis=1)
|
44
44
|
|
45
45
|
cf_layer_X.append(cf_X)
|
46
46
|
|
3
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
cf_layer_X = []
|
34
34
|
|
35
|
-
for i in range(
|
35
|
+
for i in range(11):
|
36
36
|
|
37
37
|
burdenhight = burden_hight.iloc[i]
|
38
38
|
|
2
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,21 +20,37 @@
|
|
20
20
|
|
21
21
|
```
|
22
22
|
|
23
|
-
burden_hight = pd.read_csv('burdenhight.csv', header=
|
23
|
+
burden_hight = pd.read_csv('burdenhight.csv', header=None)
|
24
24
|
|
25
25
|
cf_lst = pd.DataFrame(cf_lst)
|
26
|
+
|
27
|
+
print("width_build=" +str(width_build))
|
28
|
+
|
29
|
+
print("highth_build=" +str(highth_build))
|
26
30
|
|
27
31
|
|
28
32
|
|
29
33
|
cf_layer_X = []
|
30
34
|
|
31
|
-
for i in range(
|
35
|
+
for i in range(number_of_probe_layer):
|
32
36
|
|
33
37
|
burdenhight = burden_hight.iloc[i]
|
38
|
+
|
39
|
+
print(i)
|
40
|
+
|
41
|
+
print(burdenhight)
|
34
42
|
|
35
43
|
cf_X = cf_lst.apply(lambda r: (sum(r[7+28*i:14+28*i]) - sum(r[21+28*i:28+28*i]))/(width_build * burden_hight * average_dypre), axis=1)
|
36
44
|
|
37
45
|
cf_layer_X.append(cf_X)
|
46
|
+
|
47
|
+
cf_layer_X = np.array(cf_layer_X).T
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
cf_layer_X_with_label = pd.DataFrame(cf_layer_X, columns = header_layer, index = index)
|
52
|
+
|
53
|
+
cf_layer_X_with_label.to_csv('layer_force_X.csv', header=True, index=True, float_format='%.6f')
|
38
54
|
|
39
55
|
```
|
40
56
|
|
@@ -81,3 +97,59 @@
|
|
81
97
|
|
82
98
|
|
83
99
|
```
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
```
|
104
|
+
|
105
|
+
width_build=0.1
|
106
|
+
|
107
|
+
highth_build=0.3
|
108
|
+
|
109
|
+
0
|
110
|
+
|
111
|
+
0 0.01375
|
112
|
+
|
113
|
+
Name: 0, dtype: float64
|
114
|
+
|
115
|
+
Traceback (most recent call last):
|
116
|
+
|
117
|
+
File ".\all.py", line 138, in <module>
|
118
|
+
|
119
|
+
cf_X = cf_lst.apply(lambda r: (sum(r[7+28*i:14+28*i]) - sum(r[21+28*i:28+28*i]))/(width_build * burden_hight * average_dypre), axis=1)
|
120
|
+
|
121
|
+
File "C:\Python27_2017\lib\site-packages\pandas\core\frame.py", line 4152, in apply
|
122
|
+
|
123
|
+
return self._apply_standard(f, axis, reduce=reduce)
|
124
|
+
|
125
|
+
File "C:\Python27_2017\lib\site-packages\pandas\core\frame.py", line 4265, in _apply_standard
|
126
|
+
|
127
|
+
result = self._constructor(data=results, index=index)
|
128
|
+
|
129
|
+
File "C:\Python27_2017\lib\site-packages\pandas\core\frame.py", line 266, in __init__
|
130
|
+
|
131
|
+
mgr = self._init_dict(data, index, columns, dtype=dtype)
|
132
|
+
|
133
|
+
File "C:\Python27_2017\lib\site-packages\pandas\core\frame.py", line 402, in _init_dict
|
134
|
+
|
135
|
+
return _arrays_to_mgr(arrays, data_names, index, columns, dtype=dtype)
|
136
|
+
|
137
|
+
File "C:\Python27_2017\lib\site-packages\pandas\core\frame.py", line 5403, in _arrays_to_mgr
|
138
|
+
|
139
|
+
arrays = _homogenize(arrays, index, dtype)
|
140
|
+
|
141
|
+
File "C:\Python27_2017\lib\site-packages\pandas\core\frame.py", line 5714, in _homogenize
|
142
|
+
|
143
|
+
raise_cast_failure=False)
|
144
|
+
|
145
|
+
File "C:\Python27_2017\lib\site-packages\pandas\core\series.py", line 2952, in _sanitize_array
|
146
|
+
|
147
|
+
subarr = _asarray_tuplesafe(data, dtype=dtype)
|
148
|
+
|
149
|
+
File "C:\Python27_2017\lib\site-packages\pandas\core\common.py", line 392, in _asarray_tuplesafe
|
150
|
+
|
151
|
+
result[:] = [tuple(x) for x in values]
|
152
|
+
|
153
|
+
TypeError: 'numpy.int64' object is not iterable
|
154
|
+
|
155
|
+
```
|
1
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
|
29
29
|
cf_layer_X = []
|
30
30
|
|
31
|
-
for i in range(
|
31
|
+
for i in range(11):
|
32
32
|
|
33
33
|
burdenhight = burden_hight.iloc[i]
|
34
34
|
|