Source

yt.geometry_tests / disk.py

from yt.mods import *
import time

pf = load("JHK-DD0030/galaxy0030")
dd = pf.h.disk([0.5,0.5,0.5], [0.1, 0.3, 0.6], 0.1, 0.03)
t1 = time.time()
data = dd["Density"]
t2 = time.time()
print data.sum(dtype='float64'), data.shape
print "%0.3e" % (t2-t1)