Skip to content

Pass arguments along with preprocess=... on open_mfdataset #6820

Answered by TomNicholas
bradyrx asked this question in Q&A
Discussion options

You must be logged in to vote

I think I've done this using functools.partial before. Using that you can bind any args or kwargs into the function before passing it in to open_mfdataset, but still have it wait upon the ds argument. This pattern might be a good addition to a "recipes" page or similar (or just an example in the open_mfdataset docstring).

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bradyrx
Comment options

@bradyrx
Comment options

Answer selected by andersy005
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