[yt-users] derived quantities

Matthew Turk matthewturk at gmail.com
Fri Dec 10 16:01:57 PST 2010


Hi Stephen,

Try returning the .sum() from within the main function.  You've set
the number of return entries to 1, but returned an iterable.  So it
only takes the first item from that iterable; this is actually part of
the design.  If you want to ensure that it gets an array (I do not
think you want to do this, as it completely eliminates memory
conservation) you can return (ct,) to ensure that it's an array inside
an iterable.

But, I think you should be returning ct.sum() from _NumberOfStars.

-Matt

On Fri, Dec 10, 2010 at 4:00 PM, Stephen Skory <stephenskory at yahoo.com> wrote:
> Matt,
>
>> You might try printing out what is fed into the combine function; I
>> think what you really want to do is return (data["creation_time"] >
>> 0).sum() in _NumberOfStars.  Inside _combNumberOfStars try printing
>> both data and ct, as well, to see if it's an axis problem with the
>> combine function.
>
>
> It appears that for some reason only the first entry of each of the arrays from the grids is being fed into the combine function. The script <http://paste.enzotools.org/show/1411/> outputs <http://paste.enzotools.org/show/1412/>. This sim has 297 grids, which is the size of the ct array in the combine function.
>
> I'm confused...
>
>  Stephen Skory
> stephenskory at yahoo.com
> 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
>



More information about the yt-users mailing list