We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
__getstate__
1 parent f8b8610 commit dc63f75Copy full SHA for dc63f75
cmdstanpy/stanfit/mcmc.py
@@ -130,6 +130,10 @@ def __getattr__(self, attr: str) -> np.ndarray:
130
raise AttributeError(*e.args)
131
132
def __getstate__(self) -> dict:
133
+ # This function returns the mapping of objects to serialize with pickle.
134
+ # See https://docs.python.org/3/library/pickle.html#object.__getstate__
135
+ # for details. We call _assemble_draws to ensure posterior samples have
136
+ # been loaded prior to serialization.
137
self._assemble_draws()
138
return self.__dict__
139
0 commit comments