[Yt-svn] yt-commit r1372 - trunk/yt/lagos

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Tue Jul 14 17:48:52 PDT 2009


Author: mturk
Date: Tue Jul 14 17:48:50 2009
New Revision: 1372
URL: http://yt.spacepope.org/changeset/1372

Log:

Updated RTIntegrator.pyx and .c to work in all the test cases we considered.
Should give correct results, but if it does not, let somebody know.  I've
optimized it as much as I could in Cython; I think we might move from Cython to
hand-coded C someday...



Modified:
   trunk/yt/lagos/BaseDataTypes.py
   trunk/yt/lagos/RTIntegrator.c
   trunk/yt/lagos/RTIntegrator.pyx

Modified: trunk/yt/lagos/BaseDataTypes.py
==============================================================================
--- trunk/yt/lagos/BaseDataTypes.py	(original)
+++ trunk/yt/lagos/BaseDataTypes.py	Tue Jul 14 17:48:50 2009
@@ -458,16 +458,17 @@
             i1 = (i+1) % 3
             i2 = (i+2) % 3
             vs = self._get_line_at_coord(LE[:,i], i)
-            p = p | ( ( (LE[:,i1] < vs[:,i1]) & (RE[:,i1] > vs[:,i1]) ) \
-                    & ( (LE[:,i2] < vs[:,i2]) & (RE[:,i2] > vs[:,i2]) ) )
+            p = p | ( ( (LE[:,i1] <= vs[:,i1]) & (RE[:,i1] >= vs[:,i1]) ) \
+                    & ( (LE[:,i2] <= vs[:,i2]) & (RE[:,i2] >= vs[:,i2]) ) )
             vs = self._get_line_at_coord(RE[:,i], i)
-            p = p | ( ( (LE[:,i1] < vs[:,i1]) & (RE[:,i1] > vs[:,i1]) ) \
-                    & ( (LE[:,i2] < vs[:,i2]) & (RE[:,i2] > vs[:,i2]) ) )
-        p = p | ( na.all( LE < self.start_point, axis=1 ) 
-                & na.all( RE > self.start_point, axis=1 ) )
-        p = p | ( na.all( LE < self.end_point,   axis=1 ) 
-                & na.all( RE > self.end_point,   axis=1 ) )
-        self._grids = self.hierarchy.grids.copy()#[p]
+            p = p | ( ( (LE[:,i1] <= vs[:,i1]) & (RE[:,i1] >= vs[:,i1]) ) \
+                    & ( (LE[:,i2] <= vs[:,i2]) & (RE[:,i2] >= vs[:,i2]) ) )
+        p = p | ( na.all( LE <= self.start_point, axis=1 ) 
+                & na.all( RE >= self.start_point, axis=1 ) )
+        p = p | ( na.all( LE <= self.end_point,   axis=1 ) 
+                & na.all( RE >= self.end_point,   axis=1 ) )
+        #self._grids = self.hierarchy.grids[p]
+        self._grids = self.hierarchy.grids.copy()
 
     def _get_line_at_coord(self, v, index):
         # t*self.vec + self.start_point = self.end_point

Modified: trunk/yt/lagos/RTIntegrator.c
==============================================================================
--- trunk/yt/lagos/RTIntegrator.c	(original)
+++ trunk/yt/lagos/RTIntegrator.c	Tue Jul 14 17:48:50 2009
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.11.2 on Wed Jul  8 16:54:23 2009 */
+/* Generated by Cython 0.11.2 on Tue Jul 14 20:45:07 2009 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
@@ -300,32 +300,7 @@
 
 static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
 
-#define __Pyx_SetItemInt(o, i, v, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_SetItemInt_Fast(o, i, v, size <= sizeof(long)) : \
-                                                    __Pyx_SetItemInt_Generic(o, to_py_func(i), v))
-
-static INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
-    int r;
-    if (!j) return -1;
-    r = PyObject_SetItem(o, j, v);
-    Py_DECREF(j);
-    return r;
-}
-
-static INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int fits_long) {
-    if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
-        Py_INCREF(v);
-        Py_DECREF(PyList_GET_ITEM(o, i));
-        PyList_SET_ITEM(o, i, v);
-        return 1;
-    }
-    else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_ass_item && (likely(i >= 0)))
-        return PySequence_SetItem(o, i, v);
-    else {
-        PyObject *j = fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i);
-        return __Pyx_SetItemInt_Generic(o, j, v);
-    }
-}
+static void __Pyx_RaiseBufferFallbackError(void); /*proto*/
 
 
 static INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
@@ -739,14 +714,12 @@
 static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float_t = { "numpy.float_t", NULL, sizeof(__pyx_t_5numpy_float_t), 'R' };
 static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int_t = { "numpy.int_t", NULL, sizeof(__pyx_t_5numpy_int_t), 'I' };
 static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "numpy.float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), 'R' };
+static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t = { "numpy.int64_t", NULL, sizeof(__pyx_t_5numpy_int64_t), 'I' };
 #define __Pyx_MODULE_NAME "yt.lagos.RTIntegrator"
 int __pyx_module_is_main_yt__lagos__RTIntegrator = 0;
 
 /* Implementation of yt.lagos.RTIntegrator */
 static PyObject *__pyx_int_3;
-static PyObject *__pyx_int_neg_1;
-static PyObject *__pyx_int_0;
-static PyObject *__pyx_int_1;
 static char __pyx_k___main__[] = "__main__";
 static PyObject *__pyx_kp___main__;
 static char __pyx_k_i_s[] = "i_s";
@@ -793,18 +766,18 @@
 static PyObject *__pyx_kp_np;
 static char __pyx_k_range[] = "range";
 static PyObject *__pyx_kp_range;
-static char __pyx_k_ones[] = "ones";
-static PyObject *__pyx_kp_ones;
+static char __pyx_k_empty[] = "empty";
+static PyObject *__pyx_kp_empty;
 static char __pyx_k_dtype[] = "dtype";
 static PyObject *__pyx_kp_dtype;
-static char __pyx_k_31[] = "float64";
+static char __pyx_k_31[] = "int64";
 static PyObject *__pyx_kp_31;
-static char __pyx_k_zeros[] = "zeros";
-static PyObject *__pyx_kp_zeros;
-static char __pyx_k_32[] = "int64";
+static char __pyx_k_32[] = "float64";
 static PyObject *__pyx_kp_32;
 static char __pyx_k_floor[] = "floor";
 static PyObject *__pyx_kp_floor;
+static char __pyx_k_abs[] = "abs";
+static PyObject *__pyx_kp_abs;
 static PyObject *__pyx_builtin_range;
 static PyObject *__pyx_int_15;
 static char __pyx_k___getbuffer__[] = "__getbuffer__";
@@ -1456,7 +1429,7 @@
  *         i_s = o_s[i]
  *     return i_s             # <<<<<<<<<<<<<<
  * 
- * @cython.boundscheck(False)
+ * @cython.wraparound(False)
  */
   __Pyx_XDECREF(__pyx_r);
   __pyx_t_7 = PyFloat_FromDouble(__pyx_v_i_s); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -1490,8 +1463,8 @@
   return __pyx_r;
 }
 
-/* "yt/lagos/RTIntegrator.pyx":74
- * 
+/* "yt/lagos/RTIntegrator.pyx":75
+ * @cython.wraparound(False)
  * @cython.boundscheck(False)
  * def VoxelTraversal(np.ndarray[np.int_t, ndim=3] grid_mask,             # <<<<<<<<<<<<<<
  *                    np.ndarray[np.float64_t, ndim=3] grid_t,
@@ -1510,19 +1483,48 @@
   int __pyx_v_i;
   int __pyx_v_x;
   int __pyx_v_y;
-  double __pyx_v_tl;
-  double __pyx_v_tr;
-  double __pyx_v_intersect_t;
-  double __pyx_v_enter_t;
+  __pyx_t_5numpy_float64_t __pyx_v_tl;
+  __pyx_t_5numpy_float64_t __pyx_v_tr;
+  __pyx_t_5numpy_float64_t __pyx_v_intersect_t;
+  __pyx_t_5numpy_float64_t __pyx_v_enter_t;
+  __pyx_t_5numpy_float64_t __pyx_v_dt_tolerance;
   PyArrayObject *__pyx_v_step = 0;
   PyArrayObject *__pyx_v_cur_ind = 0;
   PyArrayObject *__pyx_v_tdelta = 0;
   PyArrayObject *__pyx_v_tmax = 0;
   PyArrayObject *__pyx_v_intersect = 0;
-  int __pyx_v_in_cells;
+  int __pyx_v_ncells;
   Py_buffer __pyx_bstruct_right_edge;
   Py_ssize_t __pyx_bstride_0_right_edge = 0;
   Py_ssize_t __pyx_bshape_0_right_edge = 0;
+  Py_buffer __pyx_bstruct_intersect;
+  Py_ssize_t __pyx_bstride_0_intersect = 0;
+  Py_ssize_t __pyx_bshape_0_intersect = 0;
+  Py_buffer __pyx_bstruct_grid_t;
+  Py_ssize_t __pyx_bstride_0_grid_t = 0;
+  Py_ssize_t __pyx_bstride_1_grid_t = 0;
+  Py_ssize_t __pyx_bstride_2_grid_t = 0;
+  Py_ssize_t __pyx_bshape_0_grid_t = 0;
+  Py_ssize_t __pyx_bshape_1_grid_t = 0;
+  Py_ssize_t __pyx_bshape_2_grid_t = 0;
+  Py_buffer __pyx_bstruct_cur_ind;
+  Py_ssize_t __pyx_bstride_0_cur_ind = 0;
+  Py_ssize_t __pyx_bshape_0_cur_ind = 0;
+  Py_buffer __pyx_bstruct_left_edge;
+  Py_ssize_t __pyx_bstride_0_left_edge = 0;
+  Py_ssize_t __pyx_bshape_0_left_edge = 0;
+  Py_buffer __pyx_bstruct_step;
+  Py_ssize_t __pyx_bstride_0_step = 0;
+  Py_ssize_t __pyx_bshape_0_step = 0;
+  Py_buffer __pyx_bstruct_dx;
+  Py_ssize_t __pyx_bstride_0_dx = 0;
+  Py_ssize_t __pyx_bshape_0_dx = 0;
+  Py_buffer __pyx_bstruct_tdelta;
+  Py_ssize_t __pyx_bstride_0_tdelta = 0;
+  Py_ssize_t __pyx_bshape_0_tdelta = 0;
+  Py_buffer __pyx_bstruct_tmax;
+  Py_ssize_t __pyx_bstride_0_tmax = 0;
+  Py_ssize_t __pyx_bshape_0_tmax = 0;
   Py_buffer __pyx_bstruct_grid_mask;
   Py_ssize_t __pyx_bstride_0_grid_mask = 0;
   Py_ssize_t __pyx_bstride_1_grid_mask = 0;
@@ -1533,34 +1535,20 @@
   Py_buffer __pyx_bstruct_u;
   Py_ssize_t __pyx_bstride_0_u = 0;
   Py_ssize_t __pyx_bshape_0_u = 0;
-  Py_buffer __pyx_bstruct_dx;
-  Py_ssize_t __pyx_bstride_0_dx = 0;
-  Py_ssize_t __pyx_bshape_0_dx = 0;
   Py_buffer __pyx_bstruct_v;
   Py_ssize_t __pyx_bstride_0_v = 0;
   Py_ssize_t __pyx_bshape_0_v = 0;
-  Py_buffer __pyx_bstruct_left_edge;
-  Py_ssize_t __pyx_bstride_0_left_edge = 0;
-  Py_ssize_t __pyx_bshape_0_left_edge = 0;
-  Py_buffer __pyx_bstruct_grid_t;
-  Py_ssize_t __pyx_bstride_0_grid_t = 0;
-  Py_ssize_t __pyx_bstride_1_grid_t = 0;
-  Py_ssize_t __pyx_bstride_2_grid_t = 0;
-  Py_ssize_t __pyx_bshape_0_grid_t = 0;
-  Py_ssize_t __pyx_bshape_1_grid_t = 0;
-  Py_ssize_t __pyx_bshape_2_grid_t = 0;
   PyObject *__pyx_r = NULL;
   PyObject *__pyx_1 = 0;
   PyObject *__pyx_2 = 0;
-  PyObject *__pyx_3 = 0;
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
   PyObject *__pyx_t_3 = NULL;
-  int __pyx_t_4;
-  int __pyx_t_5;
-  int __pyx_t_6;
-  int __pyx_t_7;
-  int __pyx_t_8;
+  PyArrayObject *__pyx_t_4 = NULL;
+  PyArrayObject *__pyx_t_5 = NULL;
+  PyArrayObject *__pyx_t_6 = NULL;
+  PyArrayObject *__pyx_t_7 = NULL;
+  PyArrayObject *__pyx_t_8 = NULL;
   int __pyx_t_9;
   int __pyx_t_10;
   int __pyx_t_11;
@@ -1568,14 +1556,14 @@
   int __pyx_t_13;
   int __pyx_t_14;
   int __pyx_t_15;
-  __pyx_t_5numpy_float64_t __pyx_t_16;
+  int __pyx_t_16;
   int __pyx_t_17;
   int __pyx_t_18;
   int __pyx_t_19;
   int __pyx_t_20;
   int __pyx_t_21;
   int __pyx_t_22;
-  int __pyx_t_23;
+  __pyx_t_5numpy_float64_t __pyx_t_23;
   int __pyx_t_24;
   int __pyx_t_25;
   int __pyx_t_26;
@@ -1585,25 +1573,129 @@
   int __pyx_t_30;
   int __pyx_t_31;
   int __pyx_t_32;
-  long __pyx_t_33;
-  long __pyx_t_34;
-  long __pyx_t_35;
-  long __pyx_t_36;
-  long __pyx_t_37;
-  long __pyx_t_38;
-  long __pyx_t_39;
+  int __pyx_t_33;
+  int __pyx_t_34;
+  int __pyx_t_35;
+  int __pyx_t_36;
+  int __pyx_t_37;
+  int __pyx_t_38;
+  int __pyx_t_39;
   long __pyx_t_40;
   long __pyx_t_41;
-  int __pyx_t_42;
-  int __pyx_t_43;
-  PyObject *__pyx_t_44 = NULL;
-  int __pyx_t_45;
-  int __pyx_t_46;
-  int __pyx_t_47;
-  int __pyx_t_48;
-  int __pyx_t_49;
-  int __pyx_t_50;
-  double __pyx_t_51;
+  long __pyx_t_42;
+  long __pyx_t_43;
+  long __pyx_t_44;
+  long __pyx_t_45;
+  long __pyx_t_46;
+  long __pyx_t_47;
+  long __pyx_t_48;
+  PyObject *__pyx_t_49 = NULL;
+  PyObject *__pyx_t_50 = NULL;
+  PyObject *__pyx_t_51 = NULL;
+  int __pyx_t_52;
+  int __pyx_t_53;
+  int __pyx_t_54;
+  int __pyx_t_55;
+  __pyx_t_5numpy_int64_t __pyx_t_56;
+  int __pyx_t_57;
+  int __pyx_t_58;
+  int __pyx_t_59;
+  int __pyx_t_60;
+  int __pyx_t_61;
+  int __pyx_t_62;
+  int __pyx_t_63;
+  int __pyx_t_64;
+  int __pyx_t_65;
+  int __pyx_t_66;
+  int __pyx_t_67;
+  int __pyx_t_68;
+  int __pyx_t_69;
+  int __pyx_t_70;
+  int __pyx_t_71;
+  int __pyx_t_72;
+  int __pyx_t_73;
+  int __pyx_t_74;
+  int __pyx_t_75;
+  int __pyx_t_76;
+  int __pyx_t_77;
+  int __pyx_t_78;
+  int __pyx_t_79;
+  int __pyx_t_80;
+  int __pyx_t_81;
+  int __pyx_t_82;
+  int __pyx_t_83;
+  int __pyx_t_84;
+  long __pyx_t_85;
+  long __pyx_t_86;
+  long __pyx_t_87;
+  long __pyx_t_88;
+  long __pyx_t_89;
+  long __pyx_t_90;
+  __pyx_t_5numpy_int64_t __pyx_t_91;
+  __pyx_t_5numpy_int64_t __pyx_t_92;
+  long __pyx_t_93;
+  long __pyx_t_94;
+  long __pyx_t_95;
+  long __pyx_t_96;
+  long __pyx_t_97;
+  long __pyx_t_98;
+  __pyx_t_5numpy_int64_t __pyx_t_99;
+  __pyx_t_5numpy_int64_t __pyx_t_100;
+  __pyx_t_5numpy_int64_t __pyx_t_101;
+  long __pyx_t_102;
+  long __pyx_t_103;
+  long __pyx_t_104;
+  long __pyx_t_105;
+  long __pyx_t_106;
+  long __pyx_t_107;
+  long __pyx_t_108;
+  long __pyx_t_109;
+  __pyx_t_5numpy_int64_t __pyx_t_110;
+  __pyx_t_5numpy_int64_t __pyx_t_111;
+  __pyx_t_5numpy_int64_t __pyx_t_112;
+  long __pyx_t_113;
+  long __pyx_t_114;
+  long __pyx_t_115;
+  long __pyx_t_116;
+  long __pyx_t_117;
+  long __pyx_t_118;
+  long __pyx_t_119;
+  long __pyx_t_120;
+  long __pyx_t_121;
+  __pyx_t_5numpy_int64_t __pyx_t_122;
+  __pyx_t_5numpy_int64_t __pyx_t_123;
+  __pyx_t_5numpy_int64_t __pyx_t_124;
+  long __pyx_t_125;
+  long __pyx_t_126;
+  long __pyx_t_127;
+  long __pyx_t_128;
+  long __pyx_t_129;
+  long __pyx_t_130;
+  long __pyx_t_131;
+  long __pyx_t_132;
+  long __pyx_t_133;
+  long __pyx_t_134;
+  long __pyx_t_135;
+  __pyx_t_5numpy_int64_t __pyx_t_136;
+  __pyx_t_5numpy_int64_t __pyx_t_137;
+  __pyx_t_5numpy_int64_t __pyx_t_138;
+  long __pyx_t_139;
+  long __pyx_t_140;
+  long __pyx_t_141;
+  long __pyx_t_142;
+  long __pyx_t_143;
+  long __pyx_t_144;
+  long __pyx_t_145;
+  long __pyx_t_146;
+  long __pyx_t_147;
+  __pyx_t_5numpy_int64_t __pyx_t_148;
+  __pyx_t_5numpy_int64_t __pyx_t_149;
+  __pyx_t_5numpy_int64_t __pyx_t_150;
+  long __pyx_t_151;
+  long __pyx_t_152;
+  long __pyx_t_153;
+  long __pyx_t_154;
+  long __pyx_t_155;
   static PyObject **__pyx_pyargnames[] = {&__pyx_kp_grid_mask,&__pyx_kp_grid_t,&__pyx_kp_left_edge,&__pyx_kp_right_edge,&__pyx_kp_dx,&__pyx_kp_u,&__pyx_kp_v,0};
   __Pyx_SetupRefcountContext("VoxelTraversal");
   __pyx_self = __pyx_self;
@@ -1630,41 +1722,41 @@
       values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_grid_t);
       if (likely(values[1])) kw_args--;
       else {
-        __Pyx_RaiseArgtupleInvalid("VoxelTraversal", 1, 7, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        __Pyx_RaiseArgtupleInvalid("VoxelTraversal", 1, 7, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
       case  2:
       values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_left_edge);
       if (likely(values[2])) kw_args--;
       else {
-        __Pyx_RaiseArgtupleInvalid("VoxelTraversal", 1, 7, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        __Pyx_RaiseArgtupleInvalid("VoxelTraversal", 1, 7, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
       case  3:
       values[3] = PyDict_GetItem(__pyx_kwds, __pyx_kp_right_edge);
       if (likely(values[3])) kw_args--;
       else {
-        __Pyx_RaiseArgtupleInvalid("VoxelTraversal", 1, 7, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        __Pyx_RaiseArgtupleInvalid("VoxelTraversal", 1, 7, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
       case  4:
       values[4] = PyDict_GetItem(__pyx_kwds, __pyx_kp_dx);
       if (likely(values[4])) kw_args--;
       else {
-        __Pyx_RaiseArgtupleInvalid("VoxelTraversal", 1, 7, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        __Pyx_RaiseArgtupleInvalid("VoxelTraversal", 1, 7, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
       case  5:
       values[5] = PyDict_GetItem(__pyx_kwds, __pyx_kp_u);
       if (likely(values[5])) kw_args--;
       else {
-        __Pyx_RaiseArgtupleInvalid("VoxelTraversal", 1, 7, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        __Pyx_RaiseArgtupleInvalid("VoxelTraversal", 1, 7, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
       case  6:
       values[6] = PyDict_GetItem(__pyx_kwds, __pyx_kp_v);
       if (likely(values[6])) kw_args--;
       else {
-        __Pyx_RaiseArgtupleInvalid("VoxelTraversal", 1, 7, 7, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+        __Pyx_RaiseArgtupleInvalid("VoxelTraversal", 1, 7, 7, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
       }
     }
     if (unlikely(kw_args > 0)) {
-      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "VoxelTraversal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "VoxelTraversal") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
     }
     __pyx_v_grid_mask = ((PyArrayObject *)values[0]);
     __pyx_v_grid_t = ((PyArrayObject *)values[1]);
@@ -1686,11 +1778,16 @@
   }
   goto __pyx_L4_argument_unpacking_done;
   __pyx_L5_argtuple_error:;
-  __Pyx_RaiseArgtupleInvalid("VoxelTraversal", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+  __Pyx_RaiseArgtupleInvalid("VoxelTraversal", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
   __pyx_L3_error:;
   __Pyx_AddTraceback("yt.lagos.RTIntegrator.VoxelTraversal");
   return NULL;
   __pyx_L4_argument_unpacking_done:;
+  __pyx_bstruct_step.buf = NULL;
+  __pyx_bstruct_cur_ind.buf = NULL;
+  __pyx_bstruct_tdelta.buf = NULL;
+  __pyx_bstruct_tmax.buf = NULL;
+  __pyx_bstruct_intersect.buf = NULL;
   __pyx_bstruct_grid_mask.buf = NULL;
   __pyx_bstruct_grid_t.buf = NULL;
   __pyx_bstruct_left_edge.buf = NULL;
@@ -1698,143 +1795,129 @@
   __pyx_bstruct_dx.buf = NULL;
   __pyx_bstruct_u.buf = NULL;
   __pyx_bstruct_v.buf = NULL;
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grid_mask), __pyx_ptype_5numpy_ndarray, 1, "grid_mask", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grid_t), __pyx_ptype_5numpy_ndarray, 1, "grid_t", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left_edge), __pyx_ptype_5numpy_ndarray, 1, "left_edge", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right_edge), __pyx_ptype_5numpy_ndarray, 1, "right_edge", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dx), __pyx_ptype_5numpy_ndarray, 1, "dx", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1, "u", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grid_mask), __pyx_ptype_5numpy_ndarray, 1, "grid_mask", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grid_t), __pyx_ptype_5numpy_ndarray, 1, "grid_t", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left_edge), __pyx_ptype_5numpy_ndarray, 1, "left_edge", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right_edge), __pyx_ptype_5numpy_ndarray, 1, "right_edge", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dx), __pyx_ptype_5numpy_ndarray, 1, "dx", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_5numpy_ndarray, 1, "u", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_5numpy_ndarray, 1, "v", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   {
     __Pyx_BufFmt_StackElem __pyx_stack[1];
-    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_grid_mask, (PyObject*)__pyx_v_grid_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_grid_mask, (PyObject*)__pyx_v_grid_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __pyx_bstride_0_grid_mask = __pyx_bstruct_grid_mask.strides[0]; __pyx_bstride_1_grid_mask = __pyx_bstruct_grid_mask.strides[1]; __pyx_bstride_2_grid_mask = __pyx_bstruct_grid_mask.strides[2];
   __pyx_bshape_0_grid_mask = __pyx_bstruct_grid_mask.shape[0]; __pyx_bshape_1_grid_mask = __pyx_bstruct_grid_mask.shape[1]; __pyx_bshape_2_grid_mask = __pyx_bstruct_grid_mask.shape[2];
   {
     __Pyx_BufFmt_StackElem __pyx_stack[1];
-    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_grid_t, (PyObject*)__pyx_v_grid_t, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_grid_t, (PyObject*)__pyx_v_grid_t, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __pyx_bstride_0_grid_t = __pyx_bstruct_grid_t.strides[0]; __pyx_bstride_1_grid_t = __pyx_bstruct_grid_t.strides[1]; __pyx_bstride_2_grid_t = __pyx_bstruct_grid_t.strides[2];
   __pyx_bshape_0_grid_t = __pyx_bstruct_grid_t.shape[0]; __pyx_bshape_1_grid_t = __pyx_bstruct_grid_t.shape[1]; __pyx_bshape_2_grid_t = __pyx_bstruct_grid_t.shape[2];
   {
     __Pyx_BufFmt_StackElem __pyx_stack[1];
-    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left_edge, (PyObject*)__pyx_v_left_edge, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_left_edge, (PyObject*)__pyx_v_left_edge, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __pyx_bstride_0_left_edge = __pyx_bstruct_left_edge.strides[0];
   __pyx_bshape_0_left_edge = __pyx_bstruct_left_edge.shape[0];
   {
     __Pyx_BufFmt_StackElem __pyx_stack[1];
-    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right_edge, (PyObject*)__pyx_v_right_edge, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_right_edge, (PyObject*)__pyx_v_right_edge, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __pyx_bstride_0_right_edge = __pyx_bstruct_right_edge.strides[0];
   __pyx_bshape_0_right_edge = __pyx_bstruct_right_edge.shape[0];
   {
     __Pyx_BufFmt_StackElem __pyx_stack[1];
-    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_dx, (PyObject*)__pyx_v_dx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_dx, (PyObject*)__pyx_v_dx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __pyx_bstride_0_dx = __pyx_bstruct_dx.strides[0];
   __pyx_bshape_0_dx = __pyx_bstruct_dx.shape[0];
   {
     __Pyx_BufFmt_StackElem __pyx_stack[1];
-    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_u, (PyObject*)__pyx_v_u, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_u, (PyObject*)__pyx_v_u, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __pyx_bstride_0_u = __pyx_bstruct_u.strides[0];
   __pyx_bshape_0_u = __pyx_bstruct_u.shape[0];
   {
     __Pyx_BufFmt_StackElem __pyx_stack[1];
-    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_v, (PyObject*)__pyx_v_v, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_v, (PyObject*)__pyx_v_v, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
   __pyx_bstride_0_v = __pyx_bstruct_v.strides[0];
   __pyx_bshape_0_v = __pyx_bstruct_v.shape[0];
 
-  /* "yt/lagos/RTIntegrator.pyx":86
+  /* "yt/lagos/RTIntegrator.pyx":87
  *     cdef int i, x, y
- *     cdef double tl, tr, intersect_t, enter_t, exit_t
- *     cdef np.ndarray step = np.ones(3, dtype=np.float64) # maybe just ints?             # <<<<<<<<<<<<<<
- *     cdef np.ndarray cur_ind = np.zeros(3, dtype=np.int64) # maybe just ints?
- *     cdef np.ndarray tdelta = np.zeros(3, dtype=np.float64)
+ *     cdef np.float64_t tl, tr, intersect_t, enter_t, exit_t, dt_tolerance
+ *     cdef np.ndarray[np.int64_t,   ndim=1] step = np.empty((3,), dtype=np.int64)             # <<<<<<<<<<<<<<
+ *     cdef np.ndarray[np.int64_t,   ndim=1] cur_ind = np.empty((3,), dtype=np.int64)
+ *     cdef np.ndarray[np.float64_t, ndim=1] tdelta = np.empty((3,), dtype=np.float64)
  */
