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

Support Ramba distributed arrays. #5970

Open
DrTodd13 opened this issue Nov 10, 2021 · 3 comments
Open

Support Ramba distributed arrays. #5970

DrTodd13 opened this issue Nov 10, 2021 · 3 comments
Labels
enhancement topic-arrays related to flexible array support

Comments

@DrTodd13
Copy link

I would like to see Ramba distributed arrays (https://github.com/Python-for-HPC/ramba) supported in xarray as an alternative to Dask arrays.

@TomNicholas TomNicholas added topic-arrays related to flexible array support enhancement labels Nov 10, 2021
@DrTodd13
Copy link
Author

@TomNicholas Please add an in-progress label for the associated PR I opened.

@DrTodd13
Copy link
Author

DrTodd13 commented Nov 17, 2021

@TomNicholas @keewis

import ramba
import numpy as np
import xarray

ra1 = ramba.random.randn(10,20)
xa1 = xarray.DataArray(ra1)
np1 = xa1.data.asarray()
print("np1:", np1)
print("xa1.data:", xa1.data, type(xa1.data), xa1.data.dtype, type(xa1.data.dtype))

xa2 = xa1 + 10.0
xa22 = xa2 * 7.1
xa3 = np.sin(xa22)
xa4 = xa3.transpose()
xa5 = xa4.sum()
print("xa5:", xa5, type(xa5))

Using the __array_function__ API and other functions (and not my ill-conceived PR that added ramba to xarray for direct support) , I was able to run the above example. Originally, there were a couple parts of the NumPy API that ramba didn't previously support and I added those. The most difficult of those was 0d arrays. Those are working at least well enough now for the above example so now like I said in the meeting, I'd like even more complicated examples to explore.

Can anybody suggest or provide one?

@dcherian
Copy link
Contributor

Sorry for the late reply @DrTodd13 .

I think #4972 is the real answer here. It looks like @keewis has it mostly working. It hasn't been merged because test_sparse isn't passing yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement topic-arrays related to flexible array support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants