Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing kwargs to wload when calling produce_or_load #411

Open
NuclearPowerNerd opened this issue Apr 10, 2024 · 2 comments
Open

Allow passing kwargs to wload when calling produce_or_load #411

NuclearPowerNerd opened this issue Apr 10, 2024 · 2 comments

Comments

@NuclearPowerNerd
Copy link
Contributor

NuclearPowerNerd commented Apr 10, 2024

Hello!

I am having some trouble using produce_or_load when my types change, which they often do during my development. The issue is that since I cannot pass any arguments to wload within produce_or_load so then I cannot pass a typemap to tell JLD2 how to reconstruct my types.

I could of course use load directly but I'd rather use DrWatson's methods.

Possibly something along these lines could resolve this?

Add the following kwarg to produce_or_load: wload_kwargs (there is already a wsave_kwargs).
Then modify the calls data = wload(file) to data = wload(file; wload_kwargs...).

If there is already a way of achieving this and I have missed it, please let me know.

If everyone agrees, I can make a PR to implement this change.

Edit: Spelling

@Datseris
Copy link
Member

yes sounds like a good solution!

@NuclearPowerNerd
Copy link
Contributor Author

yes sounds like a good solution!

Cool - I just created the pull request here.

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

No branches or pull requests

2 participants