-  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_1);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_ones); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  __Pyx_INCREF(__pyx_int_3);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
-  __Pyx_GIVEREF(__pyx_int_3);
-  __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_1));
-  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_31); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-  if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_step = ((PyArrayObject *)__pyx_t_3);
-  __pyx_t_3 = 0;
-
-  /* "yt/lagos/RTIntegrator.pyx":87
- *     cdef double tl, tr, intersect_t, enter_t, exit_t
- *     cdef np.ndarray step = np.ones(3, dtype=np.float64) # maybe just ints?
- *     cdef np.ndarray cur_ind = np.zeros(3, dtype=np.int64) # maybe just ints?             # <<<<<<<<<<<<<<
- *     cdef np.ndarray tdelta = np.zeros(3, dtype=np.float64)
- *     cdef np.ndarray tmax = np.zeros(3, dtype=np.float64)
- */
-  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
   __Pyx_INCREF(__pyx_int_3);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
   __Pyx_GIVEREF(__pyx_int_3);
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+  __pyx_t_2 = 0;
   __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_1));
   __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_2);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_2, __pyx_kp_32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_GetAttr(__pyx_2, __pyx_kp_31); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-  if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_cur_ind = ((PyArrayObject *)__pyx_t_1);
-  __pyx_t_1 = 0;
+  if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_4 = ((PyArrayObject *)__pyx_t_2);
+  {
+    __Pyx_BufFmt_StackElem __pyx_stack[1];
+    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_step, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
+      __pyx_v_step = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_step.buf = NULL;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    } else {__pyx_bstride_0_step = __pyx_bstruct_step.strides[0];
+      __pyx_bshape_0_step = __pyx_bstruct_step.shape[0];
+    }
+  }
+  __pyx_t_4 = 0;
+  __pyx_v_step = ((PyArrayObject *)__pyx_t_2);
+  __pyx_t_2 = 0;
 
   /* "yt/lagos/RTIntegrator.pyx":88
- *     cdef np.ndarray step = np.ones(3, dtype=np.float64) # maybe just ints?
- *     cdef np.ndarray cur_ind = np.zeros(3, dtype=np.int64) # maybe just ints?
- *     cdef np.ndarray tdelta = np.zeros(3, dtype=np.float64)             # <<<<<<<<<<<<<<
- *     cdef np.ndarray tmax = np.zeros(3, dtype=np.float64)
- *     cdef np.ndarray intersect = np.zeros(3, dtype=np.float64)
+ *     cdef np.float64_t tl, tr, intersect_t, enter_t, exit_t, dt_tolerance
+ *     cdef np.ndarray[np.int64_t,   ndim=1] step = np.empty((3,), dtype=np.int64)
+ *     cdef np.ndarray[np.int64_t,   ndim=1] cur_ind = np.empty((3,), dtype=np.int64)             # <<<<<<<<<<<<<<
+ *     cdef np.ndarray[np.float64_t, ndim=1] tdelta = np.empty((3,), dtype=np.float64)
+ *     cdef np.ndarray[np.float64_t, ndim=1] tmax = np.empty((3,), dtype=np.float64)
  */
   __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_2);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_2, __pyx_kp_zeros); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = PyObject_GetAttr(__pyx_2, __pyx_kp_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
   __Pyx_INCREF(__pyx_int_3);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_3);
   __Pyx_GIVEREF(__pyx_int_3);
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3));
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
+  __pyx_t_3 = 0;
   __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_1));
   __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -1844,37 +1927,53 @@
   __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
   if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
   if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_tdelta = ((PyArrayObject *)__pyx_t_3);
+  __pyx_t_5 = ((PyArrayObject *)__pyx_t_3);
+  {
+    __Pyx_BufFmt_StackElem __pyx_stack[1];
+    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_cur_ind, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
+      __pyx_v_cur_ind = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_cur_ind.buf = NULL;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    } else {__pyx_bstride_0_cur_ind = __pyx_bstruct_cur_ind.strides[0];
+      __pyx_bshape_0_cur_ind = __pyx_bstruct_cur_ind.shape[0];
+    }
+  }
+  __pyx_t_5 = 0;
+  __pyx_v_cur_ind = ((PyArrayObject *)__pyx_t_3);
   __pyx_t_3 = 0;
 
   /* "yt/lagos/RTIntegrator.pyx":89
- *     cdef np.ndarray cur_ind = np.zeros(3, dtype=np.int64) # maybe just ints?
- *     cdef np.ndarray tdelta = np.zeros(3, dtype=np.float64)
- *     cdef np.ndarray tmax = np.zeros(3, dtype=np.float64)             # <<<<<<<<<<<<<<
- *     cdef np.ndarray intersect = np.zeros(3, dtype=np.float64)
- *     intersect_t = 1
+ *     cdef np.ndarray[np.int64_t,   ndim=1] step = np.empty((3,), dtype=np.int64)
+ *     cdef np.ndarray[np.int64_t,   ndim=1] cur_ind = np.empty((3,), dtype=np.int64)
+ *     cdef np.ndarray[np.float64_t, ndim=1] tdelta = np.empty((3,), dtype=np.float64)             # <<<<<<<<<<<<<<
+ *     cdef np.ndarray[np.float64_t, ndim=1] tmax = np.empty((3,), dtype=np.float64)
+ *     cdef np.ndarray[np.float64_t, ndim=1] intersect = np.empty((3,), dtype=np.float64)
  */
   __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
   __Pyx_INCREF(__pyx_int_3);
-  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_3);
   __Pyx_GIVEREF(__pyx_int_3);
+  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1));
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
+  __pyx_t_1 = 0;
   __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_1));
   __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_2);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_2, __pyx_kp_31); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_2, __pyx_kp_32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
   if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -1885,19 +1984,30 @@
   __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
   if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_tmax = ((PyArrayObject *)__pyx_t_1);
+  __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
+  {
+    __Pyx_BufFmt_StackElem __pyx_stack[1];
+    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_tdelta, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
+      __pyx_v_tdelta = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_tdelta.buf = NULL;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    } else {__pyx_bstride_0_tdelta = __pyx_bstruct_tdelta.strides[0];
+      __pyx_bshape_0_tdelta = __pyx_bstruct_tdelta.shape[0];
+    }
+  }
+  __pyx_t_6 = 0;
+  __pyx_v_tdelta = ((PyArrayObject *)__pyx_t_1);
   __pyx_t_1 = 0;
 
   /* "yt/lagos/RTIntegrator.pyx":90
- *     cdef np.ndarray tdelta = np.zeros(3, dtype=np.float64)
- *     cdef np.ndarray tmax = np.zeros(3, dtype=np.float64)
- *     cdef np.ndarray intersect = np.zeros(3, dtype=np.float64)             # <<<<<<<<<<<<<<
+ *     cdef np.ndarray[np.int64_t,   ndim=1] cur_ind = np.empty((3,), dtype=np.int64)
+ *     cdef np.ndarray[np.float64_t, ndim=1] tdelta = np.empty((3,), dtype=np.float64)
+ *     cdef np.ndarray[np.float64_t, ndim=1] tmax = np.empty((3,), dtype=np.float64)             # <<<<<<<<<<<<<<
+ *     cdef np.ndarray[np.float64_t, ndim=1] intersect = np.empty((3,), dtype=np.float64)
  *     intersect_t = 1
- *     # recall p = v * t + u
  */
   __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_2);
-  __pyx_t_1 = PyObject_GetAttr(__pyx_2, __pyx_kp_zeros); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_GetAttr(__pyx_2, __pyx_kp_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -1905,70 +2015,158 @@
   __Pyx_INCREF(__pyx_int_3);
   PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
   __Pyx_GIVEREF(__pyx_int_3);
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+  __pyx_t_2 = 0;
   __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_1));
   __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_2);
-  __pyx_t_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_31); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = PyObject_GetAttr(__pyx_2, __pyx_kp_32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
+  if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
+  if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_7 = ((PyArrayObject *)__pyx_t_2);
+  {
+    __Pyx_BufFmt_StackElem __pyx_stack[1];
+    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_tmax, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
+      __pyx_v_tmax = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_tmax.buf = NULL;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    } else {__pyx_bstride_0_tmax = __pyx_bstruct_tmax.strides[0];
+      __pyx_bshape_0_tmax = __pyx_bstruct_tmax.shape[0];
+    }
+  }
+  __pyx_t_7 = 0;
+  __pyx_v_tmax = ((PyArrayObject *)__pyx_t_2);
+  __pyx_t_2 = 0;
+
+  /* "yt/lagos/RTIntegrator.pyx":91
+ *     cdef np.ndarray[np.float64_t, ndim=1] tdelta = np.empty((3,), dtype=np.float64)
+ *     cdef np.ndarray[np.float64_t, ndim=1] tmax = np.empty((3,), dtype=np.float64)
+ *     cdef np.ndarray[np.float64_t, ndim=1] intersect = np.empty((3,), dtype=np.float64)             # <<<<<<<<<<<<<<
+ *     intersect_t = 1
+ *     dt_tolerance = 1e-6
+ */
+  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_2);
+  __pyx_t_2 = PyObject_GetAttr(__pyx_2, __pyx_kp_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+  __Pyx_INCREF(__pyx_int_3);
+  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_3);
+  __Pyx_GIVEREF(__pyx_int_3);
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3));
+  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
+  __pyx_t_3 = 0;
+  __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_1));
+  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_2);
+  __pyx_t_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_32); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-  if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = ((PyArrayObject *)__pyx_t_3);
+  {
+    __Pyx_BufFmt_StackElem __pyx_stack[1];
+    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_intersect, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
+      __pyx_v_intersect = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_intersect.buf = NULL;
+      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    } else {__pyx_bstride_0_intersect = __pyx_bstruct_intersect.strides[0];
+      __pyx_bshape_0_intersect = __pyx_bstruct_intersect.shape[0];
+    }
+  }
+  __pyx_t_8 = 0;
   __pyx_v_intersect = ((PyArrayObject *)__pyx_t_3);
   __pyx_t_3 = 0;
 
