Skip to content

Align casting methods with Python behaviour #497

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 15 commits into from
Dec 14, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Special case neg zeros in x.__int__()
  • Loading branch information
honno committed Nov 15, 2022
commit 8212e6747c0994f68e5e15cce09d2f084c3857c9
1 change: 1 addition & 0 deletions spec/API_specification/array_api/array_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ def __int__(self: array, /) -> int:
For floating-point operands,

- If ``self`` is a finite number, the result is the integer part of ``self``.
- If ``self`` is ``-0``, the result is ``0``.

Parameters
----------
Expand Down