質問編集履歴

3

配列の中身の表示

2018/07/09 02:33

投稿

simasima
simasima

スコア49

test CHANGED
File without changes
test CHANGED
@@ -111,3 +111,89 @@
111
111
 
112
112
 
113
113
  ```
114
+
115
+
116
+
117
+ 汚くて申し訳ないのですが、以下x,y,zの配列の中身です。
118
+
119
+ 配列数は最初の3行にあるように全て239です。
120
+
121
+
122
+
123
+ ```python
124
+
125
+ (51,)
126
+
127
+ (51,)
128
+
129
+ (51,)
130
+
131
+ x [0.018945105316441533 0.038376366719427735 0.05750917295661107
132
+
133
+ 0.07629006442075704 0.09372811488304386 0.10912612525702123
134
+
135
+ 0.12464768410205995 0.1413839103561751 0.1596741410585453
136
+
137
+ 0.1759184069399719 0.19322446824327125 0.210691567977937
138
+
139
+ 0.22845655409586113 0.24650226430391914 0.2650497977458401
140
+
141
+ 0.28341059279725256 0.30264726163880595 0.3222909503597119
142
+
143
+ 0.3415180146407486 0.36120344192936826 0.38097870683137053
144
+
145
+ 0.4009628258714799 0.42071656620799663 0.4406341693717701
146
+
147
+ 0.46057715168858765 7.0988221152911e-05 0.016278620751618286
148
+
149
+ 0.03259693073674304 0.04967192015954666 0.06507510572727315
150
+
151
+ 0.08193216437272284 0.09923561811615711 0.1166556734303942
152
+
153
+ 0.13416924413319617 0.15192331989390162 0.1698669427742076
154
+
155
+ 0.18819732013519314 0.20692007261808368 0.22520352719918568
156
+
157
+ 0.24386166995327074 0.2629546458428124 0.28222526836647466
158
+
159
+ 0.3019660404290296 0.32129576570338003 0.34105888899009573
160
+
161
+ 0.36088646826753823 0.3807677427842703 0.40067699957871794
162
+
163
+ 0.42061491923715927 0.4407819226122955 0.4605310364633991]
164
+
165
+ y [0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.6
166
+
167
+ 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7
168
+
169
+ 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.7]
170
+
171
+ z [10.855443501464377 17.32098343302835 26.042603408852838 41.038506548558644
172
+
173
+ 70.16328746849081 122.47967297128532 173.39153348258986 210.49479953909872
174
+
175
+ 232.2054583878787 271.49097031518374 303.25305276344363 332.0475954482092
176
+
177
+ 357.4557031061652 379.67248029342215 399.59488853067387 413.6824308929333
178
+
179
+ 423.4969609923641 430.95804558342076 436.33447825754433 439.91060697025836
180
+
181
+ 442.46544280829954 443.7828019209314 445.44551252223863 446.3822170779967
182
+
183
+ 447.03040608671915 3.7402750670694074 41.168600585025885 83.02282664213085
184
+
185
+ 117.41178280399303 167.3956935721441 204.26213262455897 234.91703733944348
186
+
187
+ 264.2463908853601 292.5126418351867 318.0447807275893 340.28528709553103
188
+
189
+ 360.4027292674224 373.7859265238961 393.2999756995644 408.5544909574963
190
+
191
+ 420.0025527426506 428.29426922401115 434.65168997825856 438.86105089891004
192
+
193
+ 441.55391517195045 443.51403019241434 444.8637264447764 445.89531428160996
194
+
195
+ 446.6010566550302 446.9761692230607 447.55465366104426]
196
+
197
+
198
+
199
+ ```

2

題名の変更

2018/07/09 02:33

投稿

simasima
simasima

スコア49

test CHANGED
@@ -1 +1 @@
1
- 補間のエラーについて
1
+ 2dカラーマップでの線形補間におけobject arrays are not supportedのエラー
test CHANGED
File without changes

1

エラー文の追加

2018/07/05 04:24

投稿

simasima
simasima

スコア49

test CHANGED
File without changes
test CHANGED
@@ -19,3 +19,95 @@
19
19
 
20
20
 
21
21
  どのような時にこのエラーが生じるのでしょうか。
22
+
23
+
24
+
25
+
26
+
27
+ 以下エラー画面です
28
+
29
+
30
+
31
+ ```python
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+ ---------------------------------------------------------------------------
40
+
41
+ ValueError Traceback (most recent call last)
42
+
43
+ <ipython-input-17-31a9ccce0e38> in <module>()
44
+
45
+ 29 zlabel = 'diff'
46
+
47
+ 30
48
+
49
+ ---> 31 twodim_colorPlot(df_up, xlabel, ylabel, zlabel)
50
+
51
+
52
+
53
+ <ipython-input-17-31a9ccce0e38> in twodim_colorPlot(dataframe, xlabel, ylabel, zlabel)
54
+
55
+ 13 xi, yi = np.meshgrid(xi, yi)
56
+
57
+ 14 # Interpolate
58
+
59
+ ---> 15 rbf = scipy.interpolate.Rbf(x, y, z, function="linear")
60
+
61
+ 16 zi = rbf(xi, yi)
62
+
63
+ 17 plt.imshow(zi, vmin=-3.0, vmax=z.max(), origin='lower',
64
+
65
+
66
+
67
+ /opt/conda/lib/python3.5/site-packages/scipy/interpolate/rbf.py in __init__(self, *args, **kwargs)
68
+
69
+ 220
70
+
71
+ 221 self.A = self._init_function(r) - np.eye(self.N)*self.smooth
72
+
73
+ --> 222 self.nodes = linalg.solve(self.A, self.di)
74
+
75
+ 223
76
+
77
+ 224 def _call_norm(self, x1, x2):
78
+
79
+
80
+
81
+ /opt/conda/lib/python3.5/site-packages/scipy/linalg/basic.py in solve(a, b, sym_pos, lower, overwrite_a, overwrite_b, debug, check_finite)
82
+
83
+ 78 """
84
+
85
+ 79 a1 = _asarray_validated(a, check_finite=check_finite)
86
+
87
+ ---> 80 b1 = _asarray_validated(b, check_finite=check_finite)
88
+
89
+ 81 if len(a1.shape) != 2 or a1.shape[0] != a1.shape[1]:
90
+
91
+ 82 raise ValueError('expected square matrix')
92
+
93
+
94
+
95
+ /opt/conda/lib/python3.5/site-packages/scipy/_lib/_util.py in _asarray_validated(a, check_finite, sparse_ok, objects_ok, mask_ok, as_inexact)
96
+
97
+ 188 if not objects_ok:
98
+
99
+ 189 if a.dtype is np.dtype('O'):
100
+
101
+ --> 190 raise ValueError('object arrays are not supported')
102
+
103
+ 191 if as_inexact:
104
+
105
+ 192 if not np.issubdtype(a.dtype, np.inexact):
106
+
107
+
108
+
109
+ ValueError: object arrays are not supported
110
+
111
+
112
+
113
+ ```