-  /* "yt/lagos/RTIntegrator.pyx":91
- *     cdef np.ndarray tmax = np.zeros(3, dtype=np.float64)
- *     cdef np.ndarray intersect = np.zeros(3, dtype=np.float64)
+  /* "yt/lagos/RTIntegrator.pyx":92
+ *     cdef np.ndarray[np.float64_t, ndim=1] tmax = np.empty((3,), dtype=np.float64)
+ *     cdef np.ndarray[np.float64_t, ndim=1] intersect = np.empty((3,), dtype=np.float64)
  *     intersect_t = 1             # <<<<<<<<<<<<<<
+ *     dt_tolerance = 1e-6
  *     # recall p = v * t + u
- *     #  where p is position, v is our vector, u is the start point
  */
   __pyx_v_intersect_t = 1;
 
-  /* "yt/lagos/RTIntegrator.pyx":94
+  /* "yt/lagos/RTIntegrator.pyx":93
+ *     cdef np.ndarray[np.float64_t, ndim=1] intersect = np.empty((3,), dtype=np.float64)
+ *     intersect_t = 1
+ *     dt_tolerance = 1e-6             # <<<<<<<<<<<<<<
+ *     # recall p = v * t + u
+ *     #  where p is position, v is our vector, u is the start point
+ */
+  __pyx_v_dt_tolerance = 9.9999999999999995e-07;
+
+  /* "yt/lagos/RTIntegrator.pyx":96
  *     # recall p = v * t + u
  *     #  where p is position, v is our vector, u is the start point
  *     for i in range(3):             # <<<<<<<<<<<<<<
  *         # As long as we're iterating, set some other stuff, too
- *         if (v[i] < 0): step[i] = -1
+ *         if(v[i] < 0): step[i] = -1
  */
-  for (__pyx_t_4 = 0; __pyx_t_4 < 3; __pyx_t_4+=1) {
-    __pyx_v_i = __pyx_t_4;
+  for (__pyx_t_9 = 0; __pyx_t_9 < 3; __pyx_t_9+=1) {
+    __pyx_v_i = __pyx_t_9;
 
-    /* "yt/lagos/RTIntegrator.pyx":96
+    /* "yt/lagos/RTIntegrator.pyx":98
  *     for i in range(3):
  *         # As long as we're iterating, set some other stuff, too
- *         if (v[i] < 0): step[i] = -1             # <<<<<<<<<<<<<<
+ *         if(v[i] < 0): step[i] = -1             # <<<<<<<<<<<<<<
+ *         else: step[i] = 1
  *         x = (i+1)%3
- *         y = (i+2)%3
  */
-    __pyx_t_5 = __pyx_v_i;
-    if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_bshape_0_v;
-    __pyx_t_6 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_5, __pyx_bstride_0_v)) < 0);
-    if (__pyx_t_6) {
-      if (__Pyx_SetItemInt(((PyObject *)__pyx_v_step), __pyx_v_i, __pyx_int_neg_1, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_10 = __pyx_v_i;
+    __pyx_t_11 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_10, __pyx_bstride_0_v)) < 0);
+    if (__pyx_t_11) {
+      __pyx_t_12 = __pyx_v_i;
+      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_12, __pyx_bstride_0_step) = -1;
       goto __pyx_L8;
     }
-    __pyx_L8:;
+    /*else*/ {
 
-    /* "yt/lagos/RTIntegrator.pyx":97
+      /* "yt/lagos/RTIntegrator.pyx":99
  *         # As long as we're iterating, set some other stuff, too
- *         if (v[i] < 0): step[i] = -1
+ *         if(v[i] < 0): step[i] = -1
+ *         else: step[i] = 1             # <<<<<<<<<<<<<<
+ *         x = (i+1)%3
+ *         y = (i+2)%3
+ */
+      __pyx_t_13 = __pyx_v_i;
+      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_13, __pyx_bstride_0_step) = 1;
+    }
+    __pyx_L8:;
+
+    /* "yt/lagos/RTIntegrator.pyx":100
+ *         if(v[i] < 0): step[i] = -1
+ *         else: step[i] = 1
  *         x = (i+1)%3             # <<<<<<<<<<<<<<
  *         y = (i+2)%3
  *         tl = (left_edge[i] - u[i])/v[i]
  */
     __pyx_v_x = ((__pyx_v_i + 1) % 3);
 
-    /* "yt/lagos/RTIntegrator.pyx":98
- *         if (v[i] < 0): step[i] = -1
+    /* "yt/lagos/RTIntegrator.pyx":101
+ *         else: step[i] = 1
  *         x = (i+1)%3
  *         y = (i+2)%3             # <<<<<<<<<<<<<<
  *         tl = (left_edge[i] - u[i])/v[i]
@@ -1976,104 +2174,90 @@
  */
     __pyx_v_y = ((__pyx_v_i + 2) % 3);
 
-    /* "yt/lagos/RTIntegrator.pyx":99
+    /* "yt/lagos/RTIntegrator.pyx":102
  *         x = (i+1)%3
  *         y = (i+2)%3
  *         tl = (left_edge[i] - u[i])/v[i]             # <<<<<<<<<<<<<<
  *         tr = (right_edge[i] - u[i])/v[i]
  *         if (left_edge[x] <= (u[x] + tl*v[x]) <= right_edge[x]) and \
  */
-    __pyx_t_7 = __pyx_v_i;
-    if (__pyx_t_7 < 0) __pyx_t_7 += __pyx_bshape_0_left_edge;
-    __pyx_t_8 = __pyx_v_i;
-    if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_bshape_0_u;
-    __pyx_t_9 = __pyx_v_i;
-    if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_bshape_0_v;
-    __pyx_v_tl = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_7, __pyx_bstride_0_left_edge)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_8, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_9, __pyx_bstride_0_v)));
+    __pyx_t_14 = __pyx_v_i;
+    __pyx_t_15 = __pyx_v_i;
+    __pyx_t_16 = __pyx_v_i;
+    __pyx_v_tl = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_14, __pyx_bstride_0_left_edge)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_15, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_16, __pyx_bstride_0_v)));
 
-    /* "yt/lagos/RTIntegrator.pyx":100
+    /* "yt/lagos/RTIntegrator.pyx":103
  *         y = (i+2)%3
  *         tl = (left_edge[i] - u[i])/v[i]
  *         tr = (right_edge[i] - u[i])/v[i]             # <<<<<<<<<<<<<<
  *         if (left_edge[x] <= (u[x] + tl*v[x]) <= right_edge[x]) and \
  *            (left_edge[y] <= (u[y] + tl*v[y]) <= right_edge[y]) and \
  */
-    __pyx_t_10 = __pyx_v_i;
-    if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_bshape_0_right_edge;
-    __pyx_t_11 = __pyx_v_i;
-    if (__pyx_t_11 < 0) __pyx_t_11 += __pyx_bshape_0_u;
-    __pyx_t_12 = __pyx_v_i;
-    if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_bshape_0_v;
-    __pyx_v_tr = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_10, __pyx_bstride_0_right_edge)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_11, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_12, __pyx_bstride_0_v)));
+    __pyx_t_17 = __pyx_v_i;
+    __pyx_t_18 = __pyx_v_i;
+    __pyx_t_19 = __pyx_v_i;
+    __pyx_v_tr = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_17, __pyx_bstride_0_right_edge)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_18, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_19, __pyx_bstride_0_v)));
 
-    /* "yt/lagos/RTIntegrator.pyx":101
+    /* "yt/lagos/RTIntegrator.pyx":104
  *         tl = (left_edge[i] - u[i])/v[i]
  *         tr = (right_edge[i] - u[i])/v[i]
  *         if (left_edge[x] <= (u[x] + tl*v[x]) <= right_edge[x]) and \             # <<<<<<<<<<<<<<
  *            (left_edge[y] <= (u[y] + tl*v[y]) <= right_edge[y]) and \
- *            (0 <= tl < intersect_t):
+ *            (0.0 <= tl < intersect_t):
  */
-    __pyx_t_13 = __pyx_v_x;
-    if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_bshape_0_left_edge;
-    __pyx_t_14 = __pyx_v_x;
-    if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_bshape_0_u;
-    __pyx_t_15 = __pyx_v_x;
-    if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_bshape_0_v;
-    __pyx_t_16 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_14, __pyx_bstride_0_u)) + (__pyx_v_tl * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_15, __pyx_bstride_0_v))));
-    __pyx_t_6 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_13, __pyx_bstride_0_left_edge)) <= __pyx_t_16);
-    if (__pyx_t_6) {
-      __pyx_t_17 = __pyx_v_x;
-      if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_bshape_0_right_edge;
-      __pyx_t_6 = (__pyx_t_16 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_17, __pyx_bstride_0_right_edge)));
+    __pyx_t_20 = __pyx_v_x;
+    __pyx_t_21 = __pyx_v_x;
+    __pyx_t_22 = __pyx_v_x;
+    __pyx_t_23 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_21, __pyx_bstride_0_u)) + (__pyx_v_tl * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_22, __pyx_bstride_0_v))));
+    __pyx_t_11 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_20, __pyx_bstride_0_left_edge)) <= __pyx_t_23);
+    if (__pyx_t_11) {
+      __pyx_t_24 = __pyx_v_x;
+      __pyx_t_11 = (__pyx_t_23 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_24, __pyx_bstride_0_right_edge)));
     }
-    if (__pyx_t_6) {
+    if (__pyx_t_11) {
 
-      /* "yt/lagos/RTIntegrator.pyx":102
+      /* "yt/lagos/RTIntegrator.pyx":105
  *         tr = (right_edge[i] - u[i])/v[i]
  *         if (left_edge[x] <= (u[x] + tl*v[x]) <= right_edge[x]) and \
  *            (left_edge[y] <= (u[y] + tl*v[y]) <= right_edge[y]) and \             # <<<<<<<<<<<<<<
- *            (0 <= tl < intersect_t):
+ *            (0.0 <= tl < intersect_t):
  *             intersect_t = tl
  */
-      __pyx_t_18 = __pyx_v_y;
-      if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_bshape_0_left_edge;
-      __pyx_t_19 = __pyx_v_y;
-      if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_bshape_0_u;
-      __pyx_t_20 = __pyx_v_y;
-      if (__pyx_t_20 < 0) __pyx_t_20 += __pyx_bshape_0_v;
-      __pyx_t_16 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_19, __pyx_bstride_0_u)) + (__pyx_v_tl * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_20, __pyx_bstride_0_v))));
-      __pyx_t_21 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_18, __pyx_bstride_0_left_edge)) <= __pyx_t_16);
-      if (__pyx_t_21) {
-        __pyx_t_22 = __pyx_v_y;
-        if (__pyx_t_22 < 0) __pyx_t_22 += __pyx_bshape_0_right_edge;
-        __pyx_t_21 = (__pyx_t_16 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_22, __pyx_bstride_0_right_edge)));
+      __pyx_t_25 = __pyx_v_y;
+      __pyx_t_26 = __pyx_v_y;
+      __pyx_t_27 = __pyx_v_y;
+      __pyx_t_23 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_26, __pyx_bstride_0_u)) + (__pyx_v_tl * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_27, __pyx_bstride_0_v))));
+      __pyx_t_28 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_25, __pyx_bstride_0_left_edge)) <= __pyx_t_23);
+      if (__pyx_t_28) {
+        __pyx_t_29 = __pyx_v_y;
+        __pyx_t_28 = (__pyx_t_23 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_29, __pyx_bstride_0_right_edge)));
       }
-      if (__pyx_t_21) {
+      if (__pyx_t_28) {
 
-        /* "yt/lagos/RTIntegrator.pyx":103
+        /* "yt/lagos/RTIntegrator.pyx":106
  *         if (left_edge[x] <= (u[x] + tl*v[x]) <= right_edge[x]) and \
  *            (left_edge[y] <= (u[y] + tl*v[y]) <= right_edge[y]) and \
- *            (0 <= tl < intersect_t):             # <<<<<<<<<<<<<<
+ *            (0.0 <= tl < intersect_t):             # <<<<<<<<<<<<<<
  *             intersect_t = tl
  *         if (left_edge[x] <= (u[x] + tr*v[x]) <= right_edge[x]) and \
  */
-        __pyx_t_23 = (0 <= __pyx_v_tl);
-        if (__pyx_t_23) {
-          __pyx_t_23 = (__pyx_v_tl < __pyx_v_intersect_t);
+        __pyx_t_30 = (0.0 <= __pyx_v_tl);
+        if (__pyx_t_30) {
+          __pyx_t_30 = (__pyx_v_tl < __pyx_v_intersect_t);
         }
-        __pyx_t_24 = __pyx_t_23;
+        __pyx_t_31 = __pyx_t_30;
       } else {
-        __pyx_t_24 = __pyx_t_21;
+        __pyx_t_31 = __pyx_t_28;
       }
-      __pyx_t_21 = __pyx_t_24;
+      __pyx_t_28 = __pyx_t_31;
     } else {
-      __pyx_t_21 = __pyx_t_6;
+      __pyx_t_28 = __pyx_t_11;
     }
-    if (__pyx_t_21) {
+    if (__pyx_t_28) {
 
-      /* "yt/lagos/RTIntegrator.pyx":104
+      /* "yt/lagos/RTIntegrator.pyx":107
  *            (left_edge[y] <= (u[y] + tl*v[y]) <= right_edge[y]) and \
- *            (0 <= tl < intersect_t):
+ *            (0.0 <= tl < intersect_t):
  *             intersect_t = tl             # <<<<<<<<<<<<<<
  *         if (left_edge[x] <= (u[x] + tr*v[x]) <= right_edge[x]) and \
  *            (left_edge[y] <= (u[y] + tr*v[y]) <= right_edge[y]) and \
@@ -2083,74 +2267,66 @@
     }
     __pyx_L9:;
 
-    /* "yt/lagos/RTIntegrator.pyx":105
- *            (0 <= tl < intersect_t):
+    /* "yt/lagos/RTIntegrator.pyx":108
+ *            (0.0 <= tl < intersect_t):
  *             intersect_t = tl
  *         if (left_edge[x] <= (u[x] + tr*v[x]) <= right_edge[x]) and \             # <<<<<<<<<<<<<<
  *            (left_edge[y] <= (u[y] + tr*v[y]) <= right_edge[y]) and \
- *            (0 <= tr < intersect_t):
+ *            (0.0 <= tr < intersect_t):
  */
-    __pyx_t_25 = __pyx_v_x;
-    if (__pyx_t_25 < 0) __pyx_t_25 += __pyx_bshape_0_left_edge;
-    __pyx_t_26 = __pyx_v_x;
-    if (__pyx_t_26 < 0) __pyx_t_26 += __pyx_bshape_0_u;
-    __pyx_t_27 = __pyx_v_x;
-    if (__pyx_t_27 < 0) __pyx_t_27 += __pyx_bshape_0_v;
-    __pyx_t_16 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_26, __pyx_bstride_0_u)) + (__pyx_v_tr * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_27, __pyx_bstride_0_v))));
-    __pyx_t_21 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_25, __pyx_bstride_0_left_edge)) <= __pyx_t_16);
-    if (__pyx_t_21) {
-      __pyx_t_28 = __pyx_v_x;
-      if (__pyx_t_28 < 0) __pyx_t_28 += __pyx_bshape_0_right_edge;
-      __pyx_t_21 = (__pyx_t_16 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_28, __pyx_bstride_0_right_edge)));
+    __pyx_t_32 = __pyx_v_x;
+    __pyx_t_33 = __pyx_v_x;
+    __pyx_t_34 = __pyx_v_x;
+    __pyx_t_23 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_33, __pyx_bstride_0_u)) + (__pyx_v_tr * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_34, __pyx_bstride_0_v))));
+    __pyx_t_28 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_32, __pyx_bstride_0_left_edge)) <= __pyx_t_23);
+    if (__pyx_t_28) {
+      __pyx_t_35 = __pyx_v_x;
+      __pyx_t_28 = (__pyx_t_23 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_35, __pyx_bstride_0_right_edge)));
     }
-    if (__pyx_t_21) {
+    if (__pyx_t_28) {
 
-      /* "yt/lagos/RTIntegrator.pyx":106
+      /* "yt/lagos/RTIntegrator.pyx":109
  *             intersect_t = tl
  *         if (left_edge[x] <= (u[x] + tr*v[x]) <= right_edge[x]) and \
  *            (left_edge[y] <= (u[y] + tr*v[y]) <= right_edge[y]) and \             # <<<<<<<<<<<<<<
- *            (0 <= tr < intersect_t):
+ *            (0.0 <= tr < intersect_t):
  *             intersect_t = tr
  */
-      __pyx_t_29 = __pyx_v_y;
-      if (__pyx_t_29 < 0) __pyx_t_29 += __pyx_bshape_0_left_edge;
-      __pyx_t_30 = __pyx_v_y;
-      if (__pyx_t_30 < 0) __pyx_t_30 += __pyx_bshape_0_u;
-      __pyx_t_31 = __pyx_v_y;
-      if (__pyx_t_31 < 0) __pyx_t_31 += __pyx_bshape_0_v;
-      __pyx_t_16 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_30, __pyx_bstride_0_u)) + (__pyx_v_tr * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_31, __pyx_bstride_0_v))));
-      __pyx_t_6 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_29, __pyx_bstride_0_left_edge)) <= __pyx_t_16);
-      if (__pyx_t_6) {
-        __pyx_t_32 = __pyx_v_y;
-        if (__pyx_t_32 < 0) __pyx_t_32 += __pyx_bshape_0_right_edge;
-        __pyx_t_6 = (__pyx_t_16 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_32, __pyx_bstride_0_right_edge)));
+      __pyx_t_36 = __pyx_v_y;
+      __pyx_t_37 = __pyx_v_y;
+      __pyx_t_38 = __pyx_v_y;
+      __pyx_t_23 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_37, __pyx_bstride_0_u)) + (__pyx_v_tr * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_38, __pyx_bstride_0_v))));
+      __pyx_t_11 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_36, __pyx_bstride_0_left_edge)) <= __pyx_t_23);
+      if (__pyx_t_11) {
+        __pyx_t_39 = __pyx_v_y;
+        __pyx_t_11 = (__pyx_t_23 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_39, __pyx_bstride_0_right_edge)));
       }
