-
Notifications
You must be signed in to change notification settings - Fork 45
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
Conversation
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.
There was a problem hiding this 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.
array_api_tests/dtype_helpers.py
Outdated
@@ -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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Lets make this new argument kw-only
- This is bikeshedding so feel free to ignore, just to say I think I'd prefer a more descriptive kwarg like
real_only=False
orinclude_complex=True
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Merging as that was your only comment and I need this for the compat library. |
These came up in updating numpy.array_api.