質問編集履歴
2
コード
test
CHANGED
File without changes
|
test
CHANGED
@@ -50,6 +50,30 @@
|
|
50
50
|
|
51
51
|
しかしこのようにした場合ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()と表示されてしまいます。
|
52
52
|
|
53
|
+
また、
|
54
|
+
|
55
|
+
```python
|
56
|
+
|
57
|
+
indices = concatenate( (where(y>=0.5 , x < 1.0)[0],
|
58
|
+
|
59
|
+
where(y<=-0.5 , x < 1.0)[0],
|
60
|
+
|
61
|
+
where( y <= -3.0 , x >= 1.0)[0],
|
62
|
+
|
63
|
+
where( y >= 3.0 , x >= 1.0)[0],
|
64
|
+
|
65
|
+
where( x >= 3.0 )[0],
|
66
|
+
|
67
|
+
where( x <= 0 )[0],
|
68
|
+
|
69
|
+
where( z <= 0 )[0]) )
|
70
|
+
|
71
|
+
```
|
72
|
+
|
73
|
+
とした場合はValueError: either both or neither of x and y should be given
|
74
|
+
|
75
|
+
となります。T字とするのは不可能なのでしょうか?
|
76
|
+
|
53
77
|
どのようにすればよいのでしょうか?
|
54
78
|
|
55
79
|
一応オープンソースであるため以下にコード全体も貼っておきます。
|
1
コード編集
test
CHANGED
File without changes
|
test
CHANGED
@@ -288,6 +288,8 @@
|
|
288
288
|
|
289
289
|
|
290
290
|
|
291
|
+
#上に乗せた部分はここです。cw2などは編集しました。
|
292
|
+
|
291
293
|
indices = concatenate( (where(y>=0.5 and x < 1.0)[0],
|
292
294
|
|
293
295
|
where(y<=-0.5 and x < 1.0)[0],
|