-      if (__pyx_t_6) {
+      if (__pyx_t_11) {
 
-        /* "yt/lagos/RTIntegrator.pyx":107
+        /* "yt/lagos/RTIntegrator.pyx":110
  *         if (left_edge[x] <= (u[x] + tr*v[x]) <= right_edge[x]) and \
  *            (left_edge[y] <= (u[y] + tr*v[y]) <= right_edge[y]) and \
- *            (0 <= tr < intersect_t):             # <<<<<<<<<<<<<<
+ *            (0.0 <= tr < intersect_t):             # <<<<<<<<<<<<<<
  *             intersect_t = tr
  *     # if fully enclosed
  */
-        __pyx_t_24 = (0 <= __pyx_v_tr);
-        if (__pyx_t_24) {
-          __pyx_t_24 = (__pyx_v_tr < __pyx_v_intersect_t);
+        __pyx_t_31 = (0.0 <= __pyx_v_tr);
+        if (__pyx_t_31) {
+          __pyx_t_31 = (__pyx_v_tr < __pyx_v_intersect_t);
         }
-        __pyx_t_23 = __pyx_t_24;
+        __pyx_t_30 = __pyx_t_31;
       } else {
-        __pyx_t_23 = __pyx_t_6;
+        __pyx_t_30 = __pyx_t_11;
       }
-      __pyx_t_6 = __pyx_t_23;
+      __pyx_t_11 = __pyx_t_30;
     } else {
-      __pyx_t_6 = __pyx_t_21;
+      __pyx_t_11 = __pyx_t_28;
     }
-    if (__pyx_t_6) {
+    if (__pyx_t_11) {
 
-      /* "yt/lagos/RTIntegrator.pyx":108
+      /* "yt/lagos/RTIntegrator.pyx":111
  *            (left_edge[y] <= (u[y] + tr*v[y]) <= right_edge[y]) and \
- *            (0 <= tr < intersect_t):
+ *            (0.0 <= tr < intersect_t):
  *             intersect_t = tr             # <<<<<<<<<<<<<<
  *     # if fully enclosed
  *     if (left_edge[0] <= u[0] <= right_edge[0]) and \
@@ -2161,95 +2337,90 @@
     __pyx_L10:;
   }
 
-  /* "yt/lagos/RTIntegrator.pyx":110
+  /* "yt/lagos/RTIntegrator.pyx":113
  *             intersect_t = tr
  *     # if fully enclosed
  *     if (left_edge[0] <= u[0] <= right_edge[0]) and \             # <<<<<<<<<<<<<<
  *        (left_edge[1] <= u[1] <= right_edge[1]) and \
  *        (left_edge[2] <= u[2] <= right_edge[2]):
  */
-  __pyx_t_33 = 0;
-  if (__pyx_t_33 < 0) __pyx_t_33 += __pyx_bshape_0_left_edge;
-  __pyx_t_34 = 0;
-  if (__pyx_t_34 < 0) __pyx_t_34 += __pyx_bshape_0_u;
-  __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_34, __pyx_bstride_0_u));
-  __pyx_t_6 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_33, __pyx_bstride_0_left_edge)) <= __pyx_t_16);
-  if (__pyx_t_6) {
-    __pyx_t_35 = 0;
-    if (__pyx_t_35 < 0) __pyx_t_35 += __pyx_bshape_0_right_edge;
-    __pyx_t_6 = (__pyx_t_16 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_35, __pyx_bstride_0_right_edge)));
+  __pyx_t_40 = 0;
+  __pyx_t_41 = 0;
+  __pyx_t_23 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_41, __pyx_bstride_0_u));
+  __pyx_t_11 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_40, __pyx_bstride_0_left_edge)) <= __pyx_t_23);
+  if (__pyx_t_11) {
+    __pyx_t_42 = 0;
+    __pyx_t_11 = (__pyx_t_23 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_42, __pyx_bstride_0_right_edge)));
   }
-  if (__pyx_t_6) {
+  if (__pyx_t_11) {
 
-    /* "yt/lagos/RTIntegrator.pyx":111
+    /* "yt/lagos/RTIntegrator.pyx":114
  *     # if fully enclosed
  *     if (left_edge[0] <= u[0] <= right_edge[0]) and \
  *        (left_edge[1] <= u[1] <= right_edge[1]) and \             # <<<<<<<<<<<<<<
  *        (left_edge[2] <= u[2] <= right_edge[2]):
- *         intersect_t = 0
+ *         intersect_t = 0.0
  */
-    __pyx_t_36 = 1;
-    if (__pyx_t_36 < 0) __pyx_t_36 += __pyx_bshape_0_left_edge;
-    __pyx_t_37 = 1;
-    if (__pyx_t_37 < 0) __pyx_t_37 += __pyx_bshape_0_u;
-    __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_37, __pyx_bstride_0_u));
-    __pyx_t_21 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_36, __pyx_bstride_0_left_edge)) <= __pyx_t_16);
-    if (__pyx_t_21) {
-      __pyx_t_38 = 1;
-      if (__pyx_t_38 < 0) __pyx_t_38 += __pyx_bshape_0_right_edge;
-      __pyx_t_21 = (__pyx_t_16 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_38, __pyx_bstride_0_right_edge)));
+    __pyx_t_43 = 1;
+    __pyx_t_44 = 1;
+    __pyx_t_23 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_44, __pyx_bstride_0_u));
+    __pyx_t_28 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_43, __pyx_bstride_0_left_edge)) <= __pyx_t_23);
+    if (__pyx_t_28) {
+      __pyx_t_45 = 1;
+      __pyx_t_28 = (__pyx_t_23 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_45, __pyx_bstride_0_right_edge)));
     }
-    if (__pyx_t_21) {
+    if (__pyx_t_28) {
 
-      /* "yt/lagos/RTIntegrator.pyx":112
+      /* "yt/lagos/RTIntegrator.pyx":115
  *     if (left_edge[0] <= u[0] <= right_edge[0]) and \
  *        (left_edge[1] <= u[1] <= right_edge[1]) and \
  *        (left_edge[2] <= u[2] <= right_edge[2]):             # <<<<<<<<<<<<<<
- *         intersect_t = 0
- *     if intersect_t > 1: return
+ *         intersect_t = 0.0
+ *     if not (0 <= intersect_t <= 1): return
  */
-      __pyx_t_39 = 2;
-      if (__pyx_t_39 < 0) __pyx_t_39 += __pyx_bshape_0_left_edge;
-      __pyx_t_40 = 2;
-      if (__pyx_t_40 < 0) __pyx_t_40 += __pyx_bshape_0_u;
-      __pyx_t_16 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_40, __pyx_bstride_0_u));
-      __pyx_t_23 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_39, __pyx_bstride_0_left_edge)) <= __pyx_t_16);
-      if (__pyx_t_23) {
-        __pyx_t_41 = 2;
-        if (__pyx_t_41 < 0) __pyx_t_41 += __pyx_bshape_0_right_edge;
-        __pyx_t_23 = (__pyx_t_16 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_41, __pyx_bstride_0_right_edge)));
+      __pyx_t_46 = 2;
+      __pyx_t_47 = 2;
+      __pyx_t_23 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_47, __pyx_bstride_0_u));
+      __pyx_t_30 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_46, __pyx_bstride_0_left_edge)) <= __pyx_t_23);
+      if (__pyx_t_30) {
+        __pyx_t_48 = 2;
+        __pyx_t_30 = (__pyx_t_23 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_48, __pyx_bstride_0_right_edge)));
       }
-      __pyx_t_24 = __pyx_t_23;
+      __pyx_t_31 = __pyx_t_30;
     } else {
-      __pyx_t_24 = __pyx_t_21;
+      __pyx_t_31 = __pyx_t_28;
     }
-    __pyx_t_21 = __pyx_t_24;
+    __pyx_t_28 = __pyx_t_31;
   } else {
-    __pyx_t_21 = __pyx_t_6;
+    __pyx_t_28 = __pyx_t_11;
   }
-  if (__pyx_t_21) {
+  if (__pyx_t_28) {
 
-    /* "yt/lagos/RTIntegrator.pyx":113
+    /* "yt/lagos/RTIntegrator.pyx":116
  *        (left_edge[1] <= u[1] <= right_edge[1]) and \
  *        (left_edge[2] <= u[2] <= right_edge[2]):
- *         intersect_t = 0             # <<<<<<<<<<<<<<
- *     if intersect_t > 1: return
+ *         intersect_t = 0.0             # <<<<<<<<<<<<<<
+ *     if not (0 <= intersect_t <= 1): return
  *     # Now get the indices of the intersection
  */
-    __pyx_v_intersect_t = 0;
+    __pyx_v_intersect_t = 0.0;
     goto __pyx_L11;
   }
   __pyx_L11:;
 
-  /* "yt/lagos/RTIntegrator.pyx":114
+  /* "yt/lagos/RTIntegrator.pyx":117
  *        (left_edge[2] <= u[2] <= right_edge[2]):
- *         intersect_t = 0
- *     if intersect_t > 1: return             # <<<<<<<<<<<<<<
+ *         intersect_t = 0.0
+ *     if not (0 <= intersect_t <= 1): return             # <<<<<<<<<<<<<<
  *     # Now get the indices of the intersection
  *     intersect = u + intersect_t * v
  */
-  __pyx_t_21 = (__pyx_v_intersect_t > 1);
-  if (__pyx_t_21) {
+  __pyx_t_28 = (0 <= __pyx_v_intersect_t);
+  if (__pyx_t_28) {
+    __pyx_t_28 = (__pyx_v_intersect_t <= 1);
+  }
+  __pyx_t_11 = (!__pyx_t_28);
+  if (__pyx_t_11) {
     __Pyx_XDECREF(__pyx_r);
     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
     goto __pyx_L0;
@@ -2257,790 +2428,617 @@
   }
   __pyx_L12:;
 
-  /* "yt/lagos/RTIntegrator.pyx":116
- *     if intersect_t > 1: return
+  /* "yt/lagos/RTIntegrator.pyx":119
+ *     if not (0 <= intersect_t <= 1): return
  *     # Now get the indices of the intersection
  *     intersect = u + intersect_t * v             # <<<<<<<<<<<<<<
+ *     cdef int ncells = 0
  *     for i in range(3):
- *         cur_ind[i] = np.floor((intersect[i] - left_edge[i])/dx[i])
  */
-  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_intersect_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_intersect_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, ((PyObject *)__pyx_v_v)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = PyNumber_Multiply(__pyx_t_3, ((PyObject *)__pyx_v_v)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-  __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_v_u), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_v_u), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_8 = ((PyArrayObject *)__pyx_t_3);
+  {
+    __Pyx_BufFmt_StackElem __pyx_stack[1];
+    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_intersect);
+    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_intersect, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
+    if (unlikely(__pyx_t_9 < 0)) {
+      PyErr_Fetch(&__pyx_t_49, &__pyx_t_50, &__pyx_t_51);
+      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_intersect, (PyObject*)__pyx_v_intersect, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
+        Py_XDECREF(__pyx_t_49); Py_XDECREF(__pyx_t_50); Py_XDECREF(__pyx_t_51);
+        __Pyx_RaiseBufferFallbackError();
+      } else {
+        PyErr_Restore(__pyx_t_49, __pyx_t_50, __pyx_t_51);
+      }
+    }
+    __pyx_bstride_0_intersect = __pyx_bstruct_intersect.strides[0];
+    __pyx_bshape_0_intersect = __pyx_bstruct_intersect.shape[0];
+    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_8 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_v_intersect));
   __pyx_v_intersect = ((PyArrayObject *)__pyx_t_3);
   __pyx_t_3 = 0;
 
-  /* "yt/lagos/RTIntegrator.pyx":117
+  /* "yt/lagos/RTIntegrator.pyx":120
  *     # Now get the indices of the intersection
  *     intersect = u + intersect_t * v
+ *     cdef int ncells = 0             # <<<<<<<<<<<<<<
+ *     for i in range(3):
+ *         cur_ind[i] = np.floor((intersect[i] + 1e-8*dx[i] - left_edge[i])/dx[i])
+ */
+  __pyx_v_ncells = 0;
+
+  /* "yt/lagos/RTIntegrator.pyx":121
+ *     intersect = u + intersect_t * v
+ *     cdef int ncells = 0
  *     for i in range(3):             # <<<<<<<<<<<<<<
- *         cur_ind[i] = np.floor((intersect[i] - left_edge[i])/dx[i])
+ *         cur_ind[i] = np.floor((intersect[i] + 1e-8*dx[i] - left_edge[i])/dx[i])
  *         tmax[i] = (((cur_ind[i]+step[i])*dx[i])+left_edge[i]-u[i])/v[i]
  */
-  for (__pyx_t_4 = 0; __pyx_t_4 < 3; __pyx_t_4+=1) {
-    __pyx_v_i = __pyx_t_4;
+  for (__pyx_t_9 = 0; __pyx_t_9 < 3; __pyx_t_9+=1) {
+    __pyx_v_i = __pyx_t_9;
 
-    /* "yt/lagos/RTIntegrator.pyx":118
- *     intersect = u + intersect_t * v
+    /* "yt/lagos/RTIntegrator.pyx":122
+ *     cdef int ncells = 0
  *     for i in range(3):
- *         cur_ind[i] = np.floor((intersect[i] - left_edge[i])/dx[i])             # <<<<<<<<<<<<<<
+ *         cur_ind[i] = np.floor((intersect[i] + 1e-8*dx[i] - left_edge[i])/dx[i])             # <<<<<<<<<<<<<<
  *         tmax[i] = (((cur_ind[i]+step[i])*dx[i])+left_edge[i]-u[i])/v[i]
- *         if step[i] < 0: cur_ind[i] -= 1
+ *         if cur_ind[i] == grid_mask.shape[i] and step[i] < 0:
  */
-    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_2);
-    __pyx_t_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_floor); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_floor); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_3);
     __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-    __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_intersect), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    __pyx_t_42 = __pyx_v_i;
-    if (__pyx_t_42 < 0) __pyx_t_42 += __pyx_bshape_0_left_edge;
-    __pyx_t_2 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_42, __pyx_bstride_0_left_edge))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_1 = PyNumber_Subtract(__pyx_1, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_52 = __pyx_v_i;
+    __pyx_t_53 = __pyx_v_i;
+    __pyx_t_54 = __pyx_v_i;
+    __pyx_t_55 = __pyx_v_i;
+    __pyx_t_1 = PyFloat_FromDouble(((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_intersect.buf, __pyx_t_52, __pyx_bstride_0_intersect)) + (1e-08 * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_53, __pyx_bstride_0_dx)))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_54, __pyx_bstride_0_left_edge))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_55, __pyx_bstride_0_dx)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_43 = __pyx_v_i;
-    if (__pyx_t_43 < 0) __pyx_t_43 += __pyx_bshape_0_dx;
-    __pyx_t_2 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_43, __pyx_bstride_0_dx))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_44 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_44);
-    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_44);
-    __Pyx_GIVEREF(__pyx_t_44);
-    __pyx_t_44 = 0;
-    __pyx_t_44 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_44);
+    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+    __Pyx_GIVEREF(__pyx_t_1);
+    __pyx_t_1 = 0;
+    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_cur_ind), __pyx_v_i, __pyx_t_44, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
+    __pyx_t_56 = __Pyx_PyInt_AsSignedLongLong(__pyx_t_1); if (unlikely((__pyx_t_56 == (signed PY_LONG_LONG)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __pyx_t_57 = __pyx_v_i;
+    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_57, __pyx_bstride_0_cur_ind) = __pyx_t_56;
 
-    /* "yt/lagos/RTIntegrator.pyx":119
+    /* "yt/lagos/RTIntegrator.pyx":123
  *     for i in range(3):
- *         cur_ind[i] = np.floor((intersect[i] - left_edge[i])/dx[i])
+ *         cur_ind[i] = np.floor((intersect[i] + 1e-8*dx[i] - left_edge[i])/dx[i])
  *         tmax[i] = (((cur_ind[i]+step[i])*dx[i])+left_edge[i]-u[i])/v[i]             # <<<<<<<<<<<<<<
- *         if step[i] < 0: cur_ind[i] -= 1
- *         tdelta[i] = abs(dx[i]/v[i])
+ *         if cur_ind[i] == grid_mask.shape[i] and step[i] < 0:
+ *             cur_ind[i] = grid_mask.shape[i] - 1
  */
-    __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_2);
-    __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_step), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    __pyx_t_44 = PyNumber_Add(__pyx_2, __pyx_1); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_44);
-    __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    __pyx_t_45 = __pyx_v_i;
-    if (__pyx_t_45 < 0) __pyx_t_45 += __pyx_bshape_0_dx;
-    __pyx_t_2 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_45, __pyx_bstride_0_dx))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyNumber_Multiply(__pyx_t_44, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_46 = __pyx_v_i;
-    if (__pyx_t_46 < 0) __pyx_t_46 += __pyx_bshape_0_left_edge;
-    __pyx_t_2 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_46, __pyx_bstride_0_left_edge))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_44 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_44);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_47 = __pyx_v_i;
-    if (__pyx_t_47 < 0) __pyx_t_47 += __pyx_bshape_0_u;
-    __pyx_t_2 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_47, __pyx_bstride_0_u))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_3 = PyNumber_Subtract(__pyx_t_44, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    __pyx_t_48 = __pyx_v_i;
-    if (__pyx_t_48 < 0) __pyx_t_48 += __pyx_bshape_0_v;
-    __pyx_t_2 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_48, __pyx_bstride_0_v))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __pyx_t_44 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_44);
-    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_tmax), __pyx_v_i, __pyx_t_44, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
+    __pyx_t_58 = __pyx_v_i;
+    __pyx_t_59 = __pyx_v_i;
+    __pyx_t_60 = __pyx_v_i;
+    __pyx_t_61 = __pyx_v_i;
+    __pyx_t_62 = __pyx_v_i;
+    __pyx_t_63 = __pyx_v_i;
+    __pyx_t_64 = __pyx_v_i;
+    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_64, __pyx_bstride_0_tmax) = ((((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_58, __pyx_bstride_0_cur_ind)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_59, __pyx_bstride_0_step))) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_60, __pyx_bstride_0_dx))) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_61, __pyx_bstride_0_left_edge))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_62, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_63, __pyx_bstride_0_v)));
 
-    /* "yt/lagos/RTIntegrator.pyx":120
- *         cur_ind[i] = np.floor((intersect[i] - left_edge[i])/dx[i])
+    /* "yt/lagos/RTIntegrator.pyx":124
+ *         cur_ind[i] = np.floor((intersect[i] + 1e-8*dx[i] - left_edge[i])/dx[i])
  *         tmax[i] = (((cur_ind[i]+step[i])*dx[i])+left_edge[i]-u[i])/v[i]
- *         if step[i] < 0: cur_ind[i] -= 1             # <<<<<<<<<<<<<<
- *         tdelta[i] = abs(dx[i]/v[i])
- *     # The variable intersect contains the point we first pierce the grid
+ *         if cur_ind[i] == grid_mask.shape[i] and step[i] < 0:             # <<<<<<<<<<<<<<
+ *             cur_ind[i] = grid_mask.shape[i] - 1
+ *         if step[i] > 0: tmax[i] = (((cur_ind[i]+1)*dx[i])+left_edge[i]-u[i])/v[i]
+ */
+    __pyx_t_65 = __pyx_v_i;
+    if (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_65, __pyx_bstride_0_cur_ind)) == (__pyx_v_grid_mask->dimensions[__pyx_v_i]))) {
+      __pyx_t_66 = __pyx_v_i;
+      __pyx_t_11 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_66, __pyx_bstride_0_step)) < 0);
+    } else {
+      __pyx_t_11 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_65, __pyx_bstride_0_cur_ind)) == (__pyx_v_grid_mask->dimensions[__pyx_v_i]));
+    }
+    if (__pyx_t_11) {
+
+      /* "yt/lagos/RTIntegrator.pyx":125
+ *         tmax[i] = (((cur_ind[i]+step[i])*dx[i])+left_edge[i]-u[i])/v[i]
+ *         if cur_ind[i] == grid_mask.shape[i] and step[i] < 0:
+ *             cur_ind[i] = grid_mask.shape[i] - 1             # <<<<<<<<<<<<<<
+ *         if step[i] > 0: tmax[i] = (((cur_ind[i]+1)*dx[i])+left_edge[i]-u[i])/v[i]
+ *         if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i]
  */
-    __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_step), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_2);
-    __pyx_t_44 = PyObject_RichCompare(__pyx_2, __pyx_int_0, Py_LT); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_44);
-    __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-    __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_44); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
-    if (__pyx_t_21) {
-      __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_2);
-      __pyx_1 = PyNumber_InPlaceSubtract(__pyx_2, __pyx_int_1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_1);
-      __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-      if (__Pyx_SetItemInt(((PyObject *)__pyx_v_cur_ind), __pyx_v_i, __pyx_1, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+      __pyx_t_67 = __pyx_v_i;
+      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_67, __pyx_bstride_0_cur_ind) = ((__pyx_v_grid_mask->dimensions[__pyx_v_i]) - 1);
       goto __pyx_L15;
     }
     __pyx_L15:;
 
