Skip to content
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

docs: add note that cross-kind comparisons are undefined #822

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

asmeurer
Copy link
Member

Does the language here look OK? Should we add anything along the lines of "comparisons with promotable types should promote first" (so that the result is numerically correct)?

Fixes #819.

@@ -772,6 +784,9 @@ def __le__(self: array, other: Union[int, float, array], /) -> array:

.. note::
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~array_api.less_equal`.

.. note::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment should be added to __lt__ below.

Copy link
Contributor

@kgryte kgryte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The language looks okay to me. Left comments for a small grammar correction and the need to add a missing note. Once addressed, LGTM.

@kgryte kgryte changed the title Add note that cross-kind comparisons are undefined docs: add note that cross-kind comparisons are undefined Sep 19, 2024
@kgryte kgryte added this to the v2024 milestone Sep 19, 2024
@kgryte kgryte added Narrative Content Narrative documentation content. Needs Changes Pull request which needs changes before being merged. labels Sep 19, 2024
asmeurer and others added 2 commits September 19, 2024 13:00
@asmeurer
Copy link
Member Author

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Narrative Content Narrative documentation content. Needs Changes Pull request which needs changes before being merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Comparing arrays of different dtype kinds
2 participants