[yt-users] Problems with pickle

Elizabeth Tasker tasker at astro1.sci.hokudai.ac.jp
Mon Mar 4 20:39:31 PST 2013


Just as an update to this problem:

It does stem from the fact that the data was a boolean object in its dim and distant past:

diskouter = pf.h.disk(na.array([16.0, 16.0, 16.0]), na.array([0.0,0.0,1.0]), 7.5, 100e-3/pf['kpc'])
diskinner = pf.h.disk(na.array([16.0, 16.0, 16.0]), na.array([0.0,0.0,1.0]), 4.5, 100e-3/pf['kpc'])
diskdata = pf.h.boolean([diskouter, "NOT", diskinner])
.
.
.
contours = diskdata.extract_connected_sets("Density", 1, cloud_threshold, maxv+1, log_space=True, cache=True)
this_agglomeration = contours[1][0][a]
.
.
.
cloud = this_agglomeration.extract_region(agglomeration_peak_assign == p)
.
.
.
cPickle.dump(cloud, file, protocol=-1)

I also did a very old roll back and confirmed this isn't a new problem; I must have never tried to save an object that was at one point a boolean. Is there any way around this? (Apart from not using the boolean?)

Thanks!

Elizabeth


On Mar 4, 2013, at 10:29 PM, Elizabeth Tasker <tasker at astro1.sci.hokudai.ac.jp> wrote:

> Hi Stephen,
> 
> That method gives me exactly the same error.
> 
> Either I'm doing something silly (quite probable) or perhaps there's been a change to this machinery since the last update?
> 
> Elizabeth
> 
> 
> On Mar 4, 2013, at 10:18 PM, Stephen Skory <s at skory.us> wrote:
> 
>> Hi Elizabeth,
>> 
>>> I'm getting a problem with pickle that I've not seen before.
>> 
>> Have you tried save_object / load_object?
>> 
>> http://yt-project.org/doc/analyzing/objects.html#storing-and-loading-objects
>> 
>> --
>> Stephen Skory
>> s at skory.us
>> http://stephenskory.com/
>> 510.621.3687 (google voice)
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> 
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org




More information about the yt-users mailing list