-    /* "yt/lagos/RTIntegrator.pyx":121
- *         tmax[i] = (((cur_ind[i]+step[i])*dx[i])+left_edge[i]-u[i])/v[i]
- *         if step[i] < 0: cur_ind[i] -= 1
- *         tdelta[i] = abs(dx[i]/v[i])             # <<<<<<<<<<<<<<
+    /* "yt/lagos/RTIntegrator.pyx":126
+ *         if cur_ind[i] == grid_mask.shape[i] and step[i] < 0:
+ *             cur_ind[i] = grid_mask.shape[i] - 1
+ *         if step[i] > 0: tmax[i] = (((cur_ind[i]+1)*dx[i])+left_edge[i]-u[i])/v[i]             # <<<<<<<<<<<<<<
+ *         if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i]
+ *         tdelta[i] = np.abs((dx[i]/v[i]))
+ */
+    __pyx_t_68 = __pyx_v_i;
+    __pyx_t_11 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_68, __pyx_bstride_0_step)) > 0);
+    if (__pyx_t_11) {
+      __pyx_t_69 = __pyx_v_i;
+      __pyx_t_70 = __pyx_v_i;
+      __pyx_t_71 = __pyx_v_i;
+      __pyx_t_72 = __pyx_v_i;
+      __pyx_t_73 = __pyx_v_i;
+      __pyx_t_74 = __pyx_v_i;
+      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_74, __pyx_bstride_0_tmax) = ((((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_69, __pyx_bstride_0_cur_ind)) + 1) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_70, __pyx_bstride_0_dx))) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_71, __pyx_bstride_0_left_edge))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_72, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_73, __pyx_bstride_0_v)));
+      goto __pyx_L16;
+    }
+    __pyx_L16:;
+
+    /* "yt/lagos/RTIntegrator.pyx":127
+ *             cur_ind[i] = grid_mask.shape[i] - 1
+ *         if step[i] > 0: tmax[i] = (((cur_ind[i]+1)*dx[i])+left_edge[i]-u[i])/v[i]
+ *         if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i]             # <<<<<<<<<<<<<<
+ *         tdelta[i] = np.abs((dx[i]/v[i]))
+ *     # The variable intersect contains the point we first pierce the grid
+ */
+    __pyx_t_75 = __pyx_v_i;
+    __pyx_t_11 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_75, __pyx_bstride_0_step)) < 0);
+    if (__pyx_t_11) {
+      __pyx_t_76 = __pyx_v_i;
+      __pyx_t_77 = __pyx_v_i;
+      __pyx_t_78 = __pyx_v_i;
+      __pyx_t_79 = __pyx_v_i;
+      __pyx_t_80 = __pyx_v_i;
+      __pyx_t_81 = __pyx_v_i;
+      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_81, __pyx_bstride_0_tmax) = ((((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_76, __pyx_bstride_0_cur_ind)) + 0) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_77, __pyx_bstride_0_dx))) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_78, __pyx_bstride_0_left_edge))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_79, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_80, __pyx_bstride_0_v)));
+      goto __pyx_L17;
+    }
+    __pyx_L17:;
+
+    /* "yt/lagos/RTIntegrator.pyx":128
+ *         if step[i] > 0: tmax[i] = (((cur_ind[i]+1)*dx[i])+left_edge[i]-u[i])/v[i]
+ *         if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i]
+ *         tdelta[i] = np.abs((dx[i]/v[i]))             # <<<<<<<<<<<<<<
  *     # The variable intersect contains the point we first pierce the grid
  *     enter_t = intersect_t
  */
-    __pyx_t_49 = __pyx_v_i;
-    if (__pyx_t_49 < 0) __pyx_t_49 += __pyx_bshape_0_dx;
-    __pyx_t_50 = __pyx_v_i;
-    if (__pyx_t_50 < 0) __pyx_t_50 += __pyx_bshape_0_v;
-    __pyx_t_44 = PyFloat_FromDouble(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_49, __pyx_bstride_0_dx)) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_50, __pyx_bstride_0_v)))); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_44);
-    __pyx_t_2 = PyNumber_Absolute(__pyx_t_44); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_1);
+    __pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_abs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_1);
+    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+    __pyx_t_82 = __pyx_v_i;
+    __pyx_t_83 = __pyx_v_i;
+    __pyx_t_2 = PyFloat_FromDouble(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_82, __pyx_bstride_0_dx)) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_83, __pyx_bstride_0_v)))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(__pyx_t_2);
+    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+    __Pyx_GIVEREF(__pyx_t_2);
+    __pyx_t_2 = 0;
+    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
-    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_tdelta), __pyx_v_i, __pyx_t_2, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+    __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+    __pyx_t_84 = __pyx_v_i;
+    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_84, __pyx_bstride_0_tdelta) = __pyx_t_23;
   }
 
-  /* "yt/lagos/RTIntegrator.pyx":123
- *         tdelta[i] = abs(dx[i]/v[i])
+  /* "yt/lagos/RTIntegrator.pyx":130
+ *         tdelta[i] = np.abs((dx[i]/v[i]))
  *     # The variable intersect contains the point we first pierce the grid
  *     enter_t = intersect_t             # <<<<<<<<<<<<<<
- *     cdef int in_cells = 1
  *     while 1:
+ *         if (not (0 <= cur_ind[0] < grid_mask.shape[0])) or \
  */
   __pyx_v_enter_t = __pyx_v_intersect_t;
 
-  /* "yt/lagos/RTIntegrator.pyx":124
+  /* "yt/lagos/RTIntegrator.pyx":131
  *     # The variable intersect contains the point we first pierce the grid
  *     enter_t = intersect_t
- *     cdef int in_cells = 1             # <<<<<<<<<<<<<<
- *     while 1:
- *         if not (0 <= cur_ind[0] < grid_mask.shape[0]) or \
- */
-  __pyx_v_in_cells = 1;
-
-  /* "yt/lagos/RTIntegrator.pyx":125
- *     enter_t = intersect_t
- *     cdef int in_cells = 1
  *     while 1:             # <<<<<<<<<<<<<<
- *         if not (0 <= cur_ind[0] < grid_mask.shape[0]) or \
- *            not (0 <= cur_ind[1] < grid_mask.shape[1]) or \
+ *         if (not (0 <= cur_ind[0] < grid_mask.shape[0])) or \
+ *            (not (0 <= cur_ind[1] < grid_mask.shape[1])) or \
  */
   while (1) {
-    __pyx_t_21 = 1;
-    if (!__pyx_t_21) break;
+    __pyx_t_11 = 1;
+    if (!__pyx_t_11) break;
 
-    /* "yt/lagos/RTIntegrator.pyx":126
- *     cdef int in_cells = 1
+    /* "yt/lagos/RTIntegrator.pyx":132
+ *     enter_t = intersect_t
  *     while 1:
- *         if not (0 <= cur_ind[0] < grid_mask.shape[0]) or \             # <<<<<<<<<<<<<<
- *            not (0 <= cur_ind[1] < grid_mask.shape[1]) or \
- *            not (0 <= cur_ind[2] < grid_mask.shape[2]):
- */
-    __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 0, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_2);
-    __pyx_t_2 = PyObject_RichCompare(__pyx_int_0, __pyx_2, Py_LE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
-      __Pyx_DECREF(__pyx_t_2);
-      __pyx_t_44 = PyInt_FromLong((__pyx_v_grid_mask->dimensions[0])); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_44);
-      __pyx_t_2 = PyObject_RichCompare(__pyx_2, __pyx_t_44, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
+ *         if (not (0 <= cur_ind[0] < grid_mask.shape[0])) or \             # <<<<<<<<<<<<<<
+ *            (not (0 <= cur_ind[1] < grid_mask.shape[1])) or \
+ *            (not (0 <= cur_ind[2] < grid_mask.shape[2])):
+ */
+    __pyx_t_85 = 0;
+    __pyx_t_56 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_85, __pyx_bstride_0_cur_ind));
+    __pyx_t_11 = (0 <= __pyx_t_56);
+    if (__pyx_t_11) {
+      __pyx_t_11 = (__pyx_t_56 < (__pyx_v_grid_mask->dimensions[0]));
     }
-    __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-    __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (!(!__pyx_t_21)) {
+    if (!(!__pyx_t_11)) {
 
-      /* "yt/lagos/RTIntegrator.pyx":127
+      /* "yt/lagos/RTIntegrator.pyx":133
  *     while 1:
- *         if not (0 <= cur_ind[0] < grid_mask.shape[0]) or \
- *            not (0 <= cur_ind[1] < grid_mask.shape[1]) or \             # <<<<<<<<<<<<<<
- *            not (0 <= cur_ind[2] < grid_mask.shape[2]):
+ *         if (not (0 <= cur_ind[0] < grid_mask.shape[0])) or \
+ *            (not (0 <= cur_ind[1] < grid_mask.shape[1])) or \             # <<<<<<<<<<<<<<
+ *            (not (0 <= cur_ind[2] < grid_mask.shape[2])):
  *             break
  */
-      __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 1, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_1);
-      __pyx_t_2 = PyObject_RichCompare(__pyx_int_0, __pyx_1, Py_LE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
-        __Pyx_DECREF(__pyx_t_2);
-        __pyx_t_44 = PyInt_FromLong((__pyx_v_grid_mask->dimensions[1])); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_44);
-        __pyx_t_2 = PyObject_RichCompare(__pyx_1, __pyx_t_44, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
-      }
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      if (!(!__pyx_t_6)) {
-
-        /* "yt/lagos/RTIntegrator.pyx":128
- *         if not (0 <= cur_ind[0] < grid_mask.shape[0]) or \
- *            not (0 <= cur_ind[1] < grid_mask.shape[1]) or \
- *            not (0 <= cur_ind[2] < grid_mask.shape[2]):             # <<<<<<<<<<<<<<
+      __pyx_t_86 = 1;
+      __pyx_t_56 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_86, __pyx_bstride_0_cur_ind));
+      __pyx_t_28 = (0 <= __pyx_t_56);
+      if (__pyx_t_28) {
+        __pyx_t_28 = (__pyx_t_56 < (__pyx_v_grid_mask->dimensions[1]));
+      }
+      if (!(!__pyx_t_28)) {
+
+        /* "yt/lagos/RTIntegrator.pyx":134
+ *         if (not (0 <= cur_ind[0] < grid_mask.shape[0])) or \
+ *            (not (0 <= cur_ind[1] < grid_mask.shape[1])) or \
+ *            (not (0 <= cur_ind[2] < grid_mask.shape[2])):             # <<<<<<<<<<<<<<
  *             break
- *         else:
+ *         # Note that we are calculating t on the fly, but we get *negative* t
  */
-        __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 2, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_2);
-        __pyx_t_2 = PyObject_RichCompare(__pyx_int_0, __pyx_2, Py_LE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
-          __Pyx_DECREF(__pyx_t_2);
-          __pyx_t_44 = PyInt_FromLong((__pyx_v_grid_mask->dimensions[2])); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_44);
-          __pyx_t_2 = PyObject_RichCompare(__pyx_2, __pyx_t_44, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-          __Pyx_GOTREF(__pyx_t_2);
-          __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
+        __pyx_t_87 = 2;
+        __pyx_t_56 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_87, __pyx_bstride_0_cur_ind));
+        __pyx_t_31 = (0 <= __pyx_t_56);
+        if (__pyx_t_31) {
+          __pyx_t_31 = (__pyx_t_56 < (__pyx_v_grid_mask->dimensions[2]));
         }
-        __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-        __pyx_t_24 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_24 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_t_23 = (!__pyx_t_24);
+        __pyx_t_30 = (!__pyx_t_31);
       } else {
-        __pyx_t_23 = (!__pyx_t_6);
+        __pyx_t_30 = (!__pyx_t_28);
       }
-      __pyx_t_6 = __pyx_t_23;
+      __pyx_t_28 = __pyx_t_30;
     } else {
-      __pyx_t_6 = (!__pyx_t_21);
+      __pyx_t_28 = (!__pyx_t_11);
     }
-    if (__pyx_t_6) {
+    if (__pyx_t_28) {
 
-      /* "yt/lagos/RTIntegrator.pyx":129
- *            not (0 <= cur_ind[1] < grid_mask.shape[1]) or \
- *            not (0 <= cur_ind[2] < grid_mask.shape[2]):
+      /* "yt/lagos/RTIntegrator.pyx":135
+ *            (not (0 <= cur_ind[1] < grid_mask.shape[1])) or \
+ *            (not (0 <= cur_ind[2] < grid_mask.shape[2])):
  *             break             # <<<<<<<<<<<<<<
- *         else:
- *             grid_mask[cur_ind[0], cur_ind[1], cur_ind[2]] = 1
- */
-      goto __pyx_L17_break;
-      goto __pyx_L18;
-    }
-    /*else*/ {
-
-      /* "yt/lagos/RTIntegrator.pyx":131
- *             break
- *         else:
- *             grid_mask[cur_ind[0], cur_ind[1], cur_ind[2]] = 1             # <<<<<<<<<<<<<<
  *         # Note that we are calculating t on the fly, but we get *negative* t
  *         # values from what they should be.
  */
-      __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_1);
-      __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 1, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_2);
-      __pyx_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 2, sizeof(long), PyInt_FromLong); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_3);
-      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_1);
-      __Pyx_GIVEREF(__pyx_1);
-      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_2);
-      __Pyx_GIVEREF(__pyx_2);
-      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_3);
-      __Pyx_GIVEREF(__pyx_3);
-      __pyx_1 = 0;
-      __pyx_2 = 0;
-      __pyx_3 = 0;
-      if (PyObject_SetItem(((PyObject *)__pyx_v_grid_mask), ((PyObject *)__pyx_t_2), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+      goto __pyx_L19_break;
+      goto __pyx_L20;
     }
-    __pyx_L18:;
+    __pyx_L20:;
 
-    /* "yt/lagos/RTIntegrator.pyx":135
+    /* "yt/lagos/RTIntegrator.pyx":139
  *         # values from what they should be.
  *         # If we've reached t = 1, we are done.
- *         if tmax[0] > 1 and tmax[1] > 1 and tmax[2] > 1:             # <<<<<<<<<<<<<<
+ *         grid_mask[cur_ind[0], cur_ind[1], cur_ind[2]] = 1             # <<<<<<<<<<<<<<
+ *         if (tmax[0] > 1.0) and (tmax[1] > 1.0) and (tmax[2] > 1.0):
+ *             grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = 1.0 - enter_t
+ */
+    __pyx_t_88 = 0;
+    __pyx_t_89 = 1;
+    __pyx_t_90 = 2;
+    __pyx_t_56 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_88, __pyx_bstride_0_cur_ind));
+    __pyx_t_91 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_89, __pyx_bstride_0_cur_ind));
+    __pyx_t_92 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_90, __pyx_bstride_0_cur_ind));
+    *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int_t *, __pyx_bstruct_grid_mask.buf, __pyx_t_56, __pyx_bstride_0_grid_mask, __pyx_t_91, __pyx_bstride_1_grid_mask, __pyx_t_92, __pyx_bstride_2_grid_mask) = 1;
+
+    /* "yt/lagos/RTIntegrator.pyx":140
+ *         # If we've reached t = 1, we are done.
+ *         grid_mask[cur_ind[0], cur_ind[1], cur_ind[2]] = 1
+ *         if (tmax[0] > 1.0) and (tmax[1] > 1.0) and (tmax[2] > 1.0):             # <<<<<<<<<<<<<<
+ *             grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = 1.0 - enter_t
  *             break
- *         if tmax[0] < tmax[1]:
  */
-    __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    __pyx_t_2 = PyObject_RichCompare(__pyx_1, __pyx_int_1, Py_GT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (__pyx_t_6) {
-      __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 1, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_2);
-      __pyx_t_2 = PyObject_RichCompare(__pyx_2, __pyx_int_1, Py_GT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-      __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      if (__pyx_t_21) {
-        __pyx_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 2, sizeof(long), PyInt_FromLong); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_3);
-        __pyx_t_2 = PyObject_RichCompare(__pyx_3, __pyx_int_1, Py_GT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-        __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_23 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_t_24 = __pyx_t_23;
+    __pyx_t_93 = 0;
+    if (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_93, __pyx_bstride_0_tmax)) > 1.0)) {
+      __pyx_t_94 = 1;
+      if (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_94, __pyx_bstride_0_tmax)) > 1.0)) {
+        __pyx_t_95 = 2;
+        __pyx_t_28 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_95, __pyx_bstride_0_tmax)) > 1.0);
       } else {
-        __pyx_t_24 = __pyx_t_21;
+        __pyx_t_28 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_94, __pyx_bstride_0_tmax)) > 1.0);
       }
-      __pyx_t_21 = __pyx_t_24;
+      __pyx_t_11 = __pyx_t_28;
     } else {
-      __pyx_t_21 = __pyx_t_6;
+      __pyx_t_11 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_93, __pyx_bstride_0_tmax)) > 1.0);
     }
