[Yt-dev] ParticleIO patch for review
Stephen Skory
stephenskory at yahoo.com
Sun Jan 10 14:46:04 PST 2010
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 at physics.ucsd.edu o__ Stephen Skory
http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student
________________________________(_)_\(_)_______________
More information about the yt-dev
mailing list