(self)
| 161 | self.stored_np_state = None |
| 162 | |
| 163 | def __enter__(self): |
| 164 | # Store the current random state |
| 165 | self.stored_state = random.getstate() |
| 166 | self.stored_np_state = np.random.get_state() |
| 167 | |
| 168 | # Set the random seed |
| 169 | random.seed(self.seed) |
| 170 | np.random.seed(self.seed) |
| 171 | |
| 172 | def __exit__(self, exc_type, exc_value, traceback): |
| 173 | # Restore the random state |
nothing calls this directly
no outgoing calls
no test coverage detected