-    if (__pyx_t_21) {
+    if (__pyx_t_11) {
 
-      /* "yt/lagos/RTIntegrator.pyx":136
- *         # If we've reached t = 1, we are done.
- *         if tmax[0] > 1 and tmax[1] > 1 and tmax[2] > 1:
+      /* "yt/lagos/RTIntegrator.pyx":141
+ *         grid_mask[cur_ind[0], cur_ind[1], cur_ind[2]] = 1
+ *         if (tmax[0] > 1.0) and (tmax[1] > 1.0) and (tmax[2] > 1.0):
+ *             grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = 1.0 - enter_t             # <<<<<<<<<<<<<<
+ *             break
+ *         ncells += 1
+ */
+      __pyx_t_96 = 0;
+      __pyx_t_97 = 1;
+      __pyx_t_98 = 2;
+      __pyx_t_99 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_96, __pyx_bstride_0_cur_ind));
+      __pyx_t_100 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_97, __pyx_bstride_0_cur_ind));
+      __pyx_t_101 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_98, __pyx_bstride_0_cur_ind));
+      *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_t.buf, __pyx_t_99, __pyx_bstride_0_grid_t, __pyx_t_100, __pyx_bstride_1_grid_t, __pyx_t_101, __pyx_bstride_2_grid_t) = (1.0 - __pyx_v_enter_t);
+
+      /* "yt/lagos/RTIntegrator.pyx":142
+ *         if (tmax[0] > 1.0) and (tmax[1] > 1.0) and (tmax[2] > 1.0):
+ *             grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = 1.0 - enter_t
  *             break             # <<<<<<<<<<<<<<
+ *         ncells += 1
  *         if tmax[0] < tmax[1]:
- *             if tmax[0] < tmax[2]:
  */
-      goto __pyx_L17_break;
-      goto __pyx_L19;
+      goto __pyx_L19_break;
+      goto __pyx_L21;
     }
-    __pyx_L19:;
+    __pyx_L21:;
 
-    /* "yt/lagos/RTIntegrator.pyx":137
- *         if tmax[0] > 1 and tmax[1] > 1 and tmax[2] > 1:
+    /* "yt/lagos/RTIntegrator.pyx":143
+ *             grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = 1.0 - enter_t
  *             break
+ *         ncells += 1             # <<<<<<<<<<<<<<
+ *         if tmax[0] < tmax[1]:
+ *             if tmax[0] < tmax[2]:
+ */
+    __pyx_v_ncells += 1;
+
+    /* "yt/lagos/RTIntegrator.pyx":144
+ *             break
+ *         ncells += 1
  *         if tmax[0] < tmax[1]:             # <<<<<<<<<<<<<<
  *             if tmax[0] < tmax[2]:
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[0] - enter_t
  */
-    __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_1);
-    __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 1, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_2);
-    __pyx_t_2 = PyObject_RichCompare(__pyx_1, __pyx_2, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_2);
-    __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-    __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-    __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-    if (__pyx_t_21) {
+    __pyx_t_102 = 0;
+    __pyx_t_103 = 1;
+    __pyx_t_11 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_102, __pyx_bstride_0_tmax)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_103, __pyx_bstride_0_tmax)));
+    if (__pyx_t_11) {
 
-      /* "yt/lagos/RTIntegrator.pyx":138
- *             break
+      /* "yt/lagos/RTIntegrator.pyx":145
+ *         ncells += 1
  *         if tmax[0] < tmax[1]:
  *             if tmax[0] < tmax[2]:             # <<<<<<<<<<<<<<
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[0] - enter_t
  *                 enter_t = tmax[0]
  */
-      __pyx_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 0, sizeof(long), PyInt_FromLong); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_3);
-      __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 2, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_1);
-      __pyx_t_2 = PyObject_RichCompare(__pyx_3, __pyx_1, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      if (__pyx_t_21) {
+      __pyx_t_104 = 0;
+      __pyx_t_105 = 2;
+      __pyx_t_11 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_104, __pyx_bstride_0_tmax)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_105, __pyx_bstride_0_tmax)));
+      if (__pyx_t_11) {
 
-        /* "yt/lagos/RTIntegrator.pyx":139
+        /* "yt/lagos/RTIntegrator.pyx":146
  *         if tmax[0] < tmax[1]:
  *             if tmax[0] < tmax[2]:
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[0] - enter_t             # <<<<<<<<<<<<<<
  *                 enter_t = tmax[0]
  *                 tmax[0] += tdelta[0]
  */
-        __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 0, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_2);
-        __pyx_t_2 = PyFloat_FromDouble(__pyx_v_enter_t); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_44 = PyNumber_Subtract(__pyx_2, __pyx_t_2); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_44);
-        __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 0, sizeof(long), PyInt_FromLong); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_3);
-        __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 1, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_1);
-        __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 2, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_2);
-        __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_3);
-        __Pyx_GIVEREF(__pyx_3);
-        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_1);
-        __Pyx_GIVEREF(__pyx_1);
-        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_2);
-        __Pyx_GIVEREF(__pyx_2);
-        __pyx_3 = 0;
-        __pyx_1 = 0;
-        __pyx_2 = 0;
-        if (PyObject_SetItem(((PyObject *)__pyx_v_grid_t), ((PyObject *)__pyx_t_2), __pyx_t_44) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-        __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
+        __pyx_t_106 = 0;
+        __pyx_t_107 = 0;
+        __pyx_t_108 = 1;
+        __pyx_t_109 = 2;
+        __pyx_t_110 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_107, __pyx_bstride_0_cur_ind));
+        __pyx_t_111 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_108, __pyx_bstride_0_cur_ind));
+        __pyx_t_112 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_109, __pyx_bstride_0_cur_ind));
+        *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_t.buf, __pyx_t_110, __pyx_bstride_0_grid_t, __pyx_t_111, __pyx_bstride_1_grid_t, __pyx_t_112, __pyx_bstride_2_grid_t) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_106, __pyx_bstride_0_tmax)) - __pyx_v_enter_t);
 
-        /* "yt/lagos/RTIntegrator.pyx":140
+        /* "yt/lagos/RTIntegrator.pyx":147
  *             if tmax[0] < tmax[2]:
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[0] - enter_t
  *                 enter_t = tmax[0]             # <<<<<<<<<<<<<<
  *                 tmax[0] += tdelta[0]
  *                 cur_ind[0] += step[0]
  */
-        __pyx_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 0, sizeof(long), PyInt_FromLong); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_3);
-        __pyx_t_51 = __pyx_PyFloat_AsDouble(__pyx_3); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-        __pyx_v_enter_t = __pyx_t_51;
+        __pyx_t_113 = 0;
+        __pyx_v_enter_t = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_113, __pyx_bstride_0_tmax));
 
-        /* "yt/lagos/RTIntegrator.pyx":141
+        /* "yt/lagos/RTIntegrator.pyx":148
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[0] - enter_t
  *                 enter_t = tmax[0]
  *                 tmax[0] += tdelta[0]             # <<<<<<<<<<<<<<
  *                 cur_ind[0] += step[0]
  *             else:
  */
-        __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tdelta), 0, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_2);
-        __pyx_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 0, sizeof(long), PyInt_FromLong); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_3);
-        __pyx_1 = PyNumber_InPlaceAdd(__pyx_3, __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_1);
-        __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-        __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-        if (__Pyx_SetItemInt(((PyObject *)__pyx_v_tmax), 0, __pyx_1, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+        __pyx_t_114 = 0;
+        __pyx_t_115 = 0;
+        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_115, __pyx_bstride_0_tmax) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_114, __pyx_bstride_0_tdelta));
 
-        /* "yt/lagos/RTIntegrator.pyx":142
+        /* "yt/lagos/RTIntegrator.pyx":149
  *                 enter_t = tmax[0]
  *                 tmax[0] += tdelta[0]
  *                 cur_ind[0] += step[0]             # <<<<<<<<<<<<<<
  *             else:
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[2] - enter_t
  */
-        __pyx_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_step), 0, sizeof(long), PyInt_FromLong); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_3);
-        __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_1);
-        __pyx_2 = PyNumber_InPlaceAdd(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_2);
-        __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-        __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-        if (__Pyx_SetItemInt(((PyObject *)__pyx_v_cur_ind), 0, __pyx_2, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-        goto __pyx_L21;
+        __pyx_t_116 = 0;
+        __pyx_t_117 = 0;
+        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_117, __pyx_bstride_0_cur_ind) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_116, __pyx_bstride_0_step));
+        goto __pyx_L23;
       }
       /*else*/ {
 
-        /* "yt/lagos/RTIntegrator.pyx":144
+        /* "yt/lagos/RTIntegrator.pyx":151
  *                 cur_ind[0] += step[0]
  *             else:
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[2] - enter_t             # <<<<<<<<<<<<<<
  *                 enter_t = tmax[2]
  *                 tmax[2] += tdelta[2]
  */
-        __pyx_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 2, sizeof(long), PyInt_FromLong); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_3);
-        __pyx_t_44 = PyFloat_FromDouble(__pyx_v_enter_t); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_44);
-        __pyx_t_2 = PyNumber_Subtract(__pyx_3, __pyx_t_44); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-        __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
-        __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_1);
-        __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 1, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_2);
-        __pyx_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 2, sizeof(long), PyInt_FromLong); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_3);
-        __pyx_t_44 = PyTuple_New(3); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_44));
-        PyTuple_SET_ITEM(__pyx_t_44, 0, __pyx_1);
-        __Pyx_GIVEREF(__pyx_1);
-        PyTuple_SET_ITEM(__pyx_t_44, 1, __pyx_2);
-        __Pyx_GIVEREF(__pyx_2);
-        PyTuple_SET_ITEM(__pyx_t_44, 2, __pyx_3);
-        __Pyx_GIVEREF(__pyx_3);
-        __pyx_1 = 0;
-        __pyx_2 = 0;
-        __pyx_3 = 0;
-        if (PyObject_SetItem(((PyObject *)__pyx_v_grid_t), ((PyObject *)__pyx_t_44), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(((PyObject *)__pyx_t_44)); __pyx_t_44 = 0;
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_118 = 2;
+        __pyx_t_119 = 0;
+        __pyx_t_120 = 1;
+        __pyx_t_121 = 2;
+        __pyx_t_122 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_119, __pyx_bstride_0_cur_ind));
+        __pyx_t_123 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_120, __pyx_bstride_0_cur_ind));
+        __pyx_t_124 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_121, __pyx_bstride_0_cur_ind));
+        *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_t.buf, __pyx_t_122, __pyx_bstride_0_grid_t, __pyx_t_123, __pyx_bstride_1_grid_t, __pyx_t_124, __pyx_bstride_2_grid_t) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_118, __pyx_bstride_0_tmax)) - __pyx_v_enter_t);
 
-        /* "yt/lagos/RTIntegrator.pyx":145
+        /* "yt/lagos/RTIntegrator.pyx":152
  *             else:
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[2] - enter_t
  *                 enter_t = tmax[2]             # <<<<<<<<<<<<<<
  *                 tmax[2] += tdelta[2]
  *                 cur_ind[2] += step[2]
  */
-        __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 2, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_1);
-        __pyx_t_51 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-        __pyx_v_enter_t = __pyx_t_51;
+        __pyx_t_125 = 2;
+        __pyx_v_enter_t = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_125, __pyx_bstride_0_tmax));
 
-        /* "yt/lagos/RTIntegrator.pyx":146
+        /* "yt/lagos/RTIntegrator.pyx":153
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[2] - enter_t
  *                 enter_t = tmax[2]
  *                 tmax[2] += tdelta[2]             # <<<<<<<<<<<<<<
  *                 cur_ind[2] += step[2]
  *         else:
  */
-        __pyx_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tdelta), 2, sizeof(long), PyInt_FromLong); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_3);
-        __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 2, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_1);
-        __pyx_2 = PyNumber_InPlaceAdd(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_2);
-        __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-        __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-        if (__Pyx_SetItemInt(((PyObject *)__pyx_v_tmax), 2, __pyx_2, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
+        __pyx_t_126 = 2;
+        __pyx_t_127 = 2;
+        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_127, __pyx_bstride_0_tmax) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_126, __pyx_bstride_0_tdelta));
 
-        /* "yt/lagos/RTIntegrator.pyx":147
+        /* "yt/lagos/RTIntegrator.pyx":154
  *                 enter_t = tmax[2]
  *                 tmax[2] += tdelta[2]
  *                 cur_ind[2] += step[2]             # <<<<<<<<<<<<<<
  *         else:
  *             if tmax[1] < tmax[2]:
  */
-        __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_step), 2, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_1);
-        __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 2, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_2);
-        __pyx_3 = PyNumber_InPlaceAdd(__pyx_2, __pyx_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_3);
-        __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-        __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-        if (__Pyx_SetItemInt(((PyObject *)__pyx_v_cur_ind), 2, __pyx_3, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
+        __pyx_t_128 = 2;
+        __pyx_t_129 = 2;
+        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_129, __pyx_bstride_0_cur_ind) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_128, __pyx_bstride_0_step));
       }
-      __pyx_L21:;
-      goto __pyx_L20;
+      __pyx_L23:;
+      goto __pyx_L22;
     }
     /*else*/ {
 
-      /* "yt/lagos/RTIntegrator.pyx":149
+      /* "yt/lagos/RTIntegrator.pyx":156
  *                 cur_ind[2] += step[2]
  *         else:
  *             if tmax[1] < tmax[2]:             # <<<<<<<<<<<<<<
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[1] - enter_t
  *                 enter_t = tmax[1]
  */
-      __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 1, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_1);
-      __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 2, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_2);
-      __pyx_t_2 = PyObject_RichCompare(__pyx_1, __pyx_2, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_2);
-      __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-      __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-      __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_21 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-      if (__pyx_t_21) {
+      __pyx_t_130 = 1;
+      __pyx_t_131 = 2;
+      __pyx_t_11 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_130, __pyx_bstride_0_tmax)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_131, __pyx_bstride_0_tmax)));
+      if (__pyx_t_11) {
 
-        /* "yt/lagos/RTIntegrator.pyx":150
+        /* "yt/lagos/RTIntegrator.pyx":157
  *         else:
  *             if tmax[1] < tmax[2]:
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[1] - enter_t             # <<<<<<<<<<<<<<
  *                 enter_t = tmax[1]
  *                 tmax[1] += tdelta[1]
  */
-        __pyx_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 1, sizeof(long), PyInt_FromLong); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_3);
-        __pyx_t_2 = PyFloat_FromDouble(__pyx_v_enter_t); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __pyx_t_44 = PyNumber_Subtract(__pyx_3, __pyx_t_2); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_44);
-        __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-        __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_1);
-        __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 1, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_2);
-        __pyx_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 2, sizeof(long), PyInt_FromLong); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_3);
-        __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-        PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_1);
-        __Pyx_GIVEREF(__pyx_1);
-        PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_2);
-        __Pyx_GIVEREF(__pyx_2);
-        PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_3);
-        __Pyx_GIVEREF(__pyx_3);
-        __pyx_1 = 0;
-        __pyx_2 = 0;
-        __pyx_3 = 0;
-        if (PyObject_SetItem(((PyObject *)__pyx_v_grid_t), ((PyObject *)__pyx_t_2), __pyx_t_44) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-        __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
+        __pyx_t_132 = 1;
+        __pyx_t_133 = 0;
+        __pyx_t_134 = 1;
+        __pyx_t_135 = 2;
+        __pyx_t_136 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_133, __pyx_bstride_0_cur_ind));
+        __pyx_t_137 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_134, __pyx_bstride_0_cur_ind));
+        __pyx_t_138 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_135, __pyx_bstride_0_cur_ind));
+        *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_t.buf, __pyx_t_136, __pyx_bstride_0_grid_t, __pyx_t_137, __pyx_bstride_1_grid_t, __pyx_t_138, __pyx_bstride_2_grid_t) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_132, __pyx_bstride_0_tmax)) - __pyx_v_enter_t);
 
-        /* "yt/lagos/RTIntegrator.pyx":151
+        /* "yt/lagos/RTIntegrator.pyx":158
  *             if tmax[1] < tmax[2]:
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[1] - enter_t
  *                 enter_t = tmax[1]             # <<<<<<<<<<<<<<
  *                 tmax[1] += tdelta[1]
  *                 cur_ind[1] += step[1]
  */
-        __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 1, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_1);
-        __pyx_t_51 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-        __pyx_v_enter_t = __pyx_t_51;
+        __pyx_t_139 = 1;
+        __pyx_v_enter_t = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_139, __pyx_bstride_0_tmax));
 
-        /* "yt/lagos/RTIntegrator.pyx":152
+        /* "yt/lagos/RTIntegrator.pyx":159
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[1] - enter_t
  *                 enter_t = tmax[1]
  *                 tmax[1] += tdelta[1]             # <<<<<<<<<<<<<<
  *                 cur_ind[1] += step[1]
  *             else:
  */
-        __pyx_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tdelta), 1, sizeof(long), PyInt_FromLong); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_3);
-        __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 1, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_1);
-        __pyx_2 = PyNumber_InPlaceAdd(__pyx_1, __pyx_3); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_2);
-        __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-        __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-        if (__Pyx_SetItemInt(((PyObject *)__pyx_v_tmax), 1, __pyx_2, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
+        __pyx_t_140 = 1;
+        __pyx_t_141 = 1;
+        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_141, __pyx_bstride_0_tmax) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_140, __pyx_bstride_0_tdelta));
 
-        /* "yt/lagos/RTIntegrator.pyx":153
+        /* "yt/lagos/RTIntegrator.pyx":160
  *                 enter_t = tmax[1]
  *                 tmax[1] += tdelta[1]
  *                 cur_ind[1] += step[1]             # <<<<<<<<<<<<<<
  *             else:
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[2] - enter_t
  */
-        __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_step), 1, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_1);
-        __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 1, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_2);
-        __pyx_3 = PyNumber_InPlaceAdd(__pyx_2, __pyx_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_3);
-        __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-        __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-        if (__Pyx_SetItemInt(((PyObject *)__pyx_v_cur_ind), 1, __pyx_3, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-        goto __pyx_L22;
+        __pyx_t_142 = 1;
+        __pyx_t_143 = 1;
+        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_143, __pyx_bstride_0_cur_ind) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_142, __pyx_bstride_0_step));
+        goto __pyx_L24;
       }
       /*else*/ {
 
-        /* "yt/lagos/RTIntegrator.pyx":155
+        /* "yt/lagos/RTIntegrator.pyx":162
  *                 cur_ind[1] += step[1]
  *             else:
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[2] - enter_t             # <<<<<<<<<<<<<<
  *                 enter_t = tmax[2]
  *                 tmax[2] += tdelta[2]
  */
-        __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 2, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_1);
-        __pyx_t_44 = PyFloat_FromDouble(__pyx_v_enter_t); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_44);
-        __pyx_t_2 = PyNumber_Subtract(__pyx_1, __pyx_t_44); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_t_2);
-        __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-        __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
-        __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 0, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_2);
-        __pyx_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 1, sizeof(long), PyInt_FromLong); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_3);
-        __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 2, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_1);
-        __pyx_t_44 = PyTuple_New(3); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(((PyObject *)__pyx_t_44));
-        PyTuple_SET_ITEM(__pyx_t_44, 0, __pyx_2);
-        __Pyx_GIVEREF(__pyx_2);
-        PyTuple_SET_ITEM(__pyx_t_44, 1, __pyx_3);
-        __Pyx_GIVEREF(__pyx_3);
-        PyTuple_SET_ITEM(__pyx_t_44, 2, __pyx_1);
-        __Pyx_GIVEREF(__pyx_1);
-        __pyx_2 = 0;
-        __pyx_3 = 0;
-        __pyx_1 = 0;
-        if (PyObject_SetItem(((PyObject *)__pyx_v_grid_t), ((PyObject *)__pyx_t_44), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(((PyObject *)__pyx_t_44)); __pyx_t_44 = 0;
-        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+        __pyx_t_144 = 2;
+        __pyx_t_145 = 0;
+        __pyx_t_146 = 1;
+        __pyx_t_147 = 2;
+        __pyx_t_148 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_145, __pyx_bstride_0_cur_ind));
+        __pyx_t_149 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_146, __pyx_bstride_0_cur_ind));
+        __pyx_t_150 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_147, __pyx_bstride_0_cur_ind));
+        *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_t.buf, __pyx_t_148, __pyx_bstride_0_grid_t, __pyx_t_149, __pyx_bstride_1_grid_t, __pyx_t_150, __pyx_bstride_2_grid_t) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_144, __pyx_bstride_0_tmax)) - __pyx_v_enter_t);
 
