回答編集履歴

1

d

2019/06/03 09:09

投稿

tiitoi
tiitoi

スコア21960

answer CHANGED
@@ -32,7 +32,7 @@
32
32
  > If both non-None, x and y must have the same shape. The condition tensor must be a scalar if x and y are scalar. If x and y are vectors of higher rank, then condition must be either a vector with size matching the first dimension of x, or must have the same shape as x.
33
33
  > The condition tensor acts as a mask that chooses, based on the value at each element, whether the corresponding element / row in the output should be taken from x (if true) or y (if false).
34
34
 
35
- x, y を指定した場合、conditions が True の要素はそれと同じインデックスの x の要素、conditions が True の要素はそれと同じインデックスの y の要素からなるテンソルを返します。
35
+ x, y を指定した場合、conditions が True の要素はそれと同じインデックスの x の要素、conditions が False の要素はそれと同じインデックスの y の要素からなるテンソルを返します。
36
36
  プログラミングで出てくる**三項間演算子**と同じ働きになります。
37
37
 
38
38
  ```python