Skip to content

Memory efficient reduce functions #8018

Answered by TomNicholas
mortonjt asked this question in General
Discussion options

You must be logged in to vote

Hi @mortonjt !

If you want to do a common reduction (e.g. mean) without blowing up memory then xarray will do this automatically if dask is installed, as Deepak says. (You should read our docs page on dask though).

If you want to apply a custom function (including a custom reduction) then you need to look at xarray.apply_ufunc, which can apply custom dask-aware operations.

Replies: 2 comments 1 reply

Comment options

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

Comment options

You must be logged in to vote
0 replies
Answer selected by dcherian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants