... | ... |
@@ -591,3 +591,16 @@ class IntegratorLearner(BaseLearner): |
591 | 591 |
self.x_mapping = defaultdict(lambda: SortedSet([], key=attrgetter("rdepth"))) |
592 | 592 |
for k, _set in x_mapping.items(): |
593 | 593 |
self.x_mapping[k].update(_set) |
594 |
+ |
|
595 |
+ def __getstate__(self): |
|
596 |
+ return ( |
|
597 |
+ self.function, |
|
598 |
+ self.bounds, |
|
599 |
+ self.tol, |
|
600 |
+ self._get_data(), |
|
601 |
+ ) |
|
602 |
+ |
|
603 |
+ def __setstate__(self, state): |
|
604 |
+ function, bounds, tol, data = state |
|
605 |
+ self.__init__(function, bounds, tol) |
|
606 |
+ self._set_data(data) |