Skip to content

xr.apply_ufunc raise error: Buffer has wrong number of dimensions (expected 2, got 3) #4780

Answered by dcherian
QINQINKONG asked this question in Q&A
Discussion options

You must be logged in to vote

I think you need to specify input_core_dims=[["lat", "lon"], ["lat","lon"], ["time"]] to prevent "broadcasting" which is converting everything to a 3D variable.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@QINQINKONG
Comment options

Answer selected by QINQINKONG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants