-
Notifications
You must be signed in to change notification settings - Fork 12
gh-958: make positions_from_delta Array API compatible
#959
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
| np.testing.assert_array_less(actual, desired) | ||
|
|
||
| @staticmethod | ||
| def assert_equal(actual: AnyArray, desired: AnyArray) -> None: |
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.
Removing this as I tried to use it when I meant to use assert_array_equal
|
|
||
| pos = benchmark(function_to_benchmark) | ||
|
|
||
| lon, lat, cnt = data_transformer.catpos(pos, xp=np) |
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.
Changed this as it looks rude
| nside, | ||
| ipix, | ||
| lonlat=True, | ||
| rng=_utils.rng_dispatcher(xp=np), |
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.
randang internally uses numpy which means we have read-only issues. This change means we can get around it (but still rely on NumPy). We could move this to it's own module for healpix-changes
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.
Alternatively, @ntessore could randang be changed to accept random seeds?
Co-authored-by: Connor Aird <[email protected]>
Description
As part of the work towards #413, I'm working on #947. As part of the work I was porting the individual functions to the Array API, but it makes sense to do this in one step first.
Closes: #958, #907
Changelog entry
Changed: Make
positions_from_deltaArray API compatibleChecks