Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
Bug report
Bug summary
As of0d1d95c on the master branch it is no longer possible to deepcopy aLogNorm
instance, which is a regression from3.3.x
.
Code for reproduction
importmatplotlib.colorsasmcolorimportcopynorm=mcolor.LogNorm()copy.deepcopy(norm)
Actual outcome
Traceback (most recent call last): File "test.py", line 4, in <module> copy.deepcopy(norm) File "/Users/dstansby/miniconda3/envs/dev/lib/python3.8/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/Users/dstansby/miniconda3/envs/dev/lib/python3.8/copy.py", line 270, in _reconstruct state = deepcopy(state, memo) File "/Users/dstansby/miniconda3/envs/dev/lib/python3.8/copy.py", line 146, in deepcopy y = copier(x, memo) File "/Users/dstansby/miniconda3/envs/dev/lib/python3.8/copy.py", line 230, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/Users/dstansby/miniconda3/envs/dev/lib/python3.8/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/Users/dstansby/miniconda3/envs/dev/lib/python3.8/copy.py", line 270, in _reconstruct state = deepcopy(state, memo) File "/Users/dstansby/miniconda3/envs/dev/lib/python3.8/copy.py", line 146, in deepcopy y = copier(x, memo) File "/Users/dstansby/miniconda3/envs/dev/lib/python3.8/copy.py", line 230, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/Users/dstansby/miniconda3/envs/dev/lib/python3.8/copy.py", line 153, in deepcopy y = copier(memo) File "/Users/dstansby/github/matplotlib/lib/matplotlib/transforms.py", line 143, in __copy__ raise NotImplementedError(NotImplementedError: TransformNode instances can not be copied. Consider using frozen() instead.
Expected outcome
No error
Matplotlib version
- Operating system:
- Matplotlib version:
- Matplotlib backend (
print(matplotlib.get_backend())
): - Python version:
- Jupyter version (if applicable):
- Other libraries: