You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After refactoring of SolutionArray in Cantera/cantera#1426 (and Cantera/cantera#1458), there is still the option of making the object picklable in Python (similar to Cantera/cantera#692). An implementation is deferred, as it is unclear how common use cases would be.
The implementation itself would be straight-forward: modify C++ SolutionArray::save/restore to allow for YAML string output/input, and implement Python SolutionArray.__getstate__/__getstate__.
The text was updated successfully, but these errors were encountered:
In general having things be pickleable is nice, especially for some parallelization and workflow tools that rely on it
Thanks for the comment. I generally agree, and have implemented Cantera/cantera#692 for that reason. Pickled SolutionArray objects may be a good way to pass back results from multiprocessing pools. I don’t have an urgent need for this at the moment myself, but if anyone else wants to take this on I’d be more than happy to assist with a PR.
Abstract
After refactoring of
SolutionArray
in Cantera/cantera#1426 (and Cantera/cantera#1458), there is still the option of making the object picklable in Python (similar to Cantera/cantera#692). An implementation is deferred, as it is unclear how common use cases would be.The implementation itself would be straight-forward: modify C++
SolutionArray::save/restore
to allow for YAML string output/input, and implement PythonSolutionArray.__getstate__/__getstate__
.The text was updated successfully, but these errors were encountered: