Skip to content

Some fixes for v2022.12 #189

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 6 commits into from
Jun 16, 2023
Merged

Some fixes for v2022.12 #189

merged 6 commits into from
Jun 16, 2023

Conversation

asmeurer
Copy link
Member

@asmeurer asmeurer commented Jun 5, 2023

These came up in updating numpy.array_api.

asmeurer added 2 commits June 5, 2023 16:36
It should have been using xp.real(x) instead of x.real.

I'm not sure if float(x) or complex(x) would be better instead.
@asmeurer asmeurer changed the title Fix a test helper Some fixes for v2022.12 Jun 5, 2023
@honno honno self-requested a review June 12, 2023 19:14
Copy link
Member

@honno honno left a comment

Choose a reason for hiding this comment

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

Save my comment on making the new kwarg in is_float_dtype() kw-only, LGTM!

I suppose we should xfail the test_{i,f}info tests, even though we know when your numpy.array_api PR gets merged it'll be back in the green.

@@ -157,19 +157,18 @@ def is_int_dtype(dtype):
return dtype in all_int_dtypes


def is_float_dtype(dtype):
def is_float_dtype(dtype, real=False):
Copy link
Member

Choose a reason for hiding this comment

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

  1. Lets make this new argument kw-only
  2. This is bikeshedding so feel free to ignore, just to say I think I'd prefer a more descriptive kwarg like real_only=False or include_complex=True.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@asmeurer
Copy link
Member Author

Merging as that was your only comment and I need this for the compat library.

@asmeurer asmeurer merged commit f82c7bc into data-apis:master Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants