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

Run tests using JAX as the backend array API (on CPU) #374

Merged
merged 1 commit into from
Feb 12, 2024
Merged

Conversation

tomwhite
Copy link
Member

@tomwhite tomwhite commented Feb 9, 2024

This is to show that things work when the backend array library is something other than NumPy.

@tomwhite
Copy link
Member Author

tomwhite commented Feb 9, 2024

This is related to #304

@@ -129,7 +130,7 @@ def __init__(
self.chunks = template.chunks
self.template = template
if array.size > 0:
template[...] = array
template[...] = backend_array_to_numpy_array(array)
Copy link
Member

Choose a reason for hiding this comment

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

FYI xarray has some more general versions of these types of array coercion functions here

https://github.com/pydata/xarray/blob/f343b7b23a275ebb17cdd91e73289525a627d39e/xarray/core/pycompat.py#L109

@tomwhite tomwhite merged commit f3295e7 into main Feb 12, 2024
7 checks passed
@tomwhite tomwhite deleted the jax-tests branch February 12, 2024 08:38
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