Where - 9 vs 16¶
- Where9 → Where16 +6 -1
Where9 → Where16
RENAMED
@@ -1 +1 @@
|
|
1
1
|
Return elements, either from X or Y, depending on condition.
|
2
2
|
Where behaves like
|
3
3
|
[numpy.where](https://docs.scipy.org/doc/numpy/reference/generated/numpy.where.html)
|
4
4
|
with three parameters.
|
5
5
|
This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check Broadcasting in ONNX <https://github.com/onnx/onnx/blob/master/docs/Broadcasting.md>_.
|
6
|
+
|
7
|
+
**History**
|
8
|
+
- Version 16 adds bfloat16 to the types allowed (for the second and third parameter).
|
6
9
|
**Inputs**
|
7
10
|
* **condition** (heterogeneous) - **B**:
|
8
11
|
When True (nonzero), yield X, otherwise yield Y
|
9
12
|
* **X** (heterogeneous) - **T**:
|
10
13
|
values selected at indices where condition is True
|
11
14
|
* **Y** (heterogeneous) - **T**:
|
12
15
|
values selected at indices where condition is False
|
13
16
|
**Outputs**
|
14
17
|
* **output** (heterogeneous) - **T**:
|
15
18
|
Tensor of shape equal to the broadcasted shape of condition, X, and
|
16
19
|
Y.
|
17
20
|
**Type Constraints**
|
18
21
|
* **B** in (
|
19
22
|
tensor(bool)
|
20
23
|
):
|
21
24
|
Constrain to boolean tensors.
|
22
25
|
* **T** in (
|
26
|
+
tensor(bfloat16),
|
23
27
|
tensor(bool),
|
24
28
|
tensor(complex128),
|
25
29
|
tensor(complex64),
|
26
30
|
tensor(double),
|
27
31
|
tensor(float),
|
28
32
|
tensor(float16),
|
29
33
|
tensor(int16),
|
30
34
|
tensor(int32),
|
31
35
|
tensor(int64),
|
32
36
|
tensor(int8),
|
33
37
|
tensor(string),
|
34
38
|
tensor(uint16),
|
35
39
|
tensor(uint32),
|
36
40
|
tensor(uint64),
|
37
41
|
tensor(uint8)
|
38
42
|
):
|
39
|
-
Constrain input and output types to all tensor types
|
43
|
+
Constrain input and output types to all tensor types (including
|
44
|
+
bfloat).
|