Source

yt.geometry_tests / sphere.py

import time
from yt.mods import *
#pf = load("tests/DD0010/moving7_0010")
pf = load("/home/mturk/data/DD0039/output_0039")
sp = pf.h.sphere([0.5,0.5,0.5], 0.10)
t1 = time.time()
data = sp["Density"]
print "Returned"
print data.sum(dtype='float64'), data.shape, data.min(), data.max(), data.std(), (data==0).sum()
t2 = time.time()
print "%0.3e" % (t2-t1)