-        /* "yt/lagos/RTIntegrator.pyx":156
+        /* "yt/lagos/RTIntegrator.pyx":163
  *             else:
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[2] - enter_t
  *                 enter_t = tmax[2]             # <<<<<<<<<<<<<<
  *                 tmax[2] += tdelta[2]
  *                 cur_ind[2] += step[2]
  */
-        __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 2, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_2);
-        __pyx_t_51 = __pyx_PyFloat_AsDouble(__pyx_2); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-        __pyx_v_enter_t = __pyx_t_51;
+        __pyx_t_151 = 2;
+        __pyx_v_enter_t = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_151, __pyx_bstride_0_tmax));
 
-        /* "yt/lagos/RTIntegrator.pyx":157
+        /* "yt/lagos/RTIntegrator.pyx":164
  *                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[2] - enter_t
  *                 enter_t = tmax[2]
  *                 tmax[2] += tdelta[2]             # <<<<<<<<<<<<<<
  *                 cur_ind[2] += step[2]
  *     return
  */
-        __pyx_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tdelta), 2, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_1);
-        __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_tmax), 2, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_2);
-        __pyx_3 = PyNumber_InPlaceAdd(__pyx_2, __pyx_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_3);
-        __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
-        __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-        if (__Pyx_SetItemInt(((PyObject *)__pyx_v_tmax), 2, __pyx_3, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
+        __pyx_t_152 = 2;
+        __pyx_t_153 = 2;
+        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_153, __pyx_bstride_0_tmax) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_152, __pyx_bstride_0_tdelta));
 
-        /* "yt/lagos/RTIntegrator.pyx":158
+        /* "yt/lagos/RTIntegrator.pyx":165
  *                 enter_t = tmax[2]
  *                 tmax[2] += tdelta[2]
  *                 cur_ind[2] += step[2]             # <<<<<<<<<<<<<<
  *     return
  */
-        __pyx_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_step), 2, sizeof(long), PyInt_FromLong); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_2);
-        __pyx_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_cur_ind), 2, sizeof(long), PyInt_FromLong); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_3);
-        __pyx_1 = PyNumber_InPlaceAdd(__pyx_3, __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_GOTREF(__pyx_1);
-        __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
-        __Pyx_DECREF(__pyx_3); __pyx_3 = 0;
-        if (__Pyx_SetItemInt(((PyObject *)__pyx_v_cur_ind), 2, __pyx_1, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-        __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+        __pyx_t_154 = 2;
+        __pyx_t_155 = 2;
+        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_155, __pyx_bstride_0_cur_ind) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_154, __pyx_bstride_0_step));
       }
-      __pyx_L22:;
+      __pyx_L24:;
     }
-    __pyx_L20:;
+    __pyx_L22:;
   }
-  __pyx_L17_break:;
+  __pyx_L19_break:;
 
-  /* "yt/lagos/RTIntegrator.pyx":159
+  /* "yt/lagos/RTIntegrator.pyx":166
  *                 tmax[2] += tdelta[2]
  *                 cur_ind[2] += step[2]
  *     return             # <<<<<<<<<<<<<<
@@ -3054,32 +3052,40 @@
   __pyx_L1_error:;
   __Pyx_XDECREF(__pyx_1);
   __Pyx_XDECREF(__pyx_2);
-  __Pyx_XDECREF(__pyx_3);
   __Pyx_XDECREF(__pyx_t_1);
   __Pyx_XDECREF(__pyx_t_2);
   __Pyx_XDECREF(__pyx_t_3);
-  __Pyx_XDECREF(__pyx_t_44);
   { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
     __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
     __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_edge);
+    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_intersect);
+    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_grid_t);
+    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_cur_ind);
+    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_edge);
+    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_step);
+    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_dx);
+    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_tdelta);
+    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_tmax);
     __Pyx_SafeReleaseBuffer(&__pyx_bstruct_grid_mask);
     __Pyx_SafeReleaseBuffer(&__pyx_bstruct_u);
-    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_dx);
     __Pyx_SafeReleaseBuffer(&__pyx_bstruct_v);
-    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_edge);
-    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_grid_t);
   __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
   __Pyx_AddTraceback("yt.lagos.RTIntegrator.VoxelTraversal");
   __pyx_r = NULL;
   goto __pyx_L2;
   __pyx_L0:;
   __Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_edge);
+  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_intersect);
+  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_grid_t);
+  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_cur_ind);
+  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_edge);
+  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_step);
+  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_dx);
+  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_tdelta);
+  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_tmax);
   __Pyx_SafeReleaseBuffer(&__pyx_bstruct_grid_mask);
   __Pyx_SafeReleaseBuffer(&__pyx_bstruct_u);
-  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_dx);
   __Pyx_SafeReleaseBuffer(&__pyx_bstruct_v);
-  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_edge);
-  __Pyx_SafeReleaseBuffer(&__pyx_bstruct_grid_t);
   __pyx_L2:;
   __Pyx_XDECREF((PyObject *)__pyx_v_step);
   __Pyx_XDECREF((PyObject *)__pyx_v_cur_ind);
@@ -3091,7 +3097,7 @@
   return __pyx_r;
 }
 
-/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":65
+/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":65
  *         # experimental exception made for __getbuffer__ and __releasebuffer__
  *         # -- the details of this may change.
  *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
@@ -3124,7 +3130,7 @@
   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
   __Pyx_GIVEREF(__pyx_v_info->obj);
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":71
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":71
  *             # of flags
  *             cdef int copy_shape, i, ndim
  *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
@@ -3133,7 +3139,7 @@
  */
   __pyx_v_endian_detector = 1;
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":72
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":72
  *             cdef int copy_shape, i, ndim
  *             cdef int endian_detector = 1
  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
@@ -3142,7 +3148,7 @@
  */
   __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":74
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":74
  *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
  * 
  *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
@@ -3151,7 +3157,7 @@
  */
   __pyx_v_ndim = PyArray_NDIM(((PyArrayObject *)__pyx_v_self));
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":76
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":76
  *             ndim = PyArray_NDIM(self)
  * 
  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
@@ -3161,7 +3167,7 @@
   __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
   if (__pyx_t_1) {
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":77
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":77
  * 
  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
  *                 copy_shape = 1             # <<<<<<<<<<<<<<
@@ -3173,7 +3179,7 @@
   }
   /*else*/ {
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":79
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":79
  *                 copy_shape = 1
  *             else:
  *                 copy_shape = 0             # <<<<<<<<<<<<<<
@@ -3184,7 +3190,7 @@
   }
   __pyx_L5:;
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":81
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":81
  *                 copy_shape = 0
  * 
  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
@@ -3193,7 +3199,7 @@
  */
   if (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS)) {
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":82
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":82
  * 
  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
  *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
@@ -3206,7 +3212,7 @@
   }
   if (__pyx_t_1) {
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":83
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":83
  *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
  *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
  *                 raise ValueError("ndarray is not C contiguous")             # <<<<<<<<<<<<<<
@@ -3228,7 +3234,7 @@
   }
   __pyx_L6:;
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":85
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":85
  *                 raise ValueError("ndarray is not C contiguous")
  * 
  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
@@ -3237,7 +3243,7 @@
  */
   if (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS)) {
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":86
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":86
  * 
  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
  *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
@@ -3250,7 +3256,7 @@
   }
   if (__pyx_t_1) {
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":87
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":87
  *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
  *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
  *                 raise ValueError("ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
@@ -3272,7 +3278,7 @@
   }
   __pyx_L7:;
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":89
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":89
  *                 raise ValueError("ndarray is not Fortran contiguous")
  * 
  *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
@@ -3281,7 +3287,7 @@
  */
   __pyx_v_info->buf = PyArray_DATA(((PyArrayObject *)__pyx_v_self));
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":90
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":90
  * 
  *             info.buf = PyArray_DATA(self)
  *             info.ndim = ndim             # <<<<<<<<<<<<<<
@@ -3290,7 +3296,7 @@
  */
   __pyx_v_info->ndim = __pyx_v_ndim;
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":91
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":91
  *             info.buf = PyArray_DATA(self)
  *             info.ndim = ndim
  *             if copy_shape:             # <<<<<<<<<<<<<<
@@ -3300,7 +3306,7 @@
   __pyx_t_4 = __pyx_v_copy_shape;
   if (__pyx_t_4) {
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":94
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":94
  *                 # Allocate new buffer for strides and shape info. This is allocated
  *                 # as one block, strides first.
  *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)             # <<<<<<<<<<<<<<
@@ -3309,7 +3315,7 @@
  */
     __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * __pyx_v_ndim) * 2)));
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":95
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":95
  *                 # as one block, strides first.
  *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
  *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
@@ -3318,7 +3324,7 @@
  */
     __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":96
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":96
  *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
  *                 info.shape = info.strides + ndim
  *                 for i in range(ndim):             # <<<<<<<<<<<<<<
@@ -3328,7 +3334,7 @@
     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_v_ndim; __pyx_t_4+=1) {
       __pyx_v_i = __pyx_t_4;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":97
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":97
  *                 info.shape = info.strides + ndim
  *                 for i in range(ndim):
  *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
@@ -3337,7 +3343,7 @@
  */
       (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))[__pyx_v_i]);
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":98
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":98
  *                 for i in range(ndim):
  *                     info.strides[i] = PyArray_STRIDES(self)[i]
  *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
@@ -3350,7 +3356,7 @@
   }
   /*else*/ {
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":100
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":100
  *                     info.shape[i] = PyArray_DIMS(self)[i]
  *             else:
  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
@@ -3359,7 +3365,7 @@
  */
     __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(((PyArrayObject *)__pyx_v_self)));
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":101
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":101
  *             else:
  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
@@ -3370,7 +3376,7 @@
   }
   __pyx_L8:;
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":102
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":102
  *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
  *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
@@ -3379,7 +3385,7 @@
  */
   __pyx_v_info->suboffsets = NULL;
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":103
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":103
  *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
  *             info.suboffsets = NULL
  *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
@@ -3388,7 +3394,7 @@
  */
   __pyx_v_info->itemsize = PyArray_ITEMSIZE(((PyArrayObject *)__pyx_v_self));
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":104
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":104
  *             info.suboffsets = NULL
  *             info.itemsize = PyArray_ITEMSIZE(self)
  *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
@@ -3397,7 +3403,7 @@
  */
   __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(((PyArrayObject *)__pyx_v_self)));
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":107
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":107
  * 
  *             cdef int t
  *             cdef char* f = NULL             # <<<<<<<<<<<<<<
@@ -3406,7 +3412,7 @@
  */
   __pyx_v_f = NULL;
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":108
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":108
  *             cdef int t
  *             cdef char* f = NULL
  *             cdef dtype descr = self.descr             # <<<<<<<<<<<<<<
@@ -3416,7 +3422,7 @@
   __Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self)->descr));
   __pyx_v_descr = ((PyArrayObject *)__pyx_v_self)->descr;
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":112
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":112
  *             cdef int offset
  * 
  *             cdef bint hasfields = PyDataType_HASFIELDS(descr)             # <<<<<<<<<<<<<<
@@ -3425,7 +3431,7 @@
  */
   __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":114
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":114
  *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
  * 
  *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
@@ -3439,7 +3445,7 @@
   }
   if (__pyx_t_1) {
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":116
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":116
  *             if not hasfields and not copy_shape:
  *                 # do not call releasebuffer
  *                 info.obj = None             # <<<<<<<<<<<<<<
@@ -3455,7 +3461,7 @@
   }
   /*else*/ {
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":119
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":119
  *             else:
  *                 # need to call releasebuffer
  *                 info.obj = self             # <<<<<<<<<<<<<<
@@ -3470,7 +3476,7 @@
   }
   __pyx_L11:;
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":121
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":121
  *                 info.obj = self
  * 
  *             if not hasfields:             # <<<<<<<<<<<<<<
@@ -3480,7 +3486,7 @@
   __pyx_t_1 = (!__pyx_v_hasfields);
   if (__pyx_t_1) {
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":122
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":122
  * 
  *             if not hasfields:
  *                 t = descr.type_num             # <<<<<<<<<<<<<<
@@ -3489,7 +3495,7 @@
  */
     __pyx_v_t = __pyx_v_descr->type_num;
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":123
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":123
  *             if not hasfields:
  *                 t = descr.type_num
  *                 if ((descr.byteorder == '>' and little_endian) or             # <<<<<<<<<<<<<<
@@ -3503,7 +3509,7 @@
     }
     if (!__pyx_t_1) {
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":124
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":124
  *                 t = descr.type_num
  *                 if ((descr.byteorder == '>' and little_endian) or
  *                     (descr.byteorder == '<' and not little_endian)):             # <<<<<<<<<<<<<<
@@ -3521,7 +3527,7 @@
     }
     if (__pyx_t_6) {
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":125
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":125
  *                 if ((descr.byteorder == '>' and little_endian) or
  *                     (descr.byteorder == '<' and not little_endian)):
  *                     raise ValueError("Non-native byte order not supported")             # <<<<<<<<<<<<<<
@@ -3543,7 +3549,7 @@
     }
     __pyx_L13:;
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":126
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":126
  *                     (descr.byteorder == '<' and not little_endian)):
  *                     raise ValueError("Non-native byte order not supported")
  *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
@@ -3555,7 +3561,7 @@
       __pyx_v_f = __pyx_k_6;
       break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":127
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":127
  *                     raise ValueError("Non-native byte order not supported")
  *                 if   t == NPY_BYTE:        f = "b"
  *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
@@ -3566,7 +3572,7 @@
       __pyx_v_f = __pyx_k_7;
       break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":128
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":128
  *                 if   t == NPY_BYTE:        f = "b"
  *                 elif t == NPY_UBYTE:       f = "B"
  *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
@@ -3577,7 +3583,7 @@
       __pyx_v_f = __pyx_k_8;
       break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":129
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":129
  *                 elif t == NPY_UBYTE:       f = "B"
  *                 elif t == NPY_SHORT:       f = "h"
  *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
@@ -3588,7 +3594,7 @@
       __pyx_v_f = __pyx_k_9;
       break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":130
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":130
  *                 elif t == NPY_SHORT:       f = "h"
  *                 elif t == NPY_USHORT:      f = "H"
  *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
@@ -3599,7 +3605,7 @@
       __pyx_v_f = __pyx_k_10;
       break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":131
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":131
  *                 elif t == NPY_USHORT:      f = "H"
  *                 elif t == NPY_INT:         f = "i"
  *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
@@ -3610,7 +3616,7 @@
       __pyx_v_f = __pyx_k_11;
       break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":132
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":132
  *                 elif t == NPY_INT:         f = "i"
  *                 elif t == NPY_UINT:        f = "I"
  *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
@@ -3621,7 +3627,7 @@
       __pyx_v_f = __pyx_k_12;
       break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":133
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":133
  *                 elif t == NPY_UINT:        f = "I"
  *                 elif t == NPY_LONG:        f = "l"
  *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
@@ -3632,7 +3638,7 @@
       __pyx_v_f = __pyx_k_13;
       break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":134
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":134
  *                 elif t == NPY_LONG:        f = "l"
  *                 elif t == NPY_ULONG:       f = "L"
  *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
@@ -3643,7 +3649,7 @@
       __pyx_v_f = __pyx_k_14;
       break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":135
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":135
  *                 elif t == NPY_ULONG:       f = "L"
  *                 elif t == NPY_LONGLONG:    f = "q"
  *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
@@ -3654,7 +3660,7 @@
       __pyx_v_f = __pyx_k_15;
       break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":136
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":136
  *                 elif t == NPY_LONGLONG:    f = "q"
  *                 elif t == NPY_ULONGLONG:   f = "Q"
  *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
@@ -3665,7 +3671,7 @@
       __pyx_v_f = __pyx_k_16;
       break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":137
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":137
  *                 elif t == NPY_ULONGLONG:   f = "Q"
  *                 elif t == NPY_FLOAT:       f = "f"
  *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
@@ -3676,7 +3682,7 @@
       __pyx_v_f = __pyx_k_17;
       break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":138
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":138
  *                 elif t == NPY_FLOAT:       f = "f"
  *                 elif t == NPY_DOUBLE:      f = "d"
  *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
@@ -3687,7 +3693,7 @@
       __pyx_v_f = __pyx_k_18;
       break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":139
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":139
  *                 elif t == NPY_DOUBLE:      f = "d"
  *                 elif t == NPY_LONGDOUBLE:  f = "g"
  *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
@@ -3698,7 +3704,7 @@
       __pyx_v_f = __pyx_k_19;
       break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":140
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":140
  *                 elif t == NPY_LONGDOUBLE:  f = "g"
  *                 elif t == NPY_CFLOAT:      f = "Zf"
  *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
@@ -3709,7 +3715,7 @@
       __pyx_v_f = __pyx_k_20;
       break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":141
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":141
  *                 elif t == NPY_CFLOAT:      f = "Zf"
  *                 elif t == NPY_CDOUBLE:     f = "Zd"
  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
@@ -3720,7 +3726,7 @@
       __pyx_v_f = __pyx_k_21;
       break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":142
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":142
  *                 elif t == NPY_CDOUBLE:     f = "Zd"
  *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
  *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
@@ -3732,7 +3738,7 @@
       break;
       default:
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":144
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":144
  *                 elif t == NPY_OBJECT:      f = "O"
  *                 else:
  *                     raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
@@ -3758,7 +3764,7 @@
       break;
     }
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":145
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":145
  *                 else:
  *                     raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
  *                 info.format = f             # <<<<<<<<<<<<<<
@@ -3767,7 +3773,7 @@
  */
     __pyx_v_info->format = __pyx_v_f;
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":146
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":146
  *                     raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
  *                 info.format = f
  *                 return             # <<<<<<<<<<<<<<
