
Hi Stephen, Wow, good catch. I've updated the particle_validation struct with an npy_types member, which I now set as an array. The new patch is here: http://paste.enzotools.org/show/295/ Can you try this one? Thanks! -Matt On Sun, Jan 10, 2010 at 2:46 PM, Stephen Skory <stephenskory@yahoo.com> wrote:
Matt,
What's happening is the 'npy_type' is not getting set for each call of 'run_validators()' because it is set under the same 'if' statement that creates the initial array to store the values in. Subsequent calls don't create the array, but they also don't set 'npy_type'. So I think this:
if(pv->return_values[i] == NULL){
should be moved to surround:
pv->return_values[i] = (PyArrayObject *) PyArray_SimpleNewFromDescr( 1, &dims, PyArray_DescrFromType(npy_type));
Or, 'npy_type' needs to be stored more persistently between calls of 'run_validators()'. Thoughts? _______________________________________________________ sskory@physics.ucsd.edu o__ Stephen Skory http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student ________________________________(_)_\(_)_______________ _______________________________________________ Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org