[yt-users] derived quantities
Stephen Skory
stephenskory at yahoo.com
Fri Dec 10 16:06:31 PST 2010
Matt,
> But, I think you should be returning ct.sum() from _NumberOfStars.
With only that change to what I previously sent, I get this...
Traceback (most recent call last):
File "analyze.py", line 19, in <module>
print 'total', dd.quantities["NumberOfStars"]()
File "/share/home/00649/tg457850/yt/lib/python2.6/site-packages/yt-2.0dev-py2.6-linux-x86_64.egg/yt/data_objects/derived_quantities.py", line 90, in __call__
return self._call_func_lazy(args, kwargs)
File "/share/home/00649/tg457850/yt/lib/python2.6/site-packages/yt-2.0dev-py2.6-linux-x86_64.egg/yt/data_objects/derived_quantities.py", line 98, in _call_func_lazy
for i in range(self.n_ret): self.retvals[i].append(rv[i])
IndexError: invalid index to scalar variable.
Stephen Skory
stephenskory at yahoo.com
http://stephenskory.com/
510.621.3687 (google voice)
More information about the yt-users
mailing list