Source

yt.geometry_tests / slice.py

Full commit
from yt.mods import *
import time

pf = load("DD0039/output_0039")
v, c = pf.h.find_max("Density")
dd = pf.h.slice(0, c[0])
t1 = time.time()
data = dd["Density"]
t2 = time.time()
print "Took1:", data.sum(dtype='float64'), data.shape
print "Took2: %0.3e" % (t2-t1)