質問編集履歴
3
配列の中身の表示
title
CHANGED
File without changes
|
body
CHANGED
@@ -54,4 +54,47 @@
|
|
54
54
|
|
55
55
|
ValueError: object arrays are not supported
|
56
56
|
|
57
|
+
```
|
58
|
+
|
59
|
+
汚くて申し訳ないのですが、以下x,y,zの配列の中身です。
|
60
|
+
配列数は最初の3行にあるように全て239です。
|
61
|
+
|
62
|
+
```python
|
63
|
+
(51,)
|
64
|
+
(51,)
|
65
|
+
(51,)
|
66
|
+
x [0.018945105316441533 0.038376366719427735 0.05750917295661107
|
67
|
+
0.07629006442075704 0.09372811488304386 0.10912612525702123
|
68
|
+
0.12464768410205995 0.1413839103561751 0.1596741410585453
|
69
|
+
0.1759184069399719 0.19322446824327125 0.210691567977937
|
70
|
+
0.22845655409586113 0.24650226430391914 0.2650497977458401
|
71
|
+
0.28341059279725256 0.30264726163880595 0.3222909503597119
|
72
|
+
0.3415180146407486 0.36120344192936826 0.38097870683137053
|
73
|
+
0.4009628258714799 0.42071656620799663 0.4406341693717701
|
74
|
+
0.46057715168858765 7.0988221152911e-05 0.016278620751618286
|
75
|
+
0.03259693073674304 0.04967192015954666 0.06507510572727315
|
76
|
+
0.08193216437272284 0.09923561811615711 0.1166556734303942
|
77
|
+
0.13416924413319617 0.15192331989390162 0.1698669427742076
|
78
|
+
0.18819732013519314 0.20692007261808368 0.22520352719918568
|
79
|
+
0.24386166995327074 0.2629546458428124 0.28222526836647466
|
80
|
+
0.3019660404290296 0.32129576570338003 0.34105888899009573
|
81
|
+
0.36088646826753823 0.3807677427842703 0.40067699957871794
|
82
|
+
0.42061491923715927 0.4407819226122955 0.4605310364633991]
|
83
|
+
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
|
84
|
+
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
|
85
|
+
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]
|
86
|
+
z [10.855443501464377 17.32098343302835 26.042603408852838 41.038506548558644
|
87
|
+
70.16328746849081 122.47967297128532 173.39153348258986 210.49479953909872
|
88
|
+
232.2054583878787 271.49097031518374 303.25305276344363 332.0475954482092
|
89
|
+
357.4557031061652 379.67248029342215 399.59488853067387 413.6824308929333
|
90
|
+
423.4969609923641 430.95804558342076 436.33447825754433 439.91060697025836
|
91
|
+
442.46544280829954 443.7828019209314 445.44551252223863 446.3822170779967
|
92
|
+
447.03040608671915 3.7402750670694074 41.168600585025885 83.02282664213085
|
93
|
+
117.41178280399303 167.3956935721441 204.26213262455897 234.91703733944348
|
94
|
+
264.2463908853601 292.5126418351867 318.0447807275893 340.28528709553103
|
95
|
+
360.4027292674224 373.7859265238961 393.2999756995644 408.5544909574963
|
96
|
+
420.0025527426506 428.29426922401115 434.65168997825856 438.86105089891004
|
97
|
+
441.55391517195045 443.51403019241434 444.8637264447764 445.89531428160996
|
98
|
+
446.6010566550302 446.9761692230607 447.55465366104426]
|
99
|
+
|
57
100
|
```
|
2
題名の変更
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
補間
|
1
|
+
2dカラーマップでの線形補間におけるobject arrays are not supportedのエラー
|
body
CHANGED
File without changes
|
1
エラー文の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -8,4 +8,50 @@
|
|
8
8
|
となることがあります。
|
9
9
|
しかし普通に計算を行う時、この関数に代入する値はarrayのはずですし、実際に簡単な計算では問題がありません。
|
10
10
|
|
11
|
-
どのような時にこのエラーが生じるのでしょうか。
|
11
|
+
どのような時にこのエラーが生じるのでしょうか。
|
12
|
+
|
13
|
+
|
14
|
+
以下エラー画面です
|
15
|
+
|
16
|
+
```python
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
---------------------------------------------------------------------------
|
21
|
+
ValueError Traceback (most recent call last)
|
22
|
+
<ipython-input-17-31a9ccce0e38> in <module>()
|
23
|
+
29 zlabel = 'diff'
|
24
|
+
30
|
25
|
+
---> 31 twodim_colorPlot(df_up, xlabel, ylabel, zlabel)
|
26
|
+
|
27
|
+
<ipython-input-17-31a9ccce0e38> in twodim_colorPlot(dataframe, xlabel, ylabel, zlabel)
|
28
|
+
13 xi, yi = np.meshgrid(xi, yi)
|
29
|
+
14 # Interpolate
|
30
|
+
---> 15 rbf = scipy.interpolate.Rbf(x, y, z, function="linear")
|
31
|
+
16 zi = rbf(xi, yi)
|
32
|
+
17 plt.imshow(zi, vmin=-3.0, vmax=z.max(), origin='lower',
|
33
|
+
|
34
|
+
/opt/conda/lib/python3.5/site-packages/scipy/interpolate/rbf.py in __init__(self, *args, **kwargs)
|
35
|
+
220
|
36
|
+
221 self.A = self._init_function(r) - np.eye(self.N)*self.smooth
|
37
|
+
--> 222 self.nodes = linalg.solve(self.A, self.di)
|
38
|
+
223
|
39
|
+
224 def _call_norm(self, x1, x2):
|
40
|
+
|
41
|
+
/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)
|
42
|
+
78 """
|
43
|
+
79 a1 = _asarray_validated(a, check_finite=check_finite)
|
44
|
+
---> 80 b1 = _asarray_validated(b, check_finite=check_finite)
|
45
|
+
81 if len(a1.shape) != 2 or a1.shape[0] != a1.shape[1]:
|
46
|
+
82 raise ValueError('expected square matrix')
|
47
|
+
|
48
|
+
/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)
|
49
|
+
188 if not objects_ok:
|
50
|
+
189 if a.dtype is np.dtype('O'):
|
51
|
+
--> 190 raise ValueError('object arrays are not supported')
|
52
|
+
191 if as_inexact:
|
53
|
+
192 if not np.issubdtype(a.dtype, np.inexact):
|
54
|
+
|
55
|
+
ValueError: object arrays are not supported
|
56
|
+
|
57
|
+
```
|