You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
an arbitrary number of input arrays, scalars, and/or dtypes.
223
222
224
223
Returns
225
224
-------
226
225
out: dtype
227
-
the dtype resulting from an operation involving the input arrays and dtypes.
226
+
the dtype resulting from an operation involving the input arrays, scalars, and/or dtypes.
227
+
228
+
Notes
229
+
-----
230
+
231
+
- At least one argument must be an array or a dtype.
232
+
- If provided array and/or dtype arguments having mixed data type kinds (e.g., integer and floating-point), the returned dtype is unspecified and is implementation-dependent.
Returns elements chosen from ``x1`` or ``x2`` depending on ``condition``.
174
179
175
180
Parameters
176
181
----------
177
182
condition: array
178
183
when ``True``, yield ``x1_i``; otherwise, yield ``x2_i``. Should have a boolean data type. Must be compatible with ``x1`` and ``x2`` (see :ref:`broadcasting`).
179
-
x1: array
184
+
x1: Union[array, int, float, complex, bool]
180
185
first input array. Must be compatible with ``condition`` and ``x2`` (see :ref:`broadcasting`).
181
-
x2: array
186
+
x2: Union[array, int, float, complex, bool]
182
187
second input array. Must be compatible with ``condition`` and ``x1`` (see :ref:`broadcasting`).
183
188
184
189
Returns
185
190
-------
186
191
out: array
187
192
an array with elements from ``x1`` where ``condition`` is ``True``, and elements from ``x2`` elsewhere. The returned array *must* have a data type determined by :ref:`type-promotion` rules with the arrays ``x1`` and ``x2``.
193
+
194
+
Notes
195
+
-----
196
+
197
+
- At least one of ``x1`` and ``x2`` *must* be an array.
198
+
- If either ``x1`` or ``x2`` is a scalar value, the returned array *must* have a data type determined according to :ref:`mixing-scalars-and-arrays`.
0 commit comments