@@ -3780,7 +3786,7 @@
   }
   /*else*/ {
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":148
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":148
  *                 return
  *             else:
  *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
@@ -3789,7 +3795,7 @@
  */
     __pyx_v_info->format = ((char *)malloc(255));
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":149
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":149
  *             else:
  *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
  *                 info.format[0] = '^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
@@ -3798,7 +3804,7 @@
  */
     (__pyx_v_info->format[0]) = '^';
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":150
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":150
  *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
  *                 info.format[0] = '^' # Native data types, manual alignment
  *                 offset = 0             # <<<<<<<<<<<<<<
@@ -3807,7 +3813,7 @@
  */
     __pyx_v_offset = 0;
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":153
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":153
  *                 f = _util_dtypestring(descr, info.format + 1,
  *                                       info.format + _buffer_format_string_len,
  *                                       &offset)             # <<<<<<<<<<<<<<
@@ -3817,7 +3823,7 @@
     __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_v_f = __pyx_t_7;
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":154
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":154
  *                                       info.format + _buffer_format_string_len,
  *                                       &offset)
  *                 f[0] = 0 # Terminate format string             # <<<<<<<<<<<<<<
@@ -3849,7 +3855,7 @@
   return __pyx_r;
 }
 
-/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":156
+/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":156
  *                 f[0] = 0 # Terminate format string
  * 
  *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
@@ -3863,7 +3869,7 @@
   int __pyx_t_2;
   __Pyx_SetupRefcountContext("__releasebuffer__");
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":157
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":157
  * 
  *         def __releasebuffer__(ndarray self, Py_buffer* info):
  *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
@@ -3873,7 +3879,7 @@
   __pyx_t_1 = PyArray_HASFIELDS(((PyArrayObject *)__pyx_v_self));
   if (__pyx_t_1) {
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":158
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":158
  *         def __releasebuffer__(ndarray self, Py_buffer* info):
  *             if PyArray_HASFIELDS(self):
  *                 stdlib.free(info.format)             # <<<<<<<<<<<<<<
@@ -3885,7 +3891,7 @@
   }
   __pyx_L5:;
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":159
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":159
  *             if PyArray_HASFIELDS(self):
  *                 stdlib.free(info.format)
  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
@@ -3895,7 +3901,7 @@
   __pyx_t_2 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
   if (__pyx_t_2) {
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":160
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":160
  *                 stdlib.free(info.format)
  *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
  *                 stdlib.free(info.strides)             # <<<<<<<<<<<<<<
@@ -3910,7 +3916,7 @@
   __Pyx_FinishRefcountContext();
 }
 
-/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":277
+/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":277
  * ctypedef npy_cdouble     complex_t
  * 
  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
@@ -3942,7 +3948,7 @@
   __pyx_v_new_offset = Py_None; __Pyx_INCREF(Py_None);
   __pyx_v_t = Py_None; __Pyx_INCREF(Py_None);
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":284
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":284
  *     cdef int delta_offset
  *     cdef tuple i
  *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
@@ -3951,7 +3957,7 @@
  */
   __pyx_v_endian_detector = 1;
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":285
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":285
  *     cdef tuple i
  *     cdef int endian_detector = 1
  *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
@@ -3960,7 +3966,7 @@
  */
   __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":287
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":287
  *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
  * 
  *     for i in descr.fields.itervalues():             # <<<<<<<<<<<<<<
@@ -3999,7 +4005,7 @@
     __pyx_v_i = ((PyObject *)__pyx_t_3);
     __pyx_t_3 = 0;
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":288
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":288
  * 
  *     for i in descr.fields.itervalues():
  *         child = i[0]             # <<<<<<<<<<<<<<
@@ -4013,7 +4019,7 @@
     __pyx_v_child = ((PyArray_Descr *)__pyx_1);
     __pyx_1 = 0;
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":289
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":289
  *     for i in descr.fields.itervalues():
  *         child = i[0]
  *         new_offset = i[1]             # <<<<<<<<<<<<<<
@@ -4026,7 +4032,7 @@
     __pyx_v_new_offset = __pyx_1;
     __pyx_1 = 0;
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":291
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":291
  *         new_offset = i[1]
  * 
  *         if (end - f) - (new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
@@ -4051,7 +4057,7 @@
     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
     if (__pyx_t_6) {
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":292
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":292
  * 
  *         if (end - f) - (new_offset - offset[0]) < 15:
  *             raise RuntimeError("Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
@@ -4073,7 +4079,7 @@
     }
     __pyx_L5:;
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":294
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":294
  *             raise RuntimeError("Format string allocated too short, see comment in numpy.pxd")
  * 
  *         if ((child.byteorder == '>' and little_endian) or             # <<<<<<<<<<<<<<
@@ -4087,7 +4093,7 @@
     }
     if (!__pyx_t_6) {
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":295
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":295
  * 
  *         if ((child.byteorder == '>' and little_endian) or
  *             (child.byteorder == '<' and not little_endian)):             # <<<<<<<<<<<<<<
@@ -4105,7 +4111,7 @@
     }
     if (__pyx_t_8) {
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":296
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":296
  *         if ((child.byteorder == '>' and little_endian) or
  *             (child.byteorder == '<' and not little_endian)):
  *             raise ValueError("Non-native byte order not supported")             # <<<<<<<<<<<<<<
@@ -4127,7 +4133,7 @@
     }
     __pyx_L6:;
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":306
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":306
  * 
  *         # Output padding bytes
  *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
@@ -4144,7 +4150,7 @@
       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
       if (!__pyx_t_8) break;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":307
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":307
  *         # Output padding bytes
  *         while offset[0] < new_offset:
  *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
@@ -4153,7 +4159,7 @@
  */
       (__pyx_v_f[0]) = 120;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":308
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":308
  *         while offset[0] < new_offset:
  *             f[0] = 120 # "x"; pad byte
  *             f += 1             # <<<<<<<<<<<<<<
@@ -4162,7 +4168,7 @@
  */
       __pyx_v_f += 1;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":309
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":309
  *             f[0] = 120 # "x"; pad byte
  *             f += 1
  *             offset[0] += 1             # <<<<<<<<<<<<<<
@@ -4172,7 +4178,7 @@
       (__pyx_v_offset[0]) += 1;
     }
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":311
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":311
  *             offset[0] += 1
  * 
  *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
@@ -4181,7 +4187,7 @@
  */
     (__pyx_v_offset[0]) += __pyx_v_child->elsize;
 
-    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":313
+    /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":313
  *         offset[0] += child.itemsize
  * 
  *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
@@ -4191,7 +4197,7 @@
     __pyx_t_8 = (!PyDataType_HASFIELDS(__pyx_v_child));
     if (__pyx_t_8) {
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":314
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":314
  * 
  *         if not PyDataType_HASFIELDS(child):
  *             t = child.type_num             # <<<<<<<<<<<<<<
@@ -4204,7 +4210,7 @@
       __pyx_v_t = __pyx_t_4;
       __pyx_t_4 = 0;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":315
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":315
  *         if not PyDataType_HASFIELDS(child):
  *             t = child.type_num
  *             if end - f < 5:             # <<<<<<<<<<<<<<
@@ -4214,7 +4220,7 @@
       __pyx_t_8 = ((__pyx_v_end - __pyx_v_f) < 5);
       if (__pyx_t_8) {
 
-        /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":316
+        /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":316
  *             t = child.type_num
  *             if end - f < 5:
  *                 raise RuntimeError("Format string allocated too short.")             # <<<<<<<<<<<<<<
@@ -4236,7 +4242,7 @@
       }
       __pyx_L10:;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":319
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":319
  * 
  *             # Until ticket #99 is fixed, use integers to avoid warnings
  *             if   t == NPY_BYTE:        f[0] =  98 #"b"             # <<<<<<<<<<<<<<
@@ -4255,7 +4261,7 @@
         goto __pyx_L11;
       }
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":320
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":320
  *             # Until ticket #99 is fixed, use integers to avoid warnings
  *             if   t == NPY_BYTE:        f[0] =  98 #"b"
  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"             # <<<<<<<<<<<<<<
@@ -4274,7 +4280,7 @@
         goto __pyx_L11;
       }
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":321
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":321
  *             if   t == NPY_BYTE:        f[0] =  98 #"b"
  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
  *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
@@ -4293,7 +4299,7 @@
         goto __pyx_L11;
       }
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":322
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":322
  *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
  *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
@@ -4312,7 +4318,7 @@
         goto __pyx_L11;
       }
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":323
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":323
  *             elif t == NPY_SHORT:       f[0] = 104 #"h"
  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
  *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
@@ -4331,7 +4337,7 @@
         goto __pyx_L11;
       }
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":324
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":324
  *             elif t == NPY_USHORT:      f[0] =  72 #"H"
  *             elif t == NPY_INT:         f[0] = 105 #"i"
  *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
@@ -4350,7 +4356,7 @@
         goto __pyx_L11;
       }
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":325
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":325
  *             elif t == NPY_INT:         f[0] = 105 #"i"
  *             elif t == NPY_UINT:        f[0] =  73 #"I"
  *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
@@ -4369,7 +4375,7 @@
         goto __pyx_L11;
       }
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":326
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":326
  *             elif t == NPY_UINT:        f[0] =  73 #"I"
  *             elif t == NPY_LONG:        f[0] = 108 #"l"
  *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
@@ -4388,7 +4394,7 @@
         goto __pyx_L11;
       }
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":327
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":327
  *             elif t == NPY_LONG:        f[0] = 108 #"l"
  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
@@ -4407,7 +4413,7 @@
         goto __pyx_L11;
       }
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":328
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":328
  *             elif t == NPY_ULONG:       f[0] = 76  #"L"
  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
@@ -4426,7 +4432,7 @@
         goto __pyx_L11;
       }
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":329
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":329
  *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
@@ -4445,7 +4451,7 @@
         goto __pyx_L11;
       }
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":330
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":330
  *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
@@ -4464,7 +4470,7 @@
         goto __pyx_L11;
       }
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":331
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":331
  *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
@@ -4483,7 +4489,7 @@
         goto __pyx_L11;
       }
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":332
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":332
  *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf             # <<<<<<<<<<<<<<
@@ -4504,7 +4510,7 @@
         goto __pyx_L11;
       }
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":333
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":333
  *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd             # <<<<<<<<<<<<<<
@@ -4525,7 +4531,7 @@
         goto __pyx_L11;
       }
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":334
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":334
  *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg             # <<<<<<<<<<<<<<
@@ -4546,7 +4552,7 @@
         goto __pyx_L11;
       }
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":335
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":335
  *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
  *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"             # <<<<<<<<<<<<<<
@@ -4566,7 +4572,7 @@
       }
       /*else*/ {
 
-        /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":337
+        /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":337
  *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
  *             else:
  *                 raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
@@ -4589,7 +4595,7 @@
       }
       __pyx_L11:;
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":338
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":338
  *             else:
  *                 raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
  *             f += 1             # <<<<<<<<<<<<<<
@@ -4601,7 +4607,7 @@
     }
     /*else*/ {
 
-      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":342
+      /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":342
  *             # Cython ignores struct boundary information ("T{...}"),
  *             # so don't output it
  *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
@@ -4615,7 +4621,7 @@
   }
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/numpy.pxd":343
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":343
  *             # so don't output it
  *             f = _util_dtypestring(child, f, end, offset)
  *     return f             # <<<<<<<<<<<<<<
@@ -4690,12 +4696,12 @@
   {&__pyx_kp_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 1, 1, 1},
   {&__pyx_kp_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 1, 1},
   {&__pyx_kp_range, __pyx_k_range, sizeof(__pyx_k_range), 1, 1, 1},
-  {&__pyx_kp_ones, __pyx_k_ones, sizeof(__pyx_k_ones), 1, 1, 1},
+  {&__pyx_kp_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 1, 1, 1},
   {&__pyx_kp_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 1, 1, 1},
   {&__pyx_kp_31, __pyx_k_31, sizeof(__pyx_k_31), 1, 1, 1},
-  {&__pyx_kp_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 1, 1, 1},
   {&__pyx_kp_32, __pyx_k_32, sizeof(__pyx_k_32), 1, 1, 1},
   {&__pyx_kp_floor, __pyx_k_floor, sizeof(__pyx_k_floor), 1, 1, 1},
+  {&__pyx_kp_abs, __pyx_k_abs, sizeof(__pyx_k_abs), 1, 1, 1},
   {&__pyx_kp___getbuffer__, __pyx_k___getbuffer__, sizeof(__pyx_k___getbuffer__), 1, 1, 1},
   {&__pyx_kp___releasebuffer__, __pyx_k___releasebuffer__, sizeof(__pyx_k___releasebuffer__), 1, 1, 1},
   {&__pyx_kp_info, __pyx_k_info, sizeof(__pyx_k_info), 1, 1, 1},
@@ -4724,9 +4730,6 @@
 
 static int __Pyx_InitGlobals(void) {
   __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
-  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
   return 0;
@@ -4805,7 +4808,7 @@
   if (PyObject_SetAttr(__pyx_m, __pyx_kp_np, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
 
-  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-ppc.egg/Cython/Includes/stdlib.pxd":2
+  /* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/stdlib.pxd":2
  * 
  * cdef extern from "stdlib.h" nogil:             # <<<<<<<<<<<<<<
  *     void free(void *ptr)
@@ -5458,6 +5461,11 @@
     return 0;
 }
 
+static void __Pyx_RaiseBufferFallbackError(void) {
+  PyErr_Format(PyExc_ValueError,
+     "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!");
+}
+
 
 
 static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,

Modified: trunk/yt/lagos/RTIntegrator.pyx
==============================================================================
--- trunk/yt/lagos/RTIntegrator.pyx	(original)
+++ trunk/yt/lagos/RTIntegrator.pyx	Tue Jul 14 17:48:50 2009
@@ -70,6 +70,7 @@
         i_s = o_s[i]
     return i_s
 
+ at cython.wraparound(False)
 @cython.boundscheck(False)
 def VoxelTraversal(np.ndarray[np.int_t, ndim=3] grid_mask,
                    np.ndarray[np.float64_t, ndim=3] grid_t,
@@ -82,58 +83,64 @@
     # Find the first place the ray hits the grid on its path
     # Do left edge then right edge in each dim
     cdef int i, x, y
-    cdef double tl, tr, intersect_t, enter_t, exit_t
-    cdef np.ndarray step = np.ones(3, dtype=np.float64) # maybe just ints?
-    cdef np.ndarray cur_ind = np.zeros(3, dtype=np.int64) # maybe just ints?
-    cdef np.ndarray tdelta = np.zeros(3, dtype=np.float64) 
-    cdef np.ndarray tmax = np.zeros(3, dtype=np.float64) 
-    cdef np.ndarray intersect = np.zeros(3, dtype=np.float64) 
+    cdef np.float64_t tl, tr, intersect_t, enter_t, exit_t, dt_tolerance
+    cdef np.ndarray[np.int64_t,   ndim=1] step = np.empty((3,), dtype=np.int64)
+    cdef np.ndarray[np.int64_t,   ndim=1] cur_ind = np.empty((3,), dtype=np.int64)
+    cdef np.ndarray[np.float64_t, ndim=1] tdelta = np.empty((3,), dtype=np.float64)
+    cdef np.ndarray[np.float64_t, ndim=1] tmax = np.empty((3,), dtype=np.float64)
+    cdef np.ndarray[np.float64_t, ndim=1] intersect = np.empty((3,), dtype=np.float64)
     intersect_t = 1
+    dt_tolerance = 1e-6
     # recall p = v * t + u
     #  where p is position, v is our vector, u is the start point
     for i in range(3):
         # As long as we're iterating, set some other stuff, too
-        if (v[i] < 0): step[i] = -1
+        if(v[i] < 0): step[i] = -1
+        else: step[i] = 1
         x = (i+1)%3
         y = (i+2)%3
         tl = (left_edge[i] - u[i])/v[i]
         tr = (right_edge[i] - u[i])/v[i]
         if (left_edge[x] <= (u[x] + tl*v[x]) <= right_edge[x]) and \
            (left_edge[y] <= (u[y] + tl*v[y]) <= right_edge[y]) and \
-           (0 <= tl < intersect_t):
+           (0.0 <= tl < intersect_t):
             intersect_t = tl
         if (left_edge[x] <= (u[x] + tr*v[x]) <= right_edge[x]) and \
            (left_edge[y] <= (u[y] + tr*v[y]) <= right_edge[y]) and \
-           (0 <= tr < intersect_t):
+           (0.0 <= tr < intersect_t):
             intersect_t = tr
     # if fully enclosed
     if (left_edge[0] <= u[0] <= right_edge[0]) and \
        (left_edge[1] <= u[1] <= right_edge[1]) and \
        (left_edge[2] <= u[2] <= right_edge[2]):
-        intersect_t = 0
-    if intersect_t > 1: return
+        intersect_t = 0.0
+    if not (0 <= intersect_t <= 1): return
     # Now get the indices of the intersection
     intersect = u + intersect_t * v
+    cdef int ncells = 0
     for i in range(3):
-        cur_ind[i] = np.floor((intersect[i] - left_edge[i])/dx[i])
+        cur_ind[i] = np.floor((intersect[i] + 1e-8*dx[i] - left_edge[i])/dx[i])
         tmax[i] = (((cur_ind[i]+step[i])*dx[i])+left_edge[i]-u[i])/v[i]
-        if step[i] < 0: cur_ind[i] -= 1
-        tdelta[i] = abs(dx[i]/v[i])
+        if cur_ind[i] == grid_mask.shape[i] and step[i] < 0:
+            cur_ind[i] = grid_mask.shape[i] - 1
+        if step[i] > 0: tmax[i] = (((cur_ind[i]+1)*dx[i])+left_edge[i]-u[i])/v[i]
+        if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i]
+        tdelta[i] = np.abs((dx[i]/v[i]))
     # The variable intersect contains the point we first pierce the grid
     enter_t = intersect_t
-    cdef int in_cells = 1
     while 1:
-        if not (0 <= cur_ind[0] < grid_mask.shape[0]) or \
-           not (0 <= cur_ind[1] < grid_mask.shape[1]) or \
-           not (0 <= cur_ind[2] < grid_mask.shape[2]):
+        if (not (0 <= cur_ind[0] < grid_mask.shape[0])) or \
+           (not (0 <= cur_ind[1] < grid_mask.shape[1])) or \
+           (not (0 <= cur_ind[2] < grid_mask.shape[2])):
             break
-        else:
-            grid_mask[cur_ind[0], cur_ind[1], cur_ind[2]] = 1
         # Note that we are calculating t on the fly, but we get *negative* t
         # values from what they should be.
         # If we've reached t = 1, we are done.
-        if tmax[0] > 1 and tmax[1] > 1 and tmax[2] > 1:
+        grid_mask[cur_ind[0], cur_ind[1], cur_ind[2]] = 1
+        if (tmax[0] > 1.0) and (tmax[1] > 1.0) and (tmax[2] > 1.0):
+            grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = 1.0 - enter_t
             break
+        ncells += 1
         if tmax[0] < tmax[1]:
             if tmax[0] < tmax[2]:
                 grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[0] - enter_t



More information about the yt-svn mailing list