Skip to content

fix: clarify that condition should have a boolean dtype in where #868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/array_api_stubs/_2021_12/searching_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def where(condition: array, x1: array, x2: array, /) -> array:
Parameters
----------
condition: array
when ``True``, yield ``x1_i``; otherwise, yield ``x2_i``. Must be compatible with ``x1`` and ``x2`` (see :ref:`broadcasting`).
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`).
x1: array
first input array. Must be compatible with ``condition`` and ``x2`` (see :ref:`broadcasting`).
x2: array
Expand Down
2 changes: 1 addition & 1 deletion src/array_api_stubs/_2022_12/searching_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def where(condition: array, x1: array, x2: array, /) -> array:
Parameters
----------
condition: array
when ``True``, yield ``x1_i``; otherwise, yield ``x2_i``. Must be compatible with ``x1`` and ``x2`` (see :ref:`broadcasting`).
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`).
x1: array
first input array. Must be compatible with ``condition`` and ``x2`` (see :ref:`broadcasting`).
x2: array
Expand Down
2 changes: 1 addition & 1 deletion src/array_api_stubs/_2023_12/searching_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def where(condition: array, x1: array, x2: array, /) -> array:
Parameters
----------
condition: array
when ``True``, yield ``x1_i``; otherwise, yield ``x2_i``. Must be compatible with ``x1`` and ``x2`` (see :ref:`broadcasting`).
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`).
x1: array
first input array. Must be compatible with ``condition`` and ``x2`` (see :ref:`broadcasting`).
x2: array
Expand Down
2 changes: 1 addition & 1 deletion src/array_api_stubs/_draft/searching_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def where(condition: array, x1: array, x2: array, /) -> array:
Parameters
----------
condition: array
when ``True``, yield ``x1_i``; otherwise, yield ``x2_i``. Must be compatible with ``x1`` and ``x2`` (see :ref:`broadcasting`).
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`).
x1: array
first input array. Must be compatible with ``condition`` and ``x2`` (see :ref:`broadcasting`).
x2: array
Expand Down
Loading