... | ... |
@@ -102,6 +102,12 @@ class BaseLearner(metaclass=abc.ABCMeta): |
102 | 102 |
The number of points to choose. |
103 | 103 |
""" |
104 | 104 |
|
105 |
+ def __getstate__(self): |
|
106 |
+ return copy(self.__dict__) |
|
107 |
+ |
|
108 |
+ def __setstate__(self, state): |
|
109 |
+ self.__dict__ = state |
|
110 |
+ |
|
105 | 111 |
class AverageLearner(BaseLearner): |
106 | 112 |
def __init__(self, function, atol=None, rtol=None): |
107 | 113 |
"""A naive implementation of adaptive computing of averages. |