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

Complex dtype support in finfo() #484

Merged
merged 2 commits into from
Oct 5, 2022
Merged

Conversation

honno
Copy link
Member

@honno honno commented Sep 23, 2022

Per discussion in #433 and yesterdays meeting, this PR makes finfo() support complex dtypes by returning information of its real-valued component dtype, e.g.

>>> xp.finfo(xp.complex64)
finfo_object(
    bits=32,
    eps=1.1920928955078125e-07,
    max=3.4028234663852886e+38,
    min=-3.4028234663852886e+38,
    smallest_normal=1.1754943508222875e-38
)
>>> xp.finfo(xp.float32)
... # should contain the same information as above

(see #485 RE .dtype)

@rgommers rgommers added API change Changes to existing functions or objects in the API. topic: Complex Data Types Complex number data types. labels Sep 23, 2022
@rgommers rgommers added this to the v2022 milestone Sep 23, 2022
Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

LGTM too, in it goes. Thanks @honno

@rgommers rgommers merged commit 67ab474 into data-apis:main Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API change Changes to existing functions or objects in the API. topic: Complex Data Types Complex number data types.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants