File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class BufferDTypes:
4141 observations : InitVar [Union [DTypeLike , Mapping [str , DTypeLike ]]]
4242 actions : InitVar [DTypeLike ]
4343
44- dict_obs : MappingProxyType [str , np .dtype ] = field (init = False )
44+ dict_obs : MappingProxyType [str , np .dtype ] = field (default = MappingProxyType ({}), init = False )
4545 obs : Optional [np .dtype ] = field (default = None , init = False )
4646 act : Optional [np .dtype ] = field (default = None , init = False )
4747
@@ -61,7 +61,7 @@ def __getstate__(self):
6161 def __setstate__ (self , state : Mapping [str , Any ]):
6262 state = dict (state )
6363 if state .get ("dict_obs" ):
64- state ["dict_obs" ] = MappingProxyType (state ["dict_obs" ])
64+ state ["dict_obs" ] = MappingProxyType (state ["dict_obs" ]. copy () )
6565 self .__dict__ .update (state )
6666
6767 @classmethod
You can’t perform that action at this time.
0 commit comments