Closed
Description
Pickling imshow
objects (I'm using them used for heatmaps) fails with the following error in IPython after %matplotlib inline
magic has been used. If inline figures are not set they work as expected.
UnpickleableError: Cannot pickle <type 'Image'> objects
Using matplotlib.tests.test_pickle.recursive_pickle
fails reporting the following (similar to #1719):
Failed to pickle attribute "gridline" in (list/tuple item #0 in (attribute "majorTicks" in (attribute "xaxis" in (list/tuple item #1 in (list/tuple item #1 in (list/tuple item #0 in (attribute "_elements" in (attribute "_axstack" in (top level object))))))))). Type: <class 'matplotlib.lines.Line2D'>
However, using matplotlib.tests.test_pickle.depth_getter
its possible to identify the object that is the cause of the initial error. It's at:
140628613187224 (8, <Image object at 0x7fe6a688c698>, u'attribute "_imcache" in (list/tuple item #0 in (attribute "images" in (list/tuple item #1 in (list/tuple item #1 in (list/tuple item #0 in (attribute "_elements" in (attribute "_axstack" in (top level object))))))))')
It looks as though this is a cache of the rendered image. Can these be ignored when pickling?
Metadata
Metadata
Assignees
Labels
No labels