statsmodels/statsmodels — Issue #96: deepcopy breaks on ResettableCache
Author: josef-pkt
Created: 2011-10-29 12:37:30+00:00
State: open

after running example_discrete.py, deepcopy doesn't work for mlogit results

```
>>> import copy
>>> copy.deepcopy(mlogit_res)
Traceback (most recent call last):
File "", line 1, in
File "C:\Python26\lib\copy.py", line 189, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "C:\Python26\lib\copy.py", line 338, in _reconstruct
state = deepcopy(state, memo)
File "C:\Python26\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python26\lib\copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\Python26\lib\copy.py", line 189, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "C:\Python26\lib\copy.py", line 338, in _reconstruct
state = deepcopy(state, memo)
File "C:\Python26\lib\copy.py", line 162, in deepcopy
y = copier(x, memo)
File "C:\Python26\lib\copy.py", line 255, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "C:\Python26\lib\copy.py", line 189, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "C:\Python26\lib\copy.py", line 335, in _reconstruct
y[key] = value
File "e:\josef\eclipsegworkspace\statsmodels-git\statsmodels-josef\scikits\statsmodels\tools\decorators.py", line 52, in __setitem__
for mustreset in self._resetdict.get(key, []):
AttributeError: 'ResettableCache' object has no attribute '_resetdict'
```