Skip to content

Conversation

@tomwhite
Copy link
Member

This is for #67

This is a cutdown version of the equivalent code in Dask. It passes a number of tests, but the main limitation is that it only supports a single output. I've got a number of ideas for removing this limitation (e.g. write one output at a time - in series), but I think this is a good start for supporting xarray.

@TomNicholas I'll leave this open for a few days in case you want to take a look!

@TomNicholas
Copy link
Member

Awesome @tomwhite !

My only comment is that when xarray.apply_ufunc is called with dask then output_sizes is a required kwarg (at least when creating new dimensions on the output IIRC). I would need to look at the implementation in xarray again, but it might be the case that output_sizes would be required for xarray to make use of cubed.apply_gufunc too.

@tomwhite
Copy link
Member Author

Thanks for taking a look @TomNicholas and pointing out that output_sizes is needed in xarray.

I'm going to merge this and create a follow-on issue for output_sizes (see #150), as it needs a bit more investigation.

@tomwhite tomwhite merged commit db1ad26 into main Feb 17, 2023
@tomwhite tomwhite deleted the gufunc branch February 17, 2023 17:53
@tomwhite
Copy link
Member Author

Support for output_sizes is in #151

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.

3 participants