Skip to content

Divide functions have ambiguous specification for integer inputs #361

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

Closed
honno opened this issue Jan 7, 2022 · 1 comment · Fixed by #362
Closed

Divide functions have ambiguous specification for integer inputs #361

honno opened this issue Jan 7, 2022 · 1 comment · Fixed by #362
Labels
Narrative Content Narrative documentation content. topic: Type Promotion Type promotion.

Comments

@honno
Copy link
Member

honno commented Jan 7, 2022

divide() (and __truediv__/__itruediv__) allows x1 and x2 to be integer arrays, but the ouput is specified as a floating array determined by type promotion, which int types can't promote to.

The spec should either clarify behaviour for both mixed int/float array and two int array scenarios, or note they are out-of-scope similiar to pow().

@honno honno changed the title Divide functions have ambiguous behaviour for integer inputs Divide functions have ambiguous specification for integer inputs Jan 7, 2022
@kgryte
Copy link
Contributor

kgryte commented Jan 7, 2022

The spec can be updated with a note similar to pow. Feel free to submit a PR with the proposed changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Narrative Content Narrative documentation content. topic: Type Promotion Type promotion.
Projects
None yet
2 participants