Fwd: Serializing dict in jython script
Posted by
P Page-McCaw on
Nov 20, 2015; 6:20pm
URL: http://imagej.273.s1.nabble.com/Fwd-Serializing-dict-in-jython-script-tp5014996.html
I have a dictionary in a python script with many x,y pixel coordinates. When the dict is serialized by pickle and then opened into an iPython-notebook so that I can use numpy and pyplot, the data is corrupted. The structure of the data is maintained, but the data which comes from the results table, is mangled.
For example, in fiji the dictionary looks like this
{u'a': [[array('f', [252.0, 371.0, 273.0, 326.0, 346.0,...
but unpickled this looks like
{u'a': [[array('f', [1.180597739699512e-38, 1.1806694861808855e-38,
I'm guessing there is something about the java array 'f' type that does not serialize with pickle? The keys are ok and other text
I could write it all out to text, then back in, but surely there is a way to do the serializing more readily?
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html