Returns a dictionary that can be saved or load.
(self)
| 250 | self.check_dim() |
| 251 | |
| 252 | def state_dict(self) -> T.Dict[str, T.Any]: |
| 253 | """Returns a dictionary that can be saved or load.""" |
| 254 | to_save = dict() |
| 255 | for name in self.attr_names: |
| 256 | to_save[name] = getattr(self, name, None) |
| 257 | to_save['included_point_at_inf'] = self.included_point_at_inf |
| 258 | return to_save |
| 259 | |
| 260 | def load_state_dict( |
| 261 | self, |