Skip to content

Conversation

mathause
Copy link
Collaborator

@mathause mathause commented Jun 8, 2020

This would be pretty useful when using apply_ufunc for e.g. statistical tests that require vectorize=True and can consume data of unequal length (i.e. uses exclude_dims). This should also extend to dask arrays with dask="parallelized" once #4060 is implemented.

Copy link
Member

@shoyer shoyer left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! What do you think of my suggestion of putting this in the to_gufunc_string method rather than in the data model for _UFuncSignature? That seems a little less invasive to me.

@mathause
Copy link
Collaborator Author

Sounds good. I can move _enumerate into to_gufunc_string. I think it makes sense to wait for #4060.

@mathause mathause mentioned this pull request Jun 15, 2020
23 tasks
@mathause
Copy link
Collaborator Author

Inplemented @shoyer's suggestion to add exclude_dims as optional argument to to_gufunc_string. The readthedocs error is a timeout so should be fine to review.

@keewis
Copy link
Collaborator

keewis commented Aug 19, 2020

The readthedocs error is a timeout

Unfortunately not. The build timed out after the error and the traceback is visible. My own setup doesn't time out on errors, so I asked support to help fix that. They removed stale memory constraints (which is why the traceback is visible), but somehow the build still times out on errors.

In this case pandas has a minimum version requirement for xarray, but the detected version is 0.1. I'm not sure why version detection works for me but not for you, maybe because you didn't update the tags on your repo in a long time?

Edit: to re-trigger RTD, we have to close and reopen the PR; they don't allow rerunning a PR build

@mathause mathause closed this Aug 19, 2020
@mathause mathause reopened this Aug 19, 2020
@mathause
Copy link
Collaborator Author

Thanks keewis! I don't think I would have figured that out. I pushed the tags to my fork.

@mathause mathause closed this Aug 19, 2020
@mathause mathause reopened this Aug 19, 2020
@mathause
Copy link
Collaborator Author

But unfortunately this doesn't help :( If you have another idea I am all ears. But anyways it should not stop anyone from reviewing.

@keewis
Copy link
Collaborator

keewis commented Aug 19, 2020

on my own setup the build completes: https://readthedocs.org/projects/xarray-keewis/builds/11696307/ So this is definitely an issue with the setup, but I don't know how to fix that...

@kmuehlbauer
Copy link
Contributor

@keewis In the xarray setup there is --prune-tags. In your setup this is not there. Not sure, if this might be connected.

@keewis
Copy link
Collaborator

keewis commented Aug 19, 2020

thanks, @kmuehlbauer, good spot. However, that seems to come from the PR build (see also https://readthedocs.org/projects/xray/builds/11695402/, which doesn't fail), so I guess there has to be something in the code that changes the version.

Copy link
Contributor

@dcherian dcherian left a comment

Choose a reason for hiding this comment

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

Very clean. Great work!

@keewis
Copy link
Collaborator

keewis commented Aug 19, 2020

the merge seems to have fixed it. Not sure why it didn't work before.

@mathause
Copy link
Collaborator Author

Thanks @keewis!

@mathause mathause merged commit a75248a into pydata:master Aug 24, 2020
@mathause mathause deleted the fix/apply_ufunc_exclude_dims_vectorize branch August 24, 2020 13:37
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.

error for apply_ufunc with exclude_dims and vectorize
5 participants