Skip to content

expm1 should having float inputs #413

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 1 commit into from
Apr 5, 2022

Conversation

honno
Copy link
Member

@honno honno commented Apr 5, 2022

Was expm1() accepting int dtypes an oversight? If so, here's a fix!

If not, I'm guessing the intention was to "allow" int dtypes here, but leave it as implementation-defined behaviour. In that case we'll need to add a note ala divide().

@asmeurer
Copy link
Member

asmeurer commented Apr 5, 2022

Presumably this was just a typo. expm1 should be no different from exp. And it looks like the test suite and numpy implementation are already correct here.

@asmeurer
Copy link
Member

asmeurer commented Apr 5, 2022

All the floating-point functions can accept integer inputs if the library wants to. I don't think we need such a note. I think divide only gets a note because it's not obvious whether the spec requires integer division on integer inputs or not (compared to something like exp where it would be pointless to support integer inputs unless you did a float promotion).

@kgryte kgryte added bug Something isn't working. Maintenance Bug fix, typo fix, or general maintenance. labels Apr 5, 2022
@kgryte
Copy link
Contributor

kgryte commented Apr 5, 2022

This appears to have been an oversight. As such, will merge...

@kgryte kgryte merged commit 93f8d35 into data-apis:main Apr 5, 2022
@honno honno deleted the expm1-floating-input branch November 1, 2022 10:51
@kgryte kgryte added this to the v2021 milestone Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. Maintenance Bug fix, typo fix, or general maintenance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants