/* Generated by Cython 0.17.1 on Fri Mar  1 10:41:36 2013 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02040000
    #error Cython requires Python 2.4+.
#else
#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#endif
#if PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PY_FORMAT_SIZE_T ""
  #define CYTHON_FORMAT_SSIZE_T ""
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
  #define PyNumber_Index(o)    ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \
                                (PyErr_Format(PyExc_TypeError, \
                                              "expected index value, got %.200s", Py_TYPE(o)->tp_name), \
                                 (PyObject*)0))
  #define PyIndex_Check(o)     (PyNumber_Check(o) && !PyFloat_Check(o) && !PyComplex_Check(o))
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
  #define __PYX_BUILD_PY_SSIZE_T "i"
#else
  #define __PYX_BUILD_PY_SSIZE_T "n"
  #define CYTHON_FORMAT_SSIZE_T "z"
#endif
#if PY_VERSION_HEX < 0x02060000
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  #define PyVarObject_HEAD_INIT(type, size) \
          PyObject_HEAD_INIT(type) size,
  #define PyType_Modified(t)
  typedef struct {
     void *buf;
     PyObject *obj;
     Py_ssize_t len;
     Py_ssize_t itemsize;
     int readonly;
     int ndim;
     char *format;
     Py_ssize_t *shape;
     Py_ssize_t *strides;
     Py_ssize_t *suboffsets;
     void *internal;
  } Py_buffer;
  #define PyBUF_SIMPLE 0
  #define PyBUF_WRITABLE 0x0001
  #define PyBUF_FORMAT 0x0004
  #define PyBUF_ND 0x0008
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
  #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
  #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
  typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
  typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
#endif
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
#endif
#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
#else
  #define CYTHON_PEP393_ENABLED 0
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PyBytesObject                PyStringObject
  #define PyBytes_Type                 PyString_Type
  #define PyBytes_Check                PyString_Check
  #define PyBytes_CheckExact           PyString_CheckExact
  #define PyBytes_FromString           PyString_FromString
  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
  #define PyBytes_FromFormat           PyString_FromFormat
  #define PyBytes_DecodeEscape         PyString_DecodeEscape
  #define PyBytes_AsString             PyString_AsString
  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
  #define PyBytes_Size                 PyString_Size
  #define PyBytes_AS_STRING            PyString_AS_STRING
  #define PyBytes_GET_SIZE             PyString_GET_SIZE
  #define PyBytes_Repr                 PyString_Repr
  #define PyBytes_Concat               PyString_Concat
  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
#endif
#if PY_VERSION_HEX < 0x02060000
  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_VERSION_HEX < 0x03020000
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif
#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
#else
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
#endif
#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_NAMESTR(n) ((char *)(n))
  #define __Pyx_DOCSTR(n)  ((char *)(n))
#else
  #define __Pyx_NAMESTR(n) (n)
  #define __Pyx_DOCSTR(n)  (n)
#endif


#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE__yt__utilities__lib__VolumeIntegrator
#define __PYX_HAVE_API__yt__utilities__lib__VolumeIntegrator
#include "stdio.h"
#include "stdlib.h"
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
#include "kdtree.h"
#include "healpix_vectors.h"
#include "math.h"
#include "FixedInterpolator.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif


/* inline attribute */
#ifndef CYTHON_INLINE
  #if defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

/* unused attribute */
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif

typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/


/* Type Conversion Predeclarations */

#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))

#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);

#if CYTHON_COMPILING_IN_CPYTHON
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))

#ifdef __GNUC__
  /* Test for GCC > 2.95 */
  #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
    #define likely(x)   __builtin_expect(!!(x), 1)
    #define unlikely(x) __builtin_expect(!!(x), 0)
  #else /* __GNUC__ > 2 ... */
    #define likely(x)   (x)
    #define unlikely(x) (x)
  #endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
    
static PyObject *__pyx_m;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;

#if !defined(CYTHON_CCOMPLEX)
  #if defined(__cplusplus)
    #define CYTHON_CCOMPLEX 1
  #elif defined(_Complex_I)
    #define CYTHON_CCOMPLEX 1
  #else
    #define CYTHON_CCOMPLEX 0
  #endif
#endif
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #include <complex>
  #else
    #include <complex.h>
  #endif
#endif
#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
  #undef _Complex_I
  #define _Complex_I 1.0fj
#endif


static const char *__pyx_f[] = {
  "VolumeIntegrator.pyx",
  "numpy.pxd",
  "type.pxd",
};
#define IS_UNSIGNED(type) (((type) -1) > 0)
struct __Pyx_StructField_;
#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
typedef struct {
  const char* name; /* for error messages only */
  struct __Pyx_StructField_* fields;
  size_t size;     /* sizeof(type) */
  size_t arraysize[8]; /* length of array in each dimension */
  int ndim;
  char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */
  char is_unsigned;
  int flags;
} __Pyx_TypeInfo;
typedef struct __Pyx_StructField_ {
  __Pyx_TypeInfo* type;
  const char* name;
  size_t offset;
} __Pyx_StructField;
typedef struct {
  __Pyx_StructField* field;
  size_t parent_offset;
} __Pyx_BufFmt_StackElem;
typedef struct {
  __Pyx_StructField root;
  __Pyx_BufFmt_StackElem* head;
  size_t fmt_offset;
  size_t new_count, enc_count;
  size_t struct_alignment;
  int is_complex;
  char enc_type;
  char new_packmode;
  char enc_packmode;
  char is_valid_array;
} __Pyx_BufFmt_Context;


/* "numpy.pxd":723
 * # in Cython to enable them only on the right systems.
 * 
 * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 */
typedef npy_int8 __pyx_t_5numpy_int8_t;

/* "numpy.pxd":724
 * 
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t
 */
typedef npy_int16 __pyx_t_5numpy_int16_t;

/* "numpy.pxd":725
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int64      int64_t
 * #ctypedef npy_int96      int96_t
 */
typedef npy_int32 __pyx_t_5numpy_int32_t;

/* "numpy.pxd":726
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_int96      int96_t
 * #ctypedef npy_int128     int128_t
 */
typedef npy_int64 __pyx_t_5numpy_int64_t;

/* "numpy.pxd":730
 * #ctypedef npy_int128     int128_t
 * 
 * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 */
typedef npy_uint8 __pyx_t_5numpy_uint8_t;

/* "numpy.pxd":731
 * 
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t
 */
typedef npy_uint16 __pyx_t_5numpy_uint16_t;

/* "numpy.pxd":732
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint64     uint64_t
 * #ctypedef npy_uint96     uint96_t
 */
typedef npy_uint32 __pyx_t_5numpy_uint32_t;

/* "numpy.pxd":733
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_uint96     uint96_t
 * #ctypedef npy_uint128    uint128_t
 */
typedef npy_uint64 __pyx_t_5numpy_uint64_t;

/* "numpy.pxd":737
 * #ctypedef npy_uint128    uint128_t
 * 
 * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float64    float64_t
 * #ctypedef npy_float80    float80_t
 */
typedef npy_float32 __pyx_t_5numpy_float32_t;

/* "numpy.pxd":738
 * 
 * ctypedef npy_float32    float32_t
 * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_float80    float80_t
 * #ctypedef npy_float128   float128_t
 */
typedef npy_float64 __pyx_t_5numpy_float64_t;

/* "numpy.pxd":747
 * # The int types are mapped a bit surprising --
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t
 */
typedef npy_long __pyx_t_5numpy_int_t;

/* "numpy.pxd":748
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   longlong_t
 * 
 */
typedef npy_longlong __pyx_t_5numpy_long_t;

/* "numpy.pxd":749
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_ulong      uint_t
 */
typedef npy_longlong __pyx_t_5numpy_longlong_t;

/* "numpy.pxd":751
 * ctypedef npy_longlong   longlong_t
 * 
 * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t
 */
typedef npy_ulong __pyx_t_5numpy_uint_t;

/* "numpy.pxd":752
 * 
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 */
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;

/* "numpy.pxd":753
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_intp       intp_t
 */
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;

/* "numpy.pxd":755
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uintp      uintp_t
 * 
 */
typedef npy_intp __pyx_t_5numpy_intp_t;

/* "numpy.pxd":756
 * 
 * ctypedef npy_intp       intp_t
 * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_double     float_t
 */
typedef npy_uintp __pyx_t_5numpy_uintp_t;

/* "numpy.pxd":758
 * ctypedef npy_uintp      uintp_t
 * 
 * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t
 */
typedef npy_double __pyx_t_5numpy_float_t;

/* "numpy.pxd":759
 * 
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longdouble longdouble_t
 * 
 */
typedef npy_double __pyx_t_5numpy_double_t;

/* "numpy.pxd":760
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cfloat      cfloat_t
 */
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< float > __pyx_t_float_complex;
  #else
    typedef float _Complex __pyx_t_float_complex;
  #endif
#else
    typedef struct { float real, imag; } __pyx_t_float_complex;
#endif

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< double > __pyx_t_double_complex;
  #else
    typedef double _Complex __pyx_t_double_complex;
  #endif
#else
    typedef struct { double real, imag; } __pyx_t_double_complex;
#endif


/*--- Type declarations ---*/
struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism;
struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy;
struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace;
struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource;
struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container;
struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane;
struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid;

/* "numpy.pxd":762
 * ctypedef npy_longdouble longdouble_t
 * 
 * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t
 */
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;

/* "numpy.pxd":763
 * 
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
 * ctypedef npy_clongdouble clongdouble_t
 * 
 */
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;

/* "numpy.pxd":764
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cdouble     complex_t
 */
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;

/* "numpy.pxd":766
 * ctypedef npy_clongdouble clongdouble_t
 * 
 * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 */
typedef npy_cdouble __pyx_t_5numpy_complex_t;
struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle;
struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_TriangleCollection;
struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_FieldInterpolationTable;
struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_FIT_initialize_table;
struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_integrate_ray;
struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket;
struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_send_ray_home;

/* "yt/utilities/lib/VolumeIntegrator.pyx":73
 *     double acos(double x)
 * 
 * cdef struct Triangle:             # <<<<<<<<<<<<<<
 *     Triangle *next
 *     np.float64_t p[3][3]
 */
struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle {
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *next;
  __pyx_t_5numpy_float64_t p[3][3];
  __pyx_t_5numpy_float64_t val;
};

/* "yt/utilities/lib/VolumeIntegrator.pyx":78
 *     np.float64_t val
 * 
 * cdef struct TriangleCollection:             # <<<<<<<<<<<<<<
 *     int count
 *     Triangle *first
 */
struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_TriangleCollection {
  int count;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *first;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *current;
};

/* "yt/utilities/lib/VolumeIntegrator.pyx":302
 * cdef class VectorPlane
 * 
 * cdef struct FieldInterpolationTable:             # <<<<<<<<<<<<<<
 *     # Note that we make an assumption about retaining a reference to values
 *     # externally.
 */
struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_FieldInterpolationTable {
  __pyx_t_5numpy_float64_t *values;
  __pyx_t_5numpy_float64_t bounds[2];
  __pyx_t_5numpy_float64_t dbin;
  __pyx_t_5numpy_float64_t idbin;
  int field_id;
  int weight_field_id;
  int weight_table_id;
  int nbins;
  int pass_through;
};

/* "yt/utilities/lib/VolumeIntegrator.pyx":315
 *     int pass_through
 * 
 * cdef void FIT_initialize_table(FieldInterpolationTable *fit, int nbins,             # <<<<<<<<<<<<<<
 *               np.float64_t *values, np.float64_t bounds1, np.float64_t bounds2,
 *               int field_id, int weight_field_id = -1, int weight_table_id = -1,
 */
struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_FIT_initialize_table {
  int __pyx_n;
  int weight_field_id;
  int weight_table_id;
  int pass_through;
};

/* "yt/utilities/lib/VolumeIntegrator.pyx":646
 *     @cython.boundscheck(False)
 *     @cython.wraparound(False)
 *     cdef int integrate_ray(self, np.float64_t v_pos[3],             # <<<<<<<<<<<<<<
 *                                  np.float64_t v_dir[3],
 *                                  np.float64_t rgba[4],
 */
struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_integrate_ray {
  int __pyx_n;
  __pyx_t_5numpy_float64_t *return_t;
  __pyx_t_5numpy_float64_t enter_t;
};

/* "yt/utilities/lib/VolumeIntegrator.pyx":527
 *             tv[offset + k] = fv[k]
 * 
 * cdef struct AdaptiveRayPacket             # <<<<<<<<<<<<<<
 * 
 * cdef class PartitionedGrid:
 */
struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket {
  long nside;
  long ipix;
  __pyx_t_5numpy_float64_t t;
  __pyx_t_5numpy_float64_t v_dir[3];
  __pyx_t_5numpy_float64_t value[4];
  __pyx_t_5numpy_float64_t pos[3];
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *next;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *prev;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *brick_next;
  int pgi;
};

/* "yt/utilities/lib/VolumeIntegrator.pyx":1790
 *         return dt
 * 
 *     cdef send_ray_home(self, AdaptiveRayPacket *ray,             # <<<<<<<<<<<<<<
 *                        np.ndarray[np.float64_t, ndim=2] ledges,
 *                        np.ndarray[np.float64_t, ndim=2] redges,
 */
struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_send_ray_home {
  int __pyx_n;
  int skip_append;
};

/* "yt/utilities/lib/VolumeIntegrator.pyx":1562
 *         return 1
 * 
 * cdef class ProtoPrism:             # <<<<<<<<<<<<<<
 *     cdef np.float64_t left_edge[3]
 *     cdef np.float64_t right_edge[3]
 */
struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism {
  PyObject_HEAD
  struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_vtab;
  __pyx_t_5numpy_float64_t left_edge[3];
  __pyx_t_5numpy_float64_t right_edge[3];
  PyObject *LeftEdge;
  PyObject *RightEdge;
  PyObject *subgrid_faces;
  int parent_grid_id;
};


/* "yt/utilities/lib/VolumeIntegrator.pyx":347
 *     return (bv + dd*dy*fit.idbin)
 * 
 * cdef class TransferFunctionProxy:             # <<<<<<<<<<<<<<
 *     cdef int n_fields
 *     cdef int n_field_tables
 */
struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy {
  PyObject_HEAD
  struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_vtab;
  int n_fields;
  int n_field_tables;
  int ns;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_FieldInterpolationTable field_tables[6];
  int field_table_ids[6];
  PyObject *tf_obj;
  PyObject *my_field_tables;
};


/* "yt/utilities/lib/VolumeIntegrator.pyx":1530
 * 
 * 
 * cdef class GridFace:             # <<<<<<<<<<<<<<
 *     cdef int direction
 *     cdef public np.float64_t coord
 */
struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace {
  PyObject_HEAD
  struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *__pyx_vtab;
  int direction;
  __pyx_t_5numpy_float64_t coord;
  __pyx_t_5numpy_float64_t left_edge[3];
  __pyx_t_5numpy_float64_t right_edge[3];
};


/* "yt/utilities/lib/VolumeIntegrator.pyx":1657
 *     int pgi
 * 
 * cdef class AdaptiveRaySource:             # <<<<<<<<<<<<<<
 *     cdef np.float64_t center[3]
 *     cdef public np.float64_t rays_per_cell
 */
struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource {
  PyObject_HEAD
  struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_vtab;
  __pyx_t_5numpy_float64_t center[3];
  __pyx_t_5numpy_float64_t rays_per_cell;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *first;
  __pyx_t_5numpy_float64_t normalization;
  int nrays;
  int max_nside;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket **packet_pointers;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket **lpacket_pointers;
};


/* "yt/utilities/lib/VolumeIntegrator.pyx":278
 *     return vp
 * 
 * cdef class star_kdtree_container:             # <<<<<<<<<<<<<<
 *     cdef kdtree_utils.kdtree *tree
 *     cdef public np.float64_t sigma
 */
struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container {
  PyObject_HEAD
  struct kdtree *tree;
  __pyx_t_5numpy_float64_t sigma;
  __pyx_t_5numpy_float64_t coeff;
};


/* "yt/utilities/lib/VolumeIntegrator.pyx":300
 *         kdtree_utils.kd_free(self.tree)
 * 
 * cdef class VectorPlane             # <<<<<<<<<<<<<<
 * 
 * cdef struct FieldInterpolationTable:
 */
struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane {
  PyObject_HEAD
  struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_vtab;
  PyObject *avp_pos;
  PyObject *avp_dir;
  PyObject *acenter;
  PyObject *aimage;
  __pyx_t_5numpy_float64_t *vp_pos;
  __pyx_t_5numpy_float64_t *vp_dir;
  __pyx_t_5numpy_float64_t *center;
  __pyx_t_5numpy_float64_t *image;
  __pyx_t_5numpy_float64_t pdx;
  __pyx_t_5numpy_float64_t pdy;
  __pyx_t_5numpy_float64_t bounds[4];
  int nv[2];
  int vp_strides[3];
  int im_strides[3];
  int vd_strides[3];
  PyObject *ax_vec;
  PyObject *ay_vec;
  __pyx_t_5numpy_float64_t *x_vec;
  __pyx_t_5numpy_float64_t *y_vec;
};


/* "yt/utilities/lib/VolumeIntegrator.pyx":529
 * cdef struct AdaptiveRayPacket
 * 
 * cdef class PartitionedGrid:             # <<<<<<<<<<<<<<
 *     cdef public object my_data
 *     cdef public object LeftEdge
 */
struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid {
  PyObject_HEAD
  struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_vtab;
  PyObject *my_data;
  PyObject *LeftEdge;
  PyObject *RightEdge;
  __pyx_t_5numpy_float64_t *data[6];
  __pyx_t_5numpy_float64_t dvs[6];
  __pyx_t_5numpy_float64_t left_edge[3];
  __pyx_t_5numpy_float64_t right_edge[3];
  __pyx_t_5numpy_float64_t dds[3];
  __pyx_t_5numpy_float64_t idds[3];
  int dims[3];
  int parent_grid_id;
  int n_fields;
  struct kdtree *star_list;
  __pyx_t_5numpy_float64_t star_er;
  __pyx_t_5numpy_float64_t star_sigma_num;
  __pyx_t_5numpy_float64_t star_coeff;
};



/* "yt/utilities/lib/VolumeIntegrator.pyx":1562
 *         return 1
 * 
 * cdef class ProtoPrism:             # <<<<<<<<<<<<<<
 *     cdef np.float64_t left_edge[3]
 *     cdef np.float64_t right_edge[3]
 */

struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism {
  PyObject *(*split)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *, __pyx_t_5numpy_float64_t *, int);
};
static struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism;


/* "yt/utilities/lib/VolumeIntegrator.pyx":347
 *     return (bv + dd*dy*fit.idbin)
 * 
 * cdef class TransferFunctionProxy:             # <<<<<<<<<<<<<<
 *     cdef int n_fields
 *     cdef int n_field_tables
 */

struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy {
  void (*eval_transfer)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *);
};
static struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy;


/* "yt/utilities/lib/VolumeIntegrator.pyx":1530
 * 
 * 
 * cdef class GridFace:             # <<<<<<<<<<<<<<
 *     cdef int direction
 *     cdef public np.float64_t coord
 */

struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_GridFace {
  int (*proj_overlap)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *);
};
static struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *__pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_GridFace;


/* "yt/utilities/lib/VolumeIntegrator.pyx":529
 * cdef struct AdaptiveRayPacket
 * 
 * cdef class PartitionedGrid:             # <<<<<<<<<<<<<<
 *     cdef public object my_data
 *     cdef public object LeftEdge
 */

struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid {
  void (*calculate_extent)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *, __pyx_t_5numpy_float64_t *);
  int (*integrate_ray)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *, struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_integrate_ray *__pyx_optional_args);
  void (*sample_values)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int *, __pyx_t_5numpy_float64_t *, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *);
  void (*add_stars)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *, struct kdres *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *);
  void (*get_vector_field)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *);
};
static struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid;


/* "yt/utilities/lib/VolumeIntegrator.pyx":1657
 *     int pgi
 * 
 * cdef class AdaptiveRaySource:             # <<<<<<<<<<<<<<
 *     cdef np.float64_t center[3]
 *     cdef public np.float64_t rays_per_cell
 */

struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource {
  __pyx_t_5numpy_float64_t (*integrate_ray)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *);
  PyObject *(*send_ray_home)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *, PyArrayObject *, PyArrayObject *, int *, __pyx_t_5numpy_float64_t, struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_send_ray_home *__pyx_optional_args);
  PyObject *(*append_to_packets)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *, int, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *);
  int *(*find_neighbors)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *, int, __pyx_t_5numpy_float64_t, PyArrayObject *, PyArrayObject *);
  int (*intersects)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *);
  int (*find_owner)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *, int *, PyArrayObject *, PyArrayObject *);
  __pyx_t_5numpy_float64_t (*get_domega)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *);
  int (*refine_ray)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket **, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *);
};
static struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource;


/* "yt/utilities/lib/VolumeIntegrator.pyx":450
 *             #rgba[i+3] += trgba[i] * (1.0 - rgba[i+3])*dt*trgba[i+3]
 * 
 * cdef class VectorPlane:             # <<<<<<<<<<<<<<
 *     cdef public object avp_pos, avp_dir, acenter, aimage
 *     cdef np.float64_t *vp_pos, *vp_dir, *center, *image,
 */

struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane {
  void (*get_start_stop)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *, __pyx_t_5numpy_float64_t *, int *);
  void (*copy_into)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, int, int, int, int *);
  void (*copy_back)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, int, int, int, int *);
};
static struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane;
static CYTHON_INLINE void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_copy_into(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, int, int, int, int *);
static CYTHON_INLINE void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_copy_back(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, int, int, int, int *);
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          if (acquire_gil) { \
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
              PyGILState_Release(__pyx_gilstate_save); \
          } else { \
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil) \
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext() \
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif /* CYTHON_REFNANNY */
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static CYTHON_INLINE int  __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj,
    __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);

static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/

#define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0)
static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

#define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1)
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/

static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/

static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
    const char* function_name); /*proto*/

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact); /*proto*/

static CYTHON_INLINE int __Pyx_div_int(int, int); /* proto */

#define UNARY_NEG_WOULD_OVERFLOW(x)            (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))

static void __Pyx_RaiseBufferFallbackError(void); /*proto*/

#define __Pyx_BufPtrStrided3d(type, buf, i0, s0, i1, s1, i2, s2) (type)((char*)buf + i0 * s0 + i1 * s1 + i2 * s2)
static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_List_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
        PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Tuple_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
        PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (PyList_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {  /* inlined PySequence_GetItem() */
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (unlikely(l < 0)) return NULL;
                i += l;
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(PyList_Append(L, x) < 0)) return NULL;
        Py_INCREF(Py_None);
        return Py_None; /* this is just to have an accurate signature */
    } else {
        PyObject *r, *m;
        m = __Pyx_GetAttrString(L, "append");
        if (!m) return NULL;
        r = PyObject_CallFunctionObjArgs(m, x, NULL);
        Py_DECREF(m);
        return r;
    }
}

static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */

static CYTHON_INLINE long __Pyx_mod_long(long, long); /* proto */

#define __Pyx_SetItemInt(o, i, v, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_SetItemInt_Fast(o, i, v) : \
                                                    __Pyx_SetItemInt_Generic(o, to_py_func(i), v))
static CYTHON_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 CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (PyList_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {  /* inlined PySequence_SetItem() */
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            if (unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (unlikely(l < 0)) return -1;
                i += l;
            }
            return m->sq_ass_item(o, i, v);
        }
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (PySequence_Check(o) && !PyDict_Check(o)) {
#else
    if (PySequence_Check(o)) {
#endif
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

typedef struct {
  Py_ssize_t shape, strides, suboffsets;
} __Pyx_Buf_DimInfo;
typedef struct {
  size_t refcount;
  Py_buffer pybuffer;
} __Pyx_Buffer;
typedef struct {
  __Pyx_Buffer *rcbuffer;
  char *data;
  __Pyx_Buf_DimInfo diminfo[8];
} __Pyx_LocalBuf_ND;

#if PY_MAJOR_VERSION < 3
    static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
    static void __Pyx_ReleaseBuffer(Py_buffer *view);
#else
    #define __Pyx_GetBuffer PyObject_GetBuffer
    #define __Pyx_ReleaseBuffer PyBuffer_Release
#endif


  static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0};
static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1};

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_Py_intptr_t(Py_intptr_t);

static int __Pyx_Print(PyObject*, PyObject *, int); /*proto*/
#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3
static PyObject* __pyx_print = 0;
static PyObject* __pyx_print_kwargs = 0;
#endif

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #define __Pyx_CREAL(z) ((z).real())
    #define __Pyx_CIMAG(z) ((z).imag())
  #else
    #define __Pyx_CREAL(z) (__real__(z))
    #define __Pyx_CIMAG(z) (__imag__(z))
  #endif
#else
    #define __Pyx_CREAL(z) ((z).real)
    #define __Pyx_CIMAG(z) ((z).imag)
#endif
#if defined(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX
    #define __Pyx_SET_CREAL(z,x) ((z).real(x))
    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
#else
    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
#endif

static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);

#if CYTHON_CCOMPLEX
    #define __Pyx_c_eqf(a, b)   ((a)==(b))
    #define __Pyx_c_sumf(a, b)  ((a)+(b))
    #define __Pyx_c_difff(a, b) ((a)-(b))
    #define __Pyx_c_prodf(a, b) ((a)*(b))
    #define __Pyx_c_quotf(a, b) ((a)/(b))
    #define __Pyx_c_negf(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zerof(z) ((z)==(float)0)
    #define __Pyx_c_conjf(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_absf(z)     (::std::abs(z))
        #define __Pyx_c_powf(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zerof(z) ((z)==0)
    #define __Pyx_c_conjf(z)    (conjf(z))
    #if 1
        #define __Pyx_c_absf(z)     (cabsf(z))
        #define __Pyx_c_powf(a, b)  (cpowf(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex);
    static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex);
    #if 1
        static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex);
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex);
    #endif
#endif

static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);

#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq(a, b)   ((a)==(b))
    #define __Pyx_c_sum(a, b)  ((a)+(b))
    #define __Pyx_c_diff(a, b) ((a)-(b))
    #define __Pyx_c_prod(a, b) ((a)*(b))
    #define __Pyx_c_quot(a, b) ((a)/(b))
    #define __Pyx_c_neg(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero(z) ((z)==(double)0)
    #define __Pyx_c_conj(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs(z)     (::std::abs(z))
        #define __Pyx_c_pow(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero(z) ((z)==0)
    #define __Pyx_c_conj(z)    (conj(z))
    #if 1
        #define __Pyx_c_abs(z)     (cabs(z))
        #define __Pyx_c_pow(a, b)  (cpow(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex);
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex);
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex);
    #endif
#endif

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);

static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename); /*proto*/

static int __Pyx_check_binary_version(void);

static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/

#if !defined(__Pyx_PyIdentifier_FromString)
#if PY_MAJOR_VERSION < 3
  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
#else
  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
#endif
#endif

static PyObject *__Pyx_ImportModule(const char *name); /*proto*/

static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/

typedef struct {
    int code_line;
    PyCodeObject* code_object;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/


/* Module declarations from 'cpython.buffer' */

/* Module declarations from 'cpython.ref' */

/* Module declarations from 'libc.stdio' */

/* Module declarations from 'cpython.object' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.type' */
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;

/* Module declarations from 'libc.stdlib' */

/* Module declarations from 'numpy' */

/* Module declarations from 'numpy' */
static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/

/* Module declarations from 'cython' */

/* Module declarations from 'yt.utilities.lib.kdtree_utils' */

/* Module declarations from 'yt.utilities.lib.healpix_interface' */

/* Module declarations from 'yt.utilities.lib.VolumeIntegrator' */
static PyTypeObject *__pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container = 0;
static PyTypeObject *__pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane = 0;
static PyTypeObject *__pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy = 0;
static PyTypeObject *__pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid = 0;
static PyTypeObject *__pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_GridFace = 0;
static PyTypeObject *__pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism = 0;
static PyTypeObject *__pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource = 0;
static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_fmax(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/
static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_fmin(__pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t); /*proto*/
static CYTHON_INLINE int __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_iclip(int, int, int); /*proto*/
static struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_AddTriangle(struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *); /*proto*/
static void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_FillTriangleValues(PyArrayObject *, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *); /*proto*/
static void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_WipeTriangles(struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *); /*proto*/
static void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_FillAndWipeTriangles(PyArrayObject *, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *); /*proto*/
static void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_FIT_initialize_table(struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_FieldInterpolationTable *, int, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int, struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_FIT_initialize_table *__pyx_optional_args); /*proto*/
static __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_FIT_get_value(struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_FieldInterpolationTable *, __pyx_t_5numpy_float64_t *); /*proto*/
static int __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_march_cubes(__pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_TriangleCollection *); /*proto*/
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), { 0 }, 0, 'R', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t = { "int64_t", NULL, sizeof(__pyx_t_5numpy_int64_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int64_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int64_t), 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_int32_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_int32_t), 0 };
#define __Pyx_MODULE_NAME "yt.utilities.lib.VolumeIntegrator"
int __pyx_module_is_main_yt__utilities__lib__VolumeIntegrator = 0;

/* Implementation of 'yt.utilities.lib.VolumeIntegrator' */
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_hp_pix2vec_nest(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_nside, long __pyx_v_ipix); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_2arr_pix2vec_nest(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_nside, PyArrayObject *__pyx_v_aipix); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_4hp_vec2pix_nest(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_nside, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_6arr_vec2pix_nest(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_nside, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_y, PyArrayObject *__pyx_v_z); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_8hp_pix2ang_nest(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_nside, long __pyx_v_ipnest); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10arr_pix2ang_nest(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_nside, PyArrayObject *__pyx_v_aipnest); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_12hp_ang2pix_nest(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_nside, double __pyx_v_theta, double __pyx_v_phi); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_14arr_ang2pix_nest(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_nside, PyArrayObject *__pyx_v_atheta, PyArrayObject *__pyx_v_aphi); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_16arr_fisheye_vectors(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_resolution, __pyx_t_5numpy_float64_t __pyx_v_fov, int __pyx_v_nimx, int __pyx_v_nimy, int __pyx_v_nimi, int __pyx_v_nimj, __pyx_t_5numpy_float64_t __pyx_v_off_theta, __pyx_t_5numpy_float64_t __pyx_v_off_phi); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container___init__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_2add_points(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_self, PyArrayObject *__pyx_v_pos_x, PyArrayObject *__pyx_v_pos_y, PyArrayObject *__pyx_v_pos_z, PyArrayObject *__pyx_v_star_colors); /* proto */
static void __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_4__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5sigma___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5sigma_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5coeff___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5coeff_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy___cinit__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self, PyObject *__pyx_v_tf_obj); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_2ns___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_2ns_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane___cinit__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, PyArrayObject *__pyx_v_vp_pos, PyArrayObject *__pyx_v_vp_dir, PyArrayObject *__pyx_v_center, PyObject *__pyx_v_bounds, PyArrayObject *__pyx_v_image, PyArrayObject *__pyx_v_x_vec, PyArrayObject *__pyx_v_y_vec); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid___cinit__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, int __pyx_v_parent_grid_id, int __pyx_v_n_fields, PyObject *__pyx_v_data, PyArrayObject *__pyx_v_left_edge, PyArrayObject *__pyx_v_right_edge, PyArrayObject *__pyx_v_dims, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_star_tree); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_2set_star_tree(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_star_tree); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_4cast_plane(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_tf, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_vp); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_6integrate_streamline(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, PyObject *__pyx_v_pos, __pyx_t_5numpy_float64_t __pyx_v_h, PyObject *__pyx_v_mag); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8get_isocontour_triangles(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, __pyx_t_5numpy_float64_t __pyx_v_isovalue, int __pyx_v_field_id); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_14parent_grid_id___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_14parent_grid_id_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8n_fields___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8n_fields_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_18march_cubes_grid(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_isovalue, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_left_edge, PyArrayObject *__pyx_v_dxs, PyObject *__pyx_v_obj_sample); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_20march_cubes_grid_flux(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_isovalue, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_v1, PyArrayObject *__pyx_v_v2, PyArrayObject *__pyx_v_v3, PyArrayObject *__pyx_v_flux_field, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_left_edge, PyArrayObject *__pyx_v_dxs); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace___init__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *__pyx_v_self, PyObject *__pyx_v_grid, int __pyx_v_direction, int __pyx_v_left); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_5coord___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_5coord_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism___cinit__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self, int __pyx_v_parent_grid_id, PyArrayObject *__pyx_v_left_edge, PyArrayObject *__pyx_v_right_edge, PyObject *__pyx_v_subgrid_faces); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_2sweep(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self, int __pyx_v_direction, int __pyx_v_stack); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_4get_brick(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self, PyArrayObject *__pyx_v_grid_left_edge, PyArrayObject *__pyx_v_grid_dds, PyObject *__pyx_v_child_mask); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_14parent_grid_id___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_14parent_grid_id_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource___cinit__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, PyObject *__pyx_v_center, PyObject *__pyx_v_rays_per_cell, PyObject *__pyx_v_initial_nside, __pyx_t_5numpy_float64_t __pyx_v_normalization, PyObject *__pyx_v_brick_list, PyArrayObject *__pyx_v_ledges, PyArrayObject *__pyx_v_redges, int __pyx_v_max_nside); /* proto */
static void __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_2__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_4get_rays(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_6integrate_brick(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_pg, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_tf, int __pyx_v_pgi, PyArrayObject *__pyx_v_ledges, PyArrayObject *__pyx_v_redges, PyObject *__pyx_v_pgs, CYTHON_UNUSED int __pyx_v_inside); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13rays_per_cell___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13rays_per_cell_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13normalization___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13normalization_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_5nrays___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_5nrays_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_9max_nside___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self); /* proto */
static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_9max_nside_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
static char __pyx_k_6[] = "ndarray is not C contiguous";
static char __pyx_k_8[] = "ndarray is not Fortran contiguous";
static char __pyx_k_10[] = "Non-native byte order not supported";
static char __pyx_k_12[] = "unknown dtype code in numpy.pxd (%d)";
static char __pyx_k_13[] = "Format string allocated too short, see comment in numpy.pxd";
static char __pyx_k_16[] = "Format string allocated too short.";
static char __pyx_k_18[] = "\nSimple integrators for the radiative transfer equation\n\nAuthor: Matthew Turk <matthewturk@gmail.com>\nAffiliation: KIPAC/SLAC/Stanford\nHomepage: http://yt-project.org/\nLicense:\n  Copyright (C) 2009 Matthew Turk.  All Rights Reserved.\n\n  This file is part of yt.\n\n  yt is free software; you can redistribute it and/or modify\n  it under the terms of the GNU General Public License as published by\n  the Free Software Foundation; either version 3 of the License, or\n  (at your option) any later version.\n\n  This program is distributed in the hope that it will be useful,\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n  GNU General Public License for more details.\n\n  You should have received a copy of the GNU General Public License\n  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n";
static char __pyx_k_21[] = "/home/mturk/yt/yt-clean/yt/utilities/lib/VolumeIntegrator.pyx";
static char __pyx_k_22[] = "yt.utilities.lib.VolumeIntegrator";
static char __pyx_k_43[] = "march_cubes_grid_flux";
static char __pyx_k__B[] = "B";
static char __pyx_k__H[] = "H";
static char __pyx_k__I[] = "I";
static char __pyx_k__L[] = "L";
static char __pyx_k__O[] = "O";
static char __pyx_k__Q[] = "Q";
static char __pyx_k__b[] = "b";
static char __pyx_k__d[] = "d";
static char __pyx_k__f[] = "f";
static char __pyx_k__g[] = "g";
static char __pyx_k__h[] = "h";
static char __pyx_k__i[] = "i";
static char __pyx_k__j[] = "j";
static char __pyx_k__k[] = "k";
static char __pyx_k__l[] = "l";
static char __pyx_k__m[] = "m";
static char __pyx_k__n[] = "n";
static char __pyx_k__q[] = "q";
static char __pyx_k__r[] = "r";
static char __pyx_k__s[] = "s";
static char __pyx_k__v[] = "v";
static char __pyx_k__x[] = "x";
static char __pyx_k__y[] = "y";
static char __pyx_k__z[] = "z";
static char __pyx_k__Zd[] = "Zd";
static char __pyx_k__Zf[] = "Zf";
static char __pyx_k__Zg[] = "Zg";
static char __pyx_k__fv[] = "fv";
static char __pyx_k__gv[] = "gv";
static char __pyx_k__np[] = "np";
static char __pyx_k__nt[] = "nt";
static char __pyx_k__nx[] = "nx";
static char __pyx_k__ny[] = "ny";
static char __pyx_k__pg[] = "pg";
static char __pyx_k__pi[] = "pi";
static char __pyx_k__px[] = "px";
static char __pyx_k__py[] = "py";
static char __pyx_k__tf[] = "tf";
static char __pyx_k__tr[] = "tr";
static char __pyx_k__v1[] = "v1";
static char __pyx_k__v2[] = "v2";
static char __pyx_k__v3[] = "v3";
static char __pyx_k__vd[] = "vd";
static char __pyx_k__vp[] = "vp";
static char __pyx_k__dds[] = "dds";
static char __pyx_k__dxs[] = "dxs";
static char __pyx_k__fov[] = "fov";
static char __pyx_k__mag[] = "mag";
static char __pyx_k__pgi[] = "pgi";
static char __pyx_k__pgs[] = "pgs";
static char __pyx_k__phi[] = "phi";
static char __pyx_k__pos[] = "pos";
static char __pyx_k__aphi[] = "aphi";
static char __pyx_k__area[] = "area";
static char __pyx_k__copy[] = "copy";
static char __pyx_k__data[] = "data";
static char __pyx_k__dims[] = "dims";
static char __pyx_k__flux[] = "flux";
static char __pyx_k__grid[] = "grid";
static char __pyx_k__idds[] = "idds";
static char __pyx_k__ipix[] = "ipix";
static char __pyx_k__last[] = "last";
static char __pyx_k__left[] = "left";
static char __pyx_k__mask[] = "mask";
static char __pyx_k__nimi[] = "nimi";
static char __pyx_k__nimj[] = "nimj";
static char __pyx_k__nimx[] = "nimx";
static char __pyx_k__nimy[] = "nimy";
static char __pyx_k__sqrt[] = "sqrt";
static char __pyx_k__temp[] = "temp";
static char __pyx_k__wval[] = "wval";
static char __pyx_k__aipix[] = "aipix";
static char __pyx_k__dtype[] = "dtype";
static char __pyx_k__empty[] = "empty";
static char __pyx_k__fdata[] = "fdata";
static char __pyx_k__image[] = "image";
static char __pyx_k__int64[] = "int64";
static char __pyx_k__nside[] = "nside";
static char __pyx_k__numpy[] = "numpy";
static char __pyx_k__point[] = "point";
static char __pyx_k__pos_x[] = "pos_x";
static char __pyx_k__pos_y[] = "pos_y";
static char __pyx_k__pos_z[] = "pos_z";
static char __pyx_k__range[] = "range";
static char __pyx_k__sdata[] = "sdata";
static char __pyx_k__stack[] = "stack";
static char __pyx_k__sweep[] = "sweep";
static char __pyx_k__theta[] = "theta";
static char __pyx_k__x_vec[] = "x_vec";
static char __pyx_k__y_vec[] = "y_vec";
static char __pyx_k__zeros[] = "zeros";
static char __pyx_k__atheta[] = "atheta";
static char __pyx_k__bounds[] = "bounds";
static char __pyx_k__center[] = "center";
static char __pyx_k__inside[] = "inside";
static char __pyx_k__ipnest[] = "ipnest";
static char __pyx_k__ledges[] = "ledges";
static char __pyx_k__normal[] = "normal";
static char __pyx_k__offset[] = "offset";
static char __pyx_k__redges[] = "redges";
static char __pyx_k__sample[] = "sample";
static char __pyx_k__tables[] = "tables";
static char __pyx_k__tf_obj[] = "tf_obj";
static char __pyx_k__v1data[] = "v1data";
static char __pyx_k__v2data[] = "v2data";
static char __pyx_k__v3data[] = "v3data";
static char __pyx_k__values[] = "values";
static char __pyx_k__vp_dir[] = "vp_dir";
static char __pyx_k__vp_pos[] = "vp_pos";
static char __pyx_k__PROBLEM[] = "PROBLEM";
static char __pyx_k__aipnest[] = "aipnest";
static char __pyx_k__current[] = "current";
static char __pyx_k__float64[] = "float64";
static char __pyx_k__fov_rad[] = "fov_rad";
static char __pyx_k__intdata[] = "intdata";
static char __pyx_k__off_phi[] = "off_phi";
static char __pyx_k__sampled[] = "sampled";
static char __pyx_k__LeftEdge[] = "LeftEdge";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____test__[] = "__test__";
static char __pyx_k__cell_pos[] = "cell_pos";
static char __pyx_k__field_id[] = "field_id";
static char __pyx_k__grid_dds[] = "grid_dds";
static char __pyx_k__isovalue[] = "isovalue";
static char __pyx_k__n_fields[] = "n_fields";
static char __pyx_k__vertices[] = "vertices";
static char __pyx_k__x_bounds[] = "x_bounds";
static char __pyx_k__RightEdge[] = "RightEdge";
static char __pyx_k__direction[] = "direction";
static char __pyx_k__do_sample[] = "do_sample";
static char __pyx_k__field_ids[] = "field_ids";
static char __pyx_k__left_edge[] = "left_edge";
static char __pyx_k__max_nside[] = "max_nside";
static char __pyx_k__off_theta[] = "off_theta";
static char __pyx_k__star_tree[] = "star_tree";
static char __pyx_k__triangles[] = "triangles";
static char __pyx_k__ValueError[] = "ValueError";
static char __pyx_k__brick_list[] = "brick_list";
static char __pyx_k__child_mask[] = "child_mask";
static char __pyx_k__flux_field[] = "flux_field";
static char __pyx_k__obj_sample[] = "obj_sample";
static char __pyx_k__resolution[] = "resolution";
static char __pyx_k__right_edge[] = "right_edge";
static char __pyx_k__star_colors[] = "star_colors";
static char __pyx_k__RuntimeError[] = "RuntimeError";
static char __pyx_k__pass_through[] = "pass_through";
static char __pyx_k__initial_nside[] = "initial_nside";
static char __pyx_k__normalization[] = "normalization";
static char __pyx_k__rays_per_cell[] = "rays_per_cell";
static char __pyx_k__set_star_tree[] = "set_star_tree";
static char __pyx_k__subgrid_faces[] = "subgrid_faces";
static char __pyx_k__grid_left_edge[] = "grid_left_edge";
static char __pyx_k__n_field_tables[] = "n_field_tables";
static char __pyx_k__parent_grid_id[] = "parent_grid_id";
static char __pyx_k__field_table_ids[] = "field_table_ids";
static char __pyx_k__hp_ang2pix_nest[] = "hp_ang2pix_nest";
static char __pyx_k__hp_pix2ang_nest[] = "hp_pix2ang_nest";
static char __pyx_k__hp_pix2vec_nest[] = "hp_pix2vec_nest";
static char __pyx_k__hp_vec2pix_nest[] = "hp_vec2pix_nest";
static char __pyx_k__arr_ang2pix_nest[] = "arr_ang2pix_nest";
static char __pyx_k__arr_pix2ang_nest[] = "arr_pix2ang_nest";
static char __pyx_k__arr_pix2vec_nest[] = "arr_pix2vec_nest";
static char __pyx_k__arr_vec2pix_nest[] = "arr_vec2pix_nest";
static char __pyx_k__march_cubes_grid[] = "march_cubes_grid";
static char __pyx_k__weight_field_ids[] = "weight_field_ids";
static char __pyx_k__weight_table_ids[] = "weight_table_ids";
static char __pyx_k__arr_fisheye_vectors[] = "arr_fisheye_vectors";
static PyObject *__pyx_kp_u_10;
static PyObject *__pyx_kp_u_12;
static PyObject *__pyx_kp_u_13;
static PyObject *__pyx_kp_u_16;
static PyObject *__pyx_kp_s_21;
static PyObject *__pyx_n_s_22;
static PyObject *__pyx_n_s_43;
static PyObject *__pyx_kp_u_6;
static PyObject *__pyx_kp_u_8;
static PyObject *__pyx_n_s__LeftEdge;
static PyObject *__pyx_n_s__PROBLEM;
static PyObject *__pyx_n_s__RightEdge;
static PyObject *__pyx_n_s__RuntimeError;
static PyObject *__pyx_n_s__ValueError;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____test__;
static PyObject *__pyx_n_s__aipix;
static PyObject *__pyx_n_s__aipnest;
static PyObject *__pyx_n_s__aphi;
static PyObject *__pyx_n_s__area;
static PyObject *__pyx_n_s__arr_ang2pix_nest;
static PyObject *__pyx_n_s__arr_fisheye_vectors;
static PyObject *__pyx_n_s__arr_pix2ang_nest;
static PyObject *__pyx_n_s__arr_pix2vec_nest;
static PyObject *__pyx_n_s__arr_vec2pix_nest;
static PyObject *__pyx_n_s__atheta;
static PyObject *__pyx_n_s__bounds;
static PyObject *__pyx_n_s__brick_list;
static PyObject *__pyx_n_s__cell_pos;
static PyObject *__pyx_n_s__center;
static PyObject *__pyx_n_s__child_mask;
static PyObject *__pyx_n_s__copy;
static PyObject *__pyx_n_s__current;
static PyObject *__pyx_n_s__data;
static PyObject *__pyx_n_s__dds;
static PyObject *__pyx_n_s__dims;
static PyObject *__pyx_n_s__direction;
static PyObject *__pyx_n_s__do_sample;
static PyObject *__pyx_n_s__dtype;
static PyObject *__pyx_n_s__dxs;
static PyObject *__pyx_n_s__empty;
static PyObject *__pyx_n_s__fdata;
static PyObject *__pyx_n_s__field_id;
static PyObject *__pyx_n_s__field_ids;
static PyObject *__pyx_n_s__field_table_ids;
static PyObject *__pyx_n_s__float64;
static PyObject *__pyx_n_s__flux;
static PyObject *__pyx_n_s__flux_field;
static PyObject *__pyx_n_s__fov;
static PyObject *__pyx_n_s__fov_rad;
static PyObject *__pyx_n_s__fv;
static PyObject *__pyx_n_s__grid;
static PyObject *__pyx_n_s__grid_dds;
static PyObject *__pyx_n_s__grid_left_edge;
static PyObject *__pyx_n_s__gv;
static PyObject *__pyx_n_s__h;
static PyObject *__pyx_n_s__hp_ang2pix_nest;
static PyObject *__pyx_n_s__hp_pix2ang_nest;
static PyObject *__pyx_n_s__hp_pix2vec_nest;
static PyObject *__pyx_n_s__hp_vec2pix_nest;
static PyObject *__pyx_n_s__i;
static PyObject *__pyx_n_s__idds;
static PyObject *__pyx_n_s__image;
static PyObject *__pyx_n_s__initial_nside;
static PyObject *__pyx_n_s__inside;
static PyObject *__pyx_n_s__int64;
static PyObject *__pyx_n_s__intdata;
static PyObject *__pyx_n_s__ipix;
static PyObject *__pyx_n_s__ipnest;
static PyObject *__pyx_n_s__isovalue;
static PyObject *__pyx_n_s__j;
static PyObject *__pyx_n_s__k;
static PyObject *__pyx_n_s__last;
static PyObject *__pyx_n_s__ledges;
static PyObject *__pyx_n_s__left;
static PyObject *__pyx_n_s__left_edge;
static PyObject *__pyx_n_s__m;
static PyObject *__pyx_n_s__mag;
static PyObject *__pyx_n_s__march_cubes_grid;
static PyObject *__pyx_n_s__mask;
static PyObject *__pyx_n_s__max_nside;
static PyObject *__pyx_n_s__n;
static PyObject *__pyx_n_s__n_field_tables;
static PyObject *__pyx_n_s__n_fields;
static PyObject *__pyx_n_s__nimi;
static PyObject *__pyx_n_s__nimj;
static PyObject *__pyx_n_s__nimx;
static PyObject *__pyx_n_s__nimy;
static PyObject *__pyx_n_s__normal;
static PyObject *__pyx_n_s__normalization;
static PyObject *__pyx_n_s__np;
static PyObject *__pyx_n_s__nside;
static PyObject *__pyx_n_s__nt;
static PyObject *__pyx_n_s__numpy;
static PyObject *__pyx_n_s__nx;
static PyObject *__pyx_n_s__ny;
static PyObject *__pyx_n_s__obj_sample;
static PyObject *__pyx_n_s__off_phi;
static PyObject *__pyx_n_s__off_theta;
static PyObject *__pyx_n_s__offset;
static PyObject *__pyx_n_s__parent_grid_id;
static PyObject *__pyx_n_s__pass_through;
static PyObject *__pyx_n_s__pg;
static PyObject *__pyx_n_s__pgi;
static PyObject *__pyx_n_s__pgs;
static PyObject *__pyx_n_s__phi;
static PyObject *__pyx_n_s__pi;
static PyObject *__pyx_n_s__point;
static PyObject *__pyx_n_s__pos;
static PyObject *__pyx_n_s__pos_x;
static PyObject *__pyx_n_s__pos_y;
static PyObject *__pyx_n_s__pos_z;
static PyObject *__pyx_n_s__px;
static PyObject *__pyx_n_s__py;
static PyObject *__pyx_n_s__r;
static PyObject *__pyx_n_s__range;
static PyObject *__pyx_n_s__rays_per_cell;
static PyObject *__pyx_n_s__redges;
static PyObject *__pyx_n_s__resolution;
static PyObject *__pyx_n_s__right_edge;
static PyObject *__pyx_n_s__s;
static PyObject *__pyx_n_s__sample;
static PyObject *__pyx_n_s__sampled;
static PyObject *__pyx_n_s__sdata;
static PyObject *__pyx_n_s__set_star_tree;
static PyObject *__pyx_n_s__sqrt;
static PyObject *__pyx_n_s__stack;
static PyObject *__pyx_n_s__star_colors;
static PyObject *__pyx_n_s__star_tree;
static PyObject *__pyx_n_s__subgrid_faces;
static PyObject *__pyx_n_s__sweep;
static PyObject *__pyx_n_s__tables;
static PyObject *__pyx_n_s__temp;
static PyObject *__pyx_n_s__tf;
static PyObject *__pyx_n_s__tf_obj;
static PyObject *__pyx_n_s__theta;
static PyObject *__pyx_n_s__tr;
static PyObject *__pyx_n_s__triangles;
static PyObject *__pyx_n_s__v;
static PyObject *__pyx_n_s__v1;
static PyObject *__pyx_n_s__v1data;
static PyObject *__pyx_n_s__v2;
static PyObject *__pyx_n_s__v2data;
static PyObject *__pyx_n_s__v3;
static PyObject *__pyx_n_s__v3data;
static PyObject *__pyx_n_s__values;
static PyObject *__pyx_n_s__vd;
static PyObject *__pyx_n_s__vertices;
static PyObject *__pyx_n_s__vp;
static PyObject *__pyx_n_s__vp_dir;
static PyObject *__pyx_n_s__vp_pos;
static PyObject *__pyx_n_s__weight_field_ids;
static PyObject *__pyx_n_s__weight_table_ids;
static PyObject *__pyx_n_s__wval;
static PyObject *__pyx_n_s__x;
static PyObject *__pyx_n_s__x_bounds;
static PyObject *__pyx_n_s__x_vec;
static PyObject *__pyx_n_s__y;
static PyObject *__pyx_n_s__y_vec;
static PyObject *__pyx_n_s__z;
static PyObject *__pyx_n_s__zeros;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_12;
static PyObject *__pyx_int_15;
static __pyx_t_5numpy_float64_t __pyx_k_3;
static PyObject *__pyx_k_tuple_1;
static PyObject *__pyx_k_tuple_2;
static PyObject *__pyx_k_tuple_4;
static PyObject *__pyx_k_tuple_5;
static PyObject *__pyx_k_tuple_7;
static PyObject *__pyx_k_tuple_9;
static PyObject *__pyx_k_tuple_11;
static PyObject *__pyx_k_tuple_14;
static PyObject *__pyx_k_tuple_15;
static PyObject *__pyx_k_tuple_17;
static PyObject *__pyx_k_tuple_19;
static PyObject *__pyx_k_tuple_23;
static PyObject *__pyx_k_tuple_25;
static PyObject *__pyx_k_tuple_27;
static PyObject *__pyx_k_tuple_29;
static PyObject *__pyx_k_tuple_31;
static PyObject *__pyx_k_tuple_33;
static PyObject *__pyx_k_tuple_35;
static PyObject *__pyx_k_tuple_37;
static PyObject *__pyx_k_tuple_39;
static PyObject *__pyx_k_tuple_41;
static PyObject *__pyx_k_codeobj_20;
static PyObject *__pyx_k_codeobj_24;
static PyObject *__pyx_k_codeobj_26;
static PyObject *__pyx_k_codeobj_28;
static PyObject *__pyx_k_codeobj_30;
static PyObject *__pyx_k_codeobj_32;
static PyObject *__pyx_k_codeobj_34;
static PyObject *__pyx_k_codeobj_36;
static PyObject *__pyx_k_codeobj_38;
static PyObject *__pyx_k_codeobj_40;
static PyObject *__pyx_k_codeobj_42;

/* "yt/utilities/lib/VolumeIntegrator.pyx":33
 * from libc.stdlib cimport malloc, free, abs
 * 
 * cdef inline int imax(int i0, int i1):             # <<<<<<<<<<<<<<
 *     if i0 > i1: return i0
 *     return i1
 */

static CYTHON_INLINE int __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_imax(int __pyx_v_i0, int __pyx_v_i1) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("imax", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":34
 * 
 * cdef inline int imax(int i0, int i1):
 *     if i0 > i1: return i0             # <<<<<<<<<<<<<<
 *     return i1
 * 
 */
  __pyx_t_1 = (__pyx_v_i0 > __pyx_v_i1);
  if (__pyx_t_1) {
    __pyx_r = __pyx_v_i0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":35
 * cdef inline int imax(int i0, int i1):
 *     if i0 > i1: return i0
 *     return i1             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.float64_t fmax(np.float64_t f0, np.float64_t f1):
 */
  __pyx_r = __pyx_v_i1;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":37
 *     return i1
 * 
 * cdef inline np.float64_t fmax(np.float64_t f0, np.float64_t f1):             # <<<<<<<<<<<<<<
 *     if f0 > f1: return f0
 *     return f1
 */

static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_fmax(__pyx_t_5numpy_float64_t __pyx_v_f0, __pyx_t_5numpy_float64_t __pyx_v_f1) {
  __pyx_t_5numpy_float64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("fmax", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":38
 * 
 * cdef inline np.float64_t fmax(np.float64_t f0, np.float64_t f1):
 *     if f0 > f1: return f0             # <<<<<<<<<<<<<<
 *     return f1
 * 
 */
  __pyx_t_1 = (__pyx_v_f0 > __pyx_v_f1);
  if (__pyx_t_1) {
    __pyx_r = __pyx_v_f0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":39
 * cdef inline np.float64_t fmax(np.float64_t f0, np.float64_t f1):
 *     if f0 > f1: return f0
 *     return f1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int imin(int i0, int i1):
 */
  __pyx_r = __pyx_v_f1;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":41
 *     return f1
 * 
 * cdef inline int imin(int i0, int i1):             # <<<<<<<<<<<<<<
 *     if i0 < i1: return i0
 *     return i1
 */

static CYTHON_INLINE int __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_imin(int __pyx_v_i0, int __pyx_v_i1) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("imin", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":42
 * 
 * cdef inline int imin(int i0, int i1):
 *     if i0 < i1: return i0             # <<<<<<<<<<<<<<
 *     return i1
 * 
 */
  __pyx_t_1 = (__pyx_v_i0 < __pyx_v_i1);
  if (__pyx_t_1) {
    __pyx_r = __pyx_v_i0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":43
 * cdef inline int imin(int i0, int i1):
 *     if i0 < i1: return i0
 *     return i1             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.float64_t fmin(np.float64_t f0, np.float64_t f1):
 */
  __pyx_r = __pyx_v_i1;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":45
 *     return i1
 * 
 * cdef inline np.float64_t fmin(np.float64_t f0, np.float64_t f1):             # <<<<<<<<<<<<<<
 *     if f0 < f1: return f0
 *     return f1
 */

static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_fmin(__pyx_t_5numpy_float64_t __pyx_v_f0, __pyx_t_5numpy_float64_t __pyx_v_f1) {
  __pyx_t_5numpy_float64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("fmin", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":46
 * 
 * cdef inline np.float64_t fmin(np.float64_t f0, np.float64_t f1):
 *     if f0 < f1: return f0             # <<<<<<<<<<<<<<
 *     return f1
 * 
 */
  __pyx_t_1 = (__pyx_v_f0 < __pyx_v_f1);
  if (__pyx_t_1) {
    __pyx_r = __pyx_v_f0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":47
 * cdef inline np.float64_t fmin(np.float64_t f0, np.float64_t f1):
 *     if f0 < f1: return f0
 *     return f1             # <<<<<<<<<<<<<<
 * 
 * cdef inline int iclip(int i, int a, int b):
 */
  __pyx_r = __pyx_v_f1;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":49
 *     return f1
 * 
 * cdef inline int iclip(int i, int a, int b):             # <<<<<<<<<<<<<<
 *     if i < a: return a
 *     if i > b: return b
 */

static CYTHON_INLINE int __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_iclip(int __pyx_v_i, int __pyx_v_a, int __pyx_v_b) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("iclip", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":50
 * 
 * cdef inline int iclip(int i, int a, int b):
 *     if i < a: return a             # <<<<<<<<<<<<<<
 *     if i > b: return b
 *     return i
 */
  __pyx_t_1 = (__pyx_v_i < __pyx_v_a);
  if (__pyx_t_1) {
    __pyx_r = __pyx_v_a;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":51
 * cdef inline int iclip(int i, int a, int b):
 *     if i < a: return a
 *     if i > b: return b             # <<<<<<<<<<<<<<
 *     return i
 * 
 */
  __pyx_t_1 = (__pyx_v_i > __pyx_v_b);
  if (__pyx_t_1) {
    __pyx_r = __pyx_v_b;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":52
 *     if i < a: return a
 *     if i > b: return b
 *     return i             # <<<<<<<<<<<<<<
 * 
 * cdef inline np.float64_t fclip(np.float64_t f,
 */
  __pyx_r = __pyx_v_i;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":54
 *     return i
 * 
 * cdef inline np.float64_t fclip(np.float64_t f,             # <<<<<<<<<<<<<<
 *                       np.float64_t a, np.float64_t b):
 *     return fmin(fmax(f, a), b)
 */

static CYTHON_INLINE __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_fclip(__pyx_t_5numpy_float64_t __pyx_v_f, __pyx_t_5numpy_float64_t __pyx_v_a, __pyx_t_5numpy_float64_t __pyx_v_b) {
  __pyx_t_5numpy_float64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fclip", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":56
 * cdef inline np.float64_t fclip(np.float64_t f,
 *                       np.float64_t a, np.float64_t b):
 *     return fmin(fmax(f, a), b)             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "math.h":
 */
  __pyx_r = __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_fmin(__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_fmax(__pyx_v_f, __pyx_v_a), __pyx_v_b);
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":83
 *     Triangle *current
 * 
 * cdef Triangle *AddTriangle(Triangle *self,             # <<<<<<<<<<<<<<
 *                     np.float64_t p0[3], np.float64_t p1[3], np.float64_t p2[3]):
 *     cdef Triangle *nn = <Triangle *> malloc(sizeof(Triangle))
 */

static struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_AddTriangle(struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_self, __pyx_t_5numpy_float64_t *__pyx_v_p0, __pyx_t_5numpy_float64_t *__pyx_v_p1, __pyx_t_5numpy_float64_t *__pyx_v_p2) {
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_nn;
  int __pyx_v_i;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("AddTriangle", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":85
 * cdef Triangle *AddTriangle(Triangle *self,
 *                     np.float64_t p0[3], np.float64_t p1[3], np.float64_t p2[3]):
 *     cdef Triangle *nn = <Triangle *> malloc(sizeof(Triangle))             # <<<<<<<<<<<<<<
 *     if self != NULL:
 *         self.next = nn
 */
  __pyx_v_nn = ((struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *)malloc((sizeof(struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle))));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":86
 *                     np.float64_t p0[3], np.float64_t p1[3], np.float64_t p2[3]):
 *     cdef Triangle *nn = <Triangle *> malloc(sizeof(Triangle))
 *     if self != NULL:             # <<<<<<<<<<<<<<
 *         self.next = nn
 *     cdef int i
 */
  __pyx_t_1 = (__pyx_v_self != NULL);
  if (__pyx_t_1) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":87
 *     cdef Triangle *nn = <Triangle *> malloc(sizeof(Triangle))
 *     if self != NULL:
 *         self.next = nn             # <<<<<<<<<<<<<<
 *     cdef int i
 *     for i in range(3):
 */
    __pyx_v_self->next = __pyx_v_nn;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":89
 *         self.next = nn
 *     cdef int i
 *     for i in range(3):             # <<<<<<<<<<<<<<
 *         nn.p[0][i] = p0[i]
 *     for i in range(3):
 */
  for (__pyx_t_2 = 0; __pyx_t_2 < 3; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":90
 *     cdef int i
 *     for i in range(3):
 *         nn.p[0][i] = p0[i]             # <<<<<<<<<<<<<<
 *     for i in range(3):
 *         nn.p[1][i] = p1[i]
 */
    ((__pyx_v_nn->p[0])[__pyx_v_i]) = (__pyx_v_p0[__pyx_v_i]);
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":91
 *     for i in range(3):
 *         nn.p[0][i] = p0[i]
 *     for i in range(3):             # <<<<<<<<<<<<<<
 *         nn.p[1][i] = p1[i]
 *     for i in range(3):
 */
  for (__pyx_t_2 = 0; __pyx_t_2 < 3; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":92
 *         nn.p[0][i] = p0[i]
 *     for i in range(3):
 *         nn.p[1][i] = p1[i]             # <<<<<<<<<<<<<<
 *     for i in range(3):
 *         nn.p[2][i] = p2[i]
 */
    ((__pyx_v_nn->p[1])[__pyx_v_i]) = (__pyx_v_p1[__pyx_v_i]);
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":93
 *     for i in range(3):
 *         nn.p[1][i] = p1[i]
 *     for i in range(3):             # <<<<<<<<<<<<<<
 *         nn.p[2][i] = p2[i]
 *     nn.next = NULL
 */
  for (__pyx_t_2 = 0; __pyx_t_2 < 3; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":94
 *         nn.p[1][i] = p1[i]
 *     for i in range(3):
 *         nn.p[2][i] = p2[i]             # <<<<<<<<<<<<<<
 *     nn.next = NULL
 *     return nn
 */
    ((__pyx_v_nn->p[2])[__pyx_v_i]) = (__pyx_v_p2[__pyx_v_i]);
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":95
 *     for i in range(3):
 *         nn.p[2][i] = p2[i]
 *     nn.next = NULL             # <<<<<<<<<<<<<<
 *     return nn
 * 
 */
  __pyx_v_nn->next = NULL;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":96
 *         nn.p[2][i] = p2[i]
 *     nn.next = NULL
 *     return nn             # <<<<<<<<<<<<<<
 * 
 * cdef int CountTriangles(Triangle *first):
 */
  __pyx_r = __pyx_v_nn;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":98
 *     return nn
 * 
 * cdef int CountTriangles(Triangle *first):             # <<<<<<<<<<<<<<
 *     cdef int count = 0
 *     cdef Triangle *this = first
 */

static int __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_CountTriangles(struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_first) {
  int __pyx_v_count;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_this;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("CountTriangles", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":99
 * 
 * cdef int CountTriangles(Triangle *first):
 *     cdef int count = 0             # <<<<<<<<<<<<<<
 *     cdef Triangle *this = first
 *     while this != NULL:
 */
  __pyx_v_count = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":100
 * cdef int CountTriangles(Triangle *first):
 *     cdef int count = 0
 *     cdef Triangle *this = first             # <<<<<<<<<<<<<<
 *     while this != NULL:
 *         count += 1
 */
  __pyx_v_this = __pyx_v_first;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":101
 *     cdef int count = 0
 *     cdef Triangle *this = first
 *     while this != NULL:             # <<<<<<<<<<<<<<
 *         count += 1
 *         this = this.next
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_this != NULL);
    if (!__pyx_t_1) break;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":102
 *     cdef Triangle *this = first
 *     while this != NULL:
 *         count += 1             # <<<<<<<<<<<<<<
 *         this = this.next
 *     return count
 */
    __pyx_v_count = (__pyx_v_count + 1);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":103
 *     while this != NULL:
 *         count += 1
 *         this = this.next             # <<<<<<<<<<<<<<
 *     return count
 * 
 */
    __pyx_v_this = __pyx_v_this->next;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":104
 *         count += 1
 *         this = this.next
 *     return count             # <<<<<<<<<<<<<<
 * 
 * cdef void FillTriangleValues(np.ndarray[np.float64_t, ndim=1] values,
 */
  __pyx_r = __pyx_v_count;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":106
 *     return count
 * 
 * cdef void FillTriangleValues(np.ndarray[np.float64_t, ndim=1] values,             # <<<<<<<<<<<<<<
 *                              Triangle *first):
 *     cdef Triangle *this = first
 */

static void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_FillTriangleValues(PyArrayObject *__pyx_v_values, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_first) {
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_this;
  CYTHON_UNUSED struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_last;
  int __pyx_v_i;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("FillTriangleValues", 0);
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":108
 * cdef void FillTriangleValues(np.ndarray[np.float64_t, ndim=1] values,
 *                              Triangle *first):
 *     cdef Triangle *this = first             # <<<<<<<<<<<<<<
 *     cdef Triangle *last
 *     cdef int i = 0
 */
  __pyx_v_this = __pyx_v_first;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":110
 *     cdef Triangle *this = first
 *     cdef Triangle *last
 *     cdef int i = 0             # <<<<<<<<<<<<<<
 *     while this != NULL:
 *         values[i] = this.val
 */
  __pyx_v_i = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":111
 *     cdef Triangle *last
 *     cdef int i = 0
 *     while this != NULL:             # <<<<<<<<<<<<<<
 *         values[i] = this.val
 *         i += 1
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_this != NULL);
    if (!__pyx_t_1) break;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":112
 *     cdef int i = 0
 *     while this != NULL:
 *         values[i] = this.val             # <<<<<<<<<<<<<<
 *         i += 1
 *         last = this
 */
    __pyx_t_2 = __pyx_v_i;
    __pyx_t_3 = -1;
    if (__pyx_t_2 < 0) {
      __pyx_t_2 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_2 < 0)) __pyx_t_3 = 0;
    } else if (unlikely(__pyx_t_2 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0;
    if (unlikely(__pyx_t_3 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_3);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_this->val;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":113
 *     while this != NULL:
 *         values[i] = this.val
 *         i += 1             # <<<<<<<<<<<<<<
 *         last = this
 *         this = this.next
 */
    __pyx_v_i = (__pyx_v_i + 1);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":114
 *         values[i] = this.val
 *         i += 1
 *         last = this             # <<<<<<<<<<<<<<
 *         this = this.next
 * 
 */
    __pyx_v_last = __pyx_v_this;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":115
 *         i += 1
 *         last = this
 *         this = this.next             # <<<<<<<<<<<<<<
 * 
 * cdef void WipeTriangles(Triangle *first):
 */
    __pyx_v_this = __pyx_v_this->next;
  }

  goto __pyx_L0;
  __pyx_L1_error:;
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_WriteUnraisable("yt.utilities.lib.VolumeIntegrator.FillTriangleValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":117
 *         this = this.next
 * 
 * cdef void WipeTriangles(Triangle *first):             # <<<<<<<<<<<<<<
 *     cdef Triangle *this = first
 *     cdef Triangle *last
 */

static void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_WipeTriangles(struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_first) {
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_this;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_last;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("WipeTriangles", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":118
 * 
 * cdef void WipeTriangles(Triangle *first):
 *     cdef Triangle *this = first             # <<<<<<<<<<<<<<
 *     cdef Triangle *last
 *     while this != NULL:
 */
  __pyx_v_this = __pyx_v_first;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":120
 *     cdef Triangle *this = first
 *     cdef Triangle *last
 *     while this != NULL:             # <<<<<<<<<<<<<<
 *         last = this
 *         this = this.next
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_this != NULL);
    if (!__pyx_t_1) break;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":121
 *     cdef Triangle *last
 *     while this != NULL:
 *         last = this             # <<<<<<<<<<<<<<
 *         this = this.next
 *         free(last)
 */
    __pyx_v_last = __pyx_v_this;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":122
 *     while this != NULL:
 *         last = this
 *         this = this.next             # <<<<<<<<<<<<<<
 *         free(last)
 * 
 */
    __pyx_v_this = __pyx_v_this->next;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":123
 *         last = this
 *         this = this.next
 *         free(last)             # <<<<<<<<<<<<<<
 * 
 * cdef void FillAndWipeTriangles(np.ndarray[np.float64_t, ndim=2] vertices,
 */
    free(__pyx_v_last);
  }

  __Pyx_RefNannyFinishContext();
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":125
 *         free(last)
 * 
 * cdef void FillAndWipeTriangles(np.ndarray[np.float64_t, ndim=2] vertices,             # <<<<<<<<<<<<<<
 *                                Triangle *first):
 *     cdef int count = 0
 */

static void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_FillAndWipeTriangles(PyArrayObject *__pyx_v_vertices, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_first) {
  int __pyx_v_count;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_this;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_last;
  int __pyx_v_i;
  int __pyx_v_j;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_vertices;
  __Pyx_Buffer __pyx_pybuffer_vertices;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("FillAndWipeTriangles", 0);
  __pyx_pybuffer_vertices.pybuffer.buf = NULL;
  __pyx_pybuffer_vertices.refcount = 0;
  __pyx_pybuffernd_vertices.data = NULL;
  __pyx_pybuffernd_vertices.rcbuffer = &__pyx_pybuffer_vertices;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_v_vertices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_vertices.diminfo[0].strides = __pyx_pybuffernd_vertices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vertices.diminfo[0].shape = __pyx_pybuffernd_vertices.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vertices.diminfo[1].strides = __pyx_pybuffernd_vertices.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vertices.diminfo[1].shape = __pyx_pybuffernd_vertices.rcbuffer->pybuffer.shape[1];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":127
 * cdef void FillAndWipeTriangles(np.ndarray[np.float64_t, ndim=2] vertices,
 *                                Triangle *first):
 *     cdef int count = 0             # <<<<<<<<<<<<<<
 *     cdef Triangle *this = first
 *     cdef Triangle *last
 */
  __pyx_v_count = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":128
 *                                Triangle *first):
 *     cdef int count = 0
 *     cdef Triangle *this = first             # <<<<<<<<<<<<<<
 *     cdef Triangle *last
 *     cdef int i, j
 */
  __pyx_v_this = __pyx_v_first;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":131
 *     cdef Triangle *last
 *     cdef int i, j
 *     while this != NULL:             # <<<<<<<<<<<<<<
 *         for i in range(3):
 *             for j in range(3):
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_this != NULL);
    if (!__pyx_t_1) break;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":132
 *     cdef int i, j
 *     while this != NULL:
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             for j in range(3):
 *                 vertices[count, j] = this.p[i][j]
 */
    for (__pyx_t_2 = 0; __pyx_t_2 < 3; __pyx_t_2+=1) {
      __pyx_v_i = __pyx_t_2;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":133
 *     while this != NULL:
 *         for i in range(3):
 *             for j in range(3):             # <<<<<<<<<<<<<<
 *                 vertices[count, j] = this.p[i][j]
 *             count += 1 # Do it at the end because it's an index
 */
      for (__pyx_t_3 = 0; __pyx_t_3 < 3; __pyx_t_3+=1) {
        __pyx_v_j = __pyx_t_3;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":134
 *         for i in range(3):
 *             for j in range(3):
 *                 vertices[count, j] = this.p[i][j]             # <<<<<<<<<<<<<<
 *             count += 1 # Do it at the end because it's an index
 *         last = this
 */
        __pyx_t_4 = __pyx_v_count;
        __pyx_t_5 = __pyx_v_j;
        __pyx_t_6 = -1;
        if (__pyx_t_4 < 0) {
          __pyx_t_4 += __pyx_pybuffernd_vertices.diminfo[0].shape;
          if (unlikely(__pyx_t_4 < 0)) __pyx_t_6 = 0;
        } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_vertices.diminfo[0].shape)) __pyx_t_6 = 0;
        if (__pyx_t_5 < 0) {
          __pyx_t_5 += __pyx_pybuffernd_vertices.diminfo[1].shape;
          if (unlikely(__pyx_t_5 < 0)) __pyx_t_6 = 1;
        } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_vertices.diminfo[1].shape)) __pyx_t_6 = 1;
        if (unlikely(__pyx_t_6 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_6);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_vertices.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_vertices.diminfo[0].strides, __pyx_t_5, __pyx_pybuffernd_vertices.diminfo[1].strides) = ((__pyx_v_this->p[__pyx_v_i])[__pyx_v_j]);
      }

      /* "yt/utilities/lib/VolumeIntegrator.pyx":135
 *             for j in range(3):
 *                 vertices[count, j] = this.p[i][j]
 *             count += 1 # Do it at the end because it's an index             # <<<<<<<<<<<<<<
 *         last = this
 *         this = this.next
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }

    /* "yt/utilities/lib/VolumeIntegrator.pyx":136
 *                 vertices[count, j] = this.p[i][j]
 *             count += 1 # Do it at the end because it's an index
 *         last = this             # <<<<<<<<<<<<<<
 *         this = this.next
 *         free(last)
 */
    __pyx_v_last = __pyx_v_this;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":137
 *             count += 1 # Do it at the end because it's an index
 *         last = this
 *         this = this.next             # <<<<<<<<<<<<<<
 *         free(last)
 * 
 */
    __pyx_v_this = __pyx_v_this->next;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":138
 *         last = this
 *         this = this.next
 *         free(last)             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "FixedInterpolator.h":
 */
    free(__pyx_v_last);
  }

  goto __pyx_L0;
  __pyx_L1_error:;
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertices.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_WriteUnraisable("yt.utilities.lib.VolumeIntegrator.FillAndWipeTriangles", __pyx_clineno, __pyx_lineno, __pyx_filename);
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertices.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_1hp_pix2vec_nest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_1hp_pix2vec_nest = {__Pyx_NAMESTR("hp_pix2vec_nest"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_1hp_pix2vec_nest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_1hp_pix2vec_nest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  long __pyx_v_nside;
  long __pyx_v_ipix;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hp_pix2vec_nest (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__nside,&__pyx_n_s__ipix,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nside)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ipix)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hp_pix2vec_nest", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hp_pix2vec_nest") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_nside = __Pyx_PyInt_AsLong(values[0]); if (unlikely((__pyx_v_nside == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_ipix = __Pyx_PyInt_AsLong(values[1]); if (unlikely((__pyx_v_ipix == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hp_pix2vec_nest", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.hp_pix2vec_nest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_hp_pix2vec_nest(__pyx_self, __pyx_v_nside, __pyx_v_ipix);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":157
 * #cdef extern int **tri_table
 * 
 * def hp_pix2vec_nest(long nside, long ipix):             # <<<<<<<<<<<<<<
 *     cdef double v[3]
 *     healpix_interface.pix2vec_nest(nside, ipix, v)
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_hp_pix2vec_nest(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_nside, long __pyx_v_ipix) {
  double __pyx_v_v[3];
  PyArrayObject *__pyx_v_tr = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tr;
  __Pyx_Buffer __pyx_pybuffer_tr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyArrayObject *__pyx_t_4 = NULL;
  long __pyx_t_5;
  int __pyx_t_6;
  long __pyx_t_7;
  long __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hp_pix2vec_nest", 0);
  __pyx_pybuffer_tr.pybuffer.buf = NULL;
  __pyx_pybuffer_tr.refcount = 0;
  __pyx_pybuffernd_tr.data = NULL;
  __pyx_pybuffernd_tr.rcbuffer = &__pyx_pybuffer_tr;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":159
 * def hp_pix2vec_nest(long nside, long ipix):
 *     cdef double v[3]
 *     healpix_interface.pix2vec_nest(nside, ipix, v)             # <<<<<<<<<<<<<<
 *     cdef np.ndarray[np.float64_t, ndim=1] tr = np.empty((3,), dtype='float64')
 *     tr[0] = v[0]
 */
  pix2vec_nest(__pyx_v_nside, __pyx_v_ipix, __pyx_v_v);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":160
 *     cdef double v[3]
 *     healpix_interface.pix2vec_nest(nside, ipix, v)
 *     cdef np.ndarray[np.float64_t, ndim=1] tr = np.empty((3,), dtype='float64')             # <<<<<<<<<<<<<<
 *     tr[0] = v[0]
 *     tr[1] = v[1]
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_2), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tr.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_tr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_tr.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_tr.diminfo[0].strides = __pyx_pybuffernd_tr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tr.diminfo[0].shape = __pyx_pybuffernd_tr.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_4 = 0;
  __pyx_v_tr = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":161
 *     healpix_interface.pix2vec_nest(nside, ipix, v)
 *     cdef np.ndarray[np.float64_t, ndim=1] tr = np.empty((3,), dtype='float64')
 *     tr[0] = v[0]             # <<<<<<<<<<<<<<
 *     tr[1] = v[1]
 *     tr[2] = v[2]
 */
  __pyx_t_5 = 0;
  __pyx_t_6 = -1;
  if (__pyx_t_5 < 0) {
    __pyx_t_5 += __pyx_pybuffernd_tr.diminfo[0].shape;
    if (unlikely(__pyx_t_5 < 0)) __pyx_t_6 = 0;
  } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_tr.diminfo[0].shape)) __pyx_t_6 = 0;
  if (unlikely(__pyx_t_6 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_6);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_tr.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_tr.diminfo[0].strides) = (__pyx_v_v[0]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":162
 *     cdef np.ndarray[np.float64_t, ndim=1] tr = np.empty((3,), dtype='float64')
 *     tr[0] = v[0]
 *     tr[1] = v[1]             # <<<<<<<<<<<<<<
 *     tr[2] = v[2]
 *     return tr
 */
  __pyx_t_7 = 1;
  __pyx_t_6 = -1;
  if (__pyx_t_7 < 0) {
    __pyx_t_7 += __pyx_pybuffernd_tr.diminfo[0].shape;
    if (unlikely(__pyx_t_7 < 0)) __pyx_t_6 = 0;
  } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_tr.diminfo[0].shape)) __pyx_t_6 = 0;
  if (unlikely(__pyx_t_6 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_6);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_tr.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_tr.diminfo[0].strides) = (__pyx_v_v[1]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":163
 *     tr[0] = v[0]
 *     tr[1] = v[1]
 *     tr[2] = v[2]             # <<<<<<<<<<<<<<
 *     return tr
 * 
 */
  __pyx_t_8 = 2;
  __pyx_t_6 = -1;
  if (__pyx_t_8 < 0) {
    __pyx_t_8 += __pyx_pybuffernd_tr.diminfo[0].shape;
    if (unlikely(__pyx_t_8 < 0)) __pyx_t_6 = 0;
  } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_tr.diminfo[0].shape)) __pyx_t_6 = 0;
  if (unlikely(__pyx_t_6 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_6);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_tr.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_tr.diminfo[0].strides) = (__pyx_v_v[2]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":164
 *     tr[1] = v[1]
 *     tr[2] = v[2]
 *     return tr             # <<<<<<<<<<<<<<
 * 
 * def arr_pix2vec_nest(long nside,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_tr));
  __pyx_r = ((PyObject *)__pyx_v_tr);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.hp_pix2vec_nest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_3arr_pix2vec_nest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_3arr_pix2vec_nest = {__Pyx_NAMESTR("arr_pix2vec_nest"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_3arr_pix2vec_nest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_3arr_pix2vec_nest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  long __pyx_v_nside;
  PyArrayObject *__pyx_v_aipix = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("arr_pix2vec_nest (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__nside,&__pyx_n_s__aipix,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nside)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__aipix)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("arr_pix2vec_nest", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arr_pix2vec_nest") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_nside = __Pyx_PyInt_AsLong(values[0]); if (unlikely((__pyx_v_nside == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_aipix = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("arr_pix2vec_nest", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.arr_pix2vec_nest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_aipix), __pyx_ptype_5numpy_ndarray, 1, "aipix", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_2arr_pix2vec_nest(__pyx_self, __pyx_v_nside, __pyx_v_aipix);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":166
 *     return tr
 * 
 * def arr_pix2vec_nest(long nside,             # <<<<<<<<<<<<<<
 *                      np.ndarray[np.int64_t, ndim=1] aipix):
 *     cdef int n = aipix.shape[0]
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_2arr_pix2vec_nest(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_nside, PyArrayObject *__pyx_v_aipix) {
  int __pyx_v_n;
  int __pyx_v_i;
  double __pyx_v_v[3];
  long __pyx_v_ipix;
  PyArrayObject *__pyx_v_tr = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_aipix;
  __Pyx_Buffer __pyx_pybuffer_aipix;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tr;
  __Pyx_Buffer __pyx_pybuffer_tr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  long __pyx_t_10;
  int __pyx_t_11;
  long __pyx_t_12;
  int __pyx_t_13;
  long __pyx_t_14;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_pix2vec_nest", 0);
  __pyx_pybuffer_tr.pybuffer.buf = NULL;
  __pyx_pybuffer_tr.refcount = 0;
  __pyx_pybuffernd_tr.data = NULL;
  __pyx_pybuffernd_tr.rcbuffer = &__pyx_pybuffer_tr;
  __pyx_pybuffer_aipix.pybuffer.buf = NULL;
  __pyx_pybuffer_aipix.refcount = 0;
  __pyx_pybuffernd_aipix.data = NULL;
  __pyx_pybuffernd_aipix.rcbuffer = &__pyx_pybuffer_aipix;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_aipix.rcbuffer->pybuffer, (PyObject*)__pyx_v_aipix, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_aipix.diminfo[0].strides = __pyx_pybuffernd_aipix.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_aipix.diminfo[0].shape = __pyx_pybuffernd_aipix.rcbuffer->pybuffer.shape[0];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":168
 * def arr_pix2vec_nest(long nside,
 *                      np.ndarray[np.int64_t, ndim=1] aipix):
 *     cdef int n = aipix.shape[0]             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef double v[3]
 */
  __pyx_v_n = (__pyx_v_aipix->dimensions[0]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":172
 *     cdef double v[3]
 *     cdef long ipix
 *     cdef np.ndarray[np.float64_t, ndim=2] tr = np.zeros((n, 3), dtype='float64')             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         ipix = aipix[i]
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_int_3);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__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_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tr.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
      __pyx_v_tr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_tr.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_tr.diminfo[0].strides = __pyx_pybuffernd_tr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tr.diminfo[0].shape = __pyx_pybuffernd_tr.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tr.diminfo[1].strides = __pyx_pybuffernd_tr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tr.diminfo[1].shape = __pyx_pybuffernd_tr.rcbuffer->pybuffer.shape[1];
    }
  }
  __pyx_t_5 = 0;
  __pyx_v_tr = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":173
 *     cdef long ipix
 *     cdef np.ndarray[np.float64_t, ndim=2] tr = np.zeros((n, 3), dtype='float64')
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         ipix = aipix[i]
 *         healpix_interface.pix2vec_nest(nside, ipix, v)
 */
  __pyx_t_6 = __pyx_v_n;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":174
 *     cdef np.ndarray[np.float64_t, ndim=2] tr = np.zeros((n, 3), dtype='float64')
 *     for i in range(n):
 *         ipix = aipix[i]             # <<<<<<<<<<<<<<
 *         healpix_interface.pix2vec_nest(nside, ipix, v)
 *         tr[i,0] = v[0]
 */
    __pyx_t_8 = __pyx_v_i;
    __pyx_t_9 = -1;
    if (__pyx_t_8 < 0) {
      __pyx_t_8 += __pyx_pybuffernd_aipix.diminfo[0].shape;
      if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_aipix.diminfo[0].shape)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_ipix = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_aipix.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_aipix.diminfo[0].strides));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":175
 *     for i in range(n):
 *         ipix = aipix[i]
 *         healpix_interface.pix2vec_nest(nside, ipix, v)             # <<<<<<<<<<<<<<
 *         tr[i,0] = v[0]
 *         tr[i,1] = v[1]
 */
    pix2vec_nest(__pyx_v_nside, __pyx_v_ipix, __pyx_v_v);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":176
 *         ipix = aipix[i]
 *         healpix_interface.pix2vec_nest(nside, ipix, v)
 *         tr[i,0] = v[0]             # <<<<<<<<<<<<<<
 *         tr[i,1] = v[1]
 *         tr[i,2] = v[2]
 */
    __pyx_t_9 = __pyx_v_i;
    __pyx_t_10 = 0;
    __pyx_t_11 = -1;
    if (__pyx_t_9 < 0) {
      __pyx_t_9 += __pyx_pybuffernd_tr.diminfo[0].shape;
      if (unlikely(__pyx_t_9 < 0)) __pyx_t_11 = 0;
    } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_tr.diminfo[0].shape)) __pyx_t_11 = 0;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_pybuffernd_tr.diminfo[1].shape;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 1;
    } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_tr.diminfo[1].shape)) __pyx_t_11 = 1;
    if (unlikely(__pyx_t_11 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_11);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_tr.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_tr.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_tr.diminfo[1].strides) = (__pyx_v_v[0]);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":177
 *         healpix_interface.pix2vec_nest(nside, ipix, v)
 *         tr[i,0] = v[0]
 *         tr[i,1] = v[1]             # <<<<<<<<<<<<<<
 *         tr[i,2] = v[2]
 *     return tr
 */
    __pyx_t_11 = __pyx_v_i;
    __pyx_t_12 = 1;
    __pyx_t_13 = -1;
    if (__pyx_t_11 < 0) {
      __pyx_t_11 += __pyx_pybuffernd_tr.diminfo[0].shape;
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_tr.diminfo[0].shape)) __pyx_t_13 = 0;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_tr.diminfo[1].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 1;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_tr.diminfo[1].shape)) __pyx_t_13 = 1;
    if (unlikely(__pyx_t_13 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_13);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_tr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_tr.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_tr.diminfo[1].strides) = (__pyx_v_v[1]);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":178
 *         tr[i,0] = v[0]
 *         tr[i,1] = v[1]
 *         tr[i,2] = v[2]             # <<<<<<<<<<<<<<
 *     return tr
 * 
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_14 = 2;
    __pyx_t_15 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_tr.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_15 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_tr.diminfo[0].shape)) __pyx_t_15 = 0;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_tr.diminfo[1].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_15 = 1;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_tr.diminfo[1].shape)) __pyx_t_15 = 1;
    if (unlikely(__pyx_t_15 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_15);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_tr.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_tr.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_tr.diminfo[1].strides) = (__pyx_v_v[2]);
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":179
 *         tr[i,1] = v[1]
 *         tr[i,2] = v[2]
 *     return tr             # <<<<<<<<<<<<<<
 * 
 * def hp_vec2pix_nest(long nside, double x, double y, double z):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_tr));
  __pyx_r = ((PyObject *)__pyx_v_tr);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_aipix.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.arr_pix2vec_nest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_aipix.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_5hp_vec2pix_nest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_5hp_vec2pix_nest = {__Pyx_NAMESTR("hp_vec2pix_nest"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_5hp_vec2pix_nest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_5hp_vec2pix_nest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  long __pyx_v_nside;
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hp_vec2pix_nest (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__nside,&__pyx_n_s__x,&__pyx_n_s__y,&__pyx_n_s__z,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nside)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hp_vec2pix_nest", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hp_vec2pix_nest", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hp_vec2pix_nest", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hp_vec2pix_nest") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_nside = __Pyx_PyInt_AsLong(values[0]); if (unlikely((__pyx_v_nside == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_z = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hp_vec2pix_nest", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.hp_vec2pix_nest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_4hp_vec2pix_nest(__pyx_self, __pyx_v_nside, __pyx_v_x, __pyx_v_y, __pyx_v_z);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":181
 *     return tr
 * 
 * def hp_vec2pix_nest(long nside, double x, double y, double z):             # <<<<<<<<<<<<<<
 *     cdef double v[3]
 *     v[0] = x
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_4hp_vec2pix_nest(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_nside, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z) {
  double __pyx_v_v[3];
  long __pyx_v_ipix;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hp_vec2pix_nest", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":183
 * def hp_vec2pix_nest(long nside, double x, double y, double z):
 *     cdef double v[3]
 *     v[0] = x             # <<<<<<<<<<<<<<
 *     v[1] = y
 *     v[2] = z
 */
  (__pyx_v_v[0]) = __pyx_v_x;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":184
 *     cdef double v[3]
 *     v[0] = x
 *     v[1] = y             # <<<<<<<<<<<<<<
 *     v[2] = z
 *     cdef long ipix
 */
  (__pyx_v_v[1]) = __pyx_v_y;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":185
 *     v[0] = x
 *     v[1] = y
 *     v[2] = z             # <<<<<<<<<<<<<<
 *     cdef long ipix
 *     healpix_interface.vec2pix_nest(nside, v, &ipix)
 */
  (__pyx_v_v[2]) = __pyx_v_z;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":187
 *     v[2] = z
 *     cdef long ipix
 *     healpix_interface.vec2pix_nest(nside, v, &ipix)             # <<<<<<<<<<<<<<
 *     return ipix
 * 
 */
  vec2pix_nest(__pyx_v_nside, __pyx_v_v, (&__pyx_v_ipix));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":188
 *     cdef long ipix
 *     healpix_interface.vec2pix_nest(nside, v, &ipix)
 *     return ipix             # <<<<<<<<<<<<<<
 * 
 * def arr_vec2pix_nest(long nside,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_ipix); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.hp_vec2pix_nest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_7arr_vec2pix_nest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_7arr_vec2pix_nest = {__Pyx_NAMESTR("arr_vec2pix_nest"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_7arr_vec2pix_nest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_7arr_vec2pix_nest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  long __pyx_v_nside;
  PyArrayObject *__pyx_v_x = 0;
  PyArrayObject *__pyx_v_y = 0;
  PyArrayObject *__pyx_v_z = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("arr_vec2pix_nest (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__nside,&__pyx_n_s__x,&__pyx_n_s__y,&__pyx_n_s__z,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nside)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("arr_vec2pix_nest", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("arr_vec2pix_nest", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("arr_vec2pix_nest", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arr_vec2pix_nest") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_nside = __Pyx_PyInt_AsLong(values[0]); if (unlikely((__pyx_v_nside == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_x = ((PyArrayObject *)values[1]);
    __pyx_v_y = ((PyArrayObject *)values[2]);
    __pyx_v_z = ((PyArrayObject *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("arr_vec2pix_nest", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.arr_vec2pix_nest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_5numpy_ndarray, 1, "y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_z), __pyx_ptype_5numpy_ndarray, 1, "z", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_6arr_vec2pix_nest(__pyx_self, __pyx_v_nside, __pyx_v_x, __pyx_v_y, __pyx_v_z);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":190
 *     return ipix
 * 
 * def arr_vec2pix_nest(long nside,             # <<<<<<<<<<<<<<
 *                      np.ndarray[np.float64_t, ndim=1] x,
 *                      np.ndarray[np.float64_t, ndim=1] y,
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_6arr_vec2pix_nest(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_nside, PyArrayObject *__pyx_v_x, PyArrayObject *__pyx_v_y, PyArrayObject *__pyx_v_z) {
  int __pyx_v_n;
  int __pyx_v_i;
  double __pyx_v_v[3];
  long __pyx_v_ipix;
  PyArrayObject *__pyx_v_tr = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tr;
  __Pyx_Buffer __pyx_pybuffer_tr;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_x;
  __Pyx_Buffer __pyx_pybuffer_x;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_y;
  __Pyx_Buffer __pyx_pybuffer_y;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_z;
  __Pyx_Buffer __pyx_pybuffer_z;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_vec2pix_nest", 0);
  __pyx_pybuffer_tr.pybuffer.buf = NULL;
  __pyx_pybuffer_tr.refcount = 0;
  __pyx_pybuffernd_tr.data = NULL;
  __pyx_pybuffernd_tr.rcbuffer = &__pyx_pybuffer_tr;
  __pyx_pybuffer_x.pybuffer.buf = NULL;
  __pyx_pybuffer_x.refcount = 0;
  __pyx_pybuffernd_x.data = NULL;
  __pyx_pybuffernd_x.rcbuffer = &__pyx_pybuffer_x;
  __pyx_pybuffer_y.pybuffer.buf = NULL;
  __pyx_pybuffer_y.refcount = 0;
  __pyx_pybuffernd_y.data = NULL;
  __pyx_pybuffernd_y.rcbuffer = &__pyx_pybuffer_y;
  __pyx_pybuffer_z.pybuffer.buf = NULL;
  __pyx_pybuffer_z.refcount = 0;
  __pyx_pybuffernd_z.data = NULL;
  __pyx_pybuffernd_z.rcbuffer = &__pyx_pybuffer_z;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_x.diminfo[0].strides = __pyx_pybuffernd_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x.diminfo[0].shape = __pyx_pybuffernd_x.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_y.diminfo[0].strides = __pyx_pybuffernd_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y.diminfo[0].shape = __pyx_pybuffernd_y.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_z.rcbuffer->pybuffer, (PyObject*)__pyx_v_z, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_z.diminfo[0].strides = __pyx_pybuffernd_z.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_z.diminfo[0].shape = __pyx_pybuffernd_z.rcbuffer->pybuffer.shape[0];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":194
 *                      np.ndarray[np.float64_t, ndim=1] y,
 *                      np.ndarray[np.float64_t, ndim=1] z):
 *     cdef int n = x.shape[0]             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef double v[3]
 */
  __pyx_v_n = (__pyx_v_x->dimensions[0]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":198
 *     cdef double v[3]
 *     cdef long ipix
 *     cdef np.ndarray[np.int64_t, ndim=1] tr = np.zeros(n, dtype='int64')             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         v[0] = x[i]
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__int64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tr.rcbuffer->pybuffer, (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_tr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_tr.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_tr.diminfo[0].strides = __pyx_pybuffernd_tr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tr.diminfo[0].shape = __pyx_pybuffernd_tr.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_5 = 0;
  __pyx_v_tr = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":199
 *     cdef long ipix
 *     cdef np.ndarray[np.int64_t, ndim=1] tr = np.zeros(n, dtype='int64')
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         v[0] = x[i]
 *         v[1] = y[i]
 */
  __pyx_t_6 = __pyx_v_n;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":200
 *     cdef np.ndarray[np.int64_t, ndim=1] tr = np.zeros(n, dtype='int64')
 *     for i in range(n):
 *         v[0] = x[i]             # <<<<<<<<<<<<<<
 *         v[1] = y[i]
 *         v[2] = z[i]
 */
    __pyx_t_8 = __pyx_v_i;
    __pyx_t_9 = -1;
    if (__pyx_t_8 < 0) {
      __pyx_t_8 += __pyx_pybuffernd_x.diminfo[0].shape;
      if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_x.diminfo[0].shape)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    (__pyx_v_v[0]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_x.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_x.diminfo[0].strides));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":201
 *     for i in range(n):
 *         v[0] = x[i]
 *         v[1] = y[i]             # <<<<<<<<<<<<<<
 *         v[2] = z[i]
 *         healpix_interface.vec2pix_nest(nside, v, &ipix)
 */
    __pyx_t_9 = __pyx_v_i;
    __pyx_t_10 = -1;
    if (__pyx_t_9 < 0) {
      __pyx_t_9 += __pyx_pybuffernd_y.diminfo[0].shape;
      if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_y.diminfo[0].shape)) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    (__pyx_v_v[1]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_y.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_y.diminfo[0].strides));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":202
 *         v[0] = x[i]
 *         v[1] = y[i]
 *         v[2] = z[i]             # <<<<<<<<<<<<<<
 *         healpix_interface.vec2pix_nest(nside, v, &ipix)
 *         tr[i] = ipix
 */
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_11 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_pybuffernd_z.diminfo[0].shape;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_z.diminfo[0].shape)) __pyx_t_11 = 0;
    if (unlikely(__pyx_t_11 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_11);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    (__pyx_v_v[2]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_z.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_z.diminfo[0].strides));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":203
 *         v[1] = y[i]
 *         v[2] = z[i]
 *         healpix_interface.vec2pix_nest(nside, v, &ipix)             # <<<<<<<<<<<<<<
 *         tr[i] = ipix
 *     return tr
 */
    vec2pix_nest(__pyx_v_nside, __pyx_v_v, (&__pyx_v_ipix));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":204
 *         v[2] = z[i]
 *         healpix_interface.vec2pix_nest(nside, v, &ipix)
 *         tr[i] = ipix             # <<<<<<<<<<<<<<
 *     return tr
 * 
 */
    __pyx_t_11 = __pyx_v_i;
    __pyx_t_12 = -1;
    if (__pyx_t_11 < 0) {
      __pyx_t_11 += __pyx_pybuffernd_tr.diminfo[0].shape;
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_tr.diminfo[0].shape)) __pyx_t_12 = 0;
    if (unlikely(__pyx_t_12 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_12);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_tr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_tr.diminfo[0].strides) = __pyx_v_ipix;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":205
 *         healpix_interface.vec2pix_nest(nside, v, &ipix)
 *         tr[i] = ipix
 *     return tr             # <<<<<<<<<<<<<<
 * 
 * def hp_pix2ang_nest(long nside, long ipnest):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_tr));
  __pyx_r = ((PyObject *)__pyx_v_tr);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tr.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_z.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.arr_vec2pix_nest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tr.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_z.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_9hp_pix2ang_nest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_9hp_pix2ang_nest = {__Pyx_NAMESTR("hp_pix2ang_nest"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_9hp_pix2ang_nest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_9hp_pix2ang_nest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  long __pyx_v_nside;
  long __pyx_v_ipnest;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hp_pix2ang_nest (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__nside,&__pyx_n_s__ipnest,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nside)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ipnest)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hp_pix2ang_nest", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hp_pix2ang_nest") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_nside = __Pyx_PyInt_AsLong(values[0]); if (unlikely((__pyx_v_nside == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_ipnest = __Pyx_PyInt_AsLong(values[1]); if (unlikely((__pyx_v_ipnest == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hp_pix2ang_nest", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.hp_pix2ang_nest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_8hp_pix2ang_nest(__pyx_self, __pyx_v_nside, __pyx_v_ipnest);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":207
 *     return tr
 * 
 * def hp_pix2ang_nest(long nside, long ipnest):             # <<<<<<<<<<<<<<
 *     cdef double theta, phi
 *     healpix_interface.pix2ang_nest(nside, ipnest, &theta, &phi)
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_8hp_pix2ang_nest(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_nside, long __pyx_v_ipnest) {
  double __pyx_v_theta;
  double __pyx_v_phi;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hp_pix2ang_nest", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":209
 * def hp_pix2ang_nest(long nside, long ipnest):
 *     cdef double theta, phi
 *     healpix_interface.pix2ang_nest(nside, ipnest, &theta, &phi)             # <<<<<<<<<<<<<<
 *     return (theta, phi)
 * 
 */
  pix2ang_nest(__pyx_v_nside, __pyx_v_ipnest, (&__pyx_v_theta), (&__pyx_v_phi));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":210
 *     cdef double theta, phi
 *     healpix_interface.pix2ang_nest(nside, ipnest, &theta, &phi)
 *     return (theta, phi)             # <<<<<<<<<<<<<<
 * 
 * def arr_pix2ang_nest(long nside, np.ndarray[np.int64_t, ndim=1] aipnest):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_theta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_phi); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.hp_pix2ang_nest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11arr_pix2ang_nest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_11arr_pix2ang_nest = {__Pyx_NAMESTR("arr_pix2ang_nest"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11arr_pix2ang_nest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11arr_pix2ang_nest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  long __pyx_v_nside;
  PyArrayObject *__pyx_v_aipnest = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("arr_pix2ang_nest (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__nside,&__pyx_n_s__aipnest,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nside)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__aipnest)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("arr_pix2ang_nest", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arr_pix2ang_nest") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_nside = __Pyx_PyInt_AsLong(values[0]); if (unlikely((__pyx_v_nside == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_aipnest = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("arr_pix2ang_nest", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.arr_pix2ang_nest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_aipnest), __pyx_ptype_5numpy_ndarray, 1, "aipnest", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10arr_pix2ang_nest(__pyx_self, __pyx_v_nside, __pyx_v_aipnest);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":212
 *     return (theta, phi)
 * 
 * def arr_pix2ang_nest(long nside, np.ndarray[np.int64_t, ndim=1] aipnest):             # <<<<<<<<<<<<<<
 *     cdef int n = aipnest.shape[0]
 *     cdef int i
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10arr_pix2ang_nest(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_nside, PyArrayObject *__pyx_v_aipnest) {
  int __pyx_v_n;
  int __pyx_v_i;
  long __pyx_v_ipnest;
  PyArrayObject *__pyx_v_tr = 0;
  double __pyx_v_theta;
  double __pyx_v_phi;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_aipnest;
  __Pyx_Buffer __pyx_pybuffer_aipnest;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tr;
  __Pyx_Buffer __pyx_pybuffer_tr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  long __pyx_t_10;
  int __pyx_t_11;
  long __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_pix2ang_nest", 0);
  __pyx_pybuffer_tr.pybuffer.buf = NULL;
  __pyx_pybuffer_tr.refcount = 0;
  __pyx_pybuffernd_tr.data = NULL;
  __pyx_pybuffernd_tr.rcbuffer = &__pyx_pybuffer_tr;
  __pyx_pybuffer_aipnest.pybuffer.buf = NULL;
  __pyx_pybuffer_aipnest.refcount = 0;
  __pyx_pybuffernd_aipnest.data = NULL;
  __pyx_pybuffernd_aipnest.rcbuffer = &__pyx_pybuffer_aipnest;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_aipnest.rcbuffer->pybuffer, (PyObject*)__pyx_v_aipnest, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_aipnest.diminfo[0].strides = __pyx_pybuffernd_aipnest.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_aipnest.diminfo[0].shape = __pyx_pybuffernd_aipnest.rcbuffer->pybuffer.shape[0];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":213
 * 
 * def arr_pix2ang_nest(long nside, np.ndarray[np.int64_t, ndim=1] aipnest):
 *     cdef int n = aipnest.shape[0]             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef long ipnest
 */
  __pyx_v_n = (__pyx_v_aipnest->dimensions[0]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":216
 *     cdef int i
 *     cdef long ipnest
 *     cdef np.ndarray[np.float64_t, ndim=2] tr = np.zeros((n, 2), dtype='float64')             # <<<<<<<<<<<<<<
 *     cdef double theta, phi
 *     for i in range(n):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_int_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__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_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tr.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
      __pyx_v_tr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_tr.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_tr.diminfo[0].strides = __pyx_pybuffernd_tr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tr.diminfo[0].shape = __pyx_pybuffernd_tr.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tr.diminfo[1].strides = __pyx_pybuffernd_tr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tr.diminfo[1].shape = __pyx_pybuffernd_tr.rcbuffer->pybuffer.shape[1];
    }
  }
  __pyx_t_5 = 0;
  __pyx_v_tr = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":218
 *     cdef np.ndarray[np.float64_t, ndim=2] tr = np.zeros((n, 2), dtype='float64')
 *     cdef double theta, phi
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         ipnest = aipnest[i]
 *         healpix_interface.pix2ang_nest(nside, ipnest, &theta, &phi)
 */
  __pyx_t_6 = __pyx_v_n;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":219
 *     cdef double theta, phi
 *     for i in range(n):
 *         ipnest = aipnest[i]             # <<<<<<<<<<<<<<
 *         healpix_interface.pix2ang_nest(nside, ipnest, &theta, &phi)
 *         tr[i,0] = theta
 */
    __pyx_t_8 = __pyx_v_i;
    __pyx_t_9 = -1;
    if (__pyx_t_8 < 0) {
      __pyx_t_8 += __pyx_pybuffernd_aipnest.diminfo[0].shape;
      if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_aipnest.diminfo[0].shape)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_ipnest = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_aipnest.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_aipnest.diminfo[0].strides));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":220
 *     for i in range(n):
 *         ipnest = aipnest[i]
 *         healpix_interface.pix2ang_nest(nside, ipnest, &theta, &phi)             # <<<<<<<<<<<<<<
 *         tr[i,0] = theta
 *         tr[i,1] = phi
 */
    pix2ang_nest(__pyx_v_nside, __pyx_v_ipnest, (&__pyx_v_theta), (&__pyx_v_phi));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":221
 *         ipnest = aipnest[i]
 *         healpix_interface.pix2ang_nest(nside, ipnest, &theta, &phi)
 *         tr[i,0] = theta             # <<<<<<<<<<<<<<
 *         tr[i,1] = phi
 *     return tr
 */
    __pyx_t_9 = __pyx_v_i;
    __pyx_t_10 = 0;
    __pyx_t_11 = -1;
    if (__pyx_t_9 < 0) {
      __pyx_t_9 += __pyx_pybuffernd_tr.diminfo[0].shape;
      if (unlikely(__pyx_t_9 < 0)) __pyx_t_11 = 0;
    } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_tr.diminfo[0].shape)) __pyx_t_11 = 0;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_pybuffernd_tr.diminfo[1].shape;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 1;
    } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_tr.diminfo[1].shape)) __pyx_t_11 = 1;
    if (unlikely(__pyx_t_11 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_11);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_tr.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_tr.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_tr.diminfo[1].strides) = __pyx_v_theta;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":222
 *         healpix_interface.pix2ang_nest(nside, ipnest, &theta, &phi)
 *         tr[i,0] = theta
 *         tr[i,1] = phi             # <<<<<<<<<<<<<<
 *     return tr
 * 
 */
    __pyx_t_11 = __pyx_v_i;
    __pyx_t_12 = 1;
    __pyx_t_13 = -1;
    if (__pyx_t_11 < 0) {
      __pyx_t_11 += __pyx_pybuffernd_tr.diminfo[0].shape;
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_tr.diminfo[0].shape)) __pyx_t_13 = 0;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_tr.diminfo[1].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 1;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_tr.diminfo[1].shape)) __pyx_t_13 = 1;
    if (unlikely(__pyx_t_13 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_13);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_tr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_tr.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_tr.diminfo[1].strides) = __pyx_v_phi;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":223
 *         tr[i,0] = theta
 *         tr[i,1] = phi
 *     return tr             # <<<<<<<<<<<<<<
 * 
 * def hp_ang2pix_nest(long nside, double theta, double phi):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_tr));
  __pyx_r = ((PyObject *)__pyx_v_tr);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_aipnest.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.arr_pix2ang_nest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_aipnest.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_13hp_ang2pix_nest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_13hp_ang2pix_nest = {__Pyx_NAMESTR("hp_ang2pix_nest"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_13hp_ang2pix_nest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_13hp_ang2pix_nest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  long __pyx_v_nside;
  double __pyx_v_theta;
  double __pyx_v_phi;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("hp_ang2pix_nest (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__nside,&__pyx_n_s__theta,&__pyx_n_s__phi,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nside)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__theta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hp_ang2pix_nest", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__phi)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("hp_ang2pix_nest", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hp_ang2pix_nest") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_nside = __Pyx_PyInt_AsLong(values[0]); if (unlikely((__pyx_v_nside == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_theta = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_phi = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_phi == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("hp_ang2pix_nest", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.hp_ang2pix_nest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_12hp_ang2pix_nest(__pyx_self, __pyx_v_nside, __pyx_v_theta, __pyx_v_phi);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":225
 *     return tr
 * 
 * def hp_ang2pix_nest(long nside, double theta, double phi):             # <<<<<<<<<<<<<<
 *     cdef long ipix
 *     healpix_interface.ang2pix_nest(nside, theta, phi, &ipix)
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_12hp_ang2pix_nest(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_nside, double __pyx_v_theta, double __pyx_v_phi) {
  long __pyx_v_ipix;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("hp_ang2pix_nest", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":227
 * def hp_ang2pix_nest(long nside, double theta, double phi):
 *     cdef long ipix
 *     healpix_interface.ang2pix_nest(nside, theta, phi, &ipix)             # <<<<<<<<<<<<<<
 *     return ipix
 * 
 */
  ang2pix_nest(__pyx_v_nside, __pyx_v_theta, __pyx_v_phi, (&__pyx_v_ipix));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":228
 *     cdef long ipix
 *     healpix_interface.ang2pix_nest(nside, theta, phi, &ipix)
 *     return ipix             # <<<<<<<<<<<<<<
 * 
 * def arr_ang2pix_nest(long nside,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_ipix); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.hp_ang2pix_nest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15arr_ang2pix_nest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_15arr_ang2pix_nest = {__Pyx_NAMESTR("arr_ang2pix_nest"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15arr_ang2pix_nest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15arr_ang2pix_nest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  long __pyx_v_nside;
  PyArrayObject *__pyx_v_atheta = 0;
  PyArrayObject *__pyx_v_aphi = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("arr_ang2pix_nest (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__nside,&__pyx_n_s__atheta,&__pyx_n_s__aphi,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nside)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__atheta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("arr_ang2pix_nest", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__aphi)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("arr_ang2pix_nest", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arr_ang2pix_nest") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_nside = __Pyx_PyInt_AsLong(values[0]); if (unlikely((__pyx_v_nside == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_atheta = ((PyArrayObject *)values[1]);
    __pyx_v_aphi = ((PyArrayObject *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("arr_ang2pix_nest", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.arr_ang2pix_nest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_atheta), __pyx_ptype_5numpy_ndarray, 1, "atheta", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_aphi), __pyx_ptype_5numpy_ndarray, 1, "aphi", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_14arr_ang2pix_nest(__pyx_self, __pyx_v_nside, __pyx_v_atheta, __pyx_v_aphi);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":230
 *     return ipix
 * 
 * def arr_ang2pix_nest(long nside,             # <<<<<<<<<<<<<<
 *                      np.ndarray[np.float64_t, ndim=1] atheta,
 *                      np.ndarray[np.float64_t, ndim=1] aphi):
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_14arr_ang2pix_nest(CYTHON_UNUSED PyObject *__pyx_self, long __pyx_v_nside, PyArrayObject *__pyx_v_atheta, PyArrayObject *__pyx_v_aphi) {
  int __pyx_v_n;
  int __pyx_v_i;
  long __pyx_v_ipnest;
  PyArrayObject *__pyx_v_tr = 0;
  double __pyx_v_theta;
  double __pyx_v_phi;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_aphi;
  __Pyx_Buffer __pyx_pybuffer_aphi;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_atheta;
  __Pyx_Buffer __pyx_pybuffer_atheta;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tr;
  __Pyx_Buffer __pyx_pybuffer_tr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_ang2pix_nest", 0);
  __pyx_pybuffer_tr.pybuffer.buf = NULL;
  __pyx_pybuffer_tr.refcount = 0;
  __pyx_pybuffernd_tr.data = NULL;
  __pyx_pybuffernd_tr.rcbuffer = &__pyx_pybuffer_tr;
  __pyx_pybuffer_atheta.pybuffer.buf = NULL;
  __pyx_pybuffer_atheta.refcount = 0;
  __pyx_pybuffernd_atheta.data = NULL;
  __pyx_pybuffernd_atheta.rcbuffer = &__pyx_pybuffer_atheta;
  __pyx_pybuffer_aphi.pybuffer.buf = NULL;
  __pyx_pybuffer_aphi.refcount = 0;
  __pyx_pybuffernd_aphi.data = NULL;
  __pyx_pybuffernd_aphi.rcbuffer = &__pyx_pybuffer_aphi;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_atheta.rcbuffer->pybuffer, (PyObject*)__pyx_v_atheta, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_atheta.diminfo[0].strides = __pyx_pybuffernd_atheta.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_atheta.diminfo[0].shape = __pyx_pybuffernd_atheta.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_aphi.rcbuffer->pybuffer, (PyObject*)__pyx_v_aphi, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_aphi.diminfo[0].strides = __pyx_pybuffernd_aphi.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_aphi.diminfo[0].shape = __pyx_pybuffernd_aphi.rcbuffer->pybuffer.shape[0];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":233
 *                      np.ndarray[np.float64_t, ndim=1] atheta,
 *                      np.ndarray[np.float64_t, ndim=1] aphi):
 *     cdef int n = atheta.shape[0]             # <<<<<<<<<<<<<<
 *     cdef int i
 *     cdef long ipnest
 */
  __pyx_v_n = (__pyx_v_atheta->dimensions[0]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":236
 *     cdef int i
 *     cdef long ipnest
 *     cdef np.ndarray[np.int64_t, ndim=1] tr = np.zeros(n, dtype='int64')             # <<<<<<<<<<<<<<
 *     cdef double theta, phi
 *     for i in range(n):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__int64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tr.rcbuffer->pybuffer, (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_tr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_tr.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_tr.diminfo[0].strides = __pyx_pybuffernd_tr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tr.diminfo[0].shape = __pyx_pybuffernd_tr.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_5 = 0;
  __pyx_v_tr = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":238
 *     cdef np.ndarray[np.int64_t, ndim=1] tr = np.zeros(n, dtype='int64')
 *     cdef double theta, phi
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         theta = atheta[i]
 *         phi = aphi[i]
 */
  __pyx_t_6 = __pyx_v_n;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":239
 *     cdef double theta, phi
 *     for i in range(n):
 *         theta = atheta[i]             # <<<<<<<<<<<<<<
 *         phi = aphi[i]
 *         healpix_interface.ang2pix_nest(nside, theta, phi, &ipnest)
 */
    __pyx_t_8 = __pyx_v_i;
    __pyx_t_9 = -1;
    if (__pyx_t_8 < 0) {
      __pyx_t_8 += __pyx_pybuffernd_atheta.diminfo[0].shape;
      if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_atheta.diminfo[0].shape)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_theta = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_atheta.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_atheta.diminfo[0].strides));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":240
 *     for i in range(n):
 *         theta = atheta[i]
 *         phi = aphi[i]             # <<<<<<<<<<<<<<
 *         healpix_interface.ang2pix_nest(nside, theta, phi, &ipnest)
 *         tr[i] = ipnest
 */
    __pyx_t_9 = __pyx_v_i;
    __pyx_t_10 = -1;
    if (__pyx_t_9 < 0) {
      __pyx_t_9 += __pyx_pybuffernd_aphi.diminfo[0].shape;
      if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_aphi.diminfo[0].shape)) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_phi = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_aphi.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_aphi.diminfo[0].strides));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":241
 *         theta = atheta[i]
 *         phi = aphi[i]
 *         healpix_interface.ang2pix_nest(nside, theta, phi, &ipnest)             # <<<<<<<<<<<<<<
 *         tr[i] = ipnest
 *     return tr
 */
    ang2pix_nest(__pyx_v_nside, __pyx_v_theta, __pyx_v_phi, (&__pyx_v_ipnest));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":242
 *         phi = aphi[i]
 *         healpix_interface.ang2pix_nest(nside, theta, phi, &ipnest)
 *         tr[i] = ipnest             # <<<<<<<<<<<<<<
 *     return tr
 * 
 */
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_11 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_pybuffernd_tr.diminfo[0].shape;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_tr.diminfo[0].shape)) __pyx_t_11 = 0;
    if (unlikely(__pyx_t_11 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_11);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_tr.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_tr.diminfo[0].strides) = __pyx_v_ipnest;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":243
 *         healpix_interface.ang2pix_nest(nside, theta, phi, &ipnest)
 *         tr[i] = ipnest
 *     return tr             # <<<<<<<<<<<<<<
 * 
 * def arr_fisheye_vectors(int resolution, np.float64_t fov, int nimx=1, int
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_tr));
  __pyx_r = ((PyObject *)__pyx_v_tr);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_aphi.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_atheta.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.arr_ang2pix_nest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_aphi.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_atheta.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17arr_fisheye_vectors(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_17arr_fisheye_vectors = {__Pyx_NAMESTR("arr_fisheye_vectors"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17arr_fisheye_vectors, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17arr_fisheye_vectors(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_resolution;
  __pyx_t_5numpy_float64_t __pyx_v_fov;
  int __pyx_v_nimx;
  int __pyx_v_nimy;
  int __pyx_v_nimi;
  int __pyx_v_nimj;
  __pyx_t_5numpy_float64_t __pyx_v_off_theta;
  __pyx_t_5numpy_float64_t __pyx_v_off_phi;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("arr_fisheye_vectors (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__resolution,&__pyx_n_s__fov,&__pyx_n_s__nimx,&__pyx_n_s__nimy,&__pyx_n_s__nimi,&__pyx_n_s__nimj,&__pyx_n_s__off_theta,&__pyx_n_s__off_phi,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__resolution)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fov)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("arr_fisheye_vectors", 0, 2, 8, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nimx);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nimy);
          if (value) { values[3] = value; kw_args--; }
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nimi);
          if (value) { values[4] = value; kw_args--; }
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nimj);
          if (value) { values[5] = value; kw_args--; }
        }
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__off_theta);
          if (value) { values[6] = value; kw_args--; }
        }
        case  7:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__off_phi);
          if (value) { values[7] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arr_fisheye_vectors") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_resolution = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_resolution == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_fov = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_fov == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    if (values[2]) {
      __pyx_v_nimx = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_nimx == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_nimx = ((int)1);
    }
    if (values[3]) {
      __pyx_v_nimy = __Pyx_PyInt_AsInt(values[3]); if (unlikely((__pyx_v_nimy == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_nimy = ((int)1);
    }
    if (values[4]) {
      __pyx_v_nimi = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_nimi == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_nimi = ((int)0);
    }
    if (values[5]) {
      __pyx_v_nimj = __Pyx_PyInt_AsInt(values[5]); if (unlikely((__pyx_v_nimj == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_nimj = ((int)0);
    }
    if (values[6]) {
      __pyx_v_off_theta = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_off_theta == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":246
 * 
 * def arr_fisheye_vectors(int resolution, np.float64_t fov, int nimx=1, int
 *         nimy=1, int nimi=0, int nimj=0, np.float64_t off_theta=0.0, np.float64_t             # <<<<<<<<<<<<<<
 *         off_phi=0.0):
 *     # We now follow figures 4-7 of:
 */
      __pyx_v_off_theta = ((__pyx_t_5numpy_float64_t)0.0);
    }
    if (values[7]) {
      __pyx_v_off_phi = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_off_phi == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":247
 * def arr_fisheye_vectors(int resolution, np.float64_t fov, int nimx=1, int
 *         nimy=1, int nimi=0, int nimj=0, np.float64_t off_theta=0.0, np.float64_t
 *         off_phi=0.0):             # <<<<<<<<<<<<<<
 *     # We now follow figures 4-7 of:
 *     # http://paulbourke.net/miscellaneous/domefisheye/fisheye/
 */
      __pyx_v_off_phi = ((__pyx_t_5numpy_float64_t)0.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("arr_fisheye_vectors", 0, 2, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.arr_fisheye_vectors", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_16arr_fisheye_vectors(__pyx_self, __pyx_v_resolution, __pyx_v_fov, __pyx_v_nimx, __pyx_v_nimy, __pyx_v_nimi, __pyx_v_nimj, __pyx_v_off_theta, __pyx_v_off_phi);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":245
 *     return tr
 * 
 * def arr_fisheye_vectors(int resolution, np.float64_t fov, int nimx=1, int             # <<<<<<<<<<<<<<
 *         nimy=1, int nimi=0, int nimj=0, np.float64_t off_theta=0.0, np.float64_t
 *         off_phi=0.0):
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_16arr_fisheye_vectors(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_resolution, __pyx_t_5numpy_float64_t __pyx_v_fov, int __pyx_v_nimx, int __pyx_v_nimy, int __pyx_v_nimi, int __pyx_v_nimj, __pyx_t_5numpy_float64_t __pyx_v_off_theta, __pyx_t_5numpy_float64_t __pyx_v_off_phi) {
  PyArrayObject *__pyx_v_vp = 0;
  int __pyx_v_i;
  int __pyx_v_j;
  __pyx_t_5numpy_float64_t __pyx_v_r;
  __pyx_t_5numpy_float64_t __pyx_v_phi;
  __pyx_t_5numpy_float64_t __pyx_v_theta;
  __pyx_t_5numpy_float64_t __pyx_v_px;
  __pyx_t_5numpy_float64_t __pyx_v_py;
  __pyx_t_5numpy_float64_t __pyx_v_pi;
  __pyx_t_5numpy_float64_t __pyx_v_fov_rad;
  int __pyx_v_nx;
  int __pyx_v_ny;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_vp;
  __Pyx_Buffer __pyx_pybuffer_vp;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  double __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  long __pyx_t_17;
  int __pyx_t_18;
  int __pyx_t_19;
  long __pyx_t_20;
  int __pyx_t_21;
  int __pyx_t_22;
  long __pyx_t_23;
  int __pyx_t_24;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arr_fisheye_vectors", 0);
  __pyx_pybuffer_vp.pybuffer.buf = NULL;
  __pyx_pybuffer_vp.refcount = 0;
  __pyx_pybuffernd_vp.data = NULL;
  __pyx_pybuffernd_vp.rcbuffer = &__pyx_pybuffer_vp;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":254
 *     cdef int i, j, k
 *     cdef np.float64_t r, phi, theta, px, py
 *     cdef np.float64_t pi = 3.1415926             # <<<<<<<<<<<<<<
 *     cdef np.float64_t fov_rad = fov * pi / 180.0
 *     cdef int nx = resolution/nimx
 */
  __pyx_v_pi = 3.1415926;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":255
 *     cdef np.float64_t r, phi, theta, px, py
 *     cdef np.float64_t pi = 3.1415926
 *     cdef np.float64_t fov_rad = fov * pi / 180.0             # <<<<<<<<<<<<<<
 *     cdef int nx = resolution/nimx
 *     cdef int ny = resolution/nimy
 */
  __pyx_v_fov_rad = ((__pyx_v_fov * __pyx_v_pi) / 180.0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":256
 *     cdef np.float64_t pi = 3.1415926
 *     cdef np.float64_t fov_rad = fov * pi / 180.0
 *     cdef int nx = resolution/nimx             # <<<<<<<<<<<<<<
 *     cdef int ny = resolution/nimy
 *     vp = np.zeros((nx,ny, 3), dtype="float64")
 */
  if (unlikely(__pyx_v_nimx == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  else if (sizeof(int) == sizeof(long) && unlikely(__pyx_v_nimx == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_resolution))) {
    PyErr_Format(PyExc_OverflowError, "value too large to perform division");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_nx = __Pyx_div_int(__pyx_v_resolution, __pyx_v_nimx);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":257
 *     cdef np.float64_t fov_rad = fov * pi / 180.0
 *     cdef int nx = resolution/nimx
 *     cdef int ny = resolution/nimy             # <<<<<<<<<<<<<<
 *     vp = np.zeros((nx,ny, 3), dtype="float64")
 *     for i in range(nx):
 */
  if (unlikely(__pyx_v_nimy == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  else if (sizeof(int) == sizeof(long) && unlikely(__pyx_v_nimy == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_resolution))) {
    PyErr_Format(PyExc_OverflowError, "value too large to perform division");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_ny = __Pyx_div_int(__pyx_v_resolution, __pyx_v_nimy);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":258
 *     cdef int nx = resolution/nimx
 *     cdef int ny = resolution/nimy
 *     vp = np.zeros((nx,ny, 3), dtype="float64")             # <<<<<<<<<<<<<<
 *     for i in range(nx):
 *         px = 2.0 * (nimi*nx + i) / (resolution) - 1.0
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(__pyx_v_nx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyInt_FromLong(__pyx_v_ny); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vp.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vp.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 3, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vp.rcbuffer->pybuffer, (PyObject*)__pyx_v_vp, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 3, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_vp.diminfo[0].strides = __pyx_pybuffernd_vp.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vp.diminfo[0].shape = __pyx_pybuffernd_vp.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vp.diminfo[1].strides = __pyx_pybuffernd_vp.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vp.diminfo[1].shape = __pyx_pybuffernd_vp.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_vp.diminfo[2].strides = __pyx_pybuffernd_vp.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_vp.diminfo[2].shape = __pyx_pybuffernd_vp.rcbuffer->pybuffer.shape[2];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_vp = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":259
 *     cdef int ny = resolution/nimy
 *     vp = np.zeros((nx,ny, 3), dtype="float64")
 *     for i in range(nx):             # <<<<<<<<<<<<<<
 *         px = 2.0 * (nimi*nx + i) / (resolution) - 1.0
 *         for j in range(ny):
 */
  __pyx_t_6 = __pyx_v_nx;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_6; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":260
 *     vp = np.zeros((nx,ny, 3), dtype="float64")
 *     for i in range(nx):
 *         px = 2.0 * (nimi*nx + i) / (resolution) - 1.0             # <<<<<<<<<<<<<<
 *         for j in range(ny):
 *             py = 2.0 * (nimj*ny + j) / (resolution) - 1.0
 */
    __pyx_t_11 = (2.0 * ((__pyx_v_nimi * __pyx_v_nx) + __pyx_v_i));
    if (unlikely(__pyx_v_resolution == 0)) {
      PyErr_Format(PyExc_ZeroDivisionError, "float division");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_px = ((__pyx_t_11 / __pyx_v_resolution) - 1.0);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":261
 *     for i in range(nx):
 *         px = 2.0 * (nimi*nx + i) / (resolution) - 1.0
 *         for j in range(ny):             # <<<<<<<<<<<<<<
 *             py = 2.0 * (nimj*ny + j) / (resolution) - 1.0
 *             r = (px*px + py*py)**0.5
 */
    __pyx_t_12 = __pyx_v_ny;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":262
 *         px = 2.0 * (nimi*nx + i) / (resolution) - 1.0
 *         for j in range(ny):
 *             py = 2.0 * (nimj*ny + j) / (resolution) - 1.0             # <<<<<<<<<<<<<<
 *             r = (px*px + py*py)**0.5
 *             if r == 0.0:
 */
      __pyx_t_11 = (2.0 * ((__pyx_v_nimj * __pyx_v_ny) + __pyx_v_j));
      if (unlikely(__pyx_v_resolution == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "float division");
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_py = ((__pyx_t_11 / __pyx_v_resolution) - 1.0);

      /* "yt/utilities/lib/VolumeIntegrator.pyx":263
 *         for j in range(ny):
 *             py = 2.0 * (nimj*ny + j) / (resolution) - 1.0
 *             r = (px*px + py*py)**0.5             # <<<<<<<<<<<<<<
 *             if r == 0.0:
 *                 phi = 0.0
 */
      __pyx_v_r = pow(((double)((__pyx_v_px * __pyx_v_px) + (__pyx_v_py * __pyx_v_py))), 0.5);

      /* "yt/utilities/lib/VolumeIntegrator.pyx":264
 *             py = 2.0 * (nimj*ny + j) / (resolution) - 1.0
 *             r = (px*px + py*py)**0.5
 *             if r == 0.0:             # <<<<<<<<<<<<<<
 *                 phi = 0.0
 *             elif px < 0:
 */
      __pyx_t_14 = (__pyx_v_r == 0.0);
      if (__pyx_t_14) {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":265
 *             r = (px*px + py*py)**0.5
 *             if r == 0.0:
 *                 phi = 0.0             # <<<<<<<<<<<<<<
 *             elif px < 0:
 *                 phi = pi - asin(py / r)
 */
        __pyx_v_phi = 0.0;
        goto __pyx_L7;
      }

      /* "yt/utilities/lib/VolumeIntegrator.pyx":266
 *             if r == 0.0:
 *                 phi = 0.0
 *             elif px < 0:             # <<<<<<<<<<<<<<
 *                 phi = pi - asin(py / r)
 *             else:
 */
      __pyx_t_14 = (__pyx_v_px < 0.0);
      if (__pyx_t_14) {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":267
 *                 phi = 0.0
 *             elif px < 0:
 *                 phi = pi - asin(py / r)             # <<<<<<<<<<<<<<
 *             else:
 *                 phi = asin(py / r)
 */
        if (unlikely(__pyx_v_r == 0)) {
          PyErr_Format(PyExc_ZeroDivisionError, "float division");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_v_phi = (__pyx_v_pi - asin((__pyx_v_py / __pyx_v_r)));
        goto __pyx_L7;
      }
      /*else*/ {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":269
 *                 phi = pi - asin(py / r)
 *             else:
 *                 phi = asin(py / r)             # <<<<<<<<<<<<<<
 *             theta = r * fov_rad / 2.0
 *             theta += off_theta
 */
        if (unlikely(__pyx_v_r == 0)) {
          PyErr_Format(PyExc_ZeroDivisionError, "float division");
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_v_phi = asin((__pyx_v_py / __pyx_v_r));
      }
      __pyx_L7:;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":270
 *             else:
 *                 phi = asin(py / r)
 *             theta = r * fov_rad / 2.0             # <<<<<<<<<<<<<<
 *             theta += off_theta
 *             phi += off_phi
 */
      __pyx_v_theta = ((__pyx_v_r * __pyx_v_fov_rad) / 2.0);

      /* "yt/utilities/lib/VolumeIntegrator.pyx":271
 *                 phi = asin(py / r)
 *             theta = r * fov_rad / 2.0
 *             theta += off_theta             # <<<<<<<<<<<<<<
 *             phi += off_phi
 *             vp[i,j,0] = sin(theta) * cos(phi)
 */
      __pyx_v_theta = (__pyx_v_theta + __pyx_v_off_theta);

      /* "yt/utilities/lib/VolumeIntegrator.pyx":272
 *             theta = r * fov_rad / 2.0
 *             theta += off_theta
 *             phi += off_phi             # <<<<<<<<<<<<<<
 *             vp[i,j,0] = sin(theta) * cos(phi)
 *             vp[i,j,1] = sin(theta) * sin(phi)
 */
      __pyx_v_phi = (__pyx_v_phi + __pyx_v_off_phi);

      /* "yt/utilities/lib/VolumeIntegrator.pyx":273
 *             theta += off_theta
 *             phi += off_phi
 *             vp[i,j,0] = sin(theta) * cos(phi)             # <<<<<<<<<<<<<<
 *             vp[i,j,1] = sin(theta) * sin(phi)
 *             vp[i,j,2] = cos(theta)
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_16 = __pyx_v_j;
      __pyx_t_17 = 0;
      __pyx_t_18 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_vp.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_18 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_vp.diminfo[0].shape)) __pyx_t_18 = 0;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_vp.diminfo[1].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_18 = 1;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_vp.diminfo[1].shape)) __pyx_t_18 = 1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_vp.diminfo[2].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_18 = 2;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_vp.diminfo[2].shape)) __pyx_t_18 = 2;
      if (unlikely(__pyx_t_18 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_18);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_vp.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_vp.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_vp.diminfo[1].strides, __pyx_t_17, __pyx_pybuffernd_vp.diminfo[2].strides) = (sin(__pyx_v_theta) * cos(__pyx_v_phi));

      /* "yt/utilities/lib/VolumeIntegrator.pyx":274
 *             phi += off_phi
 *             vp[i,j,0] = sin(theta) * cos(phi)
 *             vp[i,j,1] = sin(theta) * sin(phi)             # <<<<<<<<<<<<<<
 *             vp[i,j,2] = cos(theta)
 *     return vp
 */
      __pyx_t_18 = __pyx_v_i;
      __pyx_t_19 = __pyx_v_j;
      __pyx_t_20 = 1;
      __pyx_t_21 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_vp.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_21 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_vp.diminfo[0].shape)) __pyx_t_21 = 0;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_vp.diminfo[1].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_21 = 1;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_vp.diminfo[1].shape)) __pyx_t_21 = 1;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_pybuffernd_vp.diminfo[2].shape;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_21 = 2;
      } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_vp.diminfo[2].shape)) __pyx_t_21 = 2;
      if (unlikely(__pyx_t_21 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_21);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_vp.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_vp.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_vp.diminfo[1].strides, __pyx_t_20, __pyx_pybuffernd_vp.diminfo[2].strides) = (sin(__pyx_v_theta) * sin(__pyx_v_phi));

      /* "yt/utilities/lib/VolumeIntegrator.pyx":275
 *             vp[i,j,0] = sin(theta) * cos(phi)
 *             vp[i,j,1] = sin(theta) * sin(phi)
 *             vp[i,j,2] = cos(theta)             # <<<<<<<<<<<<<<
 *     return vp
 * 
 */
      __pyx_t_21 = __pyx_v_i;
      __pyx_t_22 = __pyx_v_j;
      __pyx_t_23 = 2;
      __pyx_t_24 = -1;
      if (__pyx_t_21 < 0) {
        __pyx_t_21 += __pyx_pybuffernd_vp.diminfo[0].shape;
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_24 = 0;
      } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_vp.diminfo[0].shape)) __pyx_t_24 = 0;
      if (__pyx_t_22 < 0) {
        __pyx_t_22 += __pyx_pybuffernd_vp.diminfo[1].shape;
        if (unlikely(__pyx_t_22 < 0)) __pyx_t_24 = 1;
      } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_vp.diminfo[1].shape)) __pyx_t_24 = 1;
      if (__pyx_t_23 < 0) {
        __pyx_t_23 += __pyx_pybuffernd_vp.diminfo[2].shape;
        if (unlikely(__pyx_t_23 < 0)) __pyx_t_24 = 2;
      } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_vp.diminfo[2].shape)) __pyx_t_24 = 2;
      if (unlikely(__pyx_t_24 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_24);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_vp.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_vp.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_vp.diminfo[1].strides, __pyx_t_23, __pyx_pybuffernd_vp.diminfo[2].strides) = cos(__pyx_v_theta);
    }
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":276
 *             vp[i,j,1] = sin(theta) * sin(phi)
 *             vp[i,j,2] = cos(theta)
 *     return vp             # <<<<<<<<<<<<<<
 * 
 * cdef class star_kdtree_container:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_vp));
  __pyx_r = ((PyObject *)__pyx_v_vp);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vp.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.arr_fisheye_vectors", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vp.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_vp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container___init__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":283
 *     cdef public np.float64_t coeff
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.tree = kdtree_utils.kd_create(3)
 * 
 */

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container___init__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":284
 * 
 *     def __init__(self):
 *         self.tree = kdtree_utils.kd_create(3)             # <<<<<<<<<<<<<<
 * 
 *     def add_points(self,
 */
  __pyx_v_self->tree = kd_create(3);

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_3add_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_3add_points(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_pos_x = 0;
  PyArrayObject *__pyx_v_pos_y = 0;
  PyArrayObject *__pyx_v_pos_z = 0;
  PyArrayObject *__pyx_v_star_colors = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_points (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__pos_x,&__pyx_n_s__pos_y,&__pyx_n_s__pos_z,&__pyx_n_s__star_colors,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_points", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_points", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__star_colors)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_points", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_points") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_pos_x = ((PyArrayObject *)values[0]);
    __pyx_v_pos_y = ((PyArrayObject *)values[1]);
    __pyx_v_pos_z = ((PyArrayObject *)values[2]);
    __pyx_v_star_colors = ((PyArrayObject *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_points", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.star_kdtree_container.add_points", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos_x), __pyx_ptype_5numpy_ndarray, 1, "pos_x", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos_y), __pyx_ptype_5numpy_ndarray, 1, "pos_y", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos_z), __pyx_ptype_5numpy_ndarray, 1, "pos_z", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_star_colors), __pyx_ptype_5numpy_ndarray, 1, "star_colors", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_2add_points(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *)__pyx_v_self), __pyx_v_pos_x, __pyx_v_pos_y, __pyx_v_pos_z, __pyx_v_star_colors);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":286
 *         self.tree = kdtree_utils.kd_create(3)
 * 
 *     def add_points(self,             # <<<<<<<<<<<<<<
 *                    np.ndarray[np.float64_t, ndim=1] pos_x,
 *                    np.ndarray[np.float64_t, ndim=1] pos_y,
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_2add_points(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_self, PyArrayObject *__pyx_v_pos_x, PyArrayObject *__pyx_v_pos_y, PyArrayObject *__pyx_v_pos_z, PyArrayObject *__pyx_v_star_colors) {
  int __pyx_v_i;
  __pyx_t_5numpy_float64_t *__pyx_v_pointer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_pos_x;
  __Pyx_Buffer __pyx_pybuffer_pos_x;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_pos_y;
  __Pyx_Buffer __pyx_pybuffer_pos_y;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_pos_z;
  __Pyx_Buffer __pyx_pybuffer_pos_z;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_star_colors;
  __Pyx_Buffer __pyx_pybuffer_star_colors;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  npy_intp __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_points", 0);
  __pyx_pybuffer_pos_x.pybuffer.buf = NULL;
  __pyx_pybuffer_pos_x.refcount = 0;
  __pyx_pybuffernd_pos_x.data = NULL;
  __pyx_pybuffernd_pos_x.rcbuffer = &__pyx_pybuffer_pos_x;
  __pyx_pybuffer_pos_y.pybuffer.buf = NULL;
  __pyx_pybuffer_pos_y.refcount = 0;
  __pyx_pybuffernd_pos_y.data = NULL;
  __pyx_pybuffernd_pos_y.rcbuffer = &__pyx_pybuffer_pos_y;
  __pyx_pybuffer_pos_z.pybuffer.buf = NULL;
  __pyx_pybuffer_pos_z.refcount = 0;
  __pyx_pybuffernd_pos_z.data = NULL;
  __pyx_pybuffernd_pos_z.rcbuffer = &__pyx_pybuffer_pos_z;
  __pyx_pybuffer_star_colors.pybuffer.buf = NULL;
  __pyx_pybuffer_star_colors.refcount = 0;
  __pyx_pybuffernd_star_colors.data = NULL;
  __pyx_pybuffernd_star_colors.rcbuffer = &__pyx_pybuffer_star_colors;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos_x.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos_x, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_pos_x.diminfo[0].strides = __pyx_pybuffernd_pos_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos_x.diminfo[0].shape = __pyx_pybuffernd_pos_x.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos_y.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos_y, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_pos_y.diminfo[0].strides = __pyx_pybuffernd_pos_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos_y.diminfo[0].shape = __pyx_pybuffernd_pos_y.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_pos_z.rcbuffer->pybuffer, (PyObject*)__pyx_v_pos_z, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_pos_z.diminfo[0].strides = __pyx_pybuffernd_pos_z.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_pos_z.diminfo[0].shape = __pyx_pybuffernd_pos_z.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_star_colors.rcbuffer->pybuffer, (PyObject*)__pyx_v_star_colors, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_star_colors.diminfo[0].strides = __pyx_pybuffernd_star_colors.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_star_colors.diminfo[0].shape = __pyx_pybuffernd_star_colors.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_star_colors.diminfo[1].strides = __pyx_pybuffernd_star_colors.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_star_colors.diminfo[1].shape = __pyx_pybuffernd_star_colors.rcbuffer->pybuffer.shape[1];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":292
 *                    np.ndarray[np.float64_t, ndim=2] star_colors):
 *         cdef int i, n
 *         cdef np.float64_t *pointer = <np.float64_t *> star_colors.data             # <<<<<<<<<<<<<<
 *         for i in range(pos_x.shape[0]):
 *             kdtree_utils.kd_insert3(self.tree,
 */
  __pyx_v_pointer = ((__pyx_t_5numpy_float64_t *)__pyx_v_star_colors->data);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":293
 *         cdef int i, n
 *         cdef np.float64_t *pointer = <np.float64_t *> star_colors.data
 *         for i in range(pos_x.shape[0]):             # <<<<<<<<<<<<<<
 *             kdtree_utils.kd_insert3(self.tree,
 *                 pos_x[i], pos_y[i], pos_z[i], pointer + i*3)
 */
  __pyx_t_1 = (__pyx_v_pos_x->dimensions[0]);
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":295
 *         for i in range(pos_x.shape[0]):
 *             kdtree_utils.kd_insert3(self.tree,
 *                 pos_x[i], pos_y[i], pos_z[i], pointer + i*3)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
    __pyx_t_3 = __pyx_v_i;
    __pyx_t_4 = -1;
    if (__pyx_t_3 < 0) {
      __pyx_t_3 += __pyx_pybuffernd_pos_x.diminfo[0].shape;
      if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
    } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_pos_x.diminfo[0].shape)) __pyx_t_4 = 0;
    if (unlikely(__pyx_t_4 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_4);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_pybuffernd_pos_y.diminfo[0].shape;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_pos_y.diminfo[0].shape)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = __pyx_v_i;
    __pyx_t_6 = -1;
    if (__pyx_t_5 < 0) {
      __pyx_t_5 += __pyx_pybuffernd_pos_z.diminfo[0].shape;
      if (unlikely(__pyx_t_5 < 0)) __pyx_t_6 = 0;
    } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_pos_z.diminfo[0].shape)) __pyx_t_6 = 0;
    if (unlikely(__pyx_t_6 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_6);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    kd_insert3(__pyx_v_self->tree, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_pos_x.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_pos_x.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_pos_y.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_pos_y.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_pos_z.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_pos_z.diminfo[0].strides)), (__pyx_v_pointer + (__pyx_v_i * 3)));
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos_x.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos_y.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos_z.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_star_colors.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.star_kdtree_container.add_points", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos_x.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos_y.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_pos_z.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_star_colors.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static void __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_4__dealloc__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":297
 *                 pos_x[i], pos_y[i], pos_z[i], pointer + i*3)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         kdtree_utils.kd_free(self.tree)
 * 
 */

static void __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_4__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":298
 * 
 *     def __dealloc__(self):
 *         kdtree_utils.kd_free(self.tree)             # <<<<<<<<<<<<<<
 * 
 * cdef class VectorPlane
 */
  kd_free(__pyx_v_self->tree);

  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5sigma_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5sigma_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5sigma___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":280
 * cdef class star_kdtree_container:
 *     cdef kdtree_utils.kdtree *tree
 *     cdef public np.float64_t sigma             # <<<<<<<<<<<<<<
 *     cdef public np.float64_t coeff
 * 
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5sigma___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->sigma); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.star_kdtree_container.sigma.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5sigma_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5sigma_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5sigma_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5sigma_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __pyx_t_5numpy_float64_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->sigma = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.star_kdtree_container.sigma.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5coeff_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5coeff_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5coeff___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":281
 *     cdef kdtree_utils.kdtree *tree
 *     cdef public np.float64_t sigma
 *     cdef public np.float64_t coeff             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5coeff___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->coeff); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.star_kdtree_container.coeff.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5coeff_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5coeff_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5coeff_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5coeff_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __pyx_t_5numpy_float64_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->coeff = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.star_kdtree_container.coeff.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":315
 *     int pass_through
 * 
 * cdef void FIT_initialize_table(FieldInterpolationTable *fit, int nbins,             # <<<<<<<<<<<<<<
 *               np.float64_t *values, np.float64_t bounds1, np.float64_t bounds2,
 *               int field_id, int weight_field_id = -1, int weight_table_id = -1,
 */

static void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_FIT_initialize_table(struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_FieldInterpolationTable *__pyx_v_fit, int __pyx_v_nbins, __pyx_t_5numpy_float64_t *__pyx_v_values, __pyx_t_5numpy_float64_t __pyx_v_bounds1, __pyx_t_5numpy_float64_t __pyx_v_bounds2, int __pyx_v_field_id, struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_FIT_initialize_table *__pyx_optional_args) {
  int __pyx_v_weight_field_id = ((int)-1);
  int __pyx_v_weight_table_id = ((int)-1);
  int __pyx_v_pass_through = ((int)0);
  __Pyx_RefNannyDeclarations
  __pyx_t_5numpy_float64_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("FIT_initialize_table", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_weight_field_id = __pyx_optional_args->weight_field_id;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_weight_table_id = __pyx_optional_args->weight_table_id;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_pass_through = __pyx_optional_args->pass_through;
        }
      }
    }
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":319
 *               int field_id, int weight_field_id = -1, int weight_table_id = -1,
 *               int pass_through = 0):
 *     fit.bounds[0] = bounds1; fit.bounds[1] = bounds2             # <<<<<<<<<<<<<<
 *     fit.nbins = nbins
 *     fit.dbin = (fit.bounds[1] - fit.bounds[0])/fit.nbins
 */
  (__pyx_v_fit->bounds[0]) = __pyx_v_bounds1;
  (__pyx_v_fit->bounds[1]) = __pyx_v_bounds2;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":320
 *               int pass_through = 0):
 *     fit.bounds[0] = bounds1; fit.bounds[1] = bounds2
 *     fit.nbins = nbins             # <<<<<<<<<<<<<<
 *     fit.dbin = (fit.bounds[1] - fit.bounds[0])/fit.nbins
 *     fit.idbin = 1.0/fit.dbin
 */
  __pyx_v_fit->nbins = __pyx_v_nbins;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":321
 *     fit.bounds[0] = bounds1; fit.bounds[1] = bounds2
 *     fit.nbins = nbins
 *     fit.dbin = (fit.bounds[1] - fit.bounds[0])/fit.nbins             # <<<<<<<<<<<<<<
 *     fit.idbin = 1.0/fit.dbin
 *     # Better not pull this out from under us, yo
 */
  __pyx_t_1 = ((__pyx_v_fit->bounds[1]) - (__pyx_v_fit->bounds[0]));
  if (unlikely(__pyx_v_fit->nbins == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "float division");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_fit->dbin = (__pyx_t_1 / __pyx_v_fit->nbins);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":322
 *     fit.nbins = nbins
 *     fit.dbin = (fit.bounds[1] - fit.bounds[0])/fit.nbins
 *     fit.idbin = 1.0/fit.dbin             # <<<<<<<<<<<<<<
 *     # Better not pull this out from under us, yo
 *     fit.values = values
 */
  if (unlikely(__pyx_v_fit->dbin == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "float division");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_fit->idbin = (1.0 / __pyx_v_fit->dbin);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":324
 *     fit.idbin = 1.0/fit.dbin
 *     # Better not pull this out from under us, yo
 *     fit.values = values             # <<<<<<<<<<<<<<
 *     fit.field_id = field_id
 *     fit.weight_field_id = weight_field_id
 */
  __pyx_v_fit->values = __pyx_v_values;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":325
 *     # Better not pull this out from under us, yo
 *     fit.values = values
 *     fit.field_id = field_id             # <<<<<<<<<<<<<<
 *     fit.weight_field_id = weight_field_id
 *     fit.weight_table_id = weight_table_id
 */
  __pyx_v_fit->field_id = __pyx_v_field_id;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":326
 *     fit.values = values
 *     fit.field_id = field_id
 *     fit.weight_field_id = weight_field_id             # <<<<<<<<<<<<<<
 *     fit.weight_table_id = weight_table_id
 *     fit.pass_through = pass_through
 */
  __pyx_v_fit->weight_field_id = __pyx_v_weight_field_id;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":327
 *     fit.field_id = field_id
 *     fit.weight_field_id = weight_field_id
 *     fit.weight_table_id = weight_table_id             # <<<<<<<<<<<<<<
 *     fit.pass_through = pass_through
 * 
 */
  __pyx_v_fit->weight_table_id = __pyx_v_weight_table_id;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":328
 *     fit.weight_field_id = weight_field_id
 *     fit.weight_table_id = weight_table_id
 *     fit.pass_through = pass_through             # <<<<<<<<<<<<<<
 * 
 * cdef np.float64_t FIT_get_value(FieldInterpolationTable *fit,
 */
  __pyx_v_fit->pass_through = __pyx_v_pass_through;

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("yt.utilities.lib.VolumeIntegrator.FIT_initialize_table", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":330
 *     fit.pass_through = pass_through
 * 
 * cdef np.float64_t FIT_get_value(FieldInterpolationTable *fit,             # <<<<<<<<<<<<<<
 *                             np.float64_t *dvs):
 *     cdef np.float64_t bv, dy, dd, tf, rv
 */

static __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_FIT_get_value(struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_FieldInterpolationTable *__pyx_v_fit, __pyx_t_5numpy_float64_t *__pyx_v_dvs) {
  __pyx_t_5numpy_float64_t __pyx_v_bv;
  __pyx_t_5numpy_float64_t __pyx_v_dy;
  __pyx_t_5numpy_float64_t __pyx_v_dd;
  __pyx_t_5numpy_float64_t __pyx_v_rv;
  int __pyx_v_bin_id;
  __pyx_t_5numpy_float64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("FIT_get_value", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":334
 *     cdef np.float64_t bv, dy, dd, tf, rv
 *     cdef int bin_id
 *     if fit.pass_through == 1:             # <<<<<<<<<<<<<<
 *         rv = dvs[fit.field_id]
 *         if fit.weight_field_id != -1: rv *= dvs[fit.weight_field_id]
 */
  __pyx_t_1 = (__pyx_v_fit->pass_through == 1);
  if (__pyx_t_1) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":335
 *     cdef int bin_id
 *     if fit.pass_through == 1:
 *         rv = dvs[fit.field_id]             # <<<<<<<<<<<<<<
 *         if fit.weight_field_id != -1: rv *= dvs[fit.weight_field_id]
 *         return rv
 */
    __pyx_v_rv = (__pyx_v_dvs[__pyx_v_fit->field_id]);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":336
 *     if fit.pass_through == 1:
 *         rv = dvs[fit.field_id]
 *         if fit.weight_field_id != -1: rv *= dvs[fit.weight_field_id]             # <<<<<<<<<<<<<<
 *         return rv
 *     if dvs[fit.field_id] > fit.bounds[1] or dvs[fit.field_id] < fit.bounds[0]: return 0.0
 */
    __pyx_t_1 = (__pyx_v_fit->weight_field_id != -1);
    if (__pyx_t_1) {
      __pyx_v_rv = (__pyx_v_rv * (__pyx_v_dvs[__pyx_v_fit->weight_field_id]));
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":337
 *         rv = dvs[fit.field_id]
 *         if fit.weight_field_id != -1: rv *= dvs[fit.weight_field_id]
 *         return rv             # <<<<<<<<<<<<<<
 *     if dvs[fit.field_id] > fit.bounds[1] or dvs[fit.field_id] < fit.bounds[0]: return 0.0
 *     bin_id = <int> ((dvs[fit.field_id] - fit.bounds[0]) * fit.idbin)
 */
    __pyx_r = __pyx_v_rv;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":338
 *         if fit.weight_field_id != -1: rv *= dvs[fit.weight_field_id]
 *         return rv
 *     if dvs[fit.field_id] > fit.bounds[1] or dvs[fit.field_id] < fit.bounds[0]: return 0.0             # <<<<<<<<<<<<<<
 *     bin_id = <int> ((dvs[fit.field_id] - fit.bounds[0]) * fit.idbin)
 *     dd = dvs[fit.field_id] - (fit.bounds[0] + bin_id * fit.dbin) # x - x0
 */
  __pyx_t_1 = ((__pyx_v_dvs[__pyx_v_fit->field_id]) > (__pyx_v_fit->bounds[1]));
  if (!__pyx_t_1) {
    __pyx_t_2 = ((__pyx_v_dvs[__pyx_v_fit->field_id]) < (__pyx_v_fit->bounds[0]));
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {
    __pyx_r = 0.0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":339
 *         return rv
 *     if dvs[fit.field_id] > fit.bounds[1] or dvs[fit.field_id] < fit.bounds[0]: return 0.0
 *     bin_id = <int> ((dvs[fit.field_id] - fit.bounds[0]) * fit.idbin)             # <<<<<<<<<<<<<<
 *     dd = dvs[fit.field_id] - (fit.bounds[0] + bin_id * fit.dbin) # x - x0
 *     bv = fit.values[bin_id]
 */
  __pyx_v_bin_id = ((int)(((__pyx_v_dvs[__pyx_v_fit->field_id]) - (__pyx_v_fit->bounds[0])) * __pyx_v_fit->idbin));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":340
 *     if dvs[fit.field_id] > fit.bounds[1] or dvs[fit.field_id] < fit.bounds[0]: return 0.0
 *     bin_id = <int> ((dvs[fit.field_id] - fit.bounds[0]) * fit.idbin)
 *     dd = dvs[fit.field_id] - (fit.bounds[0] + bin_id * fit.dbin) # x - x0             # <<<<<<<<<<<<<<
 *     bv = fit.values[bin_id]
 *     dy = fit.values[bin_id + 1] - bv
 */
  __pyx_v_dd = ((__pyx_v_dvs[__pyx_v_fit->field_id]) - ((__pyx_v_fit->bounds[0]) + (__pyx_v_bin_id * __pyx_v_fit->dbin)));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":341
 *     bin_id = <int> ((dvs[fit.field_id] - fit.bounds[0]) * fit.idbin)
 *     dd = dvs[fit.field_id] - (fit.bounds[0] + bin_id * fit.dbin) # x - x0
 *     bv = fit.values[bin_id]             # <<<<<<<<<<<<<<
 *     dy = fit.values[bin_id + 1] - bv
 *     if fit.weight_field_id != -1:
 */
  __pyx_v_bv = (__pyx_v_fit->values[__pyx_v_bin_id]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":342
 *     dd = dvs[fit.field_id] - (fit.bounds[0] + bin_id * fit.dbin) # x - x0
 *     bv = fit.values[bin_id]
 *     dy = fit.values[bin_id + 1] - bv             # <<<<<<<<<<<<<<
 *     if fit.weight_field_id != -1:
 *         return dvs[fit.weight_field_id] * (bv + dd*dy*fit.idbin)
 */
  __pyx_v_dy = ((__pyx_v_fit->values[(__pyx_v_bin_id + 1)]) - __pyx_v_bv);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":343
 *     bv = fit.values[bin_id]
 *     dy = fit.values[bin_id + 1] - bv
 *     if fit.weight_field_id != -1:             # <<<<<<<<<<<<<<
 *         return dvs[fit.weight_field_id] * (bv + dd*dy*fit.idbin)
 *     return (bv + dd*dy*fit.idbin)
 */
  __pyx_t_3 = (__pyx_v_fit->weight_field_id != -1);
  if (__pyx_t_3) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":344
 *     dy = fit.values[bin_id + 1] - bv
 *     if fit.weight_field_id != -1:
 *         return dvs[fit.weight_field_id] * (bv + dd*dy*fit.idbin)             # <<<<<<<<<<<<<<
 *     return (bv + dd*dy*fit.idbin)
 * 
 */
    __pyx_r = ((__pyx_v_dvs[__pyx_v_fit->weight_field_id]) * (__pyx_v_bv + ((__pyx_v_dd * __pyx_v_dy) * __pyx_v_fit->idbin)));
    goto __pyx_L0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":345
 *     if fit.weight_field_id != -1:
 *         return dvs[fit.weight_field_id] * (bv + dd*dy*fit.idbin)
 *     return (bv + dd*dy*fit.idbin)             # <<<<<<<<<<<<<<
 * 
 * cdef class TransferFunctionProxy:
 */
  __pyx_r = (__pyx_v_bv + ((__pyx_v_dd * __pyx_v_dy) * __pyx_v_fit->idbin));
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tf_obj = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__tf_obj,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tf_obj)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_tf_obj = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.TransferFunctionProxy.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy___cinit__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *)__pyx_v_self), __pyx_v_tf_obj);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":367
 *     cdef public object my_field_tables
 * 
 *     def __cinit__(self, tf_obj):             # <<<<<<<<<<<<<<
 *         # We have N fields.  We have 6 channels.  We have M field tables.
 *         # The idea is that we can have multiple channels corresponding to the
 */

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy___cinit__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self, PyObject *__pyx_v_tf_obj) {
  int __pyx_v_i;
  PyArrayObject *__pyx_v_temp = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_temp;
  __Pyx_Buffer __pyx_pybuffer_temp;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __pyx_t_5numpy_float64_t __pyx_t_10;
  __pyx_t_5numpy_float64_t __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_FIT_initialize_table __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __pyx_pybuffer_temp.pybuffer.buf = NULL;
  __pyx_pybuffer_temp.refcount = 0;
  __pyx_pybuffernd_temp.data = NULL;
  __pyx_pybuffernd_temp.rcbuffer = &__pyx_pybuffer_temp;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":378
 *         cdef FieldInterpolationTable fit
 * 
 *         self.tf_obj = tf_obj             # <<<<<<<<<<<<<<
 * 
 *         self.n_field_tables = tf_obj.n_field_tables
 */
  __Pyx_INCREF(__pyx_v_tf_obj);
  __Pyx_GIVEREF(__pyx_v_tf_obj);
  __Pyx_GOTREF(__pyx_v_self->tf_obj);
  __Pyx_DECREF(__pyx_v_self->tf_obj);
  __pyx_v_self->tf_obj = __pyx_v_tf_obj;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":380
 *         self.tf_obj = tf_obj
 * 
 *         self.n_field_tables = tf_obj.n_field_tables             # <<<<<<<<<<<<<<
 * 
 *         self.my_field_tables = []
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_n_s__n_field_tables); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->n_field_tables = __pyx_t_2;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":382
 *         self.n_field_tables = tf_obj.n_field_tables
 * 
 *         self.my_field_tables = []             # <<<<<<<<<<<<<<
 *         for i in range(self.n_field_tables):
 *             temp = tf_obj.tables[i].y
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __Pyx_GOTREF(__pyx_v_self->my_field_tables);
  __Pyx_DECREF(__pyx_v_self->my_field_tables);
  __pyx_v_self->my_field_tables = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":383
 * 
 *         self.my_field_tables = []
 *         for i in range(self.n_field_tables):             # <<<<<<<<<<<<<<
 *             temp = tf_obj.tables[i].y
 *             FIT_initialize_table(&self.field_tables[i],
 */
  __pyx_t_2 = __pyx_v_self->n_field_tables;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":384
 *         self.my_field_tables = []
 *         for i in range(self.n_field_tables):
 *             temp = tf_obj.tables[i].y             # <<<<<<<<<<<<<<
 *             FIT_initialize_table(&self.field_tables[i],
 *                       temp.shape[0],
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_n_s__tables); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__y); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_temp.rcbuffer->pybuffer);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_temp.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_6 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_temp.rcbuffer->pybuffer, (PyObject*)__pyx_v_temp, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_temp.diminfo[0].strides = __pyx_pybuffernd_temp.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_temp.diminfo[0].shape = __pyx_pybuffernd_temp.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = 0;
    __Pyx_XDECREF(((PyObject *)__pyx_v_temp));
    __pyx_v_temp = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":388
 *                       temp.shape[0],
 *                       <np.float64_t *> temp.data,
 *                       tf_obj.tables[i].x_bounds[0],             # <<<<<<<<<<<<<<
 *                       tf_obj.tables[i].x_bounds[1],
 *                       tf_obj.field_ids[i], tf_obj.weight_field_ids[i],
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_n_s__tables); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__x_bounds); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":389
 *                       <np.float64_t *> temp.data,
 *                       tf_obj.tables[i].x_bounds[0],
 *                       tf_obj.tables[i].x_bounds[1],             # <<<<<<<<<<<<<<
 *                       tf_obj.field_ids[i], tf_obj.weight_field_ids[i],
 *                       tf_obj.weight_table_ids[i],
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_n_s__tables); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__x_bounds); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_11 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":390
 *                       tf_obj.tables[i].x_bounds[0],
 *                       tf_obj.tables[i].x_bounds[1],
 *                       tf_obj.field_ids[i], tf_obj.weight_field_ids[i],             # <<<<<<<<<<<<<<
 *                       tf_obj.weight_table_ids[i],
 *                       tf_obj.tables[i].pass_through)
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_n_s__field_ids); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_n_s__weight_field_ids); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":391
 *                       tf_obj.tables[i].x_bounds[1],
 *                       tf_obj.field_ids[i], tf_obj.weight_field_ids[i],
 *                       tf_obj.weight_table_ids[i],             # <<<<<<<<<<<<<<
 *                       tf_obj.tables[i].pass_through)
 *             self.my_field_tables.append((tf_obj.tables[i],
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_n_s__weight_table_ids); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":392
 *                       tf_obj.field_ids[i], tf_obj.weight_field_ids[i],
 *                       tf_obj.weight_table_ids[i],
 *                       tf_obj.tables[i].pass_through)             # <<<<<<<<<<<<<<
 *             self.my_field_tables.append((tf_obj.tables[i],
 *                                          tf_obj.tables[i].y))
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_n_s__tables); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__pass_through); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_15.__pyx_n = 3;
    __pyx_t_15.weight_field_id = __pyx_t_12;
    __pyx_t_15.weight_table_id = __pyx_t_13;
    __pyx_t_15.pass_through = __pyx_t_14;
    __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_FIT_initialize_table((&(__pyx_v_self->field_tables[__pyx_v_i])), (__pyx_v_temp->dimensions[0]), ((__pyx_t_5numpy_float64_t *)__pyx_v_temp->data), __pyx_t_10, __pyx_t_11, __pyx_t_6, &__pyx_t_15); 

    /* "yt/utilities/lib/VolumeIntegrator.pyx":393
 *                       tf_obj.weight_table_ids[i],
 *                       tf_obj.tables[i].pass_through)
 *             self.my_field_tables.append((tf_obj.tables[i],             # <<<<<<<<<<<<<<
 *                                          tf_obj.tables[i].y))
 *             self.field_tables[i].field_id = tf_obj.field_ids[i]
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_n_s__tables); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":394
 *                       tf_obj.tables[i].pass_through)
 *             self.my_field_tables.append((tf_obj.tables[i],
 *                                          tf_obj.tables[i].y))             # <<<<<<<<<<<<<<
 *             self.field_tables[i].field_id = tf_obj.field_ids[i]
 *             self.field_tables[i].weight_field_id = tf_obj.weight_field_ids[i]
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_n_s__tables); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_16) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_16, __pyx_n_s__y); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_1 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_self->my_field_tables, ((PyObject *)__pyx_t_16)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":395
 *             self.my_field_tables.append((tf_obj.tables[i],
 *                                          tf_obj.tables[i].y))
 *             self.field_tables[i].field_id = tf_obj.field_ids[i]             # <<<<<<<<<<<<<<
 *             self.field_tables[i].weight_field_id = tf_obj.weight_field_ids[i]
 *             #print "Field table", i, "corresponds to",
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_n_s__field_ids); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_16) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_16); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    (__pyx_v_self->field_tables[__pyx_v_i]).field_id = __pyx_t_14;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":396
 *                                          tf_obj.tables[i].y))
 *             self.field_tables[i].field_id = tf_obj.field_ids[i]
 *             self.field_tables[i].weight_field_id = tf_obj.weight_field_ids[i]             # <<<<<<<<<<<<<<
 *             #print "Field table", i, "corresponds to",
 *             #print self.field_tables[i].field_id,
 */
    __pyx_t_16 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_n_s__weight_field_ids); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_16, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (__pyx_v_self->field_tables[__pyx_v_i]).weight_field_id = __pyx_t_14;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":402
 *             #print ")"
 * 
 *         for i in range(6):             # <<<<<<<<<<<<<<
 *             self.field_table_ids[i] = tf_obj.field_table_ids[i]
 *             #print "Channel", i, "corresponds to", self.field_table_ids[i]
 */
  for (__pyx_t_2 = 0; __pyx_t_2 < 6; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":403
 * 
 *         for i in range(6):
 *             self.field_table_ids[i] = tf_obj.field_table_ids[i]             # <<<<<<<<<<<<<<
 *             #print "Channel", i, "corresponds to", self.field_table_ids[i]
 * 
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_tf_obj, __pyx_n_s__field_table_ids); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_16) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_16); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    (__pyx_v_self->field_table_ids[__pyx_v_i]) = __pyx_t_3;
  }

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_16);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_temp.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.TransferFunctionProxy.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_temp.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_temp);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":408
 *     @cython.boundscheck(False)
 *     @cython.wraparound(False)
 *     cdef void eval_transfer(self, np.float64_t dt, np.float64_t *dvs,             # <<<<<<<<<<<<<<
 *                                   np.float64_t *rgba, np.float64_t *grad):
 *         cdef int i, fid, use
 */

static void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_eval_transfer(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self, __pyx_t_5numpy_float64_t __pyx_v_dt, __pyx_t_5numpy_float64_t *__pyx_v_dvs, __pyx_t_5numpy_float64_t *__pyx_v_rgba, CYTHON_UNUSED __pyx_t_5numpy_float64_t *__pyx_v_grad) {
  int __pyx_v_i;
  int __pyx_v_fid;
  __pyx_t_5numpy_float64_t __pyx_v_ta;
  __pyx_t_5numpy_float64_t __pyx_v_istorage[6];
  __pyx_t_5numpy_float64_t __pyx_v_trgba[6];
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("eval_transfer", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":421
 *         #        use = 1
 *         #        break
 *         for i in range(6): istorage[i] = 0.0             # <<<<<<<<<<<<<<
 *         for i in range(self.n_field_tables):
 *             istorage[i] = FIT_get_value(&self.field_tables[i], dvs)
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 6; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;
    (__pyx_v_istorage[__pyx_v_i]) = 0.0;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":422
 *         #        break
 *         for i in range(6): istorage[i] = 0.0
 *         for i in range(self.n_field_tables):             # <<<<<<<<<<<<<<
 *             istorage[i] = FIT_get_value(&self.field_tables[i], dvs)
 *         # We have to do this after the interpolation
 */
  __pyx_t_1 = __pyx_v_self->n_field_tables;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":423
 *         for i in range(6): istorage[i] = 0.0
 *         for i in range(self.n_field_tables):
 *             istorage[i] = FIT_get_value(&self.field_tables[i], dvs)             # <<<<<<<<<<<<<<
 *         # We have to do this after the interpolation
 *         for i in range(self.n_field_tables):
 */
    (__pyx_v_istorage[__pyx_v_i]) = __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_FIT_get_value((&(__pyx_v_self->field_tables[__pyx_v_i])), __pyx_v_dvs);
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":425
 *             istorage[i] = FIT_get_value(&self.field_tables[i], dvs)
 *         # We have to do this after the interpolation
 *         for i in range(self.n_field_tables):             # <<<<<<<<<<<<<<
 *             fid = self.field_tables[i].weight_table_id
 *             if fid != -1: istorage[i] *= istorage[fid]
 */
  __pyx_t_1 = __pyx_v_self->n_field_tables;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":426
 *         # We have to do this after the interpolation
 *         for i in range(self.n_field_tables):
 *             fid = self.field_tables[i].weight_table_id             # <<<<<<<<<<<<<<
 *             if fid != -1: istorage[i] *= istorage[fid]
 *         for i in range(6):
 */
    __pyx_v_fid = (__pyx_v_self->field_tables[__pyx_v_i]).weight_table_id;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":427
 *         for i in range(self.n_field_tables):
 *             fid = self.field_tables[i].weight_table_id
 *             if fid != -1: istorage[i] *= istorage[fid]             # <<<<<<<<<<<<<<
 *         for i in range(6):
 *             trgba[i] = istorage[self.field_table_ids[i]]
 */
    __pyx_t_3 = (__pyx_v_fid != -1);
    if (__pyx_t_3) {
      __pyx_t_4 = __pyx_v_i;
      (__pyx_v_istorage[__pyx_t_4]) = ((__pyx_v_istorage[__pyx_t_4]) * (__pyx_v_istorage[__pyx_v_fid]));
      goto __pyx_L9;
    }
    __pyx_L9:;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":428
 *             fid = self.field_tables[i].weight_table_id
 *             if fid != -1: istorage[i] *= istorage[fid]
 *         for i in range(6):             # <<<<<<<<<<<<<<
 *             trgba[i] = istorage[self.field_table_ids[i]]
 *             #print i, trgba[i],
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 6; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":429
 *             if fid != -1: istorage[i] *= istorage[fid]
 *         for i in range(6):
 *             trgba[i] = istorage[self.field_table_ids[i]]             # <<<<<<<<<<<<<<
 *             #print i, trgba[i],
 *         #print
 */
    (__pyx_v_trgba[__pyx_v_i]) = (__pyx_v_istorage[(__pyx_v_self->field_table_ids[__pyx_v_i])]);
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":439
 *         # integration here:
 *         #   I_{i+1} = ds * C_i + (1.0 - ds*alpha_i) * I_i
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             # This is the new way: alpha corresponds to opacity of a given
 *             # slice.  Previously it was ill-defined, but represented some
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":443
 *             # slice.  Previously it was ill-defined, but represented some
 *             # measure of emissivity.
 *             ta = fmax((1.0 - dt*trgba[i+3]), 0.0)             # <<<<<<<<<<<<<<
 *             rgba[i  ] = dt*trgba[i  ] + ta * rgba[i  ]
 *             #rgba[i+3] = dt*trgba[i+3] + ta * rgba[i+3]
 */
    __pyx_v_ta = __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_fmax((1.0 - (__pyx_v_dt * (__pyx_v_trgba[(__pyx_v_i + 3)]))), 0.0);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":444
 *             # measure of emissivity.
 *             ta = fmax((1.0 - dt*trgba[i+3]), 0.0)
 *             rgba[i  ] = dt*trgba[i  ] + ta * rgba[i  ]             # <<<<<<<<<<<<<<
 *             #rgba[i+3] = dt*trgba[i+3] + ta * rgba[i+3]
 *             # This is the old way:
 */
    (__pyx_v_rgba[__pyx_v_i]) = ((__pyx_v_dt * (__pyx_v_trgba[__pyx_v_i])) + (__pyx_v_ta * (__pyx_v_rgba[__pyx_v_i])));
  }

  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_2ns_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_2ns_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_2ns___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":350
 *     cdef int n_fields
 *     cdef int n_field_tables
 *     cdef public int ns             # <<<<<<<<<<<<<<
 * 
 *     # These are the field tables and their affiliated storage.
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_2ns___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->ns); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.TransferFunctionProxy.ns.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_2ns_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_2ns_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_2ns_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_2ns_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->ns = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.TransferFunctionProxy.ns.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":364
 *     # We store a reference to the transfer function object and to the field
 *     # interpolation tables
 *     cdef public object tf_obj             # <<<<<<<<<<<<<<
 *     cdef public object my_field_tables
 * 
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->tf_obj);
  __pyx_r = __pyx_v_self->tf_obj;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->tf_obj);
  __Pyx_DECREF(__pyx_v_self->tf_obj);
  __pyx_v_self->tf_obj = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj_4__del__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->tf_obj);
  __Pyx_DECREF(__pyx_v_self->tf_obj);
  __pyx_v_self->tf_obj = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":365
 *     # interpolation tables
 *     cdef public object tf_obj
 *     cdef public object my_field_tables             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, tf_obj):
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->my_field_tables);
  __pyx_r = __pyx_v_self->my_field_tables;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->my_field_tables);
  __Pyx_DECREF(__pyx_v_self->my_field_tables);
  __pyx_v_self->my_field_tables = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables_4__del__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->my_field_tables);
  __Pyx_DECREF(__pyx_v_self->my_field_tables);
  __pyx_v_self->my_field_tables = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_vp_pos = 0;
  PyArrayObject *__pyx_v_vp_dir = 0;
  PyArrayObject *__pyx_v_center = 0;
  PyObject *__pyx_v_bounds = 0;
  PyArrayObject *__pyx_v_image = 0;
  PyArrayObject *__pyx_v_x_vec = 0;
  PyArrayObject *__pyx_v_y_vec = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__vp_pos,&__pyx_n_s__vp_dir,&__pyx_n_s__center,&__pyx_n_s__bounds,&__pyx_n_s__image,&__pyx_n_s__x_vec,&__pyx_n_s__y_vec,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vp_pos)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vp_dir)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__center)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bounds)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__image)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x_vec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y_vec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
    }
    __pyx_v_vp_pos = ((PyArrayObject *)values[0]);
    __pyx_v_vp_dir = ((PyArrayObject *)values[1]);
    __pyx_v_center = ((PyArrayObject *)values[2]);
    __pyx_v_bounds = values[3];
    __pyx_v_image = ((PyArrayObject *)values[4]);
    __pyx_v_x_vec = ((PyArrayObject *)values[5]);
    __pyx_v_y_vec = ((PyArrayObject *)values[6]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.VectorPlane.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vp_pos), __pyx_ptype_5numpy_ndarray, 1, "vp_pos", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vp_dir), __pyx_ptype_5numpy_ndarray, 1, "vp_dir", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_center), __pyx_ptype_5numpy_ndarray, 1, "center", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image), __pyx_ptype_5numpy_ndarray, 1, "image", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x_vec), __pyx_ptype_5numpy_ndarray, 1, "x_vec", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y_vec), __pyx_ptype_5numpy_ndarray, 1, "y_vec", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane___cinit__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self), __pyx_v_vp_pos, __pyx_v_vp_dir, __pyx_v_center, __pyx_v_bounds, __pyx_v_image, __pyx_v_x_vec, __pyx_v_y_vec);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":461
 *     cdef np.float64_t *x_vec, *y_vec
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   np.ndarray[np.float64_t, ndim=3] vp_pos,
 *                   np.ndarray vp_dir,
 */

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane___cinit__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, PyArrayObject *__pyx_v_vp_pos, PyArrayObject *__pyx_v_vp_dir, PyArrayObject *__pyx_v_center, PyObject *__pyx_v_bounds, PyArrayObject *__pyx_v_image, PyArrayObject *__pyx_v_x_vec, PyArrayObject *__pyx_v_y_vec) {
  int __pyx_v_i;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_center;
  __Pyx_Buffer __pyx_pybuffer_center;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_image;
  __Pyx_Buffer __pyx_pybuffer_image;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_vp_pos;
  __Pyx_Buffer __pyx_pybuffer_vp_pos;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_x_vec;
  __Pyx_Buffer __pyx_pybuffer_x_vec;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_y_vec;
  __Pyx_Buffer __pyx_pybuffer_y_vec;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __pyx_t_5numpy_float64_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __pyx_pybuffer_vp_pos.pybuffer.buf = NULL;
  __pyx_pybuffer_vp_pos.refcount = 0;
  __pyx_pybuffernd_vp_pos.data = NULL;
  __pyx_pybuffernd_vp_pos.rcbuffer = &__pyx_pybuffer_vp_pos;
  __pyx_pybuffer_center.pybuffer.buf = NULL;
  __pyx_pybuffer_center.refcount = 0;
  __pyx_pybuffernd_center.data = NULL;
  __pyx_pybuffernd_center.rcbuffer = &__pyx_pybuffer_center;
  __pyx_pybuffer_image.pybuffer.buf = NULL;
  __pyx_pybuffer_image.refcount = 0;
  __pyx_pybuffernd_image.data = NULL;
  __pyx_pybuffernd_image.rcbuffer = &__pyx_pybuffer_image;
  __pyx_pybuffer_x_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_x_vec.refcount = 0;
  __pyx_pybuffernd_x_vec.data = NULL;
  __pyx_pybuffernd_x_vec.rcbuffer = &__pyx_pybuffer_x_vec;
  __pyx_pybuffer_y_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_y_vec.refcount = 0;
  __pyx_pybuffernd_y_vec.data = NULL;
  __pyx_pybuffernd_y_vec.rcbuffer = &__pyx_pybuffer_y_vec;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vp_pos.rcbuffer->pybuffer, (PyObject*)__pyx_v_vp_pos, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_vp_pos.diminfo[0].strides = __pyx_pybuffernd_vp_pos.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vp_pos.diminfo[0].shape = __pyx_pybuffernd_vp_pos.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vp_pos.diminfo[1].strides = __pyx_pybuffernd_vp_pos.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vp_pos.diminfo[1].shape = __pyx_pybuffernd_vp_pos.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_vp_pos.diminfo[2].strides = __pyx_pybuffernd_vp_pos.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_vp_pos.diminfo[2].shape = __pyx_pybuffernd_vp_pos.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_center.rcbuffer->pybuffer, (PyObject*)__pyx_v_center, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_center.diminfo[0].strides = __pyx_pybuffernd_center.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_center.diminfo[0].shape = __pyx_pybuffernd_center.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_image.rcbuffer->pybuffer, (PyObject*)__pyx_v_image, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_image.diminfo[0].strides = __pyx_pybuffernd_image.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_image.diminfo[0].shape = __pyx_pybuffernd_image.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_image.diminfo[1].strides = __pyx_pybuffernd_image.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_image.diminfo[1].shape = __pyx_pybuffernd_image.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_image.diminfo[2].strides = __pyx_pybuffernd_image.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_image.diminfo[2].shape = __pyx_pybuffernd_image.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_x_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_x_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_x_vec.diminfo[0].strides = __pyx_pybuffernd_x_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_x_vec.diminfo[0].shape = __pyx_pybuffernd_x_vec.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_y_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_y_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_y_vec.diminfo[0].strides = __pyx_pybuffernd_y_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_y_vec.diminfo[0].shape = __pyx_pybuffernd_y_vec.rcbuffer->pybuffer.shape[0];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":470
 *                   np.ndarray[np.float64_t, ndim=1] y_vec):
 *         cdef int i, j
 *         self.avp_pos = vp_pos             # <<<<<<<<<<<<<<
 *         self.avp_dir = vp_dir
 *         self.acenter = center
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_vp_pos));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_vp_pos));
  __Pyx_GOTREF(__pyx_v_self->avp_pos);
  __Pyx_DECREF(__pyx_v_self->avp_pos);
  __pyx_v_self->avp_pos = ((PyObject *)__pyx_v_vp_pos);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":471
 *         cdef int i, j
 *         self.avp_pos = vp_pos
 *         self.avp_dir = vp_dir             # <<<<<<<<<<<<<<
 *         self.acenter = center
 *         self.aimage = image
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_vp_dir));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_vp_dir));
  __Pyx_GOTREF(__pyx_v_self->avp_dir);
  __Pyx_DECREF(__pyx_v_self->avp_dir);
  __pyx_v_self->avp_dir = ((PyObject *)__pyx_v_vp_dir);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":472
 *         self.avp_pos = vp_pos
 *         self.avp_dir = vp_dir
 *         self.acenter = center             # <<<<<<<<<<<<<<
 *         self.aimage = image
 *         self.ax_vec = x_vec
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_center));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_center));
  __Pyx_GOTREF(__pyx_v_self->acenter);
  __Pyx_DECREF(__pyx_v_self->acenter);
  __pyx_v_self->acenter = ((PyObject *)__pyx_v_center);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":473
 *         self.avp_dir = vp_dir
 *         self.acenter = center
 *         self.aimage = image             # <<<<<<<<<<<<<<
 *         self.ax_vec = x_vec
 *         self.ay_vec = y_vec
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_image));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_image));
  __Pyx_GOTREF(__pyx_v_self->aimage);
  __Pyx_DECREF(__pyx_v_self->aimage);
  __pyx_v_self->aimage = ((PyObject *)__pyx_v_image);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":474
 *         self.acenter = center
 *         self.aimage = image
 *         self.ax_vec = x_vec             # <<<<<<<<<<<<<<
 *         self.ay_vec = y_vec
 *         self.vp_pos = <np.float64_t *> vp_pos.data
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_x_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_x_vec));
  __Pyx_GOTREF(__pyx_v_self->ax_vec);
  __Pyx_DECREF(__pyx_v_self->ax_vec);
  __pyx_v_self->ax_vec = ((PyObject *)__pyx_v_x_vec);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":475
 *         self.aimage = image
 *         self.ax_vec = x_vec
 *         self.ay_vec = y_vec             # <<<<<<<<<<<<<<
 *         self.vp_pos = <np.float64_t *> vp_pos.data
 *         self.vp_dir = <np.float64_t *> vp_dir.data
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_y_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_y_vec));
  __Pyx_GOTREF(__pyx_v_self->ay_vec);
  __Pyx_DECREF(__pyx_v_self->ay_vec);
  __pyx_v_self->ay_vec = ((PyObject *)__pyx_v_y_vec);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":476
 *         self.ax_vec = x_vec
 *         self.ay_vec = y_vec
 *         self.vp_pos = <np.float64_t *> vp_pos.data             # <<<<<<<<<<<<<<
 *         self.vp_dir = <np.float64_t *> vp_dir.data
 *         self.center = <np.float64_t *> center.data
 */
  __pyx_v_self->vp_pos = ((__pyx_t_5numpy_float64_t *)__pyx_v_vp_pos->data);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":477
 *         self.ay_vec = y_vec
 *         self.vp_pos = <np.float64_t *> vp_pos.data
 *         self.vp_dir = <np.float64_t *> vp_dir.data             # <<<<<<<<<<<<<<
 *         self.center = <np.float64_t *> center.data
 *         self.image = <np.float64_t *> image.data
 */
  __pyx_v_self->vp_dir = ((__pyx_t_5numpy_float64_t *)__pyx_v_vp_dir->data);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":478
 *         self.vp_pos = <np.float64_t *> vp_pos.data
 *         self.vp_dir = <np.float64_t *> vp_dir.data
 *         self.center = <np.float64_t *> center.data             # <<<<<<<<<<<<<<
 *         self.image = <np.float64_t *> image.data
 *         self.x_vec = <np.float64_t *> x_vec.data
 */
  __pyx_v_self->center = ((__pyx_t_5numpy_float64_t *)__pyx_v_center->data);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":479
 *         self.vp_dir = <np.float64_t *> vp_dir.data
 *         self.center = <np.float64_t *> center.data
 *         self.image = <np.float64_t *> image.data             # <<<<<<<<<<<<<<
 *         self.x_vec = <np.float64_t *> x_vec.data
 *         self.y_vec = <np.float64_t *> y_vec.data
 */
  __pyx_v_self->image = ((__pyx_t_5numpy_float64_t *)__pyx_v_image->data);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":480
 *         self.center = <np.float64_t *> center.data
 *         self.image = <np.float64_t *> image.data
 *         self.x_vec = <np.float64_t *> x_vec.data             # <<<<<<<<<<<<<<
 *         self.y_vec = <np.float64_t *> y_vec.data
 *         self.nv[0] = vp_pos.shape[0]
 */
  __pyx_v_self->x_vec = ((__pyx_t_5numpy_float64_t *)__pyx_v_x_vec->data);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":481
 *         self.image = <np.float64_t *> image.data
 *         self.x_vec = <np.float64_t *> x_vec.data
 *         self.y_vec = <np.float64_t *> y_vec.data             # <<<<<<<<<<<<<<
 *         self.nv[0] = vp_pos.shape[0]
 *         self.nv[1] = vp_pos.shape[1]
 */
  __pyx_v_self->y_vec = ((__pyx_t_5numpy_float64_t *)__pyx_v_y_vec->data);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":482
 *         self.x_vec = <np.float64_t *> x_vec.data
 *         self.y_vec = <np.float64_t *> y_vec.data
 *         self.nv[0] = vp_pos.shape[0]             # <<<<<<<<<<<<<<
 *         self.nv[1] = vp_pos.shape[1]
 *         for i in range(4): self.bounds[i] = bounds[i]
 */
  (__pyx_v_self->nv[0]) = (__pyx_v_vp_pos->dimensions[0]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":483
 *         self.y_vec = <np.float64_t *> y_vec.data
 *         self.nv[0] = vp_pos.shape[0]
 *         self.nv[1] = vp_pos.shape[1]             # <<<<<<<<<<<<<<
 *         for i in range(4): self.bounds[i] = bounds[i]
 *         self.pdx = (self.bounds[1] - self.bounds[0])/self.nv[0]
 */
  (__pyx_v_self->nv[1]) = (__pyx_v_vp_pos->dimensions[1]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":484
 *         self.nv[0] = vp_pos.shape[0]
 *         self.nv[1] = vp_pos.shape[1]
 *         for i in range(4): self.bounds[i] = bounds[i]             # <<<<<<<<<<<<<<
 *         self.pdx = (self.bounds[1] - self.bounds[0])/self.nv[0]
 *         self.pdy = (self.bounds[3] - self.bounds[2])/self.nv[1]
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 4; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_bounds, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    (__pyx_v_self->bounds[__pyx_v_i]) = __pyx_t_3;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":485
 *         self.nv[1] = vp_pos.shape[1]
 *         for i in range(4): self.bounds[i] = bounds[i]
 *         self.pdx = (self.bounds[1] - self.bounds[0])/self.nv[0]             # <<<<<<<<<<<<<<
 *         self.pdy = (self.bounds[3] - self.bounds[2])/self.nv[1]
 *         for i in range(3):
 */
  __pyx_t_3 = ((__pyx_v_self->bounds[1]) - (__pyx_v_self->bounds[0]));
  if (unlikely((__pyx_v_self->nv[0]) == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "float division");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_self->pdx = (__pyx_t_3 / (__pyx_v_self->nv[0]));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":486
 *         for i in range(4): self.bounds[i] = bounds[i]
 *         self.pdx = (self.bounds[1] - self.bounds[0])/self.nv[0]
 *         self.pdy = (self.bounds[3] - self.bounds[2])/self.nv[1]             # <<<<<<<<<<<<<<
 *         for i in range(3):
 *             self.vp_strides[i] = vp_pos.strides[i] / 8
 */
  __pyx_t_3 = ((__pyx_v_self->bounds[3]) - (__pyx_v_self->bounds[2]));
  if (unlikely((__pyx_v_self->nv[1]) == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "float division");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_self->pdy = (__pyx_t_3 / (__pyx_v_self->nv[1]));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":487
 *         self.pdx = (self.bounds[1] - self.bounds[0])/self.nv[0]
 *         self.pdy = (self.bounds[3] - self.bounds[2])/self.nv[1]
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             self.vp_strides[i] = vp_pos.strides[i] / 8
 *             self.im_strides[i] = image.strides[i] / 8
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":488
 *         self.pdy = (self.bounds[3] - self.bounds[2])/self.nv[1]
 *         for i in range(3):
 *             self.vp_strides[i] = vp_pos.strides[i] / 8             # <<<<<<<<<<<<<<
 *             self.im_strides[i] = image.strides[i] / 8
 *         if vp_dir.ndim > 1:
 */
    (__pyx_v_self->vp_strides[__pyx_v_i]) = __Pyx_div_long((__pyx_v_vp_pos->strides[__pyx_v_i]), 8);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":489
 *         for i in range(3):
 *             self.vp_strides[i] = vp_pos.strides[i] / 8
 *             self.im_strides[i] = image.strides[i] / 8             # <<<<<<<<<<<<<<
 *         if vp_dir.ndim > 1:
 *             for i in range(3):
 */
    (__pyx_v_self->im_strides[__pyx_v_i]) = __Pyx_div_long((__pyx_v_image->strides[__pyx_v_i]), 8);
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":490
 *             self.vp_strides[i] = vp_pos.strides[i] / 8
 *             self.im_strides[i] = image.strides[i] / 8
 *         if vp_dir.ndim > 1:             # <<<<<<<<<<<<<<
 *             for i in range(3):
 *                 self.vd_strides[i] = vp_dir.strides[i] / 8
 */
  __pyx_t_4 = (__pyx_v_vp_dir->nd > 1);
  if (__pyx_t_4) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":491
 *             self.im_strides[i] = image.strides[i] / 8
 *         if vp_dir.ndim > 1:
 *             for i in range(3):             # <<<<<<<<<<<<<<
 *                 self.vd_strides[i] = vp_dir.strides[i] / 8
 *         else:
 */
    for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
      __pyx_v_i = __pyx_t_1;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":492
 *         if vp_dir.ndim > 1:
 *             for i in range(3):
 *                 self.vd_strides[i] = vp_dir.strides[i] / 8             # <<<<<<<<<<<<<<
 *         else:
 *             self.vd_strides[0] = self.vd_strides[1] = self.vd_strides[2] = -1
 */
      (__pyx_v_self->vd_strides[__pyx_v_i]) = __Pyx_div_long((__pyx_v_vp_dir->strides[__pyx_v_i]), 8);
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":494
 *                 self.vd_strides[i] = vp_dir.strides[i] / 8
 *         else:
 *             self.vd_strides[0] = self.vd_strides[1] = self.vd_strides[2] = -1             # <<<<<<<<<<<<<<
 * 
 *     @cython.boundscheck(False)
 */
    (__pyx_v_self->vd_strides[0]) = -1;
    (__pyx_v_self->vd_strides[1]) = -1;
    (__pyx_v_self->vd_strides[2]) = -1;
  }
  __pyx_L7:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_center.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_image.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vp_pos.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x_vec.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y_vec.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.VectorPlane.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_center.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_image.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vp_pos.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_x_vec.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_y_vec.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":498
 *     @cython.boundscheck(False)
 *     @cython.wraparound(False)
 *     cdef void get_start_stop(self, np.float64_t *ex, int *rv):             # <<<<<<<<<<<<<<
 *         # Extrema need to be re-centered
 *         cdef np.float64_t cx, cy
 */

static void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_get_start_stop(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, __pyx_t_5numpy_float64_t *__pyx_v_ex, int *__pyx_v_rv) {
  __pyx_t_5numpy_float64_t __pyx_v_cx;
  __pyx_t_5numpy_float64_t __pyx_v_cy;
  int __pyx_v_i;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __pyx_t_5numpy_float64_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_start_stop", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":502
 *         cdef np.float64_t cx, cy
 *         cdef int i
 *         cx = cy = 0.0             # <<<<<<<<<<<<<<
 *         for i in range(3):
 *             cx += self.center[i] * self.x_vec[i]
 */
  __pyx_v_cx = 0.0;
  __pyx_v_cy = 0.0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":503
 *         cdef int i
 *         cx = cy = 0.0
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             cx += self.center[i] * self.x_vec[i]
 *             cy += self.center[i] * self.y_vec[i]
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":504
 *         cx = cy = 0.0
 *         for i in range(3):
 *             cx += self.center[i] * self.x_vec[i]             # <<<<<<<<<<<<<<
 *             cy += self.center[i] * self.y_vec[i]
 *         rv[0] = lrint((ex[0] - cx - self.bounds[0])/self.pdx)
 */
    __pyx_v_cx = (__pyx_v_cx + ((__pyx_v_self->center[__pyx_v_i]) * (__pyx_v_self->x_vec[__pyx_v_i])));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":505
 *         for i in range(3):
 *             cx += self.center[i] * self.x_vec[i]
 *             cy += self.center[i] * self.y_vec[i]             # <<<<<<<<<<<<<<
 *         rv[0] = lrint((ex[0] - cx - self.bounds[0])/self.pdx)
 *         rv[1] = rv[0] + lrint((ex[1] - ex[0])/self.pdx)
 */
    __pyx_v_cy = (__pyx_v_cy + ((__pyx_v_self->center[__pyx_v_i]) * (__pyx_v_self->y_vec[__pyx_v_i])));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":506
 *             cx += self.center[i] * self.x_vec[i]
 *             cy += self.center[i] * self.y_vec[i]
 *         rv[0] = lrint((ex[0] - cx - self.bounds[0])/self.pdx)             # <<<<<<<<<<<<<<
 *         rv[1] = rv[0] + lrint((ex[1] - ex[0])/self.pdx)
 *         rv[2] = lrint((ex[2] - cy - self.bounds[2])/self.pdy)
 */
  __pyx_t_2 = (((__pyx_v_ex[0]) - __pyx_v_cx) - (__pyx_v_self->bounds[0]));
  if (unlikely(__pyx_v_self->pdx == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "float division");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  (__pyx_v_rv[0]) = lrint((__pyx_t_2 / __pyx_v_self->pdx));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":507
 *             cy += self.center[i] * self.y_vec[i]
 *         rv[0] = lrint((ex[0] - cx - self.bounds[0])/self.pdx)
 *         rv[1] = rv[0] + lrint((ex[1] - ex[0])/self.pdx)             # <<<<<<<<<<<<<<
 *         rv[2] = lrint((ex[2] - cy - self.bounds[2])/self.pdy)
 *         rv[3] = rv[2] + lrint((ex[3] - ex[2])/self.pdy)
 */
  __pyx_t_2 = ((__pyx_v_ex[1]) - (__pyx_v_ex[0]));
  if (unlikely(__pyx_v_self->pdx == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "float division");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  (__pyx_v_rv[1]) = ((__pyx_v_rv[0]) + lrint((__pyx_t_2 / __pyx_v_self->pdx)));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":508
 *         rv[0] = lrint((ex[0] - cx - self.bounds[0])/self.pdx)
 *         rv[1] = rv[0] + lrint((ex[1] - ex[0])/self.pdx)
 *         rv[2] = lrint((ex[2] - cy - self.bounds[2])/self.pdy)             # <<<<<<<<<<<<<<
 *         rv[3] = rv[2] + lrint((ex[3] - ex[2])/self.pdy)
 * 
 */
  __pyx_t_2 = (((__pyx_v_ex[2]) - __pyx_v_cy) - (__pyx_v_self->bounds[2]));
  if (unlikely(__pyx_v_self->pdy == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "float division");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  (__pyx_v_rv[2]) = lrint((__pyx_t_2 / __pyx_v_self->pdy));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":509
 *         rv[1] = rv[0] + lrint((ex[1] - ex[0])/self.pdx)
 *         rv[2] = lrint((ex[2] - cy - self.bounds[2])/self.pdy)
 *         rv[3] = rv[2] + lrint((ex[3] - ex[2])/self.pdy)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline void copy_into(self, np.float64_t *fv, np.float64_t *tv,
 */
  __pyx_t_2 = ((__pyx_v_ex[3]) - (__pyx_v_ex[2]));
  if (unlikely(__pyx_v_self->pdy == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "float division");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  (__pyx_v_rv[3]) = ((__pyx_v_rv[2]) + lrint((__pyx_t_2 / __pyx_v_self->pdy)));

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("yt.utilities.lib.VolumeIntegrator.VectorPlane.get_start_stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":511
 *         rv[3] = rv[2] + lrint((ex[3] - ex[2])/self.pdy)
 * 
 *     cdef inline void copy_into(self, np.float64_t *fv, np.float64_t *tv,             # <<<<<<<<<<<<<<
 *                         int i, int j, int nk, int strides[3]):
 *         # We know the first two dimensions of our from-vector, and our
 */

static CYTHON_INLINE void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_copy_into(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, __pyx_t_5numpy_float64_t *__pyx_v_fv, __pyx_t_5numpy_float64_t *__pyx_v_tv, int __pyx_v_i, int __pyx_v_j, int __pyx_v_nk, int *__pyx_v_strides) {
  int __pyx_v_k;
  int __pyx_v_offset;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("copy_into", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":516
 *         # to-vector is flat and 'ni' long
 *         cdef int k
 *         cdef int offset = strides[0] * i + strides[1] * j             # <<<<<<<<<<<<<<
 *         for k in range(nk):
 *             tv[k] = fv[offset + k]
 */
  __pyx_v_offset = (((__pyx_v_strides[0]) * __pyx_v_i) + ((__pyx_v_strides[1]) * __pyx_v_j));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":517
 *         cdef int k
 *         cdef int offset = strides[0] * i + strides[1] * j
 *         for k in range(nk):             # <<<<<<<<<<<<<<
 *             tv[k] = fv[offset + k]
 * 
 */
  __pyx_t_1 = __pyx_v_nk;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_k = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":518
 *         cdef int offset = strides[0] * i + strides[1] * j
 *         for k in range(nk):
 *             tv[k] = fv[offset + k]             # <<<<<<<<<<<<<<
 * 
 *     cdef inline void copy_back(self, np.float64_t *fv, np.float64_t *tv,
 */
    (__pyx_v_tv[__pyx_v_k]) = (__pyx_v_fv[(__pyx_v_offset + __pyx_v_k)]);
  }

  __Pyx_RefNannyFinishContext();
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":520
 *             tv[k] = fv[offset + k]
 * 
 *     cdef inline void copy_back(self, np.float64_t *fv, np.float64_t *tv,             # <<<<<<<<<<<<<<
 *                         int i, int j, int nk, int strides[3]):
 *         cdef int k
 */

static CYTHON_INLINE void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_copy_back(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, __pyx_t_5numpy_float64_t *__pyx_v_fv, __pyx_t_5numpy_float64_t *__pyx_v_tv, int __pyx_v_i, int __pyx_v_j, int __pyx_v_nk, int *__pyx_v_strides) {
  int __pyx_v_k;
  int __pyx_v_offset;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("copy_back", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":523
 *                         int i, int j, int nk, int strides[3]):
 *         cdef int k
 *         cdef int offset = strides[0] * i + strides[1] * j             # <<<<<<<<<<<<<<
 *         for k in range(nk):
 *             tv[offset + k] = fv[k]
 */
  __pyx_v_offset = (((__pyx_v_strides[0]) * __pyx_v_i) + ((__pyx_v_strides[1]) * __pyx_v_j));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":524
 *         cdef int k
 *         cdef int offset = strides[0] * i + strides[1] * j
 *         for k in range(nk):             # <<<<<<<<<<<<<<
 *             tv[offset + k] = fv[k]
 * 
 */
  __pyx_t_1 = __pyx_v_nk;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_k = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":525
 *         cdef int offset = strides[0] * i + strides[1] * j
 *         for k in range(nk):
 *             tv[offset + k] = fv[k]             # <<<<<<<<<<<<<<
 * 
 * cdef struct AdaptiveRayPacket
 */
    (__pyx_v_tv[(__pyx_v_offset + __pyx_v_k)]) = (__pyx_v_fv[__pyx_v_k]);
  }

  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":451
 * 
 * cdef class VectorPlane:
 *     cdef public object avp_pos, avp_dir, acenter, aimage             # <<<<<<<<<<<<<<
 *     cdef np.float64_t *vp_pos, *vp_dir, *center, *image,
 *     cdef np.float64_t pdx, pdy, bounds[4]
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->avp_pos);
  __pyx_r = __pyx_v_self->avp_pos;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->avp_pos);
  __Pyx_DECREF(__pyx_v_self->avp_pos);
  __pyx_v_self->avp_pos = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos_4__del__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->avp_pos);
  __Pyx_DECREF(__pyx_v_self->avp_pos);
  __pyx_v_self->avp_pos = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->avp_dir);
  __pyx_r = __pyx_v_self->avp_dir;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->avp_dir);
  __Pyx_DECREF(__pyx_v_self->avp_dir);
  __pyx_v_self->avp_dir = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir_4__del__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->avp_dir);
  __Pyx_DECREF(__pyx_v_self->avp_dir);
  __pyx_v_self->avp_dir = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->acenter);
  __pyx_r = __pyx_v_self->acenter;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->acenter);
  __Pyx_DECREF(__pyx_v_self->acenter);
  __pyx_v_self->acenter = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter_4__del__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->acenter);
  __Pyx_DECREF(__pyx_v_self->acenter);
  __pyx_v_self->acenter = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->aimage);
  __pyx_r = __pyx_v_self->aimage;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->aimage);
  __Pyx_DECREF(__pyx_v_self->aimage);
  __pyx_v_self->aimage = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage_4__del__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->aimage);
  __Pyx_DECREF(__pyx_v_self->aimage);
  __pyx_v_self->aimage = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":458
 *     cdef int im_strides[3]
 *     cdef int vd_strides[3]
 *     cdef public object ax_vec, ay_vec             # <<<<<<<<<<<<<<
 *     cdef np.float64_t *x_vec, *y_vec
 * 
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->ax_vec);
  __pyx_r = __pyx_v_self->ax_vec;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->ax_vec);
  __Pyx_DECREF(__pyx_v_self->ax_vec);
  __pyx_v_self->ax_vec = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec_4__del__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->ax_vec);
  __Pyx_DECREF(__pyx_v_self->ax_vec);
  __pyx_v_self->ax_vec = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->ay_vec);
  __pyx_r = __pyx_v_self->ay_vec;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->ay_vec);
  __Pyx_DECREF(__pyx_v_self->ay_vec);
  __pyx_v_self->ay_vec = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec_4__del__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->ay_vec);
  __Pyx_DECREF(__pyx_v_self->ay_vec);
  __pyx_v_self->ay_vec = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_parent_grid_id;
  int __pyx_v_n_fields;
  PyObject *__pyx_v_data = 0;
  PyArrayObject *__pyx_v_left_edge = 0;
  PyArrayObject *__pyx_v_right_edge = 0;
  PyArrayObject *__pyx_v_dims = 0;
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_star_tree = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__parent_grid_id,&__pyx_n_s__n_fields,&__pyx_n_s__data,&__pyx_n_s__left_edge,&__pyx_n_s__right_edge,&__pyx_n_s__dims,&__pyx_n_s__star_tree,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};

    /* "yt/utilities/lib/VolumeIntegrator.pyx":554
 *                   np.ndarray[np.float64_t, ndim=1] right_edge,
 *                   np.ndarray[np.int64_t, ndim=1] dims,
 *                   star_kdtree_container star_tree = None):             # <<<<<<<<<<<<<<
 *         # The data is likely brought in via a slice, so we copy it
 *         cdef int i, j, k, size
 */
    values[6] = (PyObject *)((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parent_grid_id)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__n_fields)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 6, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 6, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left_edge)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 6, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right_edge)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 6, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dims)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 6, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__star_tree);
          if (value) { values[6] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_parent_grid_id = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_parent_grid_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_n_fields = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_n_fields == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_data = values[2];
    __pyx_v_left_edge = ((PyArrayObject *)values[3]);
    __pyx_v_right_edge = ((PyArrayObject *)values[4]);
    __pyx_v_dims = ((PyArrayObject *)values[5]);
    __pyx_v_star_tree = ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *)values[6]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 6, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.PartitionedGrid.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left_edge), __pyx_ptype_5numpy_ndarray, 1, "left_edge", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __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 = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dims), __pyx_ptype_5numpy_ndarray, 1, "dims", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_star_tree), __pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container, 1, "star_tree", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid___cinit__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self), __pyx_v_parent_grid_id, __pyx_v_n_fields, __pyx_v_data, __pyx_v_left_edge, __pyx_v_right_edge, __pyx_v_dims, __pyx_v_star_tree);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":549
 *     @cython.boundscheck(False)
 *     @cython.wraparound(False)
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   int parent_grid_id, int n_fields, data,
 *                   np.ndarray[np.float64_t, ndim=1] left_edge,
 */

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid___cinit__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, int __pyx_v_parent_grid_id, int __pyx_v_n_fields, PyObject *__pyx_v_data, PyArrayObject *__pyx_v_left_edge, PyArrayObject *__pyx_v_right_edge, PyArrayObject *__pyx_v_dims, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_star_tree) {
  int __pyx_v_i;
  PyArrayObject *__pyx_v_tdata = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_dims;
  __Pyx_Buffer __pyx_pybuffer_dims;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left_edge;
  __Pyx_Buffer __pyx_pybuffer_left_edge;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right_edge;
  __Pyx_Buffer __pyx_pybuffer_right_edge;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tdata;
  __Pyx_Buffer __pyx_pybuffer_tdata;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  __pyx_t_5numpy_float64_t __pyx_t_5;
  int __pyx_t_6;
  __pyx_t_5numpy_int64_t __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyArrayObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __pyx_pybuffer_tdata.pybuffer.buf = NULL;
  __pyx_pybuffer_tdata.refcount = 0;
  __pyx_pybuffernd_tdata.data = NULL;
  __pyx_pybuffernd_tdata.rcbuffer = &__pyx_pybuffer_tdata;
  __pyx_pybuffer_left_edge.pybuffer.buf = NULL;
  __pyx_pybuffer_left_edge.refcount = 0;
  __pyx_pybuffernd_left_edge.data = NULL;
  __pyx_pybuffernd_left_edge.rcbuffer = &__pyx_pybuffer_left_edge;
  __pyx_pybuffer_right_edge.pybuffer.buf = NULL;
  __pyx_pybuffer_right_edge.refcount = 0;
  __pyx_pybuffernd_right_edge.data = NULL;
  __pyx_pybuffernd_right_edge.rcbuffer = &__pyx_pybuffer_right_edge;
  __pyx_pybuffer_dims.pybuffer.buf = NULL;
  __pyx_pybuffer_dims.refcount = 0;
  __pyx_pybuffernd_dims.data = NULL;
  __pyx_pybuffernd_dims.rcbuffer = &__pyx_pybuffer_dims;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_edge.rcbuffer->pybuffer, (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 = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left_edge.diminfo[0].strides = __pyx_pybuffernd_left_edge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_edge.diminfo[0].shape = __pyx_pybuffernd_left_edge.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_edge.rcbuffer->pybuffer, (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 = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right_edge.diminfo[0].strides = __pyx_pybuffernd_right_edge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_edge.diminfo[0].shape = __pyx_pybuffernd_right_edge.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dims.rcbuffer->pybuffer, (PyObject*)__pyx_v_dims, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_dims.diminfo[0].strides = __pyx_pybuffernd_dims.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dims.diminfo[0].shape = __pyx_pybuffernd_dims.rcbuffer->pybuffer.shape[0];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":558
 *         cdef int i, j, k, size
 *         cdef np.ndarray[np.float64_t, ndim=3] tdata
 *         self.parent_grid_id = parent_grid_id             # <<<<<<<<<<<<<<
 *         self.LeftEdge = left_edge
 *         self.RightEdge = right_edge
 */
  __pyx_v_self->parent_grid_id = __pyx_v_parent_grid_id;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":559
 *         cdef np.ndarray[np.float64_t, ndim=3] tdata
 *         self.parent_grid_id = parent_grid_id
 *         self.LeftEdge = left_edge             # <<<<<<<<<<<<<<
 *         self.RightEdge = right_edge
 *         for i in range(3):
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_left_edge));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left_edge));
  __Pyx_GOTREF(__pyx_v_self->LeftEdge);
  __Pyx_DECREF(__pyx_v_self->LeftEdge);
  __pyx_v_self->LeftEdge = ((PyObject *)__pyx_v_left_edge);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":560
 *         self.parent_grid_id = parent_grid_id
 *         self.LeftEdge = left_edge
 *         self.RightEdge = right_edge             # <<<<<<<<<<<<<<
 *         for i in range(3):
 *             self.left_edge[i] = left_edge[i]
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_right_edge));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_right_edge));
  __Pyx_GOTREF(__pyx_v_self->RightEdge);
  __Pyx_DECREF(__pyx_v_self->RightEdge);
  __pyx_v_self->RightEdge = ((PyObject *)__pyx_v_right_edge);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":561
 *         self.LeftEdge = left_edge
 *         self.RightEdge = right_edge
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             self.left_edge[i] = left_edge[i]
 *             self.right_edge[i] = right_edge[i]
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":562
 *         self.RightEdge = right_edge
 *         for i in range(3):
 *             self.left_edge[i] = left_edge[i]             # <<<<<<<<<<<<<<
 *             self.right_edge[i] = right_edge[i]
 *             self.dims[i] = dims[i]
 */
    __pyx_t_2 = __pyx_v_i;
    (__pyx_v_self->left_edge[__pyx_v_i]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left_edge.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_left_edge.diminfo[0].strides));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":563
 *         for i in range(3):
 *             self.left_edge[i] = left_edge[i]
 *             self.right_edge[i] = right_edge[i]             # <<<<<<<<<<<<<<
 *             self.dims[i] = dims[i]
 *             self.dds[i] = (self.right_edge[i] - self.left_edge[i])/dims[i]
 */
    __pyx_t_3 = __pyx_v_i;
    (__pyx_v_self->right_edge[__pyx_v_i]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right_edge.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_right_edge.diminfo[0].strides));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":564
 *             self.left_edge[i] = left_edge[i]
 *             self.right_edge[i] = right_edge[i]
 *             self.dims[i] = dims[i]             # <<<<<<<<<<<<<<
 *             self.dds[i] = (self.right_edge[i] - self.left_edge[i])/dims[i]
 *             self.idds[i] = 1.0/self.dds[i]
 */
    __pyx_t_4 = __pyx_v_i;
    (__pyx_v_self->dims[__pyx_v_i]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dims.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_dims.diminfo[0].strides));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":565
 *             self.right_edge[i] = right_edge[i]
 *             self.dims[i] = dims[i]
 *             self.dds[i] = (self.right_edge[i] - self.left_edge[i])/dims[i]             # <<<<<<<<<<<<<<
 *             self.idds[i] = 1.0/self.dds[i]
 *         self.my_data = data
 */
    __pyx_t_5 = ((__pyx_v_self->right_edge[__pyx_v_i]) - (__pyx_v_self->left_edge[__pyx_v_i]));
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_7 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dims.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_dims.diminfo[0].strides));
    if (unlikely(__pyx_t_7 == 0)) {
      PyErr_Format(PyExc_ZeroDivisionError, "float division");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    (__pyx_v_self->dds[__pyx_v_i]) = (__pyx_t_5 / __pyx_t_7);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":566
 *             self.dims[i] = dims[i]
 *             self.dds[i] = (self.right_edge[i] - self.left_edge[i])/dims[i]
 *             self.idds[i] = 1.0/self.dds[i]             # <<<<<<<<<<<<<<
 *         self.my_data = data
 *         self.n_fields = n_fields
 */
    if (unlikely((__pyx_v_self->dds[__pyx_v_i]) == 0)) {
      PyErr_Format(PyExc_ZeroDivisionError, "float division");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    (__pyx_v_self->idds[__pyx_v_i]) = (1.0 / (__pyx_v_self->dds[__pyx_v_i]));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":567
 *             self.dds[i] = (self.right_edge[i] - self.left_edge[i])/dims[i]
 *             self.idds[i] = 1.0/self.dds[i]
 *         self.my_data = data             # <<<<<<<<<<<<<<
 *         self.n_fields = n_fields
 *         for i in range(n_fields):
 */
  __Pyx_INCREF(__pyx_v_data);
  __Pyx_GIVEREF(__pyx_v_data);
  __Pyx_GOTREF(__pyx_v_self->my_data);
  __Pyx_DECREF(__pyx_v_self->my_data);
  __pyx_v_self->my_data = __pyx_v_data;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":568
 *             self.idds[i] = 1.0/self.dds[i]
 *         self.my_data = data
 *         self.n_fields = n_fields             # <<<<<<<<<<<<<<
 *         for i in range(n_fields):
 *             tdata = data[i]
 */
  __pyx_v_self->n_fields = __pyx_v_n_fields;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":569
 *         self.my_data = data
 *         self.n_fields = n_fields
 *         for i in range(n_fields):             # <<<<<<<<<<<<<<
 *             tdata = data[i]
 *             self.data[i] = <np.float64_t *> tdata.data
 */
  __pyx_t_1 = __pyx_v_n_fields;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":570
 *         self.n_fields = n_fields
 *         for i in range(n_fields):
 *             tdata = data[i]             # <<<<<<<<<<<<<<
 *             self.data[i] = <np.float64_t *> tdata.data
 *         if star_tree is None:
 */
    __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_data, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_10 = ((PyArrayObject *)__pyx_t_9);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tdata.rcbuffer->pybuffer);
      __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tdata.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_11 < 0)) {
        PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tdata.rcbuffer->pybuffer, (PyObject*)__pyx_v_tdata, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
        }
      }
      __pyx_pybuffernd_tdata.diminfo[0].strides = __pyx_pybuffernd_tdata.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tdata.diminfo[0].shape = __pyx_pybuffernd_tdata.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_tdata.diminfo[1].strides = __pyx_pybuffernd_tdata.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_tdata.diminfo[1].shape = __pyx_pybuffernd_tdata.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_tdata.diminfo[2].strides = __pyx_pybuffernd_tdata.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_tdata.diminfo[2].shape = __pyx_pybuffernd_tdata.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_10 = 0;
    __Pyx_XDECREF(((PyObject *)__pyx_v_tdata));
    __pyx_v_tdata = ((PyArrayObject *)__pyx_t_9);
    __pyx_t_9 = 0;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":571
 *         for i in range(n_fields):
 *             tdata = data[i]
 *             self.data[i] = <np.float64_t *> tdata.data             # <<<<<<<<<<<<<<
 *         if star_tree is None:
 *             self.star_list = NULL
 */
    (__pyx_v_self->data[__pyx_v_i]) = ((__pyx_t_5numpy_float64_t *)__pyx_v_tdata->data);
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":572
 *             tdata = data[i]
 *             self.data[i] = <np.float64_t *> tdata.data
 *         if star_tree is None:             # <<<<<<<<<<<<<<
 *             self.star_list = NULL
 *         else:
 */
  __pyx_t_15 = (((PyObject *)__pyx_v_star_tree) == Py_None);
  if (__pyx_t_15) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":573
 *             self.data[i] = <np.float64_t *> tdata.data
 *         if star_tree is None:
 *             self.star_list = NULL             # <<<<<<<<<<<<<<
 *         else:
 *             self.set_star_tree(star_tree)
 */
    __pyx_v_self->star_list = NULL;
    goto __pyx_L7;
  }
  /*else*/ {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":575
 *             self.star_list = NULL
 *         else:
 *             self.set_star_tree(star_tree)             # <<<<<<<<<<<<<<
 * 
 *     def set_star_tree(self, star_kdtree_container star_tree):
 */
    __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__set_star_tree); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_INCREF(((PyObject *)__pyx_v_star_tree));
    PyTuple_SET_ITEM(__pyx_t_16, 0, ((PyObject *)__pyx_v_star_tree));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_star_tree));
    __pyx_t_17 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  }
  __pyx_L7:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dims.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_edge.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_edge.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tdata.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.PartitionedGrid.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dims.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_edge.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_edge.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tdata.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_tdata);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_3set_star_tree(PyObject *__pyx_v_self, PyObject *__pyx_v_star_tree); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_3set_star_tree(PyObject *__pyx_v_self, PyObject *__pyx_v_star_tree) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_star_tree (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_star_tree), __pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container, 1, "star_tree", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_2set_star_tree(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self), ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *)__pyx_v_star_tree));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":577
 *             self.set_star_tree(star_tree)
 * 
 *     def set_star_tree(self, star_kdtree_container star_tree):             # <<<<<<<<<<<<<<
 *         self.star_list = star_tree.tree
 *         self.star_sigma_num = 2.0*star_tree.sigma**2.0
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_2set_star_tree(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container *__pyx_v_star_tree) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_star_tree", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":578
 * 
 *     def set_star_tree(self, star_kdtree_container star_tree):
 *         self.star_list = star_tree.tree             # <<<<<<<<<<<<<<
 *         self.star_sigma_num = 2.0*star_tree.sigma**2.0
 *         self.star_er = 2.326 * star_tree.sigma
 */
  __pyx_v_self->star_list = __pyx_v_star_tree->tree;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":579
 *     def set_star_tree(self, star_kdtree_container star_tree):
 *         self.star_list = star_tree.tree
 *         self.star_sigma_num = 2.0*star_tree.sigma**2.0             # <<<<<<<<<<<<<<
 *         self.star_er = 2.326 * star_tree.sigma
 *         self.star_coeff = star_tree.coeff
 */
  __pyx_v_self->star_sigma_num = (2.0 * pow(((double)__pyx_v_star_tree->sigma), 2.0));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":580
 *         self.star_list = star_tree.tree
 *         self.star_sigma_num = 2.0*star_tree.sigma**2.0
 *         self.star_er = 2.326 * star_tree.sigma             # <<<<<<<<<<<<<<
 *         self.star_coeff = star_tree.coeff
 * 
 */
  __pyx_v_self->star_er = (2.326 * __pyx_v_star_tree->sigma);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":581
 *         self.star_sigma_num = 2.0*star_tree.sigma**2.0
 *         self.star_er = 2.326 * star_tree.sigma
 *         self.star_coeff = star_tree.coeff             # <<<<<<<<<<<<<<
 * 
 *     @cython.boundscheck(False)
 */
  __pyx_v_self->star_coeff = __pyx_v_star_tree->coeff;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_5cast_plane(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_5cast_plane(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_tf = 0;
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_vp = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cast_plane (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__tf,&__pyx_n_s__vp,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tf)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vp)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cast_plane", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cast_plane") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_tf = ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *)values[0]);
    __pyx_v_vp = ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cast_plane", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.PartitionedGrid.cast_plane", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tf), __pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy, 1, "tf", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vp), __pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane, 1, "vp", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_4cast_plane(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self), __pyx_v_tf, __pyx_v_vp);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":585
 *     @cython.boundscheck(False)
 *     @cython.wraparound(False)
 *     def cast_plane(self, TransferFunctionProxy tf, VectorPlane vp):             # <<<<<<<<<<<<<<
 *         # This routine will iterate over all of the vectors and cast each in
 *         # turn.  Might benefit from a more sophisticated intersection check,
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_4cast_plane(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_tf, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_vp) {
  int __pyx_v_vi;
  int __pyx_v_vj;
  int __pyx_v_hit;
  int __pyx_v_iter[4];
  __pyx_t_5numpy_float64_t __pyx_v_v_pos[3];
  __pyx_t_5numpy_float64_t __pyx_v_v_dir[3];
  __pyx_t_5numpy_float64_t __pyx_v_rgba[6];
  __pyx_t_5numpy_float64_t __pyx_v_extrema[4];
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cast_plane", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":592
 *         cdef int iter[4]
 *         cdef np.float64_t v_pos[3], v_dir[3], rgba[6], extrema[4]
 *         hit = 0             # <<<<<<<<<<<<<<
 *         self.calculate_extent(vp, extrema)
 *         vp.get_start_stop(extrema, iter)
 */
  __pyx_v_hit = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":593
 *         cdef np.float64_t v_pos[3], v_dir[3], rgba[6], extrema[4]
 *         hit = 0
 *         self.calculate_extent(vp, extrema)             # <<<<<<<<<<<<<<
 *         vp.get_start_stop(extrema, iter)
 *         iter[0] = iclip(iter[0]-1, 0, vp.nv[0])
 */
  ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->calculate_extent(__pyx_v_self, __pyx_v_vp, __pyx_v_extrema);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":594
 *         hit = 0
 *         self.calculate_extent(vp, extrema)
 *         vp.get_start_stop(extrema, iter)             # <<<<<<<<<<<<<<
 *         iter[0] = iclip(iter[0]-1, 0, vp.nv[0])
 *         iter[1] = iclip(iter[1]+1, 0, vp.nv[0])
 */
  ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)__pyx_v_vp->__pyx_vtab)->get_start_stop(__pyx_v_vp, __pyx_v_extrema, __pyx_v_iter);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":595
 *         self.calculate_extent(vp, extrema)
 *         vp.get_start_stop(extrema, iter)
 *         iter[0] = iclip(iter[0]-1, 0, vp.nv[0])             # <<<<<<<<<<<<<<
 *         iter[1] = iclip(iter[1]+1, 0, vp.nv[0])
 *         iter[2] = iclip(iter[2]-1, 0, vp.nv[1])
 */
  (__pyx_v_iter[0]) = __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_iclip(((__pyx_v_iter[0]) - 1), 0, (__pyx_v_vp->nv[0]));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":596
 *         vp.get_start_stop(extrema, iter)
 *         iter[0] = iclip(iter[0]-1, 0, vp.nv[0])
 *         iter[1] = iclip(iter[1]+1, 0, vp.nv[0])             # <<<<<<<<<<<<<<
 *         iter[2] = iclip(iter[2]-1, 0, vp.nv[1])
 *         iter[3] = iclip(iter[3]+1, 0, vp.nv[1])
 */
  (__pyx_v_iter[1]) = __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_iclip(((__pyx_v_iter[1]) + 1), 0, (__pyx_v_vp->nv[0]));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":597
 *         iter[0] = iclip(iter[0]-1, 0, vp.nv[0])
 *         iter[1] = iclip(iter[1]+1, 0, vp.nv[0])
 *         iter[2] = iclip(iter[2]-1, 0, vp.nv[1])             # <<<<<<<<<<<<<<
 *         iter[3] = iclip(iter[3]+1, 0, vp.nv[1])
 *         if vp.vd_strides[0] == -1:
 */
  (__pyx_v_iter[2]) = __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_iclip(((__pyx_v_iter[2]) - 1), 0, (__pyx_v_vp->nv[1]));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":598
 *         iter[1] = iclip(iter[1]+1, 0, vp.nv[0])
 *         iter[2] = iclip(iter[2]-1, 0, vp.nv[1])
 *         iter[3] = iclip(iter[3]+1, 0, vp.nv[1])             # <<<<<<<<<<<<<<
 *         if vp.vd_strides[0] == -1:
 *             for vi in range(iter[0], iter[1]):
 */
  (__pyx_v_iter[3]) = __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_iclip(((__pyx_v_iter[3]) + 1), 0, (__pyx_v_vp->nv[1]));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":599
 *         iter[2] = iclip(iter[2]-1, 0, vp.nv[1])
 *         iter[3] = iclip(iter[3]+1, 0, vp.nv[1])
 *         if vp.vd_strides[0] == -1:             # <<<<<<<<<<<<<<
 *             for vi in range(iter[0], iter[1]):
 *                 for vj in range(iter[2], iter[3]):
 */
  __pyx_t_1 = ((__pyx_v_vp->vd_strides[0]) == -1);
  if (__pyx_t_1) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":600
 *         iter[3] = iclip(iter[3]+1, 0, vp.nv[1])
 *         if vp.vd_strides[0] == -1:
 *             for vi in range(iter[0], iter[1]):             # <<<<<<<<<<<<<<
 *                 for vj in range(iter[2], iter[3]):
 *                     vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
 */
    __pyx_t_2 = (__pyx_v_iter[1]);
    for (__pyx_t_3 = (__pyx_v_iter[0]); __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
      __pyx_v_vi = __pyx_t_3;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":601
 *         if vp.vd_strides[0] == -1:
 *             for vi in range(iter[0], iter[1]):
 *                 for vj in range(iter[2], iter[3]):             # <<<<<<<<<<<<<<
 *                     vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
 *                     vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
 */
      __pyx_t_4 = (__pyx_v_iter[3]);
      for (__pyx_t_5 = (__pyx_v_iter[2]); __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
        __pyx_v_vj = __pyx_t_5;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":602
 *             for vi in range(iter[0], iter[1]):
 *                 for vj in range(iter[2], iter[3]):
 *                     vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)             # <<<<<<<<<<<<<<
 *                     vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
 *                     self.integrate_ray(v_pos, vp.vp_dir, rgba, tf)
 */
        __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_copy_into(__pyx_v_vp, __pyx_v_vp->vp_pos, __pyx_v_v_pos, __pyx_v_vi, __pyx_v_vj, 3, __pyx_v_vp->vp_strides);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":603
 *                 for vj in range(iter[2], iter[3]):
 *                     vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
 *                     vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)             # <<<<<<<<<<<<<<
 *                     self.integrate_ray(v_pos, vp.vp_dir, rgba, tf)
 *                     vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides)
 */
        __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_copy_into(__pyx_v_vp, __pyx_v_vp->image, __pyx_v_rgba, __pyx_v_vi, __pyx_v_vj, 3, __pyx_v_vp->im_strides);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":604
 *                     vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
 *                     vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
 *                     self.integrate_ray(v_pos, vp.vp_dir, rgba, tf)             # <<<<<<<<<<<<<<
 *                     vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides)
 *         else:
 */
        ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->integrate_ray(__pyx_v_self, __pyx_v_v_pos, __pyx_v_vp->vp_dir, __pyx_v_rgba, __pyx_v_tf, NULL);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":605
 *                     vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
 *                     self.integrate_ray(v_pos, vp.vp_dir, rgba, tf)
 *                     vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides)             # <<<<<<<<<<<<<<
 *         else:
 *             # If we do not have an orthographic projection, we have to cast all
 */
        __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_copy_back(__pyx_v_vp, __pyx_v_rgba, __pyx_v_vp->image, __pyx_v_vi, __pyx_v_vj, 3, __pyx_v_vp->im_strides);
      }
    }
    goto __pyx_L3;
  }
  /*else*/ {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":609
 *             # If we do not have an orthographic projection, we have to cast all
 *             # our rays (until we can get an extrema calculation...)
 *             for vi in range(vp.nv[0]):             # <<<<<<<<<<<<<<
 *                 for vj in range(vp.nv[1]):
 *                     vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
 */
    __pyx_t_2 = (__pyx_v_vp->nv[0]);
    for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
      __pyx_v_vi = __pyx_t_3;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":610
 *             # our rays (until we can get an extrema calculation...)
 *             for vi in range(vp.nv[0]):
 *                 for vj in range(vp.nv[1]):             # <<<<<<<<<<<<<<
 *                     vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
 *                     vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
 */
      __pyx_t_4 = (__pyx_v_vp->nv[1]);
      for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
        __pyx_v_vj = __pyx_t_5;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":611
 *             for vi in range(vp.nv[0]):
 *                 for vj in range(vp.nv[1]):
 *                     vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)             # <<<<<<<<<<<<<<
 *                     vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
 *                     vp.copy_into(vp.vp_dir, v_dir, vi, vj, 3, vp.vd_strides)
 */
        __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_copy_into(__pyx_v_vp, __pyx_v_vp->vp_pos, __pyx_v_v_pos, __pyx_v_vi, __pyx_v_vj, 3, __pyx_v_vp->vp_strides);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":612
 *                 for vj in range(vp.nv[1]):
 *                     vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
 *                     vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)             # <<<<<<<<<<<<<<
 *                     vp.copy_into(vp.vp_dir, v_dir, vi, vj, 3, vp.vd_strides)
 *                     self.integrate_ray(v_pos, v_dir, rgba, tf)
 */
        __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_copy_into(__pyx_v_vp, __pyx_v_vp->image, __pyx_v_rgba, __pyx_v_vi, __pyx_v_vj, 3, __pyx_v_vp->im_strides);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":613
 *                     vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
 *                     vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
 *                     vp.copy_into(vp.vp_dir, v_dir, vi, vj, 3, vp.vd_strides)             # <<<<<<<<<<<<<<
 *                     self.integrate_ray(v_pos, v_dir, rgba, tf)
 *                     vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides)
 */
        __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_copy_into(__pyx_v_vp, __pyx_v_vp->vp_dir, __pyx_v_v_dir, __pyx_v_vi, __pyx_v_vj, 3, __pyx_v_vp->vd_strides);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":614
 *                     vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
 *                     vp.copy_into(vp.vp_dir, v_dir, vi, vj, 3, vp.vd_strides)
 *                     self.integrate_ray(v_pos, v_dir, rgba, tf)             # <<<<<<<<<<<<<<
 *                     vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides)
 *         return hit
 */
        ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->integrate_ray(__pyx_v_self, __pyx_v_v_pos, __pyx_v_v_dir, __pyx_v_rgba, __pyx_v_tf, NULL);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":615
 *                     vp.copy_into(vp.vp_dir, v_dir, vi, vj, 3, vp.vd_strides)
 *                     self.integrate_ray(v_pos, v_dir, rgba, tf)
 *                     vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides)             # <<<<<<<<<<<<<<
 *         return hit
 * 
 */
        __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_copy_back(__pyx_v_vp, __pyx_v_rgba, __pyx_v_vp->image, __pyx_v_vi, __pyx_v_vj, 3, __pyx_v_vp->im_strides);
      }
    }
  }
  __pyx_L3:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":616
 *                     self.integrate_ray(v_pos, v_dir, rgba, tf)
 *                     vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides)
 *         return hit             # <<<<<<<<<<<<<<
 * 
 *     @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = PyInt_FromLong(__pyx_v_hit); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.PartitionedGrid.cast_plane", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":620
 *     @cython.boundscheck(False)
 *     @cython.wraparound(False)
 *     cdef void calculate_extent(self, VectorPlane vp,             # <<<<<<<<<<<<<<
 *                                np.float64_t extrema[4]):
 *         # We do this for all eight corners
 */

static void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_calculate_extent(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *__pyx_v_vp, __pyx_t_5numpy_float64_t *__pyx_v_extrema) {
  __pyx_t_5numpy_float64_t *__pyx_v_edges[2];
  __pyx_t_5numpy_float64_t __pyx_v_temp;
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_k;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("calculate_extent", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":624
 *         # We do this for all eight corners
 *         cdef np.float64_t *edges[2], temp
 *         edges[0] = self.left_edge             # <<<<<<<<<<<<<<
 *         edges[1] = self.right_edge
 *         extrema[0] = extrema[2] = 1e300; extrema[1] = extrema[3] = -1e300
 */
  (__pyx_v_edges[0]) = __pyx_v_self->left_edge;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":625
 *         cdef np.float64_t *edges[2], temp
 *         edges[0] = self.left_edge
 *         edges[1] = self.right_edge             # <<<<<<<<<<<<<<
 *         extrema[0] = extrema[2] = 1e300; extrema[1] = extrema[3] = -1e300
 *         cdef int i, j, k
 */
  (__pyx_v_edges[1]) = __pyx_v_self->right_edge;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":626
 *         edges[0] = self.left_edge
 *         edges[1] = self.right_edge
 *         extrema[0] = extrema[2] = 1e300; extrema[1] = extrema[3] = -1e300             # <<<<<<<<<<<<<<
 *         cdef int i, j, k
 *         for i in range(2):
 */
  (__pyx_v_extrema[0]) = 1e300;
  (__pyx_v_extrema[2]) = 1e300;
  (__pyx_v_extrema[1]) = -1e300;
  (__pyx_v_extrema[3]) = -1e300;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":628
 *         extrema[0] = extrema[2] = 1e300; extrema[1] = extrema[3] = -1e300
 *         cdef int i, j, k
 *         for i in range(2):             # <<<<<<<<<<<<<<
 *             for j in range(2):
 *                 for k in range(2):
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 2; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":629
 *         cdef int i, j, k
 *         for i in range(2):
 *             for j in range(2):             # <<<<<<<<<<<<<<
 *                 for k in range(2):
 *                     # This should rotate it into the vector plane
 */
    for (__pyx_t_2 = 0; __pyx_t_2 < 2; __pyx_t_2+=1) {
      __pyx_v_j = __pyx_t_2;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":630
 *         for i in range(2):
 *             for j in range(2):
 *                 for k in range(2):             # <<<<<<<<<<<<<<
 *                     # This should rotate it into the vector plane
 *                     temp  = edges[i][0] * vp.x_vec[0]
 */
      for (__pyx_t_3 = 0; __pyx_t_3 < 2; __pyx_t_3+=1) {
        __pyx_v_k = __pyx_t_3;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":632
 *                 for k in range(2):
 *                     # This should rotate it into the vector plane
 *                     temp  = edges[i][0] * vp.x_vec[0]             # <<<<<<<<<<<<<<
 *                     temp += edges[j][1] * vp.x_vec[1]
 *                     temp += edges[k][2] * vp.x_vec[2]
 */
        __pyx_v_temp = (((__pyx_v_edges[__pyx_v_i])[0]) * (__pyx_v_vp->x_vec[0]));

        /* "yt/utilities/lib/VolumeIntegrator.pyx":633
 *                     # This should rotate it into the vector plane
 *                     temp  = edges[i][0] * vp.x_vec[0]
 *                     temp += edges[j][1] * vp.x_vec[1]             # <<<<<<<<<<<<<<
 *                     temp += edges[k][2] * vp.x_vec[2]
 *                     if temp < extrema[0]: extrema[0] = temp
 */
        __pyx_v_temp = (__pyx_v_temp + (((__pyx_v_edges[__pyx_v_j])[1]) * (__pyx_v_vp->x_vec[1])));

        /* "yt/utilities/lib/VolumeIntegrator.pyx":634
 *                     temp  = edges[i][0] * vp.x_vec[0]
 *                     temp += edges[j][1] * vp.x_vec[1]
 *                     temp += edges[k][2] * vp.x_vec[2]             # <<<<<<<<<<<<<<
 *                     if temp < extrema[0]: extrema[0] = temp
 *                     if temp > extrema[1]: extrema[1] = temp
 */
        __pyx_v_temp = (__pyx_v_temp + (((__pyx_v_edges[__pyx_v_k])[2]) * (__pyx_v_vp->x_vec[2])));

        /* "yt/utilities/lib/VolumeIntegrator.pyx":635
 *                     temp += edges[j][1] * vp.x_vec[1]
 *                     temp += edges[k][2] * vp.x_vec[2]
 *                     if temp < extrema[0]: extrema[0] = temp             # <<<<<<<<<<<<<<
 *                     if temp > extrema[1]: extrema[1] = temp
 *                     temp  = edges[i][0] * vp.y_vec[0]
 */
        __pyx_t_4 = (__pyx_v_temp < (__pyx_v_extrema[0]));
        if (__pyx_t_4) {
          (__pyx_v_extrema[0]) = __pyx_v_temp;
          goto __pyx_L9;
        }
        __pyx_L9:;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":636
 *                     temp += edges[k][2] * vp.x_vec[2]
 *                     if temp < extrema[0]: extrema[0] = temp
 *                     if temp > extrema[1]: extrema[1] = temp             # <<<<<<<<<<<<<<
 *                     temp  = edges[i][0] * vp.y_vec[0]
 *                     temp += edges[j][1] * vp.y_vec[1]
 */
        __pyx_t_4 = (__pyx_v_temp > (__pyx_v_extrema[1]));
        if (__pyx_t_4) {
          (__pyx_v_extrema[1]) = __pyx_v_temp;
          goto __pyx_L10;
        }
        __pyx_L10:;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":637
 *                     if temp < extrema[0]: extrema[0] = temp
 *                     if temp > extrema[1]: extrema[1] = temp
 *                     temp  = edges[i][0] * vp.y_vec[0]             # <<<<<<<<<<<<<<
 *                     temp += edges[j][1] * vp.y_vec[1]
 *                     temp += edges[k][2] * vp.y_vec[2]
 */
        __pyx_v_temp = (((__pyx_v_edges[__pyx_v_i])[0]) * (__pyx_v_vp->y_vec[0]));

        /* "yt/utilities/lib/VolumeIntegrator.pyx":638
 *                     if temp > extrema[1]: extrema[1] = temp
 *                     temp  = edges[i][0] * vp.y_vec[0]
 *                     temp += edges[j][1] * vp.y_vec[1]             # <<<<<<<<<<<<<<
 *                     temp += edges[k][2] * vp.y_vec[2]
 *                     if temp < extrema[2]: extrema[2] = temp
 */
        __pyx_v_temp = (__pyx_v_temp + (((__pyx_v_edges[__pyx_v_j])[1]) * (__pyx_v_vp->y_vec[1])));

        /* "yt/utilities/lib/VolumeIntegrator.pyx":639
 *                     temp  = edges[i][0] * vp.y_vec[0]
 *                     temp += edges[j][1] * vp.y_vec[1]
 *                     temp += edges[k][2] * vp.y_vec[2]             # <<<<<<<<<<<<<<
 *                     if temp < extrema[2]: extrema[2] = temp
 *                     if temp > extrema[3]: extrema[3] = temp
 */
        __pyx_v_temp = (__pyx_v_temp + (((__pyx_v_edges[__pyx_v_k])[2]) * (__pyx_v_vp->y_vec[2])));

        /* "yt/utilities/lib/VolumeIntegrator.pyx":640
 *                     temp += edges[j][1] * vp.y_vec[1]
 *                     temp += edges[k][2] * vp.y_vec[2]
 *                     if temp < extrema[2]: extrema[2] = temp             # <<<<<<<<<<<<<<
 *                     if temp > extrema[3]: extrema[3] = temp
 *         #print extrema[0], extrema[1], extrema[2], extrema[3]
 */
        __pyx_t_4 = (__pyx_v_temp < (__pyx_v_extrema[2]));
        if (__pyx_t_4) {
          (__pyx_v_extrema[2]) = __pyx_v_temp;
          goto __pyx_L11;
        }
        __pyx_L11:;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":641
 *                     temp += edges[k][2] * vp.y_vec[2]
 *                     if temp < extrema[2]: extrema[2] = temp
 *                     if temp > extrema[3]: extrema[3] = temp             # <<<<<<<<<<<<<<
 *         #print extrema[0], extrema[1], extrema[2], extrema[3]
 * 
 */
        __pyx_t_4 = (__pyx_v_temp > (__pyx_v_extrema[3]));
        if (__pyx_t_4) {
          (__pyx_v_extrema[3]) = __pyx_v_temp;
          goto __pyx_L12;
        }
        __pyx_L12:;
      }
    }
  }

  __Pyx_RefNannyFinishContext();
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":646
 *     @cython.boundscheck(False)
 *     @cython.wraparound(False)
 *     cdef int integrate_ray(self, np.float64_t v_pos[3],             # <<<<<<<<<<<<<<
 *                                  np.float64_t v_dir[3],
 *                                  np.float64_t rgba[4],
 */

static int __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_integrate_ray(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, __pyx_t_5numpy_float64_t *__pyx_v_v_pos, __pyx_t_5numpy_float64_t *__pyx_v_v_dir, __pyx_t_5numpy_float64_t *__pyx_v_rgba, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_tf, struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_integrate_ray *__pyx_optional_args) {

  /* "yt/utilities/lib/VolumeIntegrator.pyx":650
 *                                  np.float64_t rgba[4],
 *                                  TransferFunctionProxy tf,
 *                                  np.float64_t *return_t = NULL,             # <<<<<<<<<<<<<<
 *                                  np.float64_t enter_t = -1.0):
 *         cdef int cur_ind[3], step[3], x, y, i, n, flat_ind, hit, direction
 */
  __pyx_t_5numpy_float64_t *__pyx_v_return_t = ((__pyx_t_5numpy_float64_t *)NULL);
  __pyx_t_5numpy_float64_t __pyx_v_enter_t = __pyx_k_3;
  int __pyx_v_cur_ind[3];
  int __pyx_v_step[3];
  int __pyx_v_x;
  int __pyx_v_y;
  int __pyx_v_i;
  int __pyx_v_hit;
  CYTHON_UNUSED int __pyx_v_direction;
  __pyx_t_5numpy_float64_t __pyx_v_intersect_t;
  __pyx_t_5numpy_float64_t __pyx_v_iv_dir[3];
  __pyx_t_5numpy_float64_t __pyx_v_intersect[3];
  __pyx_t_5numpy_float64_t __pyx_v_tmax[3];
  __pyx_t_5numpy_float64_t __pyx_v_tdelta[3];
  __pyx_t_5numpy_float64_t __pyx_v_exit_t;
  __pyx_t_5numpy_float64_t __pyx_v_tr;
  __pyx_t_5numpy_float64_t __pyx_v_tl;
  __pyx_t_5numpy_float64_t __pyx_v_temp_x;
  __pyx_t_5numpy_float64_t __pyx_v_temp_y;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  long __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("integrate_ray", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_return_t = __pyx_optional_args->return_t;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_enter_t = __pyx_optional_args->enter_t;
      }
    }
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":653
 *                                  np.float64_t enter_t = -1.0):
 *         cdef int cur_ind[3], step[3], x, y, i, n, flat_ind, hit, direction
 *         cdef np.float64_t intersect_t = 1.0             # <<<<<<<<<<<<<<
 *         cdef np.float64_t iv_dir[3]
 *         cdef np.float64_t intersect[3], tmax[3], tdelta[3]
 */
  __pyx_v_intersect_t = 1.0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":658
 *         cdef np.float64_t dist, alpha, dt, exit_t
 *         cdef np.float64_t tr, tl, temp_x, temp_y, dv
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             if (v_dir[i] < 0):
 *                 step[i] = -1
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":659
 *         cdef np.float64_t tr, tl, temp_x, temp_y, dv
 *         for i in range(3):
 *             if (v_dir[i] < 0):             # <<<<<<<<<<<<<<
 *                 step[i] = -1
 *             elif (v_dir[i] == 0):
 */
    __pyx_t_2 = ((__pyx_v_v_dir[__pyx_v_i]) < 0.0);
    if (__pyx_t_2) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":660
 *         for i in range(3):
 *             if (v_dir[i] < 0):
 *                 step[i] = -1             # <<<<<<<<<<<<<<
 *             elif (v_dir[i] == 0):
 *                 step[i] = 1
 */
      (__pyx_v_step[__pyx_v_i]) = -1;
      goto __pyx_L5;
    }

    /* "yt/utilities/lib/VolumeIntegrator.pyx":661
 *             if (v_dir[i] < 0):
 *                 step[i] = -1
 *             elif (v_dir[i] == 0):             # <<<<<<<<<<<<<<
 *                 step[i] = 1
 *                 tmax[i] = 1e60
 */
    __pyx_t_2 = ((__pyx_v_v_dir[__pyx_v_i]) == 0.0);
    if (__pyx_t_2) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":662
 *                 step[i] = -1
 *             elif (v_dir[i] == 0):
 *                 step[i] = 1             # <<<<<<<<<<<<<<
 *                 tmax[i] = 1e60
 *                 iv_dir[i] = 1e60
 */
      (__pyx_v_step[__pyx_v_i]) = 1;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":663
 *             elif (v_dir[i] == 0):
 *                 step[i] = 1
 *                 tmax[i] = 1e60             # <<<<<<<<<<<<<<
 *                 iv_dir[i] = 1e60
 *                 tdelta[i] = 1e-60
 */
      (__pyx_v_tmax[__pyx_v_i]) = 1e60;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":664
 *                 step[i] = 1
 *                 tmax[i] = 1e60
 *                 iv_dir[i] = 1e60             # <<<<<<<<<<<<<<
 *                 tdelta[i] = 1e-60
 *                 continue
 */
      (__pyx_v_iv_dir[__pyx_v_i]) = 1e60;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":665
 *                 tmax[i] = 1e60
 *                 iv_dir[i] = 1e60
 *                 tdelta[i] = 1e-60             # <<<<<<<<<<<<<<
 *                 continue
 *             else:
 */
      (__pyx_v_tdelta[__pyx_v_i]) = 1e-60;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":666
 *                 iv_dir[i] = 1e60
 *                 tdelta[i] = 1e-60
 *                 continue             # <<<<<<<<<<<<<<
 *             else:
 *                 step[i] = 1
 */
      goto __pyx_L3_continue;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":668
 *                 continue
 *             else:
 *                 step[i] = 1             # <<<<<<<<<<<<<<
 *             x = (i+1) % 3
 *             y = (i+2) % 3
 */
      (__pyx_v_step[__pyx_v_i]) = 1;
    }
    __pyx_L5:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":669
 *             else:
 *                 step[i] = 1
 *             x = (i+1) % 3             # <<<<<<<<<<<<<<
 *             y = (i+2) % 3
 *             iv_dir[i] = 1.0/v_dir[i]
 */
    __pyx_v_x = __Pyx_mod_long((__pyx_v_i + 1), 3);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":670
 *                 step[i] = 1
 *             x = (i+1) % 3
 *             y = (i+2) % 3             # <<<<<<<<<<<<<<
 *             iv_dir[i] = 1.0/v_dir[i]
 *             tl = (self.left_edge[i] - v_pos[i])*iv_dir[i]
 */
    __pyx_v_y = __Pyx_mod_long((__pyx_v_i + 2), 3);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":671
 *             x = (i+1) % 3
 *             y = (i+2) % 3
 *             iv_dir[i] = 1.0/v_dir[i]             # <<<<<<<<<<<<<<
 *             tl = (self.left_edge[i] - v_pos[i])*iv_dir[i]
 *             temp_x = (v_pos[x] + tl*v_dir[x])
 */
    if (unlikely((__pyx_v_v_dir[__pyx_v_i]) == 0)) {
      PyErr_Format(PyExc_ZeroDivisionError, "float division");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    (__pyx_v_iv_dir[__pyx_v_i]) = (1.0 / (__pyx_v_v_dir[__pyx_v_i]));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":672
 *             y = (i+2) % 3
 *             iv_dir[i] = 1.0/v_dir[i]
 *             tl = (self.left_edge[i] - v_pos[i])*iv_dir[i]             # <<<<<<<<<<<<<<
 *             temp_x = (v_pos[x] + tl*v_dir[x])
 *             temp_y = (v_pos[y] + tl*v_dir[y])
 */
    __pyx_v_tl = (((__pyx_v_self->left_edge[__pyx_v_i]) - (__pyx_v_v_pos[__pyx_v_i])) * (__pyx_v_iv_dir[__pyx_v_i]));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":673
 *             iv_dir[i] = 1.0/v_dir[i]
 *             tl = (self.left_edge[i] - v_pos[i])*iv_dir[i]
 *             temp_x = (v_pos[x] + tl*v_dir[x])             # <<<<<<<<<<<<<<
 *             temp_y = (v_pos[y] + tl*v_dir[y])
 *             if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
 */
    __pyx_v_temp_x = ((__pyx_v_v_pos[__pyx_v_x]) + (__pyx_v_tl * (__pyx_v_v_dir[__pyx_v_x])));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":674
 *             tl = (self.left_edge[i] - v_pos[i])*iv_dir[i]
 *             temp_x = (v_pos[x] + tl*v_dir[x])
 *             temp_y = (v_pos[y] + tl*v_dir[y])             # <<<<<<<<<<<<<<
 *             if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
 *                self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
 */
    __pyx_v_temp_y = ((__pyx_v_v_pos[__pyx_v_y]) + (__pyx_v_tl * (__pyx_v_v_dir[__pyx_v_y])));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":675
 *             temp_x = (v_pos[x] + tl*v_dir[x])
 *             temp_y = (v_pos[y] + tl*v_dir[y])
 *             if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \             # <<<<<<<<<<<<<<
 *                self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
 *                0.0 <= tl and tl < intersect_t:
 */
    __pyx_t_2 = ((__pyx_v_self->left_edge[__pyx_v_x]) <= __pyx_v_temp_x);
    if (__pyx_t_2) {
      __pyx_t_3 = (__pyx_v_temp_x <= (__pyx_v_self->right_edge[__pyx_v_x]));
      if (__pyx_t_3) {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":676
 *             temp_y = (v_pos[y] + tl*v_dir[y])
 *             if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
 *                self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \             # <<<<<<<<<<<<<<
 *                0.0 <= tl and tl < intersect_t:
 *                 direction = i
 */
        __pyx_t_4 = ((__pyx_v_self->left_edge[__pyx_v_y]) <= __pyx_v_temp_y);
        if (__pyx_t_4) {
          __pyx_t_5 = (__pyx_v_temp_y <= (__pyx_v_self->right_edge[__pyx_v_y]));
          if (__pyx_t_5) {

            /* "yt/utilities/lib/VolumeIntegrator.pyx":677
 *             if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
 *                self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
 *                0.0 <= tl and tl < intersect_t:             # <<<<<<<<<<<<<<
 *                 direction = i
 *                 intersect_t = tl
 */
            __pyx_t_6 = (0.0 <= __pyx_v_tl);
            if (__pyx_t_6) {
              __pyx_t_7 = (__pyx_v_tl < __pyx_v_intersect_t);
              __pyx_t_8 = __pyx_t_7;
            } else {
              __pyx_t_8 = __pyx_t_6;
            }
            __pyx_t_6 = __pyx_t_8;
          } else {
            __pyx_t_6 = __pyx_t_5;
          }
          __pyx_t_5 = __pyx_t_6;
        } else {
          __pyx_t_5 = __pyx_t_4;
        }
        __pyx_t_4 = __pyx_t_5;
      } else {
        __pyx_t_4 = __pyx_t_3;
      }
      __pyx_t_3 = __pyx_t_4;
    } else {
      __pyx_t_3 = __pyx_t_2;
    }
    if (__pyx_t_3) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":678
 *                self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
 *                0.0 <= tl and tl < intersect_t:
 *                 direction = i             # <<<<<<<<<<<<<<
 *                 intersect_t = tl
 *             tr = (self.right_edge[i] - v_pos[i])*iv_dir[i]
 */
      __pyx_v_direction = __pyx_v_i;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":679
 *                0.0 <= tl and tl < intersect_t:
 *                 direction = i
 *                 intersect_t = tl             # <<<<<<<<<<<<<<
 *             tr = (self.right_edge[i] - v_pos[i])*iv_dir[i]
 *             temp_x = (v_pos[x] + tr*v_dir[x])
 */
      __pyx_v_intersect_t = __pyx_v_tl;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":680
 *                 direction = i
 *                 intersect_t = tl
 *             tr = (self.right_edge[i] - v_pos[i])*iv_dir[i]             # <<<<<<<<<<<<<<
 *             temp_x = (v_pos[x] + tr*v_dir[x])
 *             temp_y = (v_pos[y] + tr*v_dir[y])
 */
    __pyx_v_tr = (((__pyx_v_self->right_edge[__pyx_v_i]) - (__pyx_v_v_pos[__pyx_v_i])) * (__pyx_v_iv_dir[__pyx_v_i]));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":681
 *                 intersect_t = tl
 *             tr = (self.right_edge[i] - v_pos[i])*iv_dir[i]
 *             temp_x = (v_pos[x] + tr*v_dir[x])             # <<<<<<<<<<<<<<
 *             temp_y = (v_pos[y] + tr*v_dir[y])
 *             if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
 */
    __pyx_v_temp_x = ((__pyx_v_v_pos[__pyx_v_x]) + (__pyx_v_tr * (__pyx_v_v_dir[__pyx_v_x])));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":682
 *             tr = (self.right_edge[i] - v_pos[i])*iv_dir[i]
 *             temp_x = (v_pos[x] + tr*v_dir[x])
 *             temp_y = (v_pos[y] + tr*v_dir[y])             # <<<<<<<<<<<<<<
 *             if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
 *                self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
 */
    __pyx_v_temp_y = ((__pyx_v_v_pos[__pyx_v_y]) + (__pyx_v_tr * (__pyx_v_v_dir[__pyx_v_y])));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":683
 *             temp_x = (v_pos[x] + tr*v_dir[x])
 *             temp_y = (v_pos[y] + tr*v_dir[y])
 *             if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \             # <<<<<<<<<<<<<<
 *                self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
 *                0.0 <= tr and tr < intersect_t:
 */
    __pyx_t_3 = ((__pyx_v_self->left_edge[__pyx_v_x]) <= __pyx_v_temp_x);
    if (__pyx_t_3) {
      __pyx_t_2 = (__pyx_v_temp_x <= (__pyx_v_self->right_edge[__pyx_v_x]));
      if (__pyx_t_2) {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":684
 *             temp_y = (v_pos[y] + tr*v_dir[y])
 *             if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
 *                self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \             # <<<<<<<<<<<<<<
 *                0.0 <= tr and tr < intersect_t:
 *                 direction = i
 */
        __pyx_t_4 = ((__pyx_v_self->left_edge[__pyx_v_y]) <= __pyx_v_temp_y);
        if (__pyx_t_4) {
          __pyx_t_5 = (__pyx_v_temp_y <= (__pyx_v_self->right_edge[__pyx_v_y]));
          if (__pyx_t_5) {

            /* "yt/utilities/lib/VolumeIntegrator.pyx":685
 *             if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
 *                self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
 *                0.0 <= tr and tr < intersect_t:             # <<<<<<<<<<<<<<
 *                 direction = i
 *                 intersect_t = tr
 */
            __pyx_t_6 = (0.0 <= __pyx_v_tr);
            if (__pyx_t_6) {
              __pyx_t_8 = (__pyx_v_tr < __pyx_v_intersect_t);
              __pyx_t_7 = __pyx_t_8;
            } else {
              __pyx_t_7 = __pyx_t_6;
            }
            __pyx_t_6 = __pyx_t_7;
          } else {
            __pyx_t_6 = __pyx_t_5;
          }
          __pyx_t_5 = __pyx_t_6;
        } else {
          __pyx_t_5 = __pyx_t_4;
        }
        __pyx_t_4 = __pyx_t_5;
      } else {
        __pyx_t_4 = __pyx_t_2;
      }
      __pyx_t_2 = __pyx_t_4;
    } else {
      __pyx_t_2 = __pyx_t_3;
    }
    if (__pyx_t_2) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":686
 *                self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
 *                0.0 <= tr and tr < intersect_t:
 *                 direction = i             # <<<<<<<<<<<<<<
 *                 intersect_t = tr
 *         if self.left_edge[0] <= v_pos[0] and v_pos[0] <= self.right_edge[0] and \
 */
      __pyx_v_direction = __pyx_v_i;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":687
 *                0.0 <= tr and tr < intersect_t:
 *                 direction = i
 *                 intersect_t = tr             # <<<<<<<<<<<<<<
 *         if self.left_edge[0] <= v_pos[0] and v_pos[0] <= self.right_edge[0] and \
 *            self.left_edge[1] <= v_pos[1] and v_pos[1] <= self.right_edge[1] and \
 */
      __pyx_v_intersect_t = __pyx_v_tr;
      goto __pyx_L7;
    }
    __pyx_L7:;
    __pyx_L3_continue:;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":688
 *                 direction = i
 *                 intersect_t = tr
 *         if self.left_edge[0] <= v_pos[0] and v_pos[0] <= self.right_edge[0] and \             # <<<<<<<<<<<<<<
 *            self.left_edge[1] <= v_pos[1] and v_pos[1] <= self.right_edge[1] and \
 *            self.left_edge[2] <= v_pos[2] and v_pos[2] <= self.right_edge[2]:
 */
  __pyx_t_2 = ((__pyx_v_self->left_edge[0]) <= (__pyx_v_v_pos[0]));
  if (__pyx_t_2) {
    __pyx_t_3 = ((__pyx_v_v_pos[0]) <= (__pyx_v_self->right_edge[0]));
    if (__pyx_t_3) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":689
 *                 intersect_t = tr
 *         if self.left_edge[0] <= v_pos[0] and v_pos[0] <= self.right_edge[0] and \
 *            self.left_edge[1] <= v_pos[1] and v_pos[1] <= self.right_edge[1] and \             # <<<<<<<<<<<<<<
 *            self.left_edge[2] <= v_pos[2] and v_pos[2] <= self.right_edge[2]:
 *             intersect_t = 0.0
 */
      __pyx_t_4 = ((__pyx_v_self->left_edge[1]) <= (__pyx_v_v_pos[1]));
      if (__pyx_t_4) {
        __pyx_t_5 = ((__pyx_v_v_pos[1]) <= (__pyx_v_self->right_edge[1]));
        if (__pyx_t_5) {

          /* "yt/utilities/lib/VolumeIntegrator.pyx":690
 *         if self.left_edge[0] <= v_pos[0] and v_pos[0] <= self.right_edge[0] and \
 *            self.left_edge[1] <= v_pos[1] and v_pos[1] <= self.right_edge[1] and \
 *            self.left_edge[2] <= v_pos[2] and v_pos[2] <= self.right_edge[2]:             # <<<<<<<<<<<<<<
 *             intersect_t = 0.0
 *         if enter_t >= 0.0: intersect_t = enter_t
 */
          __pyx_t_6 = ((__pyx_v_self->left_edge[2]) <= (__pyx_v_v_pos[2]));
          if (__pyx_t_6) {
            __pyx_t_7 = ((__pyx_v_v_pos[2]) <= (__pyx_v_self->right_edge[2]));
            __pyx_t_8 = __pyx_t_7;
          } else {
            __pyx_t_8 = __pyx_t_6;
          }
          __pyx_t_6 = __pyx_t_8;
        } else {
          __pyx_t_6 = __pyx_t_5;
        }
        __pyx_t_5 = __pyx_t_6;
      } else {
        __pyx_t_5 = __pyx_t_4;
      }
      __pyx_t_4 = __pyx_t_5;
    } else {
      __pyx_t_4 = __pyx_t_3;
    }
    __pyx_t_3 = __pyx_t_4;
  } else {
    __pyx_t_3 = __pyx_t_2;
  }
  if (__pyx_t_3) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":691
 *            self.left_edge[1] <= v_pos[1] and v_pos[1] <= self.right_edge[1] and \
 *            self.left_edge[2] <= v_pos[2] and v_pos[2] <= self.right_edge[2]:
 *             intersect_t = 0.0             # <<<<<<<<<<<<<<
 *         if enter_t >= 0.0: intersect_t = enter_t
 *         if not ((0.0 <= intersect_t) and (intersect_t < 1.0)): return 0
 */
    __pyx_v_intersect_t = 0.0;
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":692
 *            self.left_edge[2] <= v_pos[2] and v_pos[2] <= self.right_edge[2]:
 *             intersect_t = 0.0
 *         if enter_t >= 0.0: intersect_t = enter_t             # <<<<<<<<<<<<<<
 *         if not ((0.0 <= intersect_t) and (intersect_t < 1.0)): return 0
 *         for i in range(3):
 */
  __pyx_t_3 = (__pyx_v_enter_t >= 0.0);
  if (__pyx_t_3) {
    __pyx_v_intersect_t = __pyx_v_enter_t;
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":693
 *             intersect_t = 0.0
 *         if enter_t >= 0.0: intersect_t = enter_t
 *         if not ((0.0 <= intersect_t) and (intersect_t < 1.0)): return 0             # <<<<<<<<<<<<<<
 *         for i in range(3):
 *             intersect[i] = v_pos[i] + intersect_t * v_dir[i]
 */
  __pyx_t_3 = (0.0 <= __pyx_v_intersect_t);
  if (__pyx_t_3) {
    __pyx_t_2 = (__pyx_v_intersect_t < 1.0);
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_4 = __pyx_t_3;
  }
  __pyx_t_3 = (!__pyx_t_4);
  if (__pyx_t_3) {
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L10;
  }
  __pyx_L10:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":694
 *         if enter_t >= 0.0: intersect_t = enter_t
 *         if not ((0.0 <= intersect_t) and (intersect_t < 1.0)): return 0
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             intersect[i] = v_pos[i] + intersect_t * v_dir[i]
 *             cur_ind[i] = <int> floor((intersect[i] +
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":695
 *         if not ((0.0 <= intersect_t) and (intersect_t < 1.0)): return 0
 *         for i in range(3):
 *             intersect[i] = v_pos[i] + intersect_t * v_dir[i]             # <<<<<<<<<<<<<<
 *             cur_ind[i] = <int> floor((intersect[i] +
 *                                       step[i]*1e-8*self.dds[i] -
 */
    (__pyx_v_intersect[__pyx_v_i]) = ((__pyx_v_v_pos[__pyx_v_i]) + (__pyx_v_intersect_t * (__pyx_v_v_dir[__pyx_v_i])));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":696
 *         for i in range(3):
 *             intersect[i] = v_pos[i] + intersect_t * v_dir[i]
 *             cur_ind[i] = <int> floor((intersect[i] +             # <<<<<<<<<<<<<<
 *                                       step[i]*1e-8*self.dds[i] -
 *                                       self.left_edge[i])*self.idds[i])
 */
    (__pyx_v_cur_ind[__pyx_v_i]) = ((int)floor(((((__pyx_v_intersect[__pyx_v_i]) + (((__pyx_v_step[__pyx_v_i]) * 1e-8) * (__pyx_v_self->dds[__pyx_v_i]))) - (__pyx_v_self->left_edge[__pyx_v_i])) * (__pyx_v_self->idds[__pyx_v_i]))));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":699
 *                                       step[i]*1e-8*self.dds[i] -
 *                                       self.left_edge[i])*self.idds[i])
 *             tmax[i] = (((cur_ind[i]+step[i])*self.dds[i])+             # <<<<<<<<<<<<<<
 *                         self.left_edge[i]-v_pos[i])*iv_dir[i]
 *             # This deals with the asymmetry in having our indices refer to the
 */
    (__pyx_v_tmax[__pyx_v_i]) = ((((((__pyx_v_cur_ind[__pyx_v_i]) + (__pyx_v_step[__pyx_v_i])) * (__pyx_v_self->dds[__pyx_v_i])) + (__pyx_v_self->left_edge[__pyx_v_i])) - (__pyx_v_v_pos[__pyx_v_i])) * (__pyx_v_iv_dir[__pyx_v_i]));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":704
 *             # left edge of a cell, but the right edge of the brick being one
 *             # extra zone out.
 *             if cur_ind[i] == self.dims[i] and step[i] < 0:             # <<<<<<<<<<<<<<
 *                 cur_ind[i] = self.dims[i] - 1
 *             if cur_ind[i] < 0 or cur_ind[i] >= self.dims[i]: return 0
 */
    __pyx_t_3 = ((__pyx_v_cur_ind[__pyx_v_i]) == (__pyx_v_self->dims[__pyx_v_i]));
    if (__pyx_t_3) {
      __pyx_t_4 = ((__pyx_v_step[__pyx_v_i]) < 0);
      __pyx_t_2 = __pyx_t_4;
    } else {
      __pyx_t_2 = __pyx_t_3;
    }
    if (__pyx_t_2) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":705
 *             # extra zone out.
 *             if cur_ind[i] == self.dims[i] and step[i] < 0:
 *                 cur_ind[i] = self.dims[i] - 1             # <<<<<<<<<<<<<<
 *             if cur_ind[i] < 0 or cur_ind[i] >= self.dims[i]: return 0
 *             if step[i] > 0:
 */
      (__pyx_v_cur_ind[__pyx_v_i]) = ((__pyx_v_self->dims[__pyx_v_i]) - 1);
      goto __pyx_L13;
    }
    __pyx_L13:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":706
 *             if cur_ind[i] == self.dims[i] and step[i] < 0:
 *                 cur_ind[i] = self.dims[i] - 1
 *             if cur_ind[i] < 0 or cur_ind[i] >= self.dims[i]: return 0             # <<<<<<<<<<<<<<
 *             if step[i] > 0:
 *                 tmax[i] = (((cur_ind[i]+1)*self.dds[i])
 */
    __pyx_t_2 = ((__pyx_v_cur_ind[__pyx_v_i]) < 0);
    if (!__pyx_t_2) {
      __pyx_t_3 = ((__pyx_v_cur_ind[__pyx_v_i]) >= (__pyx_v_self->dims[__pyx_v_i]));
      __pyx_t_4 = __pyx_t_3;
    } else {
      __pyx_t_4 = __pyx_t_2;
    }
    if (__pyx_t_4) {
      __pyx_r = 0;
      goto __pyx_L0;
      goto __pyx_L14;
    }
    __pyx_L14:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":707
 *                 cur_ind[i] = self.dims[i] - 1
 *             if cur_ind[i] < 0 or cur_ind[i] >= self.dims[i]: return 0
 *             if step[i] > 0:             # <<<<<<<<<<<<<<
 *                 tmax[i] = (((cur_ind[i]+1)*self.dds[i])
 *                             +self.left_edge[i]-v_pos[i])*iv_dir[i]
 */
    __pyx_t_4 = ((__pyx_v_step[__pyx_v_i]) > 0);
    if (__pyx_t_4) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":708
 *             if cur_ind[i] < 0 or cur_ind[i] >= self.dims[i]: return 0
 *             if step[i] > 0:
 *                 tmax[i] = (((cur_ind[i]+1)*self.dds[i])             # <<<<<<<<<<<<<<
 *                             +self.left_edge[i]-v_pos[i])*iv_dir[i]
 *             if step[i] < 0:
 */
      (__pyx_v_tmax[__pyx_v_i]) = ((((((__pyx_v_cur_ind[__pyx_v_i]) + 1) * (__pyx_v_self->dds[__pyx_v_i])) + (__pyx_v_self->left_edge[__pyx_v_i])) - (__pyx_v_v_pos[__pyx_v_i])) * (__pyx_v_iv_dir[__pyx_v_i]));
      goto __pyx_L15;
    }
    __pyx_L15:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":710
 *                 tmax[i] = (((cur_ind[i]+1)*self.dds[i])
 *                             +self.left_edge[i]-v_pos[i])*iv_dir[i]
 *             if step[i] < 0:             # <<<<<<<<<<<<<<
 *                 tmax[i] = (((cur_ind[i]+0)*self.dds[i])
 *                             +self.left_edge[i]-v_pos[i])*iv_dir[i]
 */
    __pyx_t_4 = ((__pyx_v_step[__pyx_v_i]) < 0);
    if (__pyx_t_4) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":711
 *                             +self.left_edge[i]-v_pos[i])*iv_dir[i]
 *             if step[i] < 0:
 *                 tmax[i] = (((cur_ind[i]+0)*self.dds[i])             # <<<<<<<<<<<<<<
 *                             +self.left_edge[i]-v_pos[i])*iv_dir[i]
 *             tdelta[i] = (self.dds[i]*iv_dir[i])
 */
      (__pyx_v_tmax[__pyx_v_i]) = ((((((__pyx_v_cur_ind[__pyx_v_i]) + 0) * (__pyx_v_self->dds[__pyx_v_i])) + (__pyx_v_self->left_edge[__pyx_v_i])) - (__pyx_v_v_pos[__pyx_v_i])) * (__pyx_v_iv_dir[__pyx_v_i]));
      goto __pyx_L16;
    }
    __pyx_L16:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":713
 *                 tmax[i] = (((cur_ind[i]+0)*self.dds[i])
 *                             +self.left_edge[i]-v_pos[i])*iv_dir[i]
 *             tdelta[i] = (self.dds[i]*iv_dir[i])             # <<<<<<<<<<<<<<
 *             if tdelta[i] < 0: tdelta[i] *= -1
 *         # We have to jumpstart our calculation
 */
    (__pyx_v_tdelta[__pyx_v_i]) = ((__pyx_v_self->dds[__pyx_v_i]) * (__pyx_v_iv_dir[__pyx_v_i]));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":714
 *                             +self.left_edge[i]-v_pos[i])*iv_dir[i]
 *             tdelta[i] = (self.dds[i]*iv_dir[i])
 *             if tdelta[i] < 0: tdelta[i] *= -1             # <<<<<<<<<<<<<<
 *         # We have to jumpstart our calculation
 *         enter_t = intersect_t
 */
    __pyx_t_4 = ((__pyx_v_tdelta[__pyx_v_i]) < 0.0);
    if (__pyx_t_4) {
      __pyx_t_9 = __pyx_v_i;
      (__pyx_v_tdelta[__pyx_t_9]) = ((__pyx_v_tdelta[__pyx_t_9]) * -1.0);
      goto __pyx_L17;
    }
    __pyx_L17:;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":716
 *             if tdelta[i] < 0: tdelta[i] *= -1
 *         # We have to jumpstart our calculation
 *         enter_t = intersect_t             # <<<<<<<<<<<<<<
 *         hit = 0
 *         while 1:
 */
  __pyx_v_enter_t = __pyx_v_intersect_t;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":717
 *         # We have to jumpstart our calculation
 *         enter_t = intersect_t
 *         hit = 0             # <<<<<<<<<<<<<<
 *         while 1:
 *             # dims here is one less than the dimensions of the data,
 */
  __pyx_v_hit = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":718
 *         enter_t = intersect_t
 *         hit = 0
 *         while 1:             # <<<<<<<<<<<<<<
 *             # dims here is one less than the dimensions of the data,
 *             # but we are tracing on the grid, not on the data...
 */
  while (1) {
    if (!1) break;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":721
 *             # dims here is one less than the dimensions of the data,
 *             # but we are tracing on the grid, not on the data...
 *             if (not (0 <= cur_ind[0] < self.dims[0])) or \             # <<<<<<<<<<<<<<
 *                (not (0 <= cur_ind[1] < self.dims[1])) or \
 *                (not (0 <= cur_ind[2] < self.dims[2])):
 */
    __pyx_t_4 = (0 <= (__pyx_v_cur_ind[0]));
    if (__pyx_t_4) {
      __pyx_t_4 = ((__pyx_v_cur_ind[0]) < (__pyx_v_self->dims[0]));
    }
    __pyx_t_2 = (!__pyx_t_4);
    if (!__pyx_t_2) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":722
 *             # but we are tracing on the grid, not on the data...
 *             if (not (0 <= cur_ind[0] < self.dims[0])) or \
 *                (not (0 <= cur_ind[1] < self.dims[1])) or \             # <<<<<<<<<<<<<<
 *                (not (0 <= cur_ind[2] < self.dims[2])):
 *                 break
 */
      __pyx_t_4 = (0 <= (__pyx_v_cur_ind[1]));
      if (__pyx_t_4) {
        __pyx_t_4 = ((__pyx_v_cur_ind[1]) < (__pyx_v_self->dims[1]));
      }
      __pyx_t_3 = (!__pyx_t_4);
      if (!__pyx_t_3) {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":723
 *             if (not (0 <= cur_ind[0] < self.dims[0])) or \
 *                (not (0 <= cur_ind[1] < self.dims[1])) or \
 *                (not (0 <= cur_ind[2] < self.dims[2])):             # <<<<<<<<<<<<<<
 *                 break
 *             hit += 1
 */
        __pyx_t_4 = (0 <= (__pyx_v_cur_ind[2]));
        if (__pyx_t_4) {
          __pyx_t_4 = ((__pyx_v_cur_ind[2]) < (__pyx_v_self->dims[2]));
        }
        __pyx_t_5 = (!__pyx_t_4);
        __pyx_t_4 = __pyx_t_5;
      } else {
        __pyx_t_4 = __pyx_t_3;
      }
      __pyx_t_3 = __pyx_t_4;
    } else {
      __pyx_t_3 = __pyx_t_2;
    }
    if (__pyx_t_3) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":724
 *                (not (0 <= cur_ind[1] < self.dims[1])) or \
 *                (not (0 <= cur_ind[2] < self.dims[2])):
 *                 break             # <<<<<<<<<<<<<<
 *             hit += 1
 *             if tmax[0] < tmax[1]:
 */
      goto __pyx_L19_break;
      goto __pyx_L20;
    }
    __pyx_L20:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":725
 *                (not (0 <= cur_ind[2] < self.dims[2])):
 *                 break
 *             hit += 1             # <<<<<<<<<<<<<<
 *             if tmax[0] < tmax[1]:
 *                 if tmax[0] < tmax[2]:
 */
    __pyx_v_hit = (__pyx_v_hit + 1);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":726
 *                 break
 *             hit += 1
 *             if tmax[0] < tmax[1]:             # <<<<<<<<<<<<<<
 *                 if tmax[0] < tmax[2]:
 *                     exit_t = fmin(tmax[0], 1.0)
 */
    __pyx_t_3 = ((__pyx_v_tmax[0]) < (__pyx_v_tmax[1]));
    if (__pyx_t_3) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":727
 *             hit += 1
 *             if tmax[0] < tmax[1]:
 *                 if tmax[0] < tmax[2]:             # <<<<<<<<<<<<<<
 *                     exit_t = fmin(tmax[0], 1.0)
 *                     self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
 */
      __pyx_t_3 = ((__pyx_v_tmax[0]) < (__pyx_v_tmax[2]));
      if (__pyx_t_3) {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":728
 *             if tmax[0] < tmax[1]:
 *                 if tmax[0] < tmax[2]:
 *                     exit_t = fmin(tmax[0], 1.0)             # <<<<<<<<<<<<<<
 *                     self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
 *                                        rgba, tf)
 */
        __pyx_v_exit_t = __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_fmin((__pyx_v_tmax[0]), 1.0);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":730
 *                     exit_t = fmin(tmax[0], 1.0)
 *                     self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
 *                                        rgba, tf)             # <<<<<<<<<<<<<<
 *                     cur_ind[0] += step[0]
 *                     enter_t = tmax[0]
 */
        ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->sample_values(__pyx_v_self, __pyx_v_v_pos, __pyx_v_v_dir, __pyx_v_enter_t, __pyx_v_exit_t, __pyx_v_cur_ind, __pyx_v_rgba, __pyx_v_tf);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":731
 *                     self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
 *                                        rgba, tf)
 *                     cur_ind[0] += step[0]             # <<<<<<<<<<<<<<
 *                     enter_t = tmax[0]
 *                     tmax[0] += tdelta[0]
 */
        __pyx_t_10 = 0;
        (__pyx_v_cur_ind[__pyx_t_10]) = ((__pyx_v_cur_ind[__pyx_t_10]) + (__pyx_v_step[0]));

        /* "yt/utilities/lib/VolumeIntegrator.pyx":732
 *                                        rgba, tf)
 *                     cur_ind[0] += step[0]
 *                     enter_t = tmax[0]             # <<<<<<<<<<<<<<
 *                     tmax[0] += tdelta[0]
 *                 else:
 */
        __pyx_v_enter_t = (__pyx_v_tmax[0]);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":733
 *                     cur_ind[0] += step[0]
 *                     enter_t = tmax[0]
 *                     tmax[0] += tdelta[0]             # <<<<<<<<<<<<<<
 *                 else:
 *                     exit_t = fmin(tmax[2], 1.0)
 */
        __pyx_t_10 = 0;
        (__pyx_v_tmax[__pyx_t_10]) = ((__pyx_v_tmax[__pyx_t_10]) + (__pyx_v_tdelta[0]));
        goto __pyx_L22;
      }
      /*else*/ {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":735
 *                     tmax[0] += tdelta[0]
 *                 else:
 *                     exit_t = fmin(tmax[2], 1.0)             # <<<<<<<<<<<<<<
 *                     self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
 *                                        rgba, tf)
 */
        __pyx_v_exit_t = __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_fmin((__pyx_v_tmax[2]), 1.0);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":737
 *                     exit_t = fmin(tmax[2], 1.0)
 *                     self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
 *                                        rgba, tf)             # <<<<<<<<<<<<<<
 *                     cur_ind[2] += step[2]
 *                     enter_t = tmax[2]
 */
        ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->sample_values(__pyx_v_self, __pyx_v_v_pos, __pyx_v_v_dir, __pyx_v_enter_t, __pyx_v_exit_t, __pyx_v_cur_ind, __pyx_v_rgba, __pyx_v_tf);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":738
 *                     self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
 *                                        rgba, tf)
 *                     cur_ind[2] += step[2]             # <<<<<<<<<<<<<<
 *                     enter_t = tmax[2]
 *                     tmax[2] += tdelta[2]
 */
        __pyx_t_10 = 2;
        (__pyx_v_cur_ind[__pyx_t_10]) = ((__pyx_v_cur_ind[__pyx_t_10]) + (__pyx_v_step[2]));

        /* "yt/utilities/lib/VolumeIntegrator.pyx":739
 *                                        rgba, tf)
 *                     cur_ind[2] += step[2]
 *                     enter_t = tmax[2]             # <<<<<<<<<<<<<<
 *                     tmax[2] += tdelta[2]
 *             else:
 */
        __pyx_v_enter_t = (__pyx_v_tmax[2]);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":740
 *                     cur_ind[2] += step[2]
 *                     enter_t = tmax[2]
 *                     tmax[2] += tdelta[2]             # <<<<<<<<<<<<<<
 *             else:
 *                 if tmax[1] < tmax[2]:
 */
        __pyx_t_10 = 2;
        (__pyx_v_tmax[__pyx_t_10]) = ((__pyx_v_tmax[__pyx_t_10]) + (__pyx_v_tdelta[2]));
      }
      __pyx_L22:;
      goto __pyx_L21;
    }
    /*else*/ {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":742
 *                     tmax[2] += tdelta[2]
 *             else:
 *                 if tmax[1] < tmax[2]:             # <<<<<<<<<<<<<<
 *                     exit_t = fmin(tmax[1], 1.0)
 *                     self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
 */
      __pyx_t_3 = ((__pyx_v_tmax[1]) < (__pyx_v_tmax[2]));
      if (__pyx_t_3) {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":743
 *             else:
 *                 if tmax[1] < tmax[2]:
 *                     exit_t = fmin(tmax[1], 1.0)             # <<<<<<<<<<<<<<
 *                     self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
 *                                        rgba, tf)
 */
        __pyx_v_exit_t = __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_fmin((__pyx_v_tmax[1]), 1.0);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":745
 *                     exit_t = fmin(tmax[1], 1.0)
 *                     self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
 *                                        rgba, tf)             # <<<<<<<<<<<<<<
 *                     cur_ind[1] += step[1]
 *                     enter_t = tmax[1]
 */
        ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->sample_values(__pyx_v_self, __pyx_v_v_pos, __pyx_v_v_dir, __pyx_v_enter_t, __pyx_v_exit_t, __pyx_v_cur_ind, __pyx_v_rgba, __pyx_v_tf);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":746
 *                     self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
 *                                        rgba, tf)
 *                     cur_ind[1] += step[1]             # <<<<<<<<<<<<<<
 *                     enter_t = tmax[1]
 *                     tmax[1] += tdelta[1]
 */
        __pyx_t_10 = 1;
        (__pyx_v_cur_ind[__pyx_t_10]) = ((__pyx_v_cur_ind[__pyx_t_10]) + (__pyx_v_step[1]));

        /* "yt/utilities/lib/VolumeIntegrator.pyx":747
 *                                        rgba, tf)
 *                     cur_ind[1] += step[1]
 *                     enter_t = tmax[1]             # <<<<<<<<<<<<<<
 *                     tmax[1] += tdelta[1]
 *                 else:
 */
        __pyx_v_enter_t = (__pyx_v_tmax[1]);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":748
 *                     cur_ind[1] += step[1]
 *                     enter_t = tmax[1]
 *                     tmax[1] += tdelta[1]             # <<<<<<<<<<<<<<
 *                 else:
 *                     exit_t = fmin(tmax[2], 1.0)
 */
        __pyx_t_10 = 1;
        (__pyx_v_tmax[__pyx_t_10]) = ((__pyx_v_tmax[__pyx_t_10]) + (__pyx_v_tdelta[1]));
        goto __pyx_L23;
      }
      /*else*/ {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":750
 *                     tmax[1] += tdelta[1]
 *                 else:
 *                     exit_t = fmin(tmax[2], 1.0)             # <<<<<<<<<<<<<<
 *                     self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
 *                                        rgba, tf)
 */
        __pyx_v_exit_t = __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_fmin((__pyx_v_tmax[2]), 1.0);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":752
 *                     exit_t = fmin(tmax[2], 1.0)
 *                     self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
 *                                        rgba, tf)             # <<<<<<<<<<<<<<
 *                     cur_ind[2] += step[2]
 *                     enter_t = tmax[2]
 */
        ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->sample_values(__pyx_v_self, __pyx_v_v_pos, __pyx_v_v_dir, __pyx_v_enter_t, __pyx_v_exit_t, __pyx_v_cur_ind, __pyx_v_rgba, __pyx_v_tf);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":753
 *                     self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
 *                                        rgba, tf)
 *                     cur_ind[2] += step[2]             # <<<<<<<<<<<<<<
 *                     enter_t = tmax[2]
 *                     tmax[2] += tdelta[2]
 */
        __pyx_t_10 = 2;
        (__pyx_v_cur_ind[__pyx_t_10]) = ((__pyx_v_cur_ind[__pyx_t_10]) + (__pyx_v_step[2]));

        /* "yt/utilities/lib/VolumeIntegrator.pyx":754
 *                                        rgba, tf)
 *                     cur_ind[2] += step[2]
 *                     enter_t = tmax[2]             # <<<<<<<<<<<<<<
 *                     tmax[2] += tdelta[2]
 *             if enter_t >= 1.0: break
 */
        __pyx_v_enter_t = (__pyx_v_tmax[2]);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":755
 *                     cur_ind[2] += step[2]
 *                     enter_t = tmax[2]
 *                     tmax[2] += tdelta[2]             # <<<<<<<<<<<<<<
 *             if enter_t >= 1.0: break
 *         if return_t != NULL: return_t[0] = exit_t
 */
        __pyx_t_10 = 2;
        (__pyx_v_tmax[__pyx_t_10]) = ((__pyx_v_tmax[__pyx_t_10]) + (__pyx_v_tdelta[2]));
      }
      __pyx_L23:;
    }
    __pyx_L21:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":756
 *                     enter_t = tmax[2]
 *                     tmax[2] += tdelta[2]
 *             if enter_t >= 1.0: break             # <<<<<<<<<<<<<<
 *         if return_t != NULL: return_t[0] = exit_t
 *         return hit
 */
    __pyx_t_3 = (__pyx_v_enter_t >= 1.0);
    if (__pyx_t_3) {
      goto __pyx_L19_break;
      goto __pyx_L24;
    }
    __pyx_L24:;
  }
  __pyx_L19_break:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":757
 *                     tmax[2] += tdelta[2]
 *             if enter_t >= 1.0: break
 *         if return_t != NULL: return_t[0] = exit_t             # <<<<<<<<<<<<<<
 *         return hit
 * 
 */
  __pyx_t_3 = (__pyx_v_return_t != NULL);
  if (__pyx_t_3) {
    (__pyx_v_return_t[0]) = __pyx_v_exit_t;
    goto __pyx_L25;
  }
  __pyx_L25:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":758
 *             if enter_t >= 1.0: break
 *         if return_t != NULL: return_t[0] = exit_t
 *         return hit             # <<<<<<<<<<<<<<
 * 
 *     @cython.boundscheck(False)
 */
  __pyx_r = __pyx_v_hit;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("yt.utilities.lib.VolumeIntegrator.PartitionedGrid.integrate_ray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":762
 *     @cython.boundscheck(False)
 *     @cython.wraparound(False)
 *     cdef void sample_values(self,             # <<<<<<<<<<<<<<
 *                             np.float64_t v_pos[3],
 *                             np.float64_t v_dir[3],
 */

static void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_sample_values(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, __pyx_t_5numpy_float64_t *__pyx_v_v_pos, __pyx_t_5numpy_float64_t *__pyx_v_v_dir, __pyx_t_5numpy_float64_t __pyx_v_enter_t, __pyx_t_5numpy_float64_t __pyx_v_exit_t, int *__pyx_v_ci, __pyx_t_5numpy_float64_t *__pyx_v_rgba, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_tf) {
  __pyx_t_5numpy_float64_t __pyx_v_dp[3];
  __pyx_t_5numpy_float64_t __pyx_v_pos[3];
  __pyx_t_5numpy_float64_t __pyx_v_dt;
  __pyx_t_5numpy_float64_t __pyx_v_grad[3];
  __pyx_t_5numpy_float64_t __pyx_v_ds[3];
  __pyx_t_5numpy_float64_t __pyx_v_local_dds[3];
  __pyx_t_5numpy_float64_t __pyx_v_cell_left[3];
  CYTHON_UNUSED int __pyx_v_dti;
  int __pyx_v_i;
  struct kdres *__pyx_v_ballq;
  int __pyx_v_offset;
  __pyx_t_5numpy_float64_t __pyx_v_slopes[6];
  __pyx_t_5numpy_float64_t __pyx_v_temp;
  __Pyx_RefNannyDeclarations
  __pyx_t_5numpy_float64_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sample_values", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":773
 *         cdef np.float64_t grad[3], ds[3]
 *         cdef np.float64_t local_dds[3], cell_left[3]
 *         grad[0] = grad[1] = grad[2] = 0.0             # <<<<<<<<<<<<<<
 *         cdef int dti, i
 *         cdef kdtree_utils.kdres *ballq = NULL
 */
  (__pyx_v_grad[0]) = 0.0;
  (__pyx_v_grad[1]) = 0.0;
  (__pyx_v_grad[2]) = 0.0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":775
 *         grad[0] = grad[1] = grad[2] = 0.0
 *         cdef int dti, i
 *         cdef kdtree_utils.kdres *ballq = NULL             # <<<<<<<<<<<<<<
 *         dt = (exit_t - enter_t) / tf.ns # 4 samples should be dt=0.25
 *         cdef int offset = ci[0] * (self.dims[1] + 1) * (self.dims[2] + 1) \
 */
  __pyx_v_ballq = NULL;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":776
 *         cdef int dti, i
 *         cdef kdtree_utils.kdres *ballq = NULL
 *         dt = (exit_t - enter_t) / tf.ns # 4 samples should be dt=0.25             # <<<<<<<<<<<<<<
 *         cdef int offset = ci[0] * (self.dims[1] + 1) * (self.dims[2] + 1) \
 *                         + ci[1] * (self.dims[2] + 1) + ci[2]
 */
  __pyx_t_1 = (__pyx_v_exit_t - __pyx_v_enter_t);
  if (unlikely(__pyx_v_tf->ns == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "float division");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_dt = (__pyx_t_1 / __pyx_v_tf->ns);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":778
 *         dt = (exit_t - enter_t) / tf.ns # 4 samples should be dt=0.25
 *         cdef int offset = ci[0] * (self.dims[1] + 1) * (self.dims[2] + 1) \
 *                         + ci[1] * (self.dims[2] + 1) + ci[2]             # <<<<<<<<<<<<<<
 *         # The initial and final values can be linearly interpolated between; so
 *         # we just have to calculate our initial and final values.
 */
  __pyx_v_offset = (((((__pyx_v_ci[0]) * ((__pyx_v_self->dims[1]) + 1)) * ((__pyx_v_self->dims[2]) + 1)) + ((__pyx_v_ci[1]) * ((__pyx_v_self->dims[2]) + 1))) + (__pyx_v_ci[2]));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":782
 *         # we just have to calculate our initial and final values.
 *         cdef np.float64_t slopes[6]
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             dp[i] = (enter_t + 0.5 * dt) * v_dir[i] + v_pos[i]
 *             dp[i] -= ci[i] * self.dds[i] + self.left_edge[i]
 */
  for (__pyx_t_2 = 0; __pyx_t_2 < 3; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":783
 *         cdef np.float64_t slopes[6]
 *         for i in range(3):
 *             dp[i] = (enter_t + 0.5 * dt) * v_dir[i] + v_pos[i]             # <<<<<<<<<<<<<<
 *             dp[i] -= ci[i] * self.dds[i] + self.left_edge[i]
 *             dp[i] *= self.idds[i]
 */
    (__pyx_v_dp[__pyx_v_i]) = (((__pyx_v_enter_t + (0.5 * __pyx_v_dt)) * (__pyx_v_v_dir[__pyx_v_i])) + (__pyx_v_v_pos[__pyx_v_i]));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":784
 *         for i in range(3):
 *             dp[i] = (enter_t + 0.5 * dt) * v_dir[i] + v_pos[i]
 *             dp[i] -= ci[i] * self.dds[i] + self.left_edge[i]             # <<<<<<<<<<<<<<
 *             dp[i] *= self.idds[i]
 *             ds[i] = v_dir[i] * self.idds[i] * dt
 */
    __pyx_t_3 = __pyx_v_i;
    (__pyx_v_dp[__pyx_t_3]) = ((__pyx_v_dp[__pyx_t_3]) - (((__pyx_v_ci[__pyx_v_i]) * (__pyx_v_self->dds[__pyx_v_i])) + (__pyx_v_self->left_edge[__pyx_v_i])));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":785
 *             dp[i] = (enter_t + 0.5 * dt) * v_dir[i] + v_pos[i]
 *             dp[i] -= ci[i] * self.dds[i] + self.left_edge[i]
 *             dp[i] *= self.idds[i]             # <<<<<<<<<<<<<<
 *             ds[i] = v_dir[i] * self.idds[i] * dt
 *         for i in range(self.n_fields):
 */
    __pyx_t_3 = __pyx_v_i;
    (__pyx_v_dp[__pyx_t_3]) = ((__pyx_v_dp[__pyx_t_3]) * (__pyx_v_self->idds[__pyx_v_i]));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":786
 *             dp[i] -= ci[i] * self.dds[i] + self.left_edge[i]
 *             dp[i] *= self.idds[i]
 *             ds[i] = v_dir[i] * self.idds[i] * dt             # <<<<<<<<<<<<<<
 *         for i in range(self.n_fields):
 *             slopes[i] = offset_interpolate(self.dims, dp,
 */
    (__pyx_v_ds[__pyx_v_i]) = (((__pyx_v_v_dir[__pyx_v_i]) * (__pyx_v_self->idds[__pyx_v_i])) * __pyx_v_dt);
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":787
 *             dp[i] *= self.idds[i]
 *             ds[i] = v_dir[i] * self.idds[i] * dt
 *         for i in range(self.n_fields):             # <<<<<<<<<<<<<<
 *             slopes[i] = offset_interpolate(self.dims, dp,
 *                             self.data[i] + offset)
 */
  __pyx_t_2 = __pyx_v_self->n_fields;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":788
 *             ds[i] = v_dir[i] * self.idds[i] * dt
 *         for i in range(self.n_fields):
 *             slopes[i] = offset_interpolate(self.dims, dp,             # <<<<<<<<<<<<<<
 *                             self.data[i] + offset)
 *         for i in range(3):
 */
    (__pyx_v_slopes[__pyx_v_i]) = offset_interpolate(__pyx_v_self->dims, __pyx_v_dp, ((__pyx_v_self->data[__pyx_v_i]) + __pyx_v_offset));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":790
 *             slopes[i] = offset_interpolate(self.dims, dp,
 *                             self.data[i] + offset)
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             dp[i] += ds[i] * tf.ns
 *         cdef np.float64_t temp
 */
  for (__pyx_t_2 = 0; __pyx_t_2 < 3; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":791
 *                             self.data[i] + offset)
 *         for i in range(3):
 *             dp[i] += ds[i] * tf.ns             # <<<<<<<<<<<<<<
 *         cdef np.float64_t temp
 *         for i in range(self.n_fields):
 */
    __pyx_t_3 = __pyx_v_i;
    (__pyx_v_dp[__pyx_t_3]) = ((__pyx_v_dp[__pyx_t_3]) + ((__pyx_v_ds[__pyx_v_i]) * __pyx_v_tf->ns));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":793
 *             dp[i] += ds[i] * tf.ns
 *         cdef np.float64_t temp
 *         for i in range(self.n_fields):             # <<<<<<<<<<<<<<
 *             temp = slopes[i]
 *             slopes[i] -= offset_interpolate(self.dims, dp,
 */
  __pyx_t_2 = __pyx_v_self->n_fields;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":794
 *         cdef np.float64_t temp
 *         for i in range(self.n_fields):
 *             temp = slopes[i]             # <<<<<<<<<<<<<<
 *             slopes[i] -= offset_interpolate(self.dims, dp,
 *                              self.data[i] + offset)
 */
    __pyx_v_temp = (__pyx_v_slopes[__pyx_v_i]);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":795
 *         for i in range(self.n_fields):
 *             temp = slopes[i]
 *             slopes[i] -= offset_interpolate(self.dims, dp,             # <<<<<<<<<<<<<<
 *                              self.data[i] + offset)
 *             slopes[i] *= -1.0/tf.ns
 */
    __pyx_t_4 = __pyx_v_i;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":796
 *             temp = slopes[i]
 *             slopes[i] -= offset_interpolate(self.dims, dp,
 *                              self.data[i] + offset)             # <<<<<<<<<<<<<<
 *             slopes[i] *= -1.0/tf.ns
 *             self.dvs[i] = temp
 */
    (__pyx_v_slopes[__pyx_t_4]) = ((__pyx_v_slopes[__pyx_t_4]) - offset_interpolate(__pyx_v_self->dims, __pyx_v_dp, ((__pyx_v_self->data[__pyx_v_i]) + __pyx_v_offset)));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":797
 *             slopes[i] -= offset_interpolate(self.dims, dp,
 *                              self.data[i] + offset)
 *             slopes[i] *= -1.0/tf.ns             # <<<<<<<<<<<<<<
 *             self.dvs[i] = temp
 *         if self.star_list != NULL:
 */
    __pyx_t_4 = __pyx_v_i;
    if (unlikely(__pyx_v_tf->ns == 0)) {
      PyErr_Format(PyExc_ZeroDivisionError, "float division");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    (__pyx_v_slopes[__pyx_t_4]) = ((__pyx_v_slopes[__pyx_t_4]) * (-1.0 / __pyx_v_tf->ns));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":798
 *                              self.data[i] + offset)
 *             slopes[i] *= -1.0/tf.ns
 *             self.dvs[i] = temp             # <<<<<<<<<<<<<<
 *         if self.star_list != NULL:
 *             for i in range(3):
 */
    (__pyx_v_self->dvs[__pyx_v_i]) = __pyx_v_temp;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":799
 *             slopes[i] *= -1.0/tf.ns
 *             self.dvs[i] = temp
 *         if self.star_list != NULL:             # <<<<<<<<<<<<<<
 *             for i in range(3):
 *                 cell_left[i] = ci[i] * self.dds[i] + self.left_edge[i]
 */
  __pyx_t_5 = (__pyx_v_self->star_list != NULL);
  if (__pyx_t_5) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":800
 *             self.dvs[i] = temp
 *         if self.star_list != NULL:
 *             for i in range(3):             # <<<<<<<<<<<<<<
 *                 cell_left[i] = ci[i] * self.dds[i] + self.left_edge[i]
 *                 # this gets us dp as the current first sample position
 */
    for (__pyx_t_2 = 0; __pyx_t_2 < 3; __pyx_t_2+=1) {
      __pyx_v_i = __pyx_t_2;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":801
 *         if self.star_list != NULL:
 *             for i in range(3):
 *                 cell_left[i] = ci[i] * self.dds[i] + self.left_edge[i]             # <<<<<<<<<<<<<<
 *                 # this gets us dp as the current first sample position
 *                 pos[i] = (enter_t + 0.5 * dt) * v_dir[i] + v_pos[i]
 */
      (__pyx_v_cell_left[__pyx_v_i]) = (((__pyx_v_ci[__pyx_v_i]) * (__pyx_v_self->dds[__pyx_v_i])) + (__pyx_v_self->left_edge[__pyx_v_i]));

      /* "yt/utilities/lib/VolumeIntegrator.pyx":803
 *                 cell_left[i] = ci[i] * self.dds[i] + self.left_edge[i]
 *                 # this gets us dp as the current first sample position
 *                 pos[i] = (enter_t + 0.5 * dt) * v_dir[i] + v_pos[i]             # <<<<<<<<<<<<<<
 *                 dp[i] -= tf.ns * ds[i]
 *                 local_dds[i] = v_dir[i] * dt
 */
      (__pyx_v_pos[__pyx_v_i]) = (((__pyx_v_enter_t + (0.5 * __pyx_v_dt)) * (__pyx_v_v_dir[__pyx_v_i])) + (__pyx_v_v_pos[__pyx_v_i]));

      /* "yt/utilities/lib/VolumeIntegrator.pyx":804
 *                 # this gets us dp as the current first sample position
 *                 pos[i] = (enter_t + 0.5 * dt) * v_dir[i] + v_pos[i]
 *                 dp[i] -= tf.ns * ds[i]             # <<<<<<<<<<<<<<
 *                 local_dds[i] = v_dir[i] * dt
 *             ballq = kdtree_utils.kd_nearest_range3(
 */
      __pyx_t_3 = __pyx_v_i;
      (__pyx_v_dp[__pyx_t_3]) = ((__pyx_v_dp[__pyx_t_3]) - (__pyx_v_tf->ns * (__pyx_v_ds[__pyx_v_i])));

      /* "yt/utilities/lib/VolumeIntegrator.pyx":805
 *                 pos[i] = (enter_t + 0.5 * dt) * v_dir[i] + v_pos[i]
 *                 dp[i] -= tf.ns * ds[i]
 *                 local_dds[i] = v_dir[i] * dt             # <<<<<<<<<<<<<<
 *             ballq = kdtree_utils.kd_nearest_range3(
 *                 self.star_list, cell_left[0] + self.dds[0]*0.5,
 */
      (__pyx_v_local_dds[__pyx_v_i]) = ((__pyx_v_v_dir[__pyx_v_i]) * __pyx_v_dt);
    }

    /* "yt/utilities/lib/VolumeIntegrator.pyx":810
 *                                 cell_left[1] + self.dds[1]*0.5,
 *                                 cell_left[2] + self.dds[2]*0.5,
 *                                 self.star_er + 0.9*self.dds[0])             # <<<<<<<<<<<<<<
 *                                             # ~0.866 + a bit
 *         for dti in range(tf.ns):
 */
    __pyx_v_ballq = kd_nearest_range3(__pyx_v_self->star_list, ((__pyx_v_cell_left[0]) + ((__pyx_v_self->dds[0]) * 0.5)), ((__pyx_v_cell_left[1]) + ((__pyx_v_self->dds[1]) * 0.5)), ((__pyx_v_cell_left[2]) + ((__pyx_v_self->dds[2]) * 0.5)), (__pyx_v_self->star_er + (0.9 * (__pyx_v_self->dds[0]))));
    goto __pyx_L11;
  }
  __pyx_L11:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":812
 *                                 self.star_er + 0.9*self.dds[0])
 *                                             # ~0.866 + a bit
 *         for dti in range(tf.ns):             # <<<<<<<<<<<<<<
 *             #if (dv < tf.x_bounds[0]) or (dv > tf.x_bounds[1]):
 *             #    continue
 */
  __pyx_t_2 = __pyx_v_tf->ns;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_dti = __pyx_t_3;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":815
 *             #if (dv < tf.x_bounds[0]) or (dv > tf.x_bounds[1]):
 *             #    continue
 *             if self.star_list != NULL:             # <<<<<<<<<<<<<<
 *                 self.add_stars(ballq, dt, pos, rgba)
 *                 for i in range(3):
 */
    __pyx_t_5 = (__pyx_v_self->star_list != NULL);
    if (__pyx_t_5) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":816
 *             #    continue
 *             if self.star_list != NULL:
 *                 self.add_stars(ballq, dt, pos, rgba)             # <<<<<<<<<<<<<<
 *                 for i in range(3):
 *                     dp[i] += ds[i]
 */
      ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->add_stars(__pyx_v_self, __pyx_v_ballq, __pyx_v_dt, __pyx_v_pos, __pyx_v_rgba);

      /* "yt/utilities/lib/VolumeIntegrator.pyx":817
 *             if self.star_list != NULL:
 *                 self.add_stars(ballq, dt, pos, rgba)
 *                 for i in range(3):             # <<<<<<<<<<<<<<
 *                     dp[i] += ds[i]
 *                     pos[i] += local_dds[i]
 */
      for (__pyx_t_4 = 0; __pyx_t_4 < 3; __pyx_t_4+=1) {
        __pyx_v_i = __pyx_t_4;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":818
 *                 self.add_stars(ballq, dt, pos, rgba)
 *                 for i in range(3):
 *                     dp[i] += ds[i]             # <<<<<<<<<<<<<<
 *                     pos[i] += local_dds[i]
 *             tf.eval_transfer(dt, self.dvs, rgba, grad)
 */
        __pyx_t_6 = __pyx_v_i;
        (__pyx_v_dp[__pyx_t_6]) = ((__pyx_v_dp[__pyx_t_6]) + (__pyx_v_ds[__pyx_v_i]));

        /* "yt/utilities/lib/VolumeIntegrator.pyx":819
 *                 for i in range(3):
 *                     dp[i] += ds[i]
 *                     pos[i] += local_dds[i]             # <<<<<<<<<<<<<<
 *             tf.eval_transfer(dt, self.dvs, rgba, grad)
 *             for i in range(self.n_fields):
 */
        __pyx_t_6 = __pyx_v_i;
        (__pyx_v_pos[__pyx_t_6]) = ((__pyx_v_pos[__pyx_t_6]) + (__pyx_v_local_dds[__pyx_v_i]));
      }
      goto __pyx_L16;
    }
    __pyx_L16:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":820
 *                     dp[i] += ds[i]
 *                     pos[i] += local_dds[i]
 *             tf.eval_transfer(dt, self.dvs, rgba, grad)             # <<<<<<<<<<<<<<
 *             for i in range(self.n_fields):
 *                 self.dvs[i] += slopes[i]
 */
    ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *)__pyx_v_tf->__pyx_vtab)->eval_transfer(__pyx_v_tf, __pyx_v_dt, __pyx_v_self->dvs, __pyx_v_rgba, __pyx_v_grad);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":821
 *                     pos[i] += local_dds[i]
 *             tf.eval_transfer(dt, self.dvs, rgba, grad)
 *             for i in range(self.n_fields):             # <<<<<<<<<<<<<<
 *                 self.dvs[i] += slopes[i]
 *         if ballq != NULL: kdtree_utils.kd_res_free(ballq)
 */
    __pyx_t_4 = __pyx_v_self->n_fields;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_4; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":822
 *             tf.eval_transfer(dt, self.dvs, rgba, grad)
 *             for i in range(self.n_fields):
 *                 self.dvs[i] += slopes[i]             # <<<<<<<<<<<<<<
 *         if ballq != NULL: kdtree_utils.kd_res_free(ballq)
 * 
 */
      __pyx_t_7 = __pyx_v_i;
      (__pyx_v_self->dvs[__pyx_t_7]) = ((__pyx_v_self->dvs[__pyx_t_7]) + (__pyx_v_slopes[__pyx_v_i]));
    }
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":823
 *             for i in range(self.n_fields):
 *                 self.dvs[i] += slopes[i]
 *         if ballq != NULL: kdtree_utils.kd_res_free(ballq)             # <<<<<<<<<<<<<<
 * 
 *     @cython.boundscheck(False)
 */
  __pyx_t_5 = (__pyx_v_ballq != NULL);
  if (__pyx_t_5) {
    kd_res_free(__pyx_v_ballq);
    goto __pyx_L21;
  }
  __pyx_L21:;

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("yt.utilities.lib.VolumeIntegrator.PartitionedGrid.sample_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":828
 *     @cython.wraparound(False)
 *     @cython.cdivision(True)
 *     cdef void add_stars(self, kdtree_utils.kdres *ballq,             # <<<<<<<<<<<<<<
 *             np.float64_t dt, np.float64_t pos[3], np.float64_t *rgba):
 *         cdef int i, n, ns
 */

static void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_add_stars(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, struct kdres *__pyx_v_ballq, __pyx_t_5numpy_float64_t __pyx_v_dt, __pyx_t_5numpy_float64_t *__pyx_v_pos, __pyx_t_5numpy_float64_t *__pyx_v_rgba) {
  int __pyx_v_i;
  CYTHON_UNUSED int __pyx_v_n;
  int __pyx_v_ns;
  __pyx_t_5numpy_float64_t __pyx_v_px;
  __pyx_t_5numpy_float64_t __pyx_v_py;
  __pyx_t_5numpy_float64_t __pyx_v_pz;
  __pyx_t_5numpy_float64_t __pyx_v_gexp;
  __pyx_t_5numpy_float64_t __pyx_v_gaussian;
  __pyx_t_5numpy_float64_t *__pyx_v_colors;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("add_stars", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":833
 *         cdef np.float64_t px, py, pz
 *         cdef np.float64_t gexp, gaussian
 *         cdef np.float64_t* colors = NULL             # <<<<<<<<<<<<<<
 *         ns = kdtree_utils.kd_res_size(ballq)
 *         for n in range(ns):
 */
  __pyx_v_colors = NULL;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":834
 *         cdef np.float64_t gexp, gaussian
 *         cdef np.float64_t* colors = NULL
 *         ns = kdtree_utils.kd_res_size(ballq)             # <<<<<<<<<<<<<<
 *         for n in range(ns):
 *             # We've got Dodgson here!
 */
  __pyx_v_ns = kd_res_size(__pyx_v_ballq);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":835
 *         cdef np.float64_t* colors = NULL
 *         ns = kdtree_utils.kd_res_size(ballq)
 *         for n in range(ns):             # <<<<<<<<<<<<<<
 *             # We've got Dodgson here!
 *             kdtree_utils.kd_res_item3(ballq, &px, &py, &pz)
 */
  __pyx_t_1 = __pyx_v_ns;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_n = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":837
 *         for n in range(ns):
 *             # We've got Dodgson here!
 *             kdtree_utils.kd_res_item3(ballq, &px, &py, &pz)             # <<<<<<<<<<<<<<
 *             colors = <np.float64_t *> kdtree_utils.kd_res_item_data(ballq)
 *             kdtree_utils.kd_res_next(ballq)
 */
    kd_res_item3(__pyx_v_ballq, (&__pyx_v_px), (&__pyx_v_py), (&__pyx_v_pz));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":838
 *             # We've got Dodgson here!
 *             kdtree_utils.kd_res_item3(ballq, &px, &py, &pz)
 *             colors = <np.float64_t *> kdtree_utils.kd_res_item_data(ballq)             # <<<<<<<<<<<<<<
 *             kdtree_utils.kd_res_next(ballq)
 *             gexp = (px - pos[0])*(px - pos[0]) \
 */
    __pyx_v_colors = ((__pyx_t_5numpy_float64_t *)kd_res_item_data(__pyx_v_ballq));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":839
 *             kdtree_utils.kd_res_item3(ballq, &px, &py, &pz)
 *             colors = <np.float64_t *> kdtree_utils.kd_res_item_data(ballq)
 *             kdtree_utils.kd_res_next(ballq)             # <<<<<<<<<<<<<<
 *             gexp = (px - pos[0])*(px - pos[0]) \
 *                  + (py - pos[1])*(py - pos[1]) \
 */
    kd_res_next(__pyx_v_ballq);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":842
 *             gexp = (px - pos[0])*(px - pos[0]) \
 *                  + (py - pos[1])*(py - pos[1]) \
 *                  + (pz - pos[2])*(pz - pos[2])             # <<<<<<<<<<<<<<
 *             gaussian = self.star_coeff * expl(-gexp/self.star_sigma_num)
 *             for i in range(3): rgba[i] += gaussian*dt*colors[i]
 */
    __pyx_v_gexp = ((((__pyx_v_px - (__pyx_v_pos[0])) * (__pyx_v_px - (__pyx_v_pos[0]))) + ((__pyx_v_py - (__pyx_v_pos[1])) * (__pyx_v_py - (__pyx_v_pos[1])))) + ((__pyx_v_pz - (__pyx_v_pos[2])) * (__pyx_v_pz - (__pyx_v_pos[2]))));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":843
 *                  + (py - pos[1])*(py - pos[1]) \
 *                  + (pz - pos[2])*(pz - pos[2])
 *             gaussian = self.star_coeff * expl(-gexp/self.star_sigma_num)             # <<<<<<<<<<<<<<
 *             for i in range(3): rgba[i] += gaussian*dt*colors[i]
 *         kdtree_utils.kd_res_rewind(ballq)
 */
    __pyx_v_gaussian = (__pyx_v_self->star_coeff * expl(((-__pyx_v_gexp) / __pyx_v_self->star_sigma_num)));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":844
 *                  + (pz - pos[2])*(pz - pos[2])
 *             gaussian = self.star_coeff * expl(-gexp/self.star_sigma_num)
 *             for i in range(3): rgba[i] += gaussian*dt*colors[i]             # <<<<<<<<<<<<<<
 *         kdtree_utils.kd_res_rewind(ballq)
 * 
 */
    for (__pyx_t_3 = 0; __pyx_t_3 < 3; __pyx_t_3+=1) {
      __pyx_v_i = __pyx_t_3;
      __pyx_t_4 = __pyx_v_i;
      (__pyx_v_rgba[__pyx_t_4]) = ((__pyx_v_rgba[__pyx_t_4]) + ((__pyx_v_gaussian * __pyx_v_dt) * (__pyx_v_colors[__pyx_v_i])));
    }
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":845
 *             gaussian = self.star_coeff * expl(-gexp/self.star_sigma_num)
 *             for i in range(3): rgba[i] += gaussian*dt*colors[i]
 *         kdtree_utils.kd_res_rewind(ballq)             # <<<<<<<<<<<<<<
 * 
 *     @cython.boundscheck(False)
 */
  kd_res_rewind(__pyx_v_ballq);

  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7integrate_streamline(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7integrate_streamline(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_pos = 0;
  __pyx_t_5numpy_float64_t __pyx_v_h;
  PyObject *__pyx_v_mag = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("integrate_streamline (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__pos,&__pyx_n_s__h,&__pyx_n_s__mag,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pos)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__h)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("integrate_streamline", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mag)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("integrate_streamline", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "integrate_streamline") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_pos = values[0];
    __pyx_v_h = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_h == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_mag = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("integrate_streamline", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.PartitionedGrid.integrate_streamline", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_6integrate_streamline(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self), __pyx_v_pos, __pyx_v_h, __pyx_v_mag);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":850
 *     @cython.wraparound(False)
 *     @cython.cdivision(True)
 *     def integrate_streamline(self, pos, np.float64_t h, mag):             # <<<<<<<<<<<<<<
 *         cdef np.float64_t cmag[1]
 *         cdef np.float64_t k1[3], k2[3], k3[3], k4[3]
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_6integrate_streamline(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, PyObject *__pyx_v_pos, __pyx_t_5numpy_float64_t __pyx_v_h, PyObject *__pyx_v_mag) {
  __pyx_t_5numpy_float64_t __pyx_v_cmag[1];
  __pyx_t_5numpy_float64_t __pyx_v_k1[3];
  __pyx_t_5numpy_float64_t __pyx_v_k2[3];
  __pyx_t_5numpy_float64_t __pyx_v_k3[3];
  __pyx_t_5numpy_float64_t __pyx_v_k4[3];
  __pyx_t_5numpy_float64_t __pyx_v_newpos[3];
  __pyx_t_5numpy_float64_t __pyx_v_oldpos[3];
  long __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __pyx_t_5numpy_float64_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("integrate_streamline", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":854
 *         cdef np.float64_t k1[3], k2[3], k3[3], k4[3]
 *         cdef np.float64_t newpos[3], oldpos[3]
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             newpos[i] = oldpos[i] = pos[i]
 *         self.get_vector_field(newpos, k1, cmag)
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":855
 *         cdef np.float64_t newpos[3], oldpos[3]
 *         for i in range(3):
 *             newpos[i] = oldpos[i] = pos[i]             # <<<<<<<<<<<<<<
 *         self.get_vector_field(newpos, k1, cmag)
 *         for i in range(3):
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pos, __pyx_v_i, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    (__pyx_v_newpos[__pyx_v_i]) = __pyx_t_3;
    __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    (__pyx_v_oldpos[__pyx_v_i]) = __pyx_t_3;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":856
 *         for i in range(3):
 *             newpos[i] = oldpos[i] = pos[i]
 *         self.get_vector_field(newpos, k1, cmag)             # <<<<<<<<<<<<<<
 *         for i in range(3):
 *             newpos[i] = oldpos[i] + 0.5*k1[i]*h
 */
  ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->get_vector_field(__pyx_v_self, __pyx_v_newpos, __pyx_v_k1, __pyx_v_cmag);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":857
 *             newpos[i] = oldpos[i] = pos[i]
 *         self.get_vector_field(newpos, k1, cmag)
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             newpos[i] = oldpos[i] + 0.5*k1[i]*h
 * 
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":858
 *         self.get_vector_field(newpos, k1, cmag)
 *         for i in range(3):
 *             newpos[i] = oldpos[i] + 0.5*k1[i]*h             # <<<<<<<<<<<<<<
 * 
 *         if not (self.left_edge[0] < newpos[0] and newpos[0] < self.right_edge[0] and \
 */
    (__pyx_v_newpos[__pyx_v_i]) = ((__pyx_v_oldpos[__pyx_v_i]) + ((0.5 * (__pyx_v_k1[__pyx_v_i])) * __pyx_v_h));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":860
 *             newpos[i] = oldpos[i] + 0.5*k1[i]*h
 * 
 *         if not (self.left_edge[0] < newpos[0] and newpos[0] < self.right_edge[0] and \             # <<<<<<<<<<<<<<
 *                 self.left_edge[1] < newpos[1] and newpos[1] < self.right_edge[1] and \
 *                 self.left_edge[2] < newpos[2] and newpos[2] < self.right_edge[2]):
 */
  __pyx_t_4 = ((__pyx_v_self->left_edge[0]) < (__pyx_v_newpos[0]));
  if (__pyx_t_4) {
    __pyx_t_5 = ((__pyx_v_newpos[0]) < (__pyx_v_self->right_edge[0]));
    if (__pyx_t_5) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":861
 * 
 *         if not (self.left_edge[0] < newpos[0] and newpos[0] < self.right_edge[0] and \
 *                 self.left_edge[1] < newpos[1] and newpos[1] < self.right_edge[1] and \             # <<<<<<<<<<<<<<
 *                 self.left_edge[2] < newpos[2] and newpos[2] < self.right_edge[2]):
 *             if mag is not None:
 */
      __pyx_t_6 = ((__pyx_v_self->left_edge[1]) < (__pyx_v_newpos[1]));
      if (__pyx_t_6) {
        __pyx_t_7 = ((__pyx_v_newpos[1]) < (__pyx_v_self->right_edge[1]));
        if (__pyx_t_7) {

          /* "yt/utilities/lib/VolumeIntegrator.pyx":862
 *         if not (self.left_edge[0] < newpos[0] and newpos[0] < self.right_edge[0] and \
 *                 self.left_edge[1] < newpos[1] and newpos[1] < self.right_edge[1] and \
 *                 self.left_edge[2] < newpos[2] and newpos[2] < self.right_edge[2]):             # <<<<<<<<<<<<<<
 *             if mag is not None:
 *                 mag[0] = cmag[0]
 */
          __pyx_t_8 = ((__pyx_v_self->left_edge[2]) < (__pyx_v_newpos[2]));
          if (__pyx_t_8) {
            __pyx_t_9 = ((__pyx_v_newpos[2]) < (__pyx_v_self->right_edge[2]));
            __pyx_t_10 = __pyx_t_9;
          } else {
            __pyx_t_10 = __pyx_t_8;
          }
          __pyx_t_8 = __pyx_t_10;
        } else {
          __pyx_t_8 = __pyx_t_7;
        }
        __pyx_t_7 = __pyx_t_8;
      } else {
        __pyx_t_7 = __pyx_t_6;
      }
      __pyx_t_6 = __pyx_t_7;
    } else {
      __pyx_t_6 = __pyx_t_5;
    }
    __pyx_t_5 = __pyx_t_6;
  } else {
    __pyx_t_5 = __pyx_t_4;
  }
  __pyx_t_4 = (!__pyx_t_5);
  if (__pyx_t_4) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":863
 *                 self.left_edge[1] < newpos[1] and newpos[1] < self.right_edge[1] and \
 *                 self.left_edge[2] < newpos[2] and newpos[2] < self.right_edge[2]):
 *             if mag is not None:             # <<<<<<<<<<<<<<
 *                 mag[0] = cmag[0]
 *             for i in range(3):
 */
    __pyx_t_4 = (__pyx_v_mag != Py_None);
    if (__pyx_t_4) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":864
 *                 self.left_edge[2] < newpos[2] and newpos[2] < self.right_edge[2]):
 *             if mag is not None:
 *                 mag[0] = cmag[0]             # <<<<<<<<<<<<<<
 *             for i in range(3):
 *                 pos[i] = newpos[i]
 */
      __pyx_t_2 = PyFloat_FromDouble((__pyx_v_cmag[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_SetItemInt(__pyx_v_mag, 0, __pyx_t_2, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":865
 *             if mag is not None:
 *                 mag[0] = cmag[0]
 *             for i in range(3):             # <<<<<<<<<<<<<<
 *                 pos[i] = newpos[i]
 *             return
 */
    for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
      __pyx_v_i = __pyx_t_1;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":866
 *                 mag[0] = cmag[0]
 *             for i in range(3):
 *                 pos[i] = newpos[i]             # <<<<<<<<<<<<<<
 *             return
 * 
 */
      __pyx_t_2 = PyFloat_FromDouble((__pyx_v_newpos[__pyx_v_i])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_SetItemInt(__pyx_v_pos, __pyx_v_i, __pyx_t_2, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "yt/utilities/lib/VolumeIntegrator.pyx":867
 *             for i in range(3):
 *                 pos[i] = newpos[i]
 *             return             # <<<<<<<<<<<<<<
 * 
 *         self.get_vector_field(newpos, k2, cmag)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":869
 *             return
 * 
 *         self.get_vector_field(newpos, k2, cmag)             # <<<<<<<<<<<<<<
 *         for i in range(3):
 *             newpos[i] = oldpos[i] + 0.5*k2[i]*h
 */
  ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->get_vector_field(__pyx_v_self, __pyx_v_newpos, __pyx_v_k2, __pyx_v_cmag);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":870
 * 
 *         self.get_vector_field(newpos, k2, cmag)
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             newpos[i] = oldpos[i] + 0.5*k2[i]*h
 * 
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":871
 *         self.get_vector_field(newpos, k2, cmag)
 *         for i in range(3):
 *             newpos[i] = oldpos[i] + 0.5*k2[i]*h             # <<<<<<<<<<<<<<
 * 
 *         if not (self.left_edge[0] <= newpos[0] and newpos[0] <= self.right_edge[0] and \
 */
    (__pyx_v_newpos[__pyx_v_i]) = ((__pyx_v_oldpos[__pyx_v_i]) + ((0.5 * (__pyx_v_k2[__pyx_v_i])) * __pyx_v_h));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":873
 *             newpos[i] = oldpos[i] + 0.5*k2[i]*h
 * 
 *         if not (self.left_edge[0] <= newpos[0] and newpos[0] <= self.right_edge[0] and \             # <<<<<<<<<<<<<<
 *                 self.left_edge[1] <= newpos[1] and newpos[1] <= self.right_edge[1] and \
 *                 self.left_edge[2] <= newpos[2] and newpos[2] <= self.right_edge[2]):
 */
  __pyx_t_4 = ((__pyx_v_self->left_edge[0]) <= (__pyx_v_newpos[0]));
  if (__pyx_t_4) {
    __pyx_t_5 = ((__pyx_v_newpos[0]) <= (__pyx_v_self->right_edge[0]));
    if (__pyx_t_5) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":874
 * 
 *         if not (self.left_edge[0] <= newpos[0] and newpos[0] <= self.right_edge[0] and \
 *                 self.left_edge[1] <= newpos[1] and newpos[1] <= self.right_edge[1] and \             # <<<<<<<<<<<<<<
 *                 self.left_edge[2] <= newpos[2] and newpos[2] <= self.right_edge[2]):
 *             if mag is not None:
 */
      __pyx_t_6 = ((__pyx_v_self->left_edge[1]) <= (__pyx_v_newpos[1]));
      if (__pyx_t_6) {
        __pyx_t_7 = ((__pyx_v_newpos[1]) <= (__pyx_v_self->right_edge[1]));
        if (__pyx_t_7) {

          /* "yt/utilities/lib/VolumeIntegrator.pyx":875
 *         if not (self.left_edge[0] <= newpos[0] and newpos[0] <= self.right_edge[0] and \
 *                 self.left_edge[1] <= newpos[1] and newpos[1] <= self.right_edge[1] and \
 *                 self.left_edge[2] <= newpos[2] and newpos[2] <= self.right_edge[2]):             # <<<<<<<<<<<<<<
 *             if mag is not None:
 *                 mag[0] = cmag[0]
 */
          __pyx_t_8 = ((__pyx_v_self->left_edge[2]) <= (__pyx_v_newpos[2]));
          if (__pyx_t_8) {
            __pyx_t_10 = ((__pyx_v_newpos[2]) <= (__pyx_v_self->right_edge[2]));
            __pyx_t_9 = __pyx_t_10;
          } else {
            __pyx_t_9 = __pyx_t_8;
          }
          __pyx_t_8 = __pyx_t_9;
        } else {
          __pyx_t_8 = __pyx_t_7;
        }
        __pyx_t_7 = __pyx_t_8;
      } else {
        __pyx_t_7 = __pyx_t_6;
      }
      __pyx_t_6 = __pyx_t_7;
    } else {
      __pyx_t_6 = __pyx_t_5;
    }
    __pyx_t_5 = __pyx_t_6;
  } else {
    __pyx_t_5 = __pyx_t_4;
  }
  __pyx_t_4 = (!__pyx_t_5);
  if (__pyx_t_4) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":876
 *                 self.left_edge[1] <= newpos[1] and newpos[1] <= self.right_edge[1] and \
 *                 self.left_edge[2] <= newpos[2] and newpos[2] <= self.right_edge[2]):
 *             if mag is not None:             # <<<<<<<<<<<<<<
 *                 mag[0] = cmag[0]
 *             for i in range(3):
 */
    __pyx_t_4 = (__pyx_v_mag != Py_None);
    if (__pyx_t_4) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":877
 *                 self.left_edge[2] <= newpos[2] and newpos[2] <= self.right_edge[2]):
 *             if mag is not None:
 *                 mag[0] = cmag[0]             # <<<<<<<<<<<<<<
 *             for i in range(3):
 *                 pos[i] = newpos[i]
 */
      __pyx_t_2 = PyFloat_FromDouble((__pyx_v_cmag[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_SetItemInt(__pyx_v_mag, 0, __pyx_t_2, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L14;
    }
    __pyx_L14:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":878
 *             if mag is not None:
 *                 mag[0] = cmag[0]
 *             for i in range(3):             # <<<<<<<<<<<<<<
 *                 pos[i] = newpos[i]
 *             return
 */
    for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
      __pyx_v_i = __pyx_t_1;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":879
 *                 mag[0] = cmag[0]
 *             for i in range(3):
 *                 pos[i] = newpos[i]             # <<<<<<<<<<<<<<
 *             return
 * 
 */
      __pyx_t_2 = PyFloat_FromDouble((__pyx_v_newpos[__pyx_v_i])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_SetItemInt(__pyx_v_pos, __pyx_v_i, __pyx_t_2, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "yt/utilities/lib/VolumeIntegrator.pyx":880
 *             for i in range(3):
 *                 pos[i] = newpos[i]
 *             return             # <<<<<<<<<<<<<<
 * 
 *         self.get_vector_field(newpos, k3, cmag)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    goto __pyx_L13;
  }
  __pyx_L13:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":882
 *             return
 * 
 *         self.get_vector_field(newpos, k3, cmag)             # <<<<<<<<<<<<<<
 *         for i in range(3):
 *             newpos[i] = oldpos[i] + k3[i]*h
 */
  ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->get_vector_field(__pyx_v_self, __pyx_v_newpos, __pyx_v_k3, __pyx_v_cmag);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":883
 * 
 *         self.get_vector_field(newpos, k3, cmag)
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             newpos[i] = oldpos[i] + k3[i]*h
 * 
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":884
 *         self.get_vector_field(newpos, k3, cmag)
 *         for i in range(3):
 *             newpos[i] = oldpos[i] + k3[i]*h             # <<<<<<<<<<<<<<
 * 
 *         if not (self.left_edge[0] <= newpos[0] and newpos[0] <= self.right_edge[0] and \
 */
    (__pyx_v_newpos[__pyx_v_i]) = ((__pyx_v_oldpos[__pyx_v_i]) + ((__pyx_v_k3[__pyx_v_i]) * __pyx_v_h));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":886
 *             newpos[i] = oldpos[i] + k3[i]*h
 * 
 *         if not (self.left_edge[0] <= newpos[0] and newpos[0] <= self.right_edge[0] and \             # <<<<<<<<<<<<<<
 *                 self.left_edge[1] <= newpos[1] and newpos[1] <= self.right_edge[1] and \
 *                 self.left_edge[2] <= newpos[2] and newpos[2] <= self.right_edge[2]):
 */
  __pyx_t_4 = ((__pyx_v_self->left_edge[0]) <= (__pyx_v_newpos[0]));
  if (__pyx_t_4) {
    __pyx_t_5 = ((__pyx_v_newpos[0]) <= (__pyx_v_self->right_edge[0]));
    if (__pyx_t_5) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":887
 * 
 *         if not (self.left_edge[0] <= newpos[0] and newpos[0] <= self.right_edge[0] and \
 *                 self.left_edge[1] <= newpos[1] and newpos[1] <= self.right_edge[1] and \             # <<<<<<<<<<<<<<
 *                 self.left_edge[2] <= newpos[2] and newpos[2] <= self.right_edge[2]):
 *             if mag is not None:
 */
      __pyx_t_6 = ((__pyx_v_self->left_edge[1]) <= (__pyx_v_newpos[1]));
      if (__pyx_t_6) {
        __pyx_t_7 = ((__pyx_v_newpos[1]) <= (__pyx_v_self->right_edge[1]));
        if (__pyx_t_7) {

          /* "yt/utilities/lib/VolumeIntegrator.pyx":888
 *         if not (self.left_edge[0] <= newpos[0] and newpos[0] <= self.right_edge[0] and \
 *                 self.left_edge[1] <= newpos[1] and newpos[1] <= self.right_edge[1] and \
 *                 self.left_edge[2] <= newpos[2] and newpos[2] <= self.right_edge[2]):             # <<<<<<<<<<<<<<
 *             if mag is not None:
 *                 mag[0] = cmag[0]
 */
          __pyx_t_8 = ((__pyx_v_self->left_edge[2]) <= (__pyx_v_newpos[2]));
          if (__pyx_t_8) {
            __pyx_t_9 = ((__pyx_v_newpos[2]) <= (__pyx_v_self->right_edge[2]));
            __pyx_t_10 = __pyx_t_9;
          } else {
            __pyx_t_10 = __pyx_t_8;
          }
          __pyx_t_8 = __pyx_t_10;
        } else {
          __pyx_t_8 = __pyx_t_7;
        }
        __pyx_t_7 = __pyx_t_8;
      } else {
        __pyx_t_7 = __pyx_t_6;
      }
      __pyx_t_6 = __pyx_t_7;
    } else {
      __pyx_t_6 = __pyx_t_5;
    }
    __pyx_t_5 = __pyx_t_6;
  } else {
    __pyx_t_5 = __pyx_t_4;
  }
  __pyx_t_4 = (!__pyx_t_5);
  if (__pyx_t_4) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":889
 *                 self.left_edge[1] <= newpos[1] and newpos[1] <= self.right_edge[1] and \
 *                 self.left_edge[2] <= newpos[2] and newpos[2] <= self.right_edge[2]):
 *             if mag is not None:             # <<<<<<<<<<<<<<
 *                 mag[0] = cmag[0]
 *             for i in range(3):
 */
    __pyx_t_4 = (__pyx_v_mag != Py_None);
    if (__pyx_t_4) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":890
 *                 self.left_edge[2] <= newpos[2] and newpos[2] <= self.right_edge[2]):
 *             if mag is not None:
 *                 mag[0] = cmag[0]             # <<<<<<<<<<<<<<
 *             for i in range(3):
 *                 pos[i] = newpos[i]
 */
      __pyx_t_2 = PyFloat_FromDouble((__pyx_v_cmag[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_SetItemInt(__pyx_v_mag, 0, __pyx_t_2, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L20;
    }
    __pyx_L20:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":891
 *             if mag is not None:
 *                 mag[0] = cmag[0]
 *             for i in range(3):             # <<<<<<<<<<<<<<
 *                 pos[i] = newpos[i]
 *             return
 */
    for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
      __pyx_v_i = __pyx_t_1;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":892
 *                 mag[0] = cmag[0]
 *             for i in range(3):
 *                 pos[i] = newpos[i]             # <<<<<<<<<<<<<<
 *             return
 * 
 */
      __pyx_t_2 = PyFloat_FromDouble((__pyx_v_newpos[__pyx_v_i])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_SetItemInt(__pyx_v_pos, __pyx_v_i, __pyx_t_2, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "yt/utilities/lib/VolumeIntegrator.pyx":893
 *             for i in range(3):
 *                 pos[i] = newpos[i]
 *             return             # <<<<<<<<<<<<<<
 * 
 *         self.get_vector_field(newpos, k4, cmag)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
    goto __pyx_L19;
  }
  __pyx_L19:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":895
 *             return
 * 
 *         self.get_vector_field(newpos, k4, cmag)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(3):
 */
  ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->get_vector_field(__pyx_v_self, __pyx_v_newpos, __pyx_v_k4, __pyx_v_cmag);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":897
 *         self.get_vector_field(newpos, k4, cmag)
 * 
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             pos[i] = oldpos[i] + h*(k1[i]/6.0 + k2[i]/3.0 + k3[i]/3.0 + k4[i]/6.0)
 * 
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":898
 * 
 *         for i in range(3):
 *             pos[i] = oldpos[i] + h*(k1[i]/6.0 + k2[i]/3.0 + k3[i]/3.0 + k4[i]/6.0)             # <<<<<<<<<<<<<<
 * 
 *         if mag is not None:
 */
    __pyx_t_2 = PyFloat_FromDouble(((__pyx_v_oldpos[__pyx_v_i]) + (__pyx_v_h * (((((__pyx_v_k1[__pyx_v_i]) / 6.0) + ((__pyx_v_k2[__pyx_v_i]) / 3.0)) + ((__pyx_v_k3[__pyx_v_i]) / 3.0)) + ((__pyx_v_k4[__pyx_v_i]) / 6.0))))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_SetItemInt(__pyx_v_pos, __pyx_v_i, __pyx_t_2, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":900
 *             pos[i] = oldpos[i] + h*(k1[i]/6.0 + k2[i]/3.0 + k3[i]/3.0 + k4[i]/6.0)
 * 
 *         if mag is not None:             # <<<<<<<<<<<<<<
 *             for i in range(3):
 *                 newpos[i] = pos[i]
 */
  __pyx_t_4 = (__pyx_v_mag != Py_None);
  if (__pyx_t_4) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":901
 * 
 *         if mag is not None:
 *             for i in range(3):             # <<<<<<<<<<<<<<
 *                 newpos[i] = pos[i]
 *             self.get_vector_field(newpos, k4, cmag)
 */
    for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
      __pyx_v_i = __pyx_t_1;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":902
 *         if mag is not None:
 *             for i in range(3):
 *                 newpos[i] = pos[i]             # <<<<<<<<<<<<<<
 *             self.get_vector_field(newpos, k4, cmag)
 *             mag[0] = cmag[0]
 */
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pos, __pyx_v_i, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      (__pyx_v_newpos[__pyx_v_i]) = __pyx_t_3;
    }

    /* "yt/utilities/lib/VolumeIntegrator.pyx":903
 *             for i in range(3):
 *                 newpos[i] = pos[i]
 *             self.get_vector_field(newpos, k4, cmag)             # <<<<<<<<<<<<<<
 *             mag[0] = cmag[0]
 * 
 */
    ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->get_vector_field(__pyx_v_self, __pyx_v_newpos, __pyx_v_k4, __pyx_v_cmag);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":904
 *                 newpos[i] = pos[i]
 *             self.get_vector_field(newpos, k4, cmag)
 *             mag[0] = cmag[0]             # <<<<<<<<<<<<<<
 * 
 *     @cython.boundscheck(False)
 */
    __pyx_t_2 = PyFloat_FromDouble((__pyx_v_cmag[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_SetItemInt(__pyx_v_mag, 0, __pyx_t_2, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L25;
  }
  __pyx_L25:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.PartitionedGrid.integrate_streamline", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":909
 *     @cython.wraparound(False)
 *     @cython.cdivision(True)
 *     cdef void get_vector_field(self, np.float64_t pos[3],             # <<<<<<<<<<<<<<
 *                                np.float64_t *vel, np.float64_t *vel_mag):
 *         cdef np.float64_t dp[3]
 */

static void __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_get_vector_field(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, __pyx_t_5numpy_float64_t *__pyx_v_pos, __pyx_t_5numpy_float64_t *__pyx_v_vel, __pyx_t_5numpy_float64_t *__pyx_v_vel_mag) {
  __pyx_t_5numpy_float64_t __pyx_v_dp[3];
  int __pyx_v_ci[3];
  long __pyx_v_i;
  int __pyx_v_offset;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  long __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __pyx_t_5numpy_float64_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_vector_field", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":913
 *         cdef np.float64_t dp[3]
 *         cdef int ci[3]
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             ci[i] = (int)((pos[i]-self.left_edge[i])/self.dds[i])
 *             dp[i] = (pos[i] - self.left_edge[i])%(self.dds[i])
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":914
 *         cdef int ci[3]
 *         for i in range(3):
 *             ci[i] = (int)((pos[i]-self.left_edge[i])/self.dds[i])             # <<<<<<<<<<<<<<
 *             dp[i] = (pos[i] - self.left_edge[i])%(self.dds[i])
 * 
 */
    (__pyx_v_ci[__pyx_v_i]) = ((int)(((__pyx_v_pos[__pyx_v_i]) - (__pyx_v_self->left_edge[__pyx_v_i])) / (__pyx_v_self->dds[__pyx_v_i])));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":915
 *         for i in range(3):
 *             ci[i] = (int)((pos[i]-self.left_edge[i])/self.dds[i])
 *             dp[i] = (pos[i] - self.left_edge[i])%(self.dds[i])             # <<<<<<<<<<<<<<
 * 
 *         cdef int offset = ci[0] * (self.dims[1] + 1) * (self.dims[2] + 1) \
 */
    (__pyx_v_dp[__pyx_v_i]) = fmod(((__pyx_v_pos[__pyx_v_i]) - (__pyx_v_self->left_edge[__pyx_v_i])), (__pyx_v_self->dds[__pyx_v_i]));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":918
 * 
 *         cdef int offset = ci[0] * (self.dims[1] + 1) * (self.dims[2] + 1) \
 *                           + ci[1] * (self.dims[2] + 1) + ci[2]             # <<<<<<<<<<<<<<
 * 
 *         vel_mag[0] = 0.0
 */
  __pyx_v_offset = (((((__pyx_v_ci[0]) * ((__pyx_v_self->dims[1]) + 1)) * ((__pyx_v_self->dims[2]) + 1)) + ((__pyx_v_ci[1]) * ((__pyx_v_self->dims[2]) + 1))) + (__pyx_v_ci[2]));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":920
 *                           + ci[1] * (self.dims[2] + 1) + ci[2]
 * 
 *         vel_mag[0] = 0.0             # <<<<<<<<<<<<<<
 *         for i in range(3):
 *             vel[i] = offset_interpolate(self.dims, dp, self.data[i] + offset)
 */
  (__pyx_v_vel_mag[0]) = 0.0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":921
 * 
 *         vel_mag[0] = 0.0
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             vel[i] = offset_interpolate(self.dims, dp, self.data[i] + offset)
 *             vel_mag[0] += vel[i]*vel[i]
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":922
 *         vel_mag[0] = 0.0
 *         for i in range(3):
 *             vel[i] = offset_interpolate(self.dims, dp, self.data[i] + offset)             # <<<<<<<<<<<<<<
 *             vel_mag[0] += vel[i]*vel[i]
 *         vel_mag[0] = np.sqrt(vel_mag[0])
 */
    (__pyx_v_vel[__pyx_v_i]) = offset_interpolate(__pyx_v_self->dims, __pyx_v_dp, ((__pyx_v_self->data[__pyx_v_i]) + __pyx_v_offset));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":923
 *         for i in range(3):
 *             vel[i] = offset_interpolate(self.dims, dp, self.data[i] + offset)
 *             vel_mag[0] += vel[i]*vel[i]             # <<<<<<<<<<<<<<
 *         vel_mag[0] = np.sqrt(vel_mag[0])
 *         if vel_mag[0] != 0.0:
 */
    __pyx_t_2 = 0;
    (__pyx_v_vel_mag[__pyx_t_2]) = ((__pyx_v_vel_mag[__pyx_t_2]) + ((__pyx_v_vel[__pyx_v_i]) * (__pyx_v_vel[__pyx_v_i])));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":924
 *             vel[i] = offset_interpolate(self.dims, dp, self.data[i] + offset)
 *             vel_mag[0] += vel[i]*vel[i]
 *         vel_mag[0] = np.sqrt(vel_mag[0])             # <<<<<<<<<<<<<<
 *         if vel_mag[0] != 0.0:
 *             for i in range(3):
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__sqrt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_vel_mag[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_6 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  (__pyx_v_vel_mag[0]) = __pyx_t_6;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":925
 *             vel_mag[0] += vel[i]*vel[i]
 *         vel_mag[0] = np.sqrt(vel_mag[0])
 *         if vel_mag[0] != 0.0:             # <<<<<<<<<<<<<<
 *             for i in range(3):
 *                 vel[i] /= vel_mag[0]
 */
  __pyx_t_7 = ((__pyx_v_vel_mag[0]) != 0.0);
  if (__pyx_t_7) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":926
 *         vel_mag[0] = np.sqrt(vel_mag[0])
 *         if vel_mag[0] != 0.0:
 *             for i in range(3):             # <<<<<<<<<<<<<<
 *                 vel[i] /= vel_mag[0]
 * 
 */
    for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
      __pyx_v_i = __pyx_t_1;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":927
 *         if vel_mag[0] != 0.0:
 *             for i in range(3):
 *                 vel[i] /= vel_mag[0]             # <<<<<<<<<<<<<<
 * 
 *     @cython.boundscheck(False)
 */
      __pyx_t_2 = __pyx_v_i;
      (__pyx_v_vel[__pyx_t_2]) = ((__pyx_v_vel[__pyx_t_2]) / (__pyx_v_vel_mag[0]));
    }
    goto __pyx_L7;
  }
  __pyx_L7:;

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("yt.utilities.lib.VolumeIntegrator.PartitionedGrid.get_vector_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9get_isocontour_triangles(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9get_isocontour_triangles(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_5numpy_float64_t __pyx_v_isovalue;
  int __pyx_v_field_id;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_isocontour_triangles (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__isovalue,&__pyx_n_s__field_id,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__isovalue)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__field_id);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_isocontour_triangles") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_isovalue = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_isovalue == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    if (values[1]) {
      __pyx_v_field_id = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_field_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_field_id = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_isocontour_triangles", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.PartitionedGrid.get_isocontour_triangles", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8get_isocontour_triangles(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self), __pyx_v_isovalue, __pyx_v_field_id);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":932
 *     @cython.wraparound(False)
 *     @cython.cdivision(True)
 *     def get_isocontour_triangles(self, np.float64_t isovalue, int field_id = 0):             # <<<<<<<<<<<<<<
 *         # Much of this was inspired by code from Paul Bourke's website:
 *         # http://paulbourke.net/geometry/polygonise/
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8get_isocontour_triangles(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, __pyx_t_5numpy_float64_t __pyx_v_isovalue, int __pyx_v_field_id) {
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_k;
  int __pyx_v_offset;
  __pyx_t_5numpy_float64_t __pyx_v_gv[8];
  __pyx_t_5numpy_float64_t *__pyx_v_intdata;
  __pyx_t_5numpy_float64_t __pyx_v_x;
  __pyx_t_5numpy_float64_t __pyx_v_y;
  __pyx_t_5numpy_float64_t __pyx_v_z;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_TriangleCollection __pyx_v_triangles;
  PyArrayObject *__pyx_v_vertices = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_vertices;
  __Pyx_Buffer __pyx_pybuffer_vertices;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_isocontour_triangles", 0);
  __pyx_pybuffer_vertices.pybuffer.buf = NULL;
  __pyx_pybuffer_vertices.refcount = 0;
  __pyx_pybuffernd_vertices.data = NULL;
  __pyx_pybuffernd_vertices.rcbuffer = &__pyx_pybuffer_vertices;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":942
 *         cdef np.float64_t gv[8]
 *         cdef int cubeindex
 *         cdef np.float64_t *intdata = NULL             # <<<<<<<<<<<<<<
 *         cdef np.float64_t x, y, z
 *         cdef np.float64_t mu
 */
  __pyx_v_intdata = NULL;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":946
 *         cdef np.float64_t mu
 *         cdef TriangleCollection triangles
 *         triangles.first = triangles.current = NULL             # <<<<<<<<<<<<<<
 *         triangles.count = 0
 *         x = self.left_edge[0]
 */
  __pyx_v_triangles.first = NULL;
  __pyx_v_triangles.current = NULL;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":947
 *         cdef TriangleCollection triangles
 *         triangles.first = triangles.current = NULL
 *         triangles.count = 0             # <<<<<<<<<<<<<<
 *         x = self.left_edge[0]
 *         for i in range(self.dims[0]):
 */
  __pyx_v_triangles.count = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":948
 *         triangles.first = triangles.current = NULL
 *         triangles.count = 0
 *         x = self.left_edge[0]             # <<<<<<<<<<<<<<
 *         for i in range(self.dims[0]):
 *             y = self.left_edge[1]
 */
  __pyx_v_x = (__pyx_v_self->left_edge[0]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":949
 *         triangles.count = 0
 *         x = self.left_edge[0]
 *         for i in range(self.dims[0]):             # <<<<<<<<<<<<<<
 *             y = self.left_edge[1]
 *             for j in range(self.dims[1]):
 */
  __pyx_t_1 = (__pyx_v_self->dims[0]);
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":950
 *         x = self.left_edge[0]
 *         for i in range(self.dims[0]):
 *             y = self.left_edge[1]             # <<<<<<<<<<<<<<
 *             for j in range(self.dims[1]):
 *                 z = self.left_edge[2]
 */
    __pyx_v_y = (__pyx_v_self->left_edge[1]);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":951
 *         for i in range(self.dims[0]):
 *             y = self.left_edge[1]
 *             for j in range(self.dims[1]):             # <<<<<<<<<<<<<<
 *                 z = self.left_edge[2]
 *                 for k in range(self.dims[2]):
 */
    __pyx_t_3 = (__pyx_v_self->dims[1]);
    for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
      __pyx_v_j = __pyx_t_4;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":952
 *             y = self.left_edge[1]
 *             for j in range(self.dims[1]):
 *                 z = self.left_edge[2]             # <<<<<<<<<<<<<<
 *                 for k in range(self.dims[2]):
 *                     offset = i * (self.dims[1] + 1) * (self.dims[2] + 1) \
 */
      __pyx_v_z = (__pyx_v_self->left_edge[2]);

      /* "yt/utilities/lib/VolumeIntegrator.pyx":953
 *             for j in range(self.dims[1]):
 *                 z = self.left_edge[2]
 *                 for k in range(self.dims[2]):             # <<<<<<<<<<<<<<
 *                     offset = i * (self.dims[1] + 1) * (self.dims[2] + 1) \
 *                            + j * (self.dims[2] + 1) + k
 */
      __pyx_t_5 = (__pyx_v_self->dims[2]);
      for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
        __pyx_v_k = __pyx_t_6;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":955
 *                 for k in range(self.dims[2]):
 *                     offset = i * (self.dims[1] + 1) * (self.dims[2] + 1) \
 *                            + j * (self.dims[2] + 1) + k             # <<<<<<<<<<<<<<
 *                     intdata = self.data[field_id] + offset
 *                     offset_fill(self.dims, intdata, gv)
 */
        __pyx_v_offset = ((((__pyx_v_i * ((__pyx_v_self->dims[1]) + 1)) * ((__pyx_v_self->dims[2]) + 1)) + (__pyx_v_j * ((__pyx_v_self->dims[2]) + 1))) + __pyx_v_k);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":956
 *                     offset = i * (self.dims[1] + 1) * (self.dims[2] + 1) \
 *                            + j * (self.dims[2] + 1) + k
 *                     intdata = self.data[field_id] + offset             # <<<<<<<<<<<<<<
 *                     offset_fill(self.dims, intdata, gv)
 *                     march_cubes(gv, isovalue, self.dds, x, y, z,
 */
        __pyx_v_intdata = ((__pyx_v_self->data[__pyx_v_field_id]) + __pyx_v_offset);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":957
 *                            + j * (self.dims[2] + 1) + k
 *                     intdata = self.data[field_id] + offset
 *                     offset_fill(self.dims, intdata, gv)             # <<<<<<<<<<<<<<
 *                     march_cubes(gv, isovalue, self.dds, x, y, z,
 *                                 &triangles)
 */
        offset_fill(__pyx_v_self->dims, __pyx_v_intdata, __pyx_v_gv);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":959
 *                     offset_fill(self.dims, intdata, gv)
 *                     march_cubes(gv, isovalue, self.dds, x, y, z,
 *                                 &triangles)             # <<<<<<<<<<<<<<
 *                     z += self.dds[2]
 *                 y += self.dds[1]
 */
        __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_march_cubes(__pyx_v_gv, __pyx_v_isovalue, __pyx_v_self->dds, __pyx_v_x, __pyx_v_y, __pyx_v_z, (&__pyx_v_triangles));

        /* "yt/utilities/lib/VolumeIntegrator.pyx":960
 *                     march_cubes(gv, isovalue, self.dds, x, y, z,
 *                                 &triangles)
 *                     z += self.dds[2]             # <<<<<<<<<<<<<<
 *                 y += self.dds[1]
 *             x += self.dds[0]
 */
        __pyx_v_z = (__pyx_v_z + (__pyx_v_self->dds[2]));
      }

      /* "yt/utilities/lib/VolumeIntegrator.pyx":961
 *                                 &triangles)
 *                     z += self.dds[2]
 *                 y += self.dds[1]             # <<<<<<<<<<<<<<
 *             x += self.dds[0]
 *         # Hallo, we are all done.
 */
      __pyx_v_y = (__pyx_v_y + (__pyx_v_self->dds[1]));
    }

    /* "yt/utilities/lib/VolumeIntegrator.pyx":962
 *                     z += self.dds[2]
 *                 y += self.dds[1]
 *             x += self.dds[0]             # <<<<<<<<<<<<<<
 *         # Hallo, we are all done.
 *         cdef np.ndarray[np.float64_t, ndim=2] vertices
 */
    __pyx_v_x = (__pyx_v_x + (__pyx_v_self->dds[0]));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":965
 *         # Hallo, we are all done.
 *         cdef np.ndarray[np.float64_t, ndim=2] vertices
 *         vertices = np.zeros((triangles.count*3,3), dtype='float64')             # <<<<<<<<<<<<<<
 *         FillAndWipeTriangles(vertices, triangles.first)
 *         return vertices
 */
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__zeros); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyInt_FromLong((__pyx_v_triangles.count * 3)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_int_3);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  __pyx_t_7 = 0;
  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_9));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
  __pyx_t_9 = 0;
  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_10 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_10);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertices.rcbuffer->pybuffer);
    __pyx_t_1 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_1 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_v_vertices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
      }
    }
    __pyx_pybuffernd_vertices.diminfo[0].strides = __pyx_pybuffernd_vertices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vertices.diminfo[0].shape = __pyx_pybuffernd_vertices.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vertices.diminfo[1].strides = __pyx_pybuffernd_vertices.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vertices.diminfo[1].shape = __pyx_pybuffernd_vertices.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_vertices = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":966
 *         cdef np.ndarray[np.float64_t, ndim=2] vertices
 *         vertices = np.zeros((triangles.count*3,3), dtype='float64')
 *         FillAndWipeTriangles(vertices, triangles.first)             # <<<<<<<<<<<<<<
 *         return vertices
 * 
 */
  __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_FillAndWipeTriangles(((PyArrayObject *)__pyx_v_vertices), __pyx_v_triangles.first);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":967
 *         vertices = np.zeros((triangles.count*3,3), dtype='float64')
 *         FillAndWipeTriangles(vertices, triangles.first)
 *         return vertices             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_vertices));
  __pyx_r = ((PyObject *)__pyx_v_vertices);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertices.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.PartitionedGrid.get_isocontour_triangles", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertices.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_vertices);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":530
 * 
 * cdef class PartitionedGrid:
 *     cdef public object my_data             # <<<<<<<<<<<<<<
 *     cdef public object LeftEdge
 *     cdef public object RightEdge
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->my_data);
  __pyx_r = __pyx_v_self->my_data;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->my_data);
  __Pyx_DECREF(__pyx_v_self->my_data);
  __pyx_v_self->my_data = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data_4__del__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->my_data);
  __Pyx_DECREF(__pyx_v_self->my_data);
  __pyx_v_self->my_data = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":531
 * cdef class PartitionedGrid:
 *     cdef public object my_data
 *     cdef public object LeftEdge             # <<<<<<<<<<<<<<
 *     cdef public object RightEdge
 *     cdef np.float64_t *data[6]
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->LeftEdge);
  __pyx_r = __pyx_v_self->LeftEdge;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->LeftEdge);
  __Pyx_DECREF(__pyx_v_self->LeftEdge);
  __pyx_v_self->LeftEdge = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge_4__del__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->LeftEdge);
  __Pyx_DECREF(__pyx_v_self->LeftEdge);
  __pyx_v_self->LeftEdge = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":532
 *     cdef public object my_data
 *     cdef public object LeftEdge
 *     cdef public object RightEdge             # <<<<<<<<<<<<<<
 *     cdef np.float64_t *data[6]
 *     cdef np.float64_t dvs[6]
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->RightEdge);
  __pyx_r = __pyx_v_self->RightEdge;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->RightEdge);
  __Pyx_DECREF(__pyx_v_self->RightEdge);
  __pyx_v_self->RightEdge = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge_4__del__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->RightEdge);
  __Pyx_DECREF(__pyx_v_self->RightEdge);
  __pyx_v_self->RightEdge = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_14parent_grid_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_14parent_grid_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_14parent_grid_id___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":540
 *     cdef np.float64_t idds[3]
 *     cdef int dims[3]
 *     cdef public int parent_grid_id             # <<<<<<<<<<<<<<
 *     cdef public int n_fields
 *     cdef kdtree_utils.kdtree *star_list
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_14parent_grid_id___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->parent_grid_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.PartitionedGrid.parent_grid_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_14parent_grid_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_14parent_grid_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_14parent_grid_id_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_14parent_grid_id_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->parent_grid_id = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.PartitionedGrid.parent_grid_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8n_fields_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8n_fields_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8n_fields___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":541
 *     cdef int dims[3]
 *     cdef public int parent_grid_id
 *     cdef public int n_fields             # <<<<<<<<<<<<<<
 *     cdef kdtree_utils.kdtree *star_list
 *     cdef np.float64_t star_er
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8n_fields___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->n_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.PartitionedGrid.n_fields.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8n_fields_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8n_fields_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8n_fields_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8n_fields_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->n_fields = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.PartitionedGrid.n_fields.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_19march_cubes_grid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_19march_cubes_grid = {__Pyx_NAMESTR("march_cubes_grid"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_19march_cubes_grid, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_19march_cubes_grid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_5numpy_float64_t __pyx_v_isovalue;
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  PyArrayObject *__pyx_v_left_edge = 0;
  PyArrayObject *__pyx_v_dxs = 0;
  PyObject *__pyx_v_obj_sample = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("march_cubes_grid (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__isovalue,&__pyx_n_s__values,&__pyx_n_s__mask,&__pyx_n_s__left_edge,&__pyx_n_s__dxs,&__pyx_n_s__obj_sample,0};
    PyObject* values[6] = {0,0,0,0,0,0};

    /* "yt/utilities/lib/VolumeIntegrator.pyx":977
 *                      np.ndarray[np.float64_t, ndim=1] left_edge,
 *                      np.ndarray[np.float64_t, ndim=1] dxs,
 *                      obj_sample = None):             # <<<<<<<<<<<<<<
 *     cdef int dims[3]
 *     cdef int i, j, k, n, m, nt
 */
    values[5] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__isovalue)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("march_cubes_grid", 0, 5, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("march_cubes_grid", 0, 5, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left_edge)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("march_cubes_grid", 0, 5, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dxs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("march_cubes_grid", 0, 5, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__obj_sample);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "march_cubes_grid") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_isovalue = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_isovalue == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_values = ((PyArrayObject *)values[1]);
    __pyx_v_mask = ((PyArrayObject *)values[2]);
    __pyx_v_left_edge = ((PyArrayObject *)values[3]);
    __pyx_v_dxs = ((PyArrayObject *)values[4]);
    __pyx_v_obj_sample = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("march_cubes_grid", 0, 5, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.march_cubes_grid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 974; __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 = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dxs), __pyx_ptype_5numpy_ndarray, 1, "dxs", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_18march_cubes_grid(__pyx_self, __pyx_v_isovalue, __pyx_v_values, __pyx_v_mask, __pyx_v_left_edge, __pyx_v_dxs, __pyx_v_obj_sample);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":972
 * @cython.wraparound(False)
 * @cython.cdivision(True)
 * def march_cubes_grid(np.float64_t isovalue,             # <<<<<<<<<<<<<<
 *                      np.ndarray[np.float64_t, ndim=3] values,
 *                      np.ndarray[np.int32_t, ndim=3] mask,
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_18march_cubes_grid(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_isovalue, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_left_edge, PyArrayObject *__pyx_v_dxs, PyObject *__pyx_v_obj_sample) {
  int __pyx_v_dims[3];
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_k;
  int __pyx_v_n;
  int __pyx_v_m;
  int __pyx_v_nt;
  int __pyx_v_offset;
  __pyx_t_5numpy_float64_t __pyx_v_gv[8];
  __pyx_t_5numpy_float64_t __pyx_v_pos[3];
  __pyx_t_5numpy_float64_t __pyx_v_point[3];
  __pyx_t_5numpy_float64_t __pyx_v_idds[3];
  __pyx_t_5numpy_float64_t *__pyx_v_intdata;
  __pyx_t_5numpy_float64_t *__pyx_v_sdata;
  __pyx_t_5numpy_float64_t __pyx_v_do_sample;
  PyArrayObject *__pyx_v_sample = 0;
  PyArrayObject *__pyx_v_sampled = 0;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_TriangleCollection __pyx_v_triangles;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_last;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_current;
  __pyx_t_5numpy_float64_t *__pyx_v_data;
  __pyx_t_5numpy_float64_t *__pyx_v_dds;
  PyArrayObject *__pyx_v_vertices = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_dxs;
  __Pyx_Buffer __pyx_pybuffer_dxs;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left_edge;
  __Pyx_Buffer __pyx_pybuffer_left_edge;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sample;
  __Pyx_Buffer __pyx_pybuffer_sample;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sampled;
  __Pyx_Buffer __pyx_pybuffer_sampled;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_vertices;
  __Pyx_Buffer __pyx_pybuffer_vertices;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyArrayObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  long __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  long __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  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;
  long __pyx_t_24;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  PyArrayObject *__pyx_t_29 = NULL;
  PyArrayObject *__pyx_t_30 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("march_cubes_grid", 0);
  __pyx_pybuffer_sample.pybuffer.buf = NULL;
  __pyx_pybuffer_sample.refcount = 0;
  __pyx_pybuffernd_sample.data = NULL;
  __pyx_pybuffernd_sample.rcbuffer = &__pyx_pybuffer_sample;
  __pyx_pybuffer_sampled.pybuffer.buf = NULL;
  __pyx_pybuffer_sampled.refcount = 0;
  __pyx_pybuffernd_sampled.data = NULL;
  __pyx_pybuffernd_sampled.rcbuffer = &__pyx_pybuffer_sampled;
  __pyx_pybuffer_vertices.pybuffer.buf = NULL;
  __pyx_pybuffer_vertices.refcount = 0;
  __pyx_pybuffernd_vertices.data = NULL;
  __pyx_pybuffernd_vertices.rcbuffer = &__pyx_pybuffer_vertices;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  __pyx_pybuffer_left_edge.pybuffer.buf = NULL;
  __pyx_pybuffer_left_edge.refcount = 0;
  __pyx_pybuffernd_left_edge.data = NULL;
  __pyx_pybuffernd_left_edge.rcbuffer = &__pyx_pybuffer_left_edge;
  __pyx_pybuffer_dxs.pybuffer.buf = NULL;
  __pyx_pybuffer_dxs.refcount = 0;
  __pyx_pybuffernd_dxs.data = NULL;
  __pyx_pybuffernd_dxs.rcbuffer = &__pyx_pybuffer_dxs;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_values.diminfo[2].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_values.diminfo[2].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_mask.diminfo[2].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_mask.diminfo[2].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_edge.rcbuffer->pybuffer, (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 = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left_edge.diminfo[0].strides = __pyx_pybuffernd_left_edge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_edge.diminfo[0].shape = __pyx_pybuffernd_left_edge.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dxs.rcbuffer->pybuffer, (PyObject*)__pyx_v_dxs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_dxs.diminfo[0].strides = __pyx_pybuffernd_dxs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dxs.diminfo[0].shape = __pyx_pybuffernd_dxs.rcbuffer->pybuffer.shape[0];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":982
 *     cdef int offset
 *     cdef np.float64_t gv[8], pos[3], point[3], idds[3]
 *     cdef np.float64_t *intdata = NULL             # <<<<<<<<<<<<<<
 *     cdef np.float64_t *sdata = NULL
 *     cdef np.float64_t x, y, z, do_sample
 */
  __pyx_v_intdata = NULL;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":983
 *     cdef np.float64_t gv[8], pos[3], point[3], idds[3]
 *     cdef np.float64_t *intdata = NULL
 *     cdef np.float64_t *sdata = NULL             # <<<<<<<<<<<<<<
 *     cdef np.float64_t x, y, z, do_sample
 *     cdef np.ndarray[np.float64_t, ndim=3] sample
 */
  __pyx_v_sdata = NULL;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":989
 *     cdef TriangleCollection triangles
 *     cdef Triangle *last, *current
 *     if obj_sample is not None:             # <<<<<<<<<<<<<<
 *         sample = obj_sample
 *         sdata = <np.float64_t *> sample.data
 */
  __pyx_t_1 = (__pyx_v_obj_sample != Py_None);
  if (__pyx_t_1) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":990
 *     cdef Triangle *last, *current
 *     if obj_sample is not None:
 *         sample = obj_sample             # <<<<<<<<<<<<<<
 *         sdata = <np.float64_t *> sample.data
 *         do_sample = 1
 */
    if (!(likely(((__pyx_v_obj_sample) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_obj_sample, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = ((PyArrayObject *)__pyx_v_obj_sample);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sample.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sample.rcbuffer->pybuffer, (PyObject*)__pyx_t_2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sample.rcbuffer->pybuffer, (PyObject*)__pyx_v_sample, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        }
      }
      __pyx_pybuffernd_sample.diminfo[0].strides = __pyx_pybuffernd_sample.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sample.diminfo[0].shape = __pyx_pybuffernd_sample.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sample.diminfo[1].strides = __pyx_pybuffernd_sample.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sample.diminfo[1].shape = __pyx_pybuffernd_sample.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_sample.diminfo[2].strides = __pyx_pybuffernd_sample.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_sample.diminfo[2].shape = __pyx_pybuffernd_sample.rcbuffer->pybuffer.shape[2];
      if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_v_obj_sample);
    __pyx_v_sample = ((PyArrayObject *)__pyx_v_obj_sample);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":991
 *     if obj_sample is not None:
 *         sample = obj_sample
 *         sdata = <np.float64_t *> sample.data             # <<<<<<<<<<<<<<
 *         do_sample = 1
 *     else:
 */
    __pyx_v_sdata = ((__pyx_t_5numpy_float64_t *)__pyx_v_sample->data);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":992
 *         sample = obj_sample
 *         sdata = <np.float64_t *> sample.data
 *         do_sample = 1             # <<<<<<<<<<<<<<
 *     else:
 *         do_sample = 0
 */
    __pyx_v_do_sample = 1.0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":994
 *         do_sample = 1
 *     else:
 *         do_sample = 0             # <<<<<<<<<<<<<<
 *     for i in range(3):
 *         dims[i] = values.shape[i] - 1
 */
    __pyx_v_do_sample = 0.0;
  }
  __pyx_L3:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":995
 *     else:
 *         do_sample = 0
 *     for i in range(3):             # <<<<<<<<<<<<<<
 *         dims[i] = values.shape[i] - 1
 *         idds[i] = 1.0 / dxs[i]
 */
  for (__pyx_t_3 = 0; __pyx_t_3 < 3; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":996
 *         do_sample = 0
 *     for i in range(3):
 *         dims[i] = values.shape[i] - 1             # <<<<<<<<<<<<<<
 *         idds[i] = 1.0 / dxs[i]
 *     triangles.first = triangles.current = NULL
 */
    (__pyx_v_dims[__pyx_v_i]) = ((__pyx_v_values->dimensions[__pyx_v_i]) - 1);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":997
 *     for i in range(3):
 *         dims[i] = values.shape[i] - 1
 *         idds[i] = 1.0 / dxs[i]             # <<<<<<<<<<<<<<
 *     triangles.first = triangles.current = NULL
 *     last = current = NULL
 */
    __pyx_t_7 = __pyx_v_i;
    (__pyx_v_idds[__pyx_v_i]) = (1.0 / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_dxs.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_dxs.diminfo[0].strides)));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":998
 *         dims[i] = values.shape[i] - 1
 *         idds[i] = 1.0 / dxs[i]
 *     triangles.first = triangles.current = NULL             # <<<<<<<<<<<<<<
 *     last = current = NULL
 *     triangles.count = 0
 */
  __pyx_v_triangles.first = NULL;
  __pyx_v_triangles.current = NULL;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":999
 *         idds[i] = 1.0 / dxs[i]
 *     triangles.first = triangles.current = NULL
 *     last = current = NULL             # <<<<<<<<<<<<<<
 *     triangles.count = 0
 *     cdef np.float64_t *data = <np.float64_t *> values.data
 */
  __pyx_v_last = NULL;
  __pyx_v_current = NULL;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1000
 *     triangles.first = triangles.current = NULL
 *     last = current = NULL
 *     triangles.count = 0             # <<<<<<<<<<<<<<
 *     cdef np.float64_t *data = <np.float64_t *> values.data
 *     cdef np.float64_t *dds = <np.float64_t *> dxs.data
 */
  __pyx_v_triangles.count = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1001
 *     last = current = NULL
 *     triangles.count = 0
 *     cdef np.float64_t *data = <np.float64_t *> values.data             # <<<<<<<<<<<<<<
 *     cdef np.float64_t *dds = <np.float64_t *> dxs.data
 *     pos[0] = left_edge[0]
 */
  __pyx_v_data = ((__pyx_t_5numpy_float64_t *)__pyx_v_values->data);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1002
 *     triangles.count = 0
 *     cdef np.float64_t *data = <np.float64_t *> values.data
 *     cdef np.float64_t *dds = <np.float64_t *> dxs.data             # <<<<<<<<<<<<<<
 *     pos[0] = left_edge[0]
 *     for i in range(dims[0]):
 */
  __pyx_v_dds = ((__pyx_t_5numpy_float64_t *)__pyx_v_dxs->data);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1003
 *     cdef np.float64_t *data = <np.float64_t *> values.data
 *     cdef np.float64_t *dds = <np.float64_t *> dxs.data
 *     pos[0] = left_edge[0]             # <<<<<<<<<<<<<<
 *     for i in range(dims[0]):
 *         pos[1] = left_edge[1]
 */
  __pyx_t_8 = 0;
  (__pyx_v_pos[0]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left_edge.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_left_edge.diminfo[0].strides));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1004
 *     cdef np.float64_t *dds = <np.float64_t *> dxs.data
 *     pos[0] = left_edge[0]
 *     for i in range(dims[0]):             # <<<<<<<<<<<<<<
 *         pos[1] = left_edge[1]
 *         for j in range(dims[1]):
 */
  __pyx_t_3 = (__pyx_v_dims[0]);
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_3; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1005
 *     pos[0] = left_edge[0]
 *     for i in range(dims[0]):
 *         pos[1] = left_edge[1]             # <<<<<<<<<<<<<<
 *         for j in range(dims[1]):
 *             pos[2] = left_edge[2]
 */
    __pyx_t_10 = 1;
    (__pyx_v_pos[1]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left_edge.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_left_edge.diminfo[0].strides));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1006
 *     for i in range(dims[0]):
 *         pos[1] = left_edge[1]
 *         for j in range(dims[1]):             # <<<<<<<<<<<<<<
 *             pos[2] = left_edge[2]
 *             for k in range(dims[2]):
 */
    __pyx_t_11 = (__pyx_v_dims[1]);
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_v_j = __pyx_t_12;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1007
 *         pos[1] = left_edge[1]
 *         for j in range(dims[1]):
 *             pos[2] = left_edge[2]             # <<<<<<<<<<<<<<
 *             for k in range(dims[2]):
 *                 if mask[i,j,k] == 1:
 */
      __pyx_t_13 = 2;
      (__pyx_v_pos[2]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left_edge.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_left_edge.diminfo[0].strides));

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1008
 *         for j in range(dims[1]):
 *             pos[2] = left_edge[2]
 *             for k in range(dims[2]):             # <<<<<<<<<<<<<<
 *                 if mask[i,j,k] == 1:
 *                     offset = i * (dims[1] + 1) * (dims[2] + 1) \
 */
      __pyx_t_14 = (__pyx_v_dims[2]);
      for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
        __pyx_v_k = __pyx_t_15;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1009
 *             pos[2] = left_edge[2]
 *             for k in range(dims[2]):
 *                 if mask[i,j,k] == 1:             # <<<<<<<<<<<<<<
 *                     offset = i * (dims[1] + 1) * (dims[2] + 1) \
 *                            + j * (dims[2] + 1) + k
 */
        __pyx_t_16 = __pyx_v_i;
        __pyx_t_17 = __pyx_v_j;
        __pyx_t_18 = __pyx_v_k;
        __pyx_t_1 = ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_mask.diminfo[1].strides, __pyx_t_18, __pyx_pybuffernd_mask.diminfo[2].strides)) == 1);
        if (__pyx_t_1) {

          /* "yt/utilities/lib/VolumeIntegrator.pyx":1011
 *                 if mask[i,j,k] == 1:
 *                     offset = i * (dims[1] + 1) * (dims[2] + 1) \
 *                            + j * (dims[2] + 1) + k             # <<<<<<<<<<<<<<
 *                     intdata = data + offset
 *                     offset_fill(dims, intdata, gv)
 */
          __pyx_v_offset = ((((__pyx_v_i * ((__pyx_v_dims[1]) + 1)) * ((__pyx_v_dims[2]) + 1)) + (__pyx_v_j * ((__pyx_v_dims[2]) + 1))) + __pyx_v_k);

          /* "yt/utilities/lib/VolumeIntegrator.pyx":1012
 *                     offset = i * (dims[1] + 1) * (dims[2] + 1) \
 *                            + j * (dims[2] + 1) + k
 *                     intdata = data + offset             # <<<<<<<<<<<<<<
 *                     offset_fill(dims, intdata, gv)
 *                     nt = march_cubes(gv, isovalue, dds, pos[0], pos[1], pos[2],
 */
          __pyx_v_intdata = (__pyx_v_data + __pyx_v_offset);

          /* "yt/utilities/lib/VolumeIntegrator.pyx":1013
 *                            + j * (dims[2] + 1) + k
 *                     intdata = data + offset
 *                     offset_fill(dims, intdata, gv)             # <<<<<<<<<<<<<<
 *                     nt = march_cubes(gv, isovalue, dds, pos[0], pos[1], pos[2],
 *                                 &triangles)
 */
          offset_fill(__pyx_v_dims, __pyx_v_intdata, __pyx_v_gv);

          /* "yt/utilities/lib/VolumeIntegrator.pyx":1015
 *                     offset_fill(dims, intdata, gv)
 *                     nt = march_cubes(gv, isovalue, dds, pos[0], pos[1], pos[2],
 *                                 &triangles)             # <<<<<<<<<<<<<<
 *                     if do_sample == 1 and nt > 0:
 *                         # At each triangle's center, sample our secondary field
 */
          __pyx_v_nt = __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_march_cubes(__pyx_v_gv, __pyx_v_isovalue, __pyx_v_dds, (__pyx_v_pos[0]), (__pyx_v_pos[1]), (__pyx_v_pos[2]), (&__pyx_v_triangles));

          /* "yt/utilities/lib/VolumeIntegrator.pyx":1016
 *                     nt = march_cubes(gv, isovalue, dds, pos[0], pos[1], pos[2],
 *                                 &triangles)
 *                     if do_sample == 1 and nt > 0:             # <<<<<<<<<<<<<<
 *                         # At each triangle's center, sample our secondary field
 *                         if last == NULL and triangles.first != NULL:
 */
          __pyx_t_1 = (__pyx_v_do_sample == 1.0);
          if (__pyx_t_1) {
            __pyx_t_19 = (__pyx_v_nt > 0);
            __pyx_t_20 = __pyx_t_19;
          } else {
            __pyx_t_20 = __pyx_t_1;
          }
          if (__pyx_t_20) {

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1018
 *                     if do_sample == 1 and nt > 0:
 *                         # At each triangle's center, sample our secondary field
 *                         if last == NULL and triangles.first != NULL:             # <<<<<<<<<<<<<<
 *                             current = triangles.first
 *                             last = NULL
 */
            __pyx_t_20 = (__pyx_v_last == NULL);
            if (__pyx_t_20) {
              __pyx_t_1 = (__pyx_v_triangles.first != NULL);
              __pyx_t_19 = __pyx_t_1;
            } else {
              __pyx_t_19 = __pyx_t_20;
            }
            if (__pyx_t_19) {

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1019
 *                         # At each triangle's center, sample our secondary field
 *                         if last == NULL and triangles.first != NULL:
 *                             current = triangles.first             # <<<<<<<<<<<<<<
 *                             last = NULL
 *                         elif last != NULL:
 */
              __pyx_v_current = __pyx_v_triangles.first;

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1020
 *                         if last == NULL and triangles.first != NULL:
 *                             current = triangles.first
 *                             last = NULL             # <<<<<<<<<<<<<<
 *                         elif last != NULL:
 *                             current = last.next
 */
              __pyx_v_last = NULL;
              goto __pyx_L14;
            }

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1021
 *                             current = triangles.first
 *                             last = NULL
 *                         elif last != NULL:             # <<<<<<<<<<<<<<
 *                             current = last.next
 *                         while current != NULL:
 */
            __pyx_t_19 = (__pyx_v_last != NULL);
            if (__pyx_t_19) {

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1022
 *                             last = NULL
 *                         elif last != NULL:
 *                             current = last.next             # <<<<<<<<<<<<<<
 *                         while current != NULL:
 *                             for n in range(3):
 */
              __pyx_v_current = __pyx_v_last->next;
              goto __pyx_L14;
            }
            __pyx_L14:;

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1023
 *                         elif last != NULL:
 *                             current = last.next
 *                         while current != NULL:             # <<<<<<<<<<<<<<
 *                             for n in range(3):
 *                                 point[n] = 0.0
 */
            while (1) {
              __pyx_t_19 = (__pyx_v_current != NULL);
              if (!__pyx_t_19) break;

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1024
 *                             current = last.next
 *                         while current != NULL:
 *                             for n in range(3):             # <<<<<<<<<<<<<<
 *                                 point[n] = 0.0
 *                             for n in range(3):
 */
              for (__pyx_t_21 = 0; __pyx_t_21 < 3; __pyx_t_21+=1) {
                __pyx_v_n = __pyx_t_21;

                /* "yt/utilities/lib/VolumeIntegrator.pyx":1025
 *                         while current != NULL:
 *                             for n in range(3):
 *                                 point[n] = 0.0             # <<<<<<<<<<<<<<
 *                             for n in range(3):
 *                                 for m in range(3):
 */
                (__pyx_v_point[__pyx_v_n]) = 0.0;
              }

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1026
 *                             for n in range(3):
 *                                 point[n] = 0.0
 *                             for n in range(3):             # <<<<<<<<<<<<<<
 *                                 for m in range(3):
 *                                     point[m] += (current.p[n][m]-pos[m])*idds[m]
 */
              for (__pyx_t_21 = 0; __pyx_t_21 < 3; __pyx_t_21+=1) {
                __pyx_v_n = __pyx_t_21;

                /* "yt/utilities/lib/VolumeIntegrator.pyx":1027
 *                                 point[n] = 0.0
 *                             for n in range(3):
 *                                 for m in range(3):             # <<<<<<<<<<<<<<
 *                                     point[m] += (current.p[n][m]-pos[m])*idds[m]
 *                             for n in range(3):
 */
                for (__pyx_t_22 = 0; __pyx_t_22 < 3; __pyx_t_22+=1) {
                  __pyx_v_m = __pyx_t_22;

                  /* "yt/utilities/lib/VolumeIntegrator.pyx":1028
 *                             for n in range(3):
 *                                 for m in range(3):
 *                                     point[m] += (current.p[n][m]-pos[m])*idds[m]             # <<<<<<<<<<<<<<
 *                             for n in range(3):
 *                                 point[n] /= 3.0
 */
                  __pyx_t_23 = __pyx_v_m;
                  (__pyx_v_point[__pyx_t_23]) = ((__pyx_v_point[__pyx_t_23]) + ((((__pyx_v_current->p[__pyx_v_n])[__pyx_v_m]) - (__pyx_v_pos[__pyx_v_m])) * (__pyx_v_idds[__pyx_v_m])));
                }
              }

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1029
 *                                 for m in range(3):
 *                                     point[m] += (current.p[n][m]-pos[m])*idds[m]
 *                             for n in range(3):             # <<<<<<<<<<<<<<
 *                                 point[n] /= 3.0
 *                             current.val = offset_interpolate(dims, point,
 */
              for (__pyx_t_21 = 0; __pyx_t_21 < 3; __pyx_t_21+=1) {
                __pyx_v_n = __pyx_t_21;

                /* "yt/utilities/lib/VolumeIntegrator.pyx":1030
 *                                     point[m] += (current.p[n][m]-pos[m])*idds[m]
 *                             for n in range(3):
 *                                 point[n] /= 3.0             # <<<<<<<<<<<<<<
 *                             current.val = offset_interpolate(dims, point,
 *                                                              sdata + offset)
 */
                __pyx_t_22 = __pyx_v_n;
                (__pyx_v_point[__pyx_t_22]) = ((__pyx_v_point[__pyx_t_22]) / 3.0);
              }

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1031
 *                             for n in range(3):
 *                                 point[n] /= 3.0
 *                             current.val = offset_interpolate(dims, point,             # <<<<<<<<<<<<<<
 *                                                              sdata + offset)
 *                             last = current
 */
              __pyx_v_current->val = offset_interpolate(__pyx_v_dims, __pyx_v_point, (__pyx_v_sdata + __pyx_v_offset));

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1033
 *                             current.val = offset_interpolate(dims, point,
 *                                                              sdata + offset)
 *                             last = current             # <<<<<<<<<<<<<<
 *                             if current.next == NULL: break
 *                             current = current.next
 */
              __pyx_v_last = __pyx_v_current;

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1034
 *                                                              sdata + offset)
 *                             last = current
 *                             if current.next == NULL: break             # <<<<<<<<<<<<<<
 *                             current = current.next
 *                 pos[2] += dds[2]
 */
              __pyx_t_19 = (__pyx_v_current->next == NULL);
              if (__pyx_t_19) {
                goto __pyx_L16_break;
                goto __pyx_L25;
              }
              __pyx_L25:;

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1035
 *                             last = current
 *                             if current.next == NULL: break
 *                             current = current.next             # <<<<<<<<<<<<<<
 *                 pos[2] += dds[2]
 *             pos[1] += dds[1]
 */
              __pyx_v_current = __pyx_v_current->next;
            }
            __pyx_L16_break:;
            goto __pyx_L13;
          }
          __pyx_L13:;
          goto __pyx_L12;
        }
        __pyx_L12:;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1036
 *                             if current.next == NULL: break
 *                             current = current.next
 *                 pos[2] += dds[2]             # <<<<<<<<<<<<<<
 *             pos[1] += dds[1]
 *         pos[0] += dds[0]
 */
        __pyx_t_24 = 2;
        (__pyx_v_pos[__pyx_t_24]) = ((__pyx_v_pos[__pyx_t_24]) + (__pyx_v_dds[2]));
      }

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1037
 *                             current = current.next
 *                 pos[2] += dds[2]
 *             pos[1] += dds[1]             # <<<<<<<<<<<<<<
 *         pos[0] += dds[0]
 *     # Hallo, we are all done.
 */
      __pyx_t_24 = 1;
      (__pyx_v_pos[__pyx_t_24]) = ((__pyx_v_pos[__pyx_t_24]) + (__pyx_v_dds[1]));
    }

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1038
 *                 pos[2] += dds[2]
 *             pos[1] += dds[1]
 *         pos[0] += dds[0]             # <<<<<<<<<<<<<<
 *     # Hallo, we are all done.
 *     cdef np.ndarray[np.float64_t, ndim=2] vertices
 */
    __pyx_t_24 = 0;
    (__pyx_v_pos[__pyx_t_24]) = ((__pyx_v_pos[__pyx_t_24]) + (__pyx_v_dds[0]));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1041
 *     # Hallo, we are all done.
 *     cdef np.ndarray[np.float64_t, ndim=2] vertices
 *     vertices = np.zeros((triangles.count*3,3), dtype='float64')             # <<<<<<<<<<<<<<
 *     if do_sample == 1:
 *         sampled = np.zeros(triangles.count, dtype='float64')
 */
  __pyx_t_25 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_26 = PyObject_GetAttr(__pyx_t_25, __pyx_n_s__zeros); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_26);
  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  __pyx_t_25 = PyInt_FromLong((__pyx_v_triangles.count * 3)); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_25);
  __pyx_t_27 = PyTuple_New(2); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_27);
  PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_25);
  __Pyx_GIVEREF(__pyx_t_25);
  __Pyx_INCREF(__pyx_int_3);
  PyTuple_SET_ITEM(__pyx_t_27, 1, __pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  __pyx_t_25 = 0;
  __pyx_t_25 = PyTuple_New(1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_25);
  PyTuple_SET_ITEM(__pyx_t_25, 0, ((PyObject *)__pyx_t_27));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_27));
  __pyx_t_27 = 0;
  __pyx_t_27 = PyDict_New(); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_27));
  if (PyDict_SetItem(__pyx_t_27, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_28 = PyObject_Call(__pyx_t_26, ((PyObject *)__pyx_t_25), ((PyObject *)__pyx_t_27)); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_28);
  __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_25)); __pyx_t_25 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_27)); __pyx_t_27 = 0;
  if (!(likely(((__pyx_t_28) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_28, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_29 = ((PyArrayObject *)__pyx_t_28);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertices.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_t_29, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_vertices.rcbuffer->pybuffer, (PyObject*)__pyx_v_vertices, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
      }
    }
    __pyx_pybuffernd_vertices.diminfo[0].strides = __pyx_pybuffernd_vertices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_vertices.diminfo[0].shape = __pyx_pybuffernd_vertices.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_vertices.diminfo[1].strides = __pyx_pybuffernd_vertices.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_vertices.diminfo[1].shape = __pyx_pybuffernd_vertices.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_29 = 0;
  __pyx_v_vertices = ((PyArrayObject *)__pyx_t_28);
  __pyx_t_28 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1042
 *     cdef np.ndarray[np.float64_t, ndim=2] vertices
 *     vertices = np.zeros((triangles.count*3,3), dtype='float64')
 *     if do_sample == 1:             # <<<<<<<<<<<<<<
 *         sampled = np.zeros(triangles.count, dtype='float64')
 *         FillTriangleValues(sampled, triangles.first)
 */
  __pyx_t_19 = (__pyx_v_do_sample == 1.0);
  if (__pyx_t_19) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1043
 *     vertices = np.zeros((triangles.count*3,3), dtype='float64')
 *     if do_sample == 1:
 *         sampled = np.zeros(triangles.count, dtype='float64')             # <<<<<<<<<<<<<<
 *         FillTriangleValues(sampled, triangles.first)
 *         FillAndWipeTriangles(vertices, triangles.first)
 */
    __pyx_t_28 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_28);
    __pyx_t_27 = PyObject_GetAttr(__pyx_t_28, __pyx_n_s__zeros); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_27);
    __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0;
    __pyx_t_28 = PyInt_FromLong(__pyx_v_triangles.count); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_28);
    __pyx_t_25 = PyTuple_New(1); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_25);
    PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_28);
    __Pyx_GIVEREF(__pyx_t_28);
    __pyx_t_28 = 0;
    __pyx_t_28 = PyDict_New(); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_28));
    if (PyDict_SetItem(__pyx_t_28, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_26 = PyObject_Call(__pyx_t_27, ((PyObject *)__pyx_t_25), ((PyObject *)__pyx_t_28)); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_26);
    __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_25)); __pyx_t_25 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_28)); __pyx_t_28 = 0;
    if (!(likely(((__pyx_t_26) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_26, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_30 = ((PyArrayObject *)__pyx_t_26);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sampled.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sampled.rcbuffer->pybuffer, (PyObject*)__pyx_t_30, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sampled.rcbuffer->pybuffer, (PyObject*)__pyx_v_sampled, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        }
      }
      __pyx_pybuffernd_sampled.diminfo[0].strides = __pyx_pybuffernd_sampled.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sampled.diminfo[0].shape = __pyx_pybuffernd_sampled.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_30 = 0;
    __pyx_v_sampled = ((PyArrayObject *)__pyx_t_26);
    __pyx_t_26 = 0;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1044
 *     if do_sample == 1:
 *         sampled = np.zeros(triangles.count, dtype='float64')
 *         FillTriangleValues(sampled, triangles.first)             # <<<<<<<<<<<<<<
 *         FillAndWipeTriangles(vertices, triangles.first)
 *         return vertices, sampled
 */
    __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_FillTriangleValues(((PyArrayObject *)__pyx_v_sampled), __pyx_v_triangles.first);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1045
 *         sampled = np.zeros(triangles.count, dtype='float64')
 *         FillTriangleValues(sampled, triangles.first)
 *         FillAndWipeTriangles(vertices, triangles.first)             # <<<<<<<<<<<<<<
 *         return vertices, sampled
 *     FillAndWipeTriangles(vertices, triangles.first)
 */
    __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_FillAndWipeTriangles(((PyArrayObject *)__pyx_v_vertices), __pyx_v_triangles.first);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1046
 *         FillTriangleValues(sampled, triangles.first)
 *         FillAndWipeTriangles(vertices, triangles.first)
 *         return vertices, sampled             # <<<<<<<<<<<<<<
 *     FillAndWipeTriangles(vertices, triangles.first)
 *     return vertices
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_26 = PyTuple_New(2); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_26);
    __Pyx_INCREF(((PyObject *)__pyx_v_vertices));
    PyTuple_SET_ITEM(__pyx_t_26, 0, ((PyObject *)__pyx_v_vertices));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_vertices));
    __Pyx_INCREF(((PyObject *)__pyx_v_sampled));
    PyTuple_SET_ITEM(__pyx_t_26, 1, ((PyObject *)__pyx_v_sampled));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_sampled));
    __pyx_r = ((PyObject *)__pyx_t_26);
    __pyx_t_26 = 0;
    goto __pyx_L0;
    goto __pyx_L26;
  }
  __pyx_L26:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1047
 *         FillAndWipeTriangles(vertices, triangles.first)
 *         return vertices, sampled
 *     FillAndWipeTriangles(vertices, triangles.first)             # <<<<<<<<<<<<<<
 *     return vertices
 * 
 */
  __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_FillAndWipeTriangles(((PyArrayObject *)__pyx_v_vertices), __pyx_v_triangles.first);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1048
 *         return vertices, sampled
 *     FillAndWipeTriangles(vertices, triangles.first)
 *     return vertices             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_vertices));
  __pyx_r = ((PyObject *)__pyx_v_vertices);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_XDECREF(__pyx_t_26);
  __Pyx_XDECREF(__pyx_t_27);
  __Pyx_XDECREF(__pyx_t_28);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dxs.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_edge.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sample.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sampled.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertices.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.march_cubes_grid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dxs.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_edge.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sample.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sampled.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_vertices.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_sample);
  __Pyx_XDECREF((PyObject *)__pyx_v_sampled);
  __Pyx_XDECREF((PyObject *)__pyx_v_vertices);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21march_cubes_grid_flux(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_21march_cubes_grid_flux = {__Pyx_NAMESTR("march_cubes_grid_flux"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21march_cubes_grid_flux, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21march_cubes_grid_flux(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_5numpy_float64_t __pyx_v_isovalue;
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_v1 = 0;
  PyArrayObject *__pyx_v_v2 = 0;
  PyArrayObject *__pyx_v_v3 = 0;
  PyArrayObject *__pyx_v_flux_field = 0;
  PyArrayObject *__pyx_v_mask = 0;
  PyArrayObject *__pyx_v_left_edge = 0;
  PyArrayObject *__pyx_v_dxs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("march_cubes_grid_flux (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__isovalue,&__pyx_n_s__values,&__pyx_n_s__v1,&__pyx_n_s__v2,&__pyx_n_s__v3,&__pyx_n_s__flux_field,&__pyx_n_s__mask,&__pyx_n_s__left_edge,&__pyx_n_s__dxs,0};
    PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__isovalue)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("march_cubes_grid_flux", 1, 9, 9, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__v1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("march_cubes_grid_flux", 1, 9, 9, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__v2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("march_cubes_grid_flux", 1, 9, 9, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__v3)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("march_cubes_grid_flux", 1, 9, 9, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__flux_field)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("march_cubes_grid_flux", 1, 9, 9, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("march_cubes_grid_flux", 1, 9, 9, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  7:
        if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left_edge)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("march_cubes_grid_flux", 1, 9, 9, 7); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  8:
        if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dxs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("march_cubes_grid_flux", 1, 9, 9, 8); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "march_cubes_grid_flux") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
    }
    __pyx_v_isovalue = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_isovalue == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_values = ((PyArrayObject *)values[1]);
    __pyx_v_v1 = ((PyArrayObject *)values[2]);
    __pyx_v_v2 = ((PyArrayObject *)values[3]);
    __pyx_v_v3 = ((PyArrayObject *)values[4]);
    __pyx_v_flux_field = ((PyArrayObject *)values[5]);
    __pyx_v_mask = ((PyArrayObject *)values[6]);
    __pyx_v_left_edge = ((PyArrayObject *)values[7]);
    __pyx_v_dxs = ((PyArrayObject *)values[8]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("march_cubes_grid_flux", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.march_cubes_grid_flux", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v1), __pyx_ptype_5numpy_ndarray, 1, "v1", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v2), __pyx_ptype_5numpy_ndarray, 1, "v2", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v3), __pyx_ptype_5numpy_ndarray, 1, "v3", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_flux_field), __pyx_ptype_5numpy_ndarray, 1, "flux_field", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1060; __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 = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dxs), __pyx_ptype_5numpy_ndarray, 1, "dxs", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_20march_cubes_grid_flux(__pyx_self, __pyx_v_isovalue, __pyx_v_values, __pyx_v_v1, __pyx_v_v2, __pyx_v_v3, __pyx_v_flux_field, __pyx_v_mask, __pyx_v_left_edge, __pyx_v_dxs);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1053
 * @cython.wraparound(False)
 * @cython.cdivision(True)
 * def march_cubes_grid_flux(             # <<<<<<<<<<<<<<
 *                      np.float64_t isovalue,
 *                      np.ndarray[np.float64_t, ndim=3] values,
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_20march_cubes_grid_flux(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_float64_t __pyx_v_isovalue, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_v1, PyArrayObject *__pyx_v_v2, PyArrayObject *__pyx_v_v3, PyArrayObject *__pyx_v_flux_field, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_left_edge, PyArrayObject *__pyx_v_dxs) {
  int __pyx_v_dims[3];
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_k;
  int __pyx_v_n;
  int __pyx_v_m;
  int __pyx_v_offset;
  __pyx_t_5numpy_float64_t __pyx_v_gv[8];
  __pyx_t_5numpy_float64_t *__pyx_v_intdata;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_TriangleCollection __pyx_v_triangles;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_current;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_Triangle *__pyx_v_last;
  __pyx_t_5numpy_float64_t *__pyx_v_data;
  __pyx_t_5numpy_float64_t *__pyx_v_v1data;
  __pyx_t_5numpy_float64_t *__pyx_v_v2data;
  __pyx_t_5numpy_float64_t *__pyx_v_v3data;
  __pyx_t_5numpy_float64_t *__pyx_v_fdata;
  __pyx_t_5numpy_float64_t *__pyx_v_dds;
  __pyx_t_5numpy_float64_t __pyx_v_flux;
  __pyx_t_5numpy_float64_t __pyx_v_center[3];
  __pyx_t_5numpy_float64_t __pyx_v_point[3];
  __pyx_t_5numpy_float64_t __pyx_v_wval;
  __pyx_t_5numpy_float64_t __pyx_v_temp;
  __pyx_t_5numpy_float64_t __pyx_v_area;
  __pyx_t_5numpy_float64_t __pyx_v_s;
  __pyx_t_5numpy_float64_t __pyx_v_cell_pos[3];
  __pyx_t_5numpy_float64_t __pyx_v_fv[3];
  __pyx_t_5numpy_float64_t __pyx_v_idds[3];
  __pyx_t_5numpy_float64_t __pyx_v_normal[3];
  __Pyx_LocalBuf_ND __pyx_pybuffernd_dxs;
  __Pyx_Buffer __pyx_pybuffer_dxs;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_flux_field;
  __Pyx_Buffer __pyx_pybuffer_flux_field;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left_edge;
  __Pyx_Buffer __pyx_pybuffer_left_edge;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_v1;
  __Pyx_Buffer __pyx_pybuffer_v1;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_v2;
  __Pyx_Buffer __pyx_pybuffer_v2;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_v3;
  __Pyx_Buffer __pyx_pybuffer_v3;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  long __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  long __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  int __pyx_t_18;
  long __pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("march_cubes_grid_flux", 0);
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_v1.pybuffer.buf = NULL;
  __pyx_pybuffer_v1.refcount = 0;
  __pyx_pybuffernd_v1.data = NULL;
  __pyx_pybuffernd_v1.rcbuffer = &__pyx_pybuffer_v1;
  __pyx_pybuffer_v2.pybuffer.buf = NULL;
  __pyx_pybuffer_v2.refcount = 0;
  __pyx_pybuffernd_v2.data = NULL;
  __pyx_pybuffernd_v2.rcbuffer = &__pyx_pybuffer_v2;
  __pyx_pybuffer_v3.pybuffer.buf = NULL;
  __pyx_pybuffer_v3.refcount = 0;
  __pyx_pybuffernd_v3.data = NULL;
  __pyx_pybuffernd_v3.rcbuffer = &__pyx_pybuffer_v3;
  __pyx_pybuffer_flux_field.pybuffer.buf = NULL;
  __pyx_pybuffer_flux_field.refcount = 0;
  __pyx_pybuffernd_flux_field.data = NULL;
  __pyx_pybuffernd_flux_field.rcbuffer = &__pyx_pybuffer_flux_field;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  __pyx_pybuffer_left_edge.pybuffer.buf = NULL;
  __pyx_pybuffer_left_edge.refcount = 0;
  __pyx_pybuffernd_left_edge.data = NULL;
  __pyx_pybuffernd_left_edge.rcbuffer = &__pyx_pybuffer_left_edge;
  __pyx_pybuffer_dxs.pybuffer.buf = NULL;
  __pyx_pybuffer_dxs.refcount = 0;
  __pyx_pybuffernd_dxs.data = NULL;
  __pyx_pybuffernd_dxs.rcbuffer = &__pyx_pybuffer_dxs;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_values.diminfo[2].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_values.diminfo[2].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v1.rcbuffer->pybuffer, (PyObject*)__pyx_v_v1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_v1.diminfo[0].strides = __pyx_pybuffernd_v1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v1.diminfo[0].shape = __pyx_pybuffernd_v1.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_v1.diminfo[1].strides = __pyx_pybuffernd_v1.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_v1.diminfo[1].shape = __pyx_pybuffernd_v1.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_v1.diminfo[2].strides = __pyx_pybuffernd_v1.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_v1.diminfo[2].shape = __pyx_pybuffernd_v1.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v2.rcbuffer->pybuffer, (PyObject*)__pyx_v_v2, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_v2.diminfo[0].strides = __pyx_pybuffernd_v2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v2.diminfo[0].shape = __pyx_pybuffernd_v2.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_v2.diminfo[1].strides = __pyx_pybuffernd_v2.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_v2.diminfo[1].shape = __pyx_pybuffernd_v2.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_v2.diminfo[2].strides = __pyx_pybuffernd_v2.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_v2.diminfo[2].shape = __pyx_pybuffernd_v2.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_v3.rcbuffer->pybuffer, (PyObject*)__pyx_v_v3, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_v3.diminfo[0].strides = __pyx_pybuffernd_v3.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_v3.diminfo[0].shape = __pyx_pybuffernd_v3.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_v3.diminfo[1].strides = __pyx_pybuffernd_v3.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_v3.diminfo[1].shape = __pyx_pybuffernd_v3.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_v3.diminfo[2].strides = __pyx_pybuffernd_v3.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_v3.diminfo[2].shape = __pyx_pybuffernd_v3.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_flux_field.rcbuffer->pybuffer, (PyObject*)__pyx_v_flux_field, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_flux_field.diminfo[0].strides = __pyx_pybuffernd_flux_field.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_flux_field.diminfo[0].shape = __pyx_pybuffernd_flux_field.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_flux_field.diminfo[1].strides = __pyx_pybuffernd_flux_field.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_flux_field.diminfo[1].shape = __pyx_pybuffernd_flux_field.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_flux_field.diminfo[2].strides = __pyx_pybuffernd_flux_field.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_flux_field.diminfo[2].shape = __pyx_pybuffernd_flux_field.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_mask.diminfo[2].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_mask.diminfo[2].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[2];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_edge.rcbuffer->pybuffer, (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 = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left_edge.diminfo[0].strides = __pyx_pybuffernd_left_edge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_edge.diminfo[0].shape = __pyx_pybuffernd_left_edge.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dxs.rcbuffer->pybuffer, (PyObject*)__pyx_v_dxs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_dxs.diminfo[0].strides = __pyx_pybuffernd_dxs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dxs.diminfo[0].shape = __pyx_pybuffernd_dxs.rcbuffer->pybuffer.shape[0];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1067
 *     cdef int offset
 *     cdef np.float64_t gv[8]
 *     cdef np.float64_t *intdata = NULL             # <<<<<<<<<<<<<<
 *     cdef TriangleCollection triangles
 *     cdef Triangle *current = NULL
 */
  __pyx_v_intdata = NULL;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1069
 *     cdef np.float64_t *intdata = NULL
 *     cdef TriangleCollection triangles
 *     cdef Triangle *current = NULL             # <<<<<<<<<<<<<<
 *     cdef Triangle *last = NULL
 *     cdef np.float64_t *data = <np.float64_t *> values.data
 */
  __pyx_v_current = NULL;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1070
 *     cdef TriangleCollection triangles
 *     cdef Triangle *current = NULL
 *     cdef Triangle *last = NULL             # <<<<<<<<<<<<<<
 *     cdef np.float64_t *data = <np.float64_t *> values.data
 *     cdef np.float64_t *v1data = <np.float64_t *> v1.data
 */
  __pyx_v_last = NULL;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1071
 *     cdef Triangle *current = NULL
 *     cdef Triangle *last = NULL
 *     cdef np.float64_t *data = <np.float64_t *> values.data             # <<<<<<<<<<<<<<
 *     cdef np.float64_t *v1data = <np.float64_t *> v1.data
 *     cdef np.float64_t *v2data = <np.float64_t *> v2.data
 */
  __pyx_v_data = ((__pyx_t_5numpy_float64_t *)__pyx_v_values->data);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1072
 *     cdef Triangle *last = NULL
 *     cdef np.float64_t *data = <np.float64_t *> values.data
 *     cdef np.float64_t *v1data = <np.float64_t *> v1.data             # <<<<<<<<<<<<<<
 *     cdef np.float64_t *v2data = <np.float64_t *> v2.data
 *     cdef np.float64_t *v3data = <np.float64_t *> v3.data
 */
  __pyx_v_v1data = ((__pyx_t_5numpy_float64_t *)__pyx_v_v1->data);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1073
 *     cdef np.float64_t *data = <np.float64_t *> values.data
 *     cdef np.float64_t *v1data = <np.float64_t *> v1.data
 *     cdef np.float64_t *v2data = <np.float64_t *> v2.data             # <<<<<<<<<<<<<<
 *     cdef np.float64_t *v3data = <np.float64_t *> v3.data
 *     cdef np.float64_t *fdata = <np.float64_t *> flux_field.data
 */
  __pyx_v_v2data = ((__pyx_t_5numpy_float64_t *)__pyx_v_v2->data);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1074
 *     cdef np.float64_t *v1data = <np.float64_t *> v1.data
 *     cdef np.float64_t *v2data = <np.float64_t *> v2.data
 *     cdef np.float64_t *v3data = <np.float64_t *> v3.data             # <<<<<<<<<<<<<<
 *     cdef np.float64_t *fdata = <np.float64_t *> flux_field.data
 *     cdef np.float64_t *dds = <np.float64_t *> dxs.data
 */
  __pyx_v_v3data = ((__pyx_t_5numpy_float64_t *)__pyx_v_v3->data);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1075
 *     cdef np.float64_t *v2data = <np.float64_t *> v2.data
 *     cdef np.float64_t *v3data = <np.float64_t *> v3.data
 *     cdef np.float64_t *fdata = <np.float64_t *> flux_field.data             # <<<<<<<<<<<<<<
 *     cdef np.float64_t *dds = <np.float64_t *> dxs.data
 *     cdef np.float64_t flux = 0.0
 */
  __pyx_v_fdata = ((__pyx_t_5numpy_float64_t *)__pyx_v_flux_field->data);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1076
 *     cdef np.float64_t *v3data = <np.float64_t *> v3.data
 *     cdef np.float64_t *fdata = <np.float64_t *> flux_field.data
 *     cdef np.float64_t *dds = <np.float64_t *> dxs.data             # <<<<<<<<<<<<<<
 *     cdef np.float64_t flux = 0.0
 *     cdef np.float64_t center[3], point[3], wval, temp, area, s
 */
  __pyx_v_dds = ((__pyx_t_5numpy_float64_t *)__pyx_v_dxs->data);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1077
 *     cdef np.float64_t *fdata = <np.float64_t *> flux_field.data
 *     cdef np.float64_t *dds = <np.float64_t *> dxs.data
 *     cdef np.float64_t flux = 0.0             # <<<<<<<<<<<<<<
 *     cdef np.float64_t center[3], point[3], wval, temp, area, s
 *     cdef np.float64_t cell_pos[3], fv[3], idds[3], normal[3]
 */
  __pyx_v_flux = 0.0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1080
 *     cdef np.float64_t center[3], point[3], wval, temp, area, s
 *     cdef np.float64_t cell_pos[3], fv[3], idds[3], normal[3]
 *     for i in range(3):             # <<<<<<<<<<<<<<
 *         dims[i] = values.shape[i] - 1
 *         idds[i] = 1.0 / dds[i]
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1081
 *     cdef np.float64_t cell_pos[3], fv[3], idds[3], normal[3]
 *     for i in range(3):
 *         dims[i] = values.shape[i] - 1             # <<<<<<<<<<<<<<
 *         idds[i] = 1.0 / dds[i]
 *     triangles.first = triangles.current = NULL
 */
    (__pyx_v_dims[__pyx_v_i]) = ((__pyx_v_values->dimensions[__pyx_v_i]) - 1);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1082
 *     for i in range(3):
 *         dims[i] = values.shape[i] - 1
 *         idds[i] = 1.0 / dds[i]             # <<<<<<<<<<<<<<
 *     triangles.first = triangles.current = NULL
 *     triangles.count = 0
 */
    (__pyx_v_idds[__pyx_v_i]) = (1.0 / (__pyx_v_dds[__pyx_v_i]));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1083
 *         dims[i] = values.shape[i] - 1
 *         idds[i] = 1.0 / dds[i]
 *     triangles.first = triangles.current = NULL             # <<<<<<<<<<<<<<
 *     triangles.count = 0
 *     cell_pos[0] = left_edge[0]
 */
  __pyx_v_triangles.first = NULL;
  __pyx_v_triangles.current = NULL;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1084
 *         idds[i] = 1.0 / dds[i]
 *     triangles.first = triangles.current = NULL
 *     triangles.count = 0             # <<<<<<<<<<<<<<
 *     cell_pos[0] = left_edge[0]
 *     for i in range(dims[0]):
 */
  __pyx_v_triangles.count = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1085
 *     triangles.first = triangles.current = NULL
 *     triangles.count = 0
 *     cell_pos[0] = left_edge[0]             # <<<<<<<<<<<<<<
 *     for i in range(dims[0]):
 *         cell_pos[1] = left_edge[1]
 */
  __pyx_t_2 = 0;
  (__pyx_v_cell_pos[0]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left_edge.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_left_edge.diminfo[0].strides));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1086
 *     triangles.count = 0
 *     cell_pos[0] = left_edge[0]
 *     for i in range(dims[0]):             # <<<<<<<<<<<<<<
 *         cell_pos[1] = left_edge[1]
 *         for j in range(dims[1]):
 */
  __pyx_t_1 = (__pyx_v_dims[0]);
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1087
 *     cell_pos[0] = left_edge[0]
 *     for i in range(dims[0]):
 *         cell_pos[1] = left_edge[1]             # <<<<<<<<<<<<<<
 *         for j in range(dims[1]):
 *             cell_pos[2] = left_edge[2]
 */
    __pyx_t_4 = 1;
    (__pyx_v_cell_pos[1]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left_edge.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_left_edge.diminfo[0].strides));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1088
 *     for i in range(dims[0]):
 *         cell_pos[1] = left_edge[1]
 *         for j in range(dims[1]):             # <<<<<<<<<<<<<<
 *             cell_pos[2] = left_edge[2]
 *             for k in range(dims[2]):
 */
    __pyx_t_5 = (__pyx_v_dims[1]);
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_j = __pyx_t_6;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1089
 *         cell_pos[1] = left_edge[1]
 *         for j in range(dims[1]):
 *             cell_pos[2] = left_edge[2]             # <<<<<<<<<<<<<<
 *             for k in range(dims[2]):
 *                 if mask[i,j,k] == 1:
 */
      __pyx_t_7 = 2;
      (__pyx_v_cell_pos[2]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left_edge.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left_edge.diminfo[0].strides));

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1090
 *         for j in range(dims[1]):
 *             cell_pos[2] = left_edge[2]
 *             for k in range(dims[2]):             # <<<<<<<<<<<<<<
 *                 if mask[i,j,k] == 1:
 *                     offset = i * (dims[1] + 1) * (dims[2] + 1) \
 */
      __pyx_t_8 = (__pyx_v_dims[2]);
      for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
        __pyx_v_k = __pyx_t_9;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1091
 *             cell_pos[2] = left_edge[2]
 *             for k in range(dims[2]):
 *                 if mask[i,j,k] == 1:             # <<<<<<<<<<<<<<
 *                     offset = i * (dims[1] + 1) * (dims[2] + 1) \
 *                            + j * (dims[2] + 1) + k
 */
        __pyx_t_10 = __pyx_v_i;
        __pyx_t_11 = __pyx_v_j;
        __pyx_t_12 = __pyx_v_k;
        __pyx_t_13 = ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_mask.diminfo[1].strides, __pyx_t_12, __pyx_pybuffernd_mask.diminfo[2].strides)) == 1);
        if (__pyx_t_13) {

          /* "yt/utilities/lib/VolumeIntegrator.pyx":1093
 *                 if mask[i,j,k] == 1:
 *                     offset = i * (dims[1] + 1) * (dims[2] + 1) \
 *                            + j * (dims[2] + 1) + k             # <<<<<<<<<<<<<<
 *                     intdata = data + offset
 *                     offset_fill(dims, intdata, gv)
 */
          __pyx_v_offset = ((((__pyx_v_i * ((__pyx_v_dims[1]) + 1)) * ((__pyx_v_dims[2]) + 1)) + (__pyx_v_j * ((__pyx_v_dims[2]) + 1))) + __pyx_v_k);

          /* "yt/utilities/lib/VolumeIntegrator.pyx":1094
 *                     offset = i * (dims[1] + 1) * (dims[2] + 1) \
 *                            + j * (dims[2] + 1) + k
 *                     intdata = data + offset             # <<<<<<<<<<<<<<
 *                     offset_fill(dims, intdata, gv)
 *                     march_cubes(gv, isovalue, dds,
 */
          __pyx_v_intdata = (__pyx_v_data + __pyx_v_offset);

          /* "yt/utilities/lib/VolumeIntegrator.pyx":1095
 *                            + j * (dims[2] + 1) + k
 *                     intdata = data + offset
 *                     offset_fill(dims, intdata, gv)             # <<<<<<<<<<<<<<
 *                     march_cubes(gv, isovalue, dds,
 *                                 cell_pos[0], cell_pos[1], cell_pos[2],
 */
          offset_fill(__pyx_v_dims, __pyx_v_intdata, __pyx_v_gv);

          /* "yt/utilities/lib/VolumeIntegrator.pyx":1098
 *                     march_cubes(gv, isovalue, dds,
 *                                 cell_pos[0], cell_pos[1], cell_pos[2],
 *                                 &triangles)             # <<<<<<<<<<<<<<
 *                     # Now our triangles collection has a bunch.  We now
 *                     # calculate fluxes for each.
 */
          __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_march_cubes(__pyx_v_gv, __pyx_v_isovalue, __pyx_v_dds, (__pyx_v_cell_pos[0]), (__pyx_v_cell_pos[1]), (__pyx_v_cell_pos[2]), (&__pyx_v_triangles));

          /* "yt/utilities/lib/VolumeIntegrator.pyx":1101
 *                     # Now our triangles collection has a bunch.  We now
 *                     # calculate fluxes for each.
 *                     if last == NULL and triangles.first != NULL:             # <<<<<<<<<<<<<<
 *                         current = triangles.first
 *                         last = NULL
 */
          __pyx_t_13 = (__pyx_v_last == NULL);
          if (__pyx_t_13) {
            __pyx_t_14 = (__pyx_v_triangles.first != NULL);
            __pyx_t_15 = __pyx_t_14;
          } else {
            __pyx_t_15 = __pyx_t_13;
          }
          if (__pyx_t_15) {

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1102
 *                     # calculate fluxes for each.
 *                     if last == NULL and triangles.first != NULL:
 *                         current = triangles.first             # <<<<<<<<<<<<<<
 *                         last = NULL
 *                     elif last != NULL:
 */
            __pyx_v_current = __pyx_v_triangles.first;

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1103
 *                     if last == NULL and triangles.first != NULL:
 *                         current = triangles.first
 *                         last = NULL             # <<<<<<<<<<<<<<
 *                     elif last != NULL:
 *                         current = last.next
 */
            __pyx_v_last = NULL;
            goto __pyx_L12;
          }

          /* "yt/utilities/lib/VolumeIntegrator.pyx":1104
 *                         current = triangles.first
 *                         last = NULL
 *                     elif last != NULL:             # <<<<<<<<<<<<<<
 *                         current = last.next
 *                     while current != NULL:
 */
          __pyx_t_15 = (__pyx_v_last != NULL);
          if (__pyx_t_15) {

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1105
 *                         last = NULL
 *                     elif last != NULL:
 *                         current = last.next             # <<<<<<<<<<<<<<
 *                     while current != NULL:
 *                         # Calculate the center of the triangle
 */
            __pyx_v_current = __pyx_v_last->next;
            goto __pyx_L12;
          }
          __pyx_L12:;

          /* "yt/utilities/lib/VolumeIntegrator.pyx":1106
 *                     elif last != NULL:
 *                         current = last.next
 *                     while current != NULL:             # <<<<<<<<<<<<<<
 *                         # Calculate the center of the triangle
 *                         wval = 0.0
 */
          while (1) {
            __pyx_t_15 = (__pyx_v_current != NULL);
            if (!__pyx_t_15) break;

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1108
 *                     while current != NULL:
 *                         # Calculate the center of the triangle
 *                         wval = 0.0             # <<<<<<<<<<<<<<
 *                         for n in range(3):
 *                             center[n] = 0.0
 */
            __pyx_v_wval = 0.0;

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1109
 *                         # Calculate the center of the triangle
 *                         wval = 0.0
 *                         for n in range(3):             # <<<<<<<<<<<<<<
 *                             center[n] = 0.0
 *                         for n in range(3):
 */
            for (__pyx_t_16 = 0; __pyx_t_16 < 3; __pyx_t_16+=1) {
              __pyx_v_n = __pyx_t_16;

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1110
 *                         wval = 0.0
 *                         for n in range(3):
 *                             center[n] = 0.0             # <<<<<<<<<<<<<<
 *                         for n in range(3):
 *                             for m in range(3):
 */
              (__pyx_v_center[__pyx_v_n]) = 0.0;
            }

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1111
 *                         for n in range(3):
 *                             center[n] = 0.0
 *                         for n in range(3):             # <<<<<<<<<<<<<<
 *                             for m in range(3):
 *                                 point[m] = (current.p[n][m]-cell_pos[m])*idds[m]
 */
            for (__pyx_t_16 = 0; __pyx_t_16 < 3; __pyx_t_16+=1) {
              __pyx_v_n = __pyx_t_16;

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1112
 *                             center[n] = 0.0
 *                         for n in range(3):
 *                             for m in range(3):             # <<<<<<<<<<<<<<
 *                                 point[m] = (current.p[n][m]-cell_pos[m])*idds[m]
 *                             # Now we calculate the value at this point
 */
              for (__pyx_t_17 = 0; __pyx_t_17 < 3; __pyx_t_17+=1) {
                __pyx_v_m = __pyx_t_17;

                /* "yt/utilities/lib/VolumeIntegrator.pyx":1113
 *                         for n in range(3):
 *                             for m in range(3):
 *                                 point[m] = (current.p[n][m]-cell_pos[m])*idds[m]             # <<<<<<<<<<<<<<
 *                             # Now we calculate the value at this point
 *                             temp = offset_interpolate(dims, point, intdata)
 */
                (__pyx_v_point[__pyx_v_m]) = ((((__pyx_v_current->p[__pyx_v_n])[__pyx_v_m]) - (__pyx_v_cell_pos[__pyx_v_m])) * (__pyx_v_idds[__pyx_v_m]));
              }

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1115
 *                                 point[m] = (current.p[n][m]-cell_pos[m])*idds[m]
 *                             # Now we calculate the value at this point
 *                             temp = offset_interpolate(dims, point, intdata)             # <<<<<<<<<<<<<<
 *                             #print "something", temp, point[0], point[1], point[2]
 *                             wval += temp
 */
              __pyx_v_temp = offset_interpolate(__pyx_v_dims, __pyx_v_point, __pyx_v_intdata);

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1117
 *                             temp = offset_interpolate(dims, point, intdata)
 *                             #print "something", temp, point[0], point[1], point[2]
 *                             wval += temp             # <<<<<<<<<<<<<<
 *                             for m in range(3):
 *                                 center[m] += temp * point[m]
 */
              __pyx_v_wval = (__pyx_v_wval + __pyx_v_temp);

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1118
 *                             #print "something", temp, point[0], point[1], point[2]
 *                             wval += temp
 *                             for m in range(3):             # <<<<<<<<<<<<<<
 *                                 center[m] += temp * point[m]
 *                         # Now we divide by our normalizing factor
 */
              for (__pyx_t_17 = 0; __pyx_t_17 < 3; __pyx_t_17+=1) {
                __pyx_v_m = __pyx_t_17;

                /* "yt/utilities/lib/VolumeIntegrator.pyx":1119
 *                             wval += temp
 *                             for m in range(3):
 *                                 center[m] += temp * point[m]             # <<<<<<<<<<<<<<
 *                         # Now we divide by our normalizing factor
 *                         for n in range(3):
 */
                __pyx_t_18 = __pyx_v_m;
                (__pyx_v_center[__pyx_t_18]) = ((__pyx_v_center[__pyx_t_18]) + (__pyx_v_temp * (__pyx_v_point[__pyx_v_m])));
              }
            }

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1121
 *                                 center[m] += temp * point[m]
 *                         # Now we divide by our normalizing factor
 *                         for n in range(3):             # <<<<<<<<<<<<<<
 *                             center[n] /= wval
 *                         # We have our center point of the triangle, in 0..1
 */
            for (__pyx_t_16 = 0; __pyx_t_16 < 3; __pyx_t_16+=1) {
              __pyx_v_n = __pyx_t_16;

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1122
 *                         # Now we divide by our normalizing factor
 *                         for n in range(3):
 *                             center[n] /= wval             # <<<<<<<<<<<<<<
 *                         # We have our center point of the triangle, in 0..1
 *                         # coordinates.  So now we interpolate our three
 */
              __pyx_t_17 = __pyx_v_n;
              (__pyx_v_center[__pyx_t_17]) = ((__pyx_v_center[__pyx_t_17]) / __pyx_v_wval);
            }

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1126
 *                         # coordinates.  So now we interpolate our three
 *                         # fields.
 *                         fv[0] = offset_interpolate(dims, center, v1data + offset)             # <<<<<<<<<<<<<<
 *                         fv[1] = offset_interpolate(dims, center, v2data + offset)
 *                         fv[2] = offset_interpolate(dims, center, v3data + offset)
 */
            (__pyx_v_fv[0]) = offset_interpolate(__pyx_v_dims, __pyx_v_center, (__pyx_v_v1data + __pyx_v_offset));

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1127
 *                         # fields.
 *                         fv[0] = offset_interpolate(dims, center, v1data + offset)
 *                         fv[1] = offset_interpolate(dims, center, v2data + offset)             # <<<<<<<<<<<<<<
 *                         fv[2] = offset_interpolate(dims, center, v3data + offset)
 *                         # We interpolate again the actual value data
 */
            (__pyx_v_fv[1]) = offset_interpolate(__pyx_v_dims, __pyx_v_center, (__pyx_v_v2data + __pyx_v_offset));

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1128
 *                         fv[0] = offset_interpolate(dims, center, v1data + offset)
 *                         fv[1] = offset_interpolate(dims, center, v2data + offset)
 *                         fv[2] = offset_interpolate(dims, center, v3data + offset)             # <<<<<<<<<<<<<<
 *                         # We interpolate again the actual value data
 *                         wval = offset_interpolate(dims, center, fdata + offset)
 */
            (__pyx_v_fv[2]) = offset_interpolate(__pyx_v_dims, __pyx_v_center, (__pyx_v_v3data + __pyx_v_offset));

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1130
 *                         fv[2] = offset_interpolate(dims, center, v3data + offset)
 *                         # We interpolate again the actual value data
 *                         wval = offset_interpolate(dims, center, fdata + offset)             # <<<<<<<<<<<<<<
 *                         # Now we have our flux vector and our field value!
 *                         # We just need a normal vector with which we can
 */
            __pyx_v_wval = offset_interpolate(__pyx_v_dims, __pyx_v_center, (__pyx_v_fdata + __pyx_v_offset));

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1135
 *                         # dot it.  The normal should be equal to the gradient
 *                         # in the center of the triangle, or thereabouts.
 *                         eval_gradient(dims, center, intdata, normal)             # <<<<<<<<<<<<<<
 *                         temp = 0.0
 *                         for n in range(3):
 */
            eval_gradient(__pyx_v_dims, __pyx_v_center, __pyx_v_intdata, __pyx_v_normal);

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1136
 *                         # in the center of the triangle, or thereabouts.
 *                         eval_gradient(dims, center, intdata, normal)
 *                         temp = 0.0             # <<<<<<<<<<<<<<
 *                         for n in range(3):
 *                             temp += normal[n]*normal[n]
 */
            __pyx_v_temp = 0.0;

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1137
 *                         eval_gradient(dims, center, intdata, normal)
 *                         temp = 0.0
 *                         for n in range(3):             # <<<<<<<<<<<<<<
 *                             temp += normal[n]*normal[n]
 *                         # Take the negative, to ensure it points inwardly
 */
            for (__pyx_t_16 = 0; __pyx_t_16 < 3; __pyx_t_16+=1) {
              __pyx_v_n = __pyx_t_16;

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1138
 *                         temp = 0.0
 *                         for n in range(3):
 *                             temp += normal[n]*normal[n]             # <<<<<<<<<<<<<<
 *                         # Take the negative, to ensure it points inwardly
 *                         temp = -(temp**0.5)
 */
              __pyx_v_temp = (__pyx_v_temp + ((__pyx_v_normal[__pyx_v_n]) * (__pyx_v_normal[__pyx_v_n])));
            }

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1140
 *                             temp += normal[n]*normal[n]
 *                         # Take the negative, to ensure it points inwardly
 *                         temp = -(temp**0.5)             # <<<<<<<<<<<<<<
 *                         # Dump this somewhere for now
 *                         temp = wval * (fv[0] * normal[0] +
 */
            __pyx_v_temp = (-pow(((double)__pyx_v_temp), 0.5));

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1144
 *                         temp = wval * (fv[0] * normal[0] +
 *                                        fv[1] * normal[1] +
 *                                        fv[2] * normal[2])/temp             # <<<<<<<<<<<<<<
 *                         # Now we need the area of the triangle.  This will take
 *                         # a lot of time to calculate compared to the rest.
 */
            __pyx_v_temp = ((__pyx_v_wval * ((((__pyx_v_fv[0]) * (__pyx_v_normal[0])) + ((__pyx_v_fv[1]) * (__pyx_v_normal[1]))) + ((__pyx_v_fv[2]) * (__pyx_v_normal[2])))) / __pyx_v_temp);

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1148
 *                         # a lot of time to calculate compared to the rest.
 *                         # We use Heron's formula.
 *                         for n in range(3):             # <<<<<<<<<<<<<<
 *                             fv[n] = 0.0
 *                         for n in range(3):
 */
            for (__pyx_t_16 = 0; __pyx_t_16 < 3; __pyx_t_16+=1) {
              __pyx_v_n = __pyx_t_16;

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1149
 *                         # We use Heron's formula.
 *                         for n in range(3):
 *                             fv[n] = 0.0             # <<<<<<<<<<<<<<
 *                         for n in range(3):
 *                             fv[0] += (current.p[0][n] - current.p[2][n])**2.0
 */
              (__pyx_v_fv[__pyx_v_n]) = 0.0;
            }

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1150
 *                         for n in range(3):
 *                             fv[n] = 0.0
 *                         for n in range(3):             # <<<<<<<<<<<<<<
 *                             fv[0] += (current.p[0][n] - current.p[2][n])**2.0
 *                             fv[1] += (current.p[1][n] - current.p[0][n])**2.0
 */
            for (__pyx_t_16 = 0; __pyx_t_16 < 3; __pyx_t_16+=1) {
              __pyx_v_n = __pyx_t_16;

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1151
 *                             fv[n] = 0.0
 *                         for n in range(3):
 *                             fv[0] += (current.p[0][n] - current.p[2][n])**2.0             # <<<<<<<<<<<<<<
 *                             fv[1] += (current.p[1][n] - current.p[0][n])**2.0
 *                             fv[2] += (current.p[2][n] - current.p[1][n])**2.0
 */
              __pyx_t_19 = 0;
              (__pyx_v_fv[__pyx_t_19]) = ((__pyx_v_fv[__pyx_t_19]) + pow(((double)(((__pyx_v_current->p[0])[__pyx_v_n]) - ((__pyx_v_current->p[2])[__pyx_v_n]))), 2.0));

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1152
 *                         for n in range(3):
 *                             fv[0] += (current.p[0][n] - current.p[2][n])**2.0
 *                             fv[1] += (current.p[1][n] - current.p[0][n])**2.0             # <<<<<<<<<<<<<<
 *                             fv[2] += (current.p[2][n] - current.p[1][n])**2.0
 *                         s = 0.0
 */
              __pyx_t_19 = 1;
              (__pyx_v_fv[__pyx_t_19]) = ((__pyx_v_fv[__pyx_t_19]) + pow(((double)(((__pyx_v_current->p[1])[__pyx_v_n]) - ((__pyx_v_current->p[0])[__pyx_v_n]))), 2.0));

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1153
 *                             fv[0] += (current.p[0][n] - current.p[2][n])**2.0
 *                             fv[1] += (current.p[1][n] - current.p[0][n])**2.0
 *                             fv[2] += (current.p[2][n] - current.p[1][n])**2.0             # <<<<<<<<<<<<<<
 *                         s = 0.0
 *                         for n in range(3):
 */
              __pyx_t_19 = 2;
              (__pyx_v_fv[__pyx_t_19]) = ((__pyx_v_fv[__pyx_t_19]) + pow(((double)(((__pyx_v_current->p[2])[__pyx_v_n]) - ((__pyx_v_current->p[1])[__pyx_v_n]))), 2.0));
            }

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1154
 *                             fv[1] += (current.p[1][n] - current.p[0][n])**2.0
 *                             fv[2] += (current.p[2][n] - current.p[1][n])**2.0
 *                         s = 0.0             # <<<<<<<<<<<<<<
 *                         for n in range(3):
 *                             fv[n] = fv[n]**0.5
 */
            __pyx_v_s = 0.0;

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1155
 *                             fv[2] += (current.p[2][n] - current.p[1][n])**2.0
 *                         s = 0.0
 *                         for n in range(3):             # <<<<<<<<<<<<<<
 *                             fv[n] = fv[n]**0.5
 *                             s += 0.5 * fv[n]
 */
            for (__pyx_t_16 = 0; __pyx_t_16 < 3; __pyx_t_16+=1) {
              __pyx_v_n = __pyx_t_16;

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1156
 *                         s = 0.0
 *                         for n in range(3):
 *                             fv[n] = fv[n]**0.5             # <<<<<<<<<<<<<<
 *                             s += 0.5 * fv[n]
 *                         area = (s*(s-fv[0])*(s-fv[1])*(s-fv[2]))
 */
              (__pyx_v_fv[__pyx_v_n]) = pow(((double)(__pyx_v_fv[__pyx_v_n])), 0.5);

              /* "yt/utilities/lib/VolumeIntegrator.pyx":1157
 *                         for n in range(3):
 *                             fv[n] = fv[n]**0.5
 *                             s += 0.5 * fv[n]             # <<<<<<<<<<<<<<
 *                         area = (s*(s-fv[0])*(s-fv[1])*(s-fv[2]))
 *                         area = area**0.5
 */
              __pyx_v_s = (__pyx_v_s + (0.5 * (__pyx_v_fv[__pyx_v_n])));
            }

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1158
 *                             fv[n] = fv[n]**0.5
 *                             s += 0.5 * fv[n]
 *                         area = (s*(s-fv[0])*(s-fv[1])*(s-fv[2]))             # <<<<<<<<<<<<<<
 *                         area = area**0.5
 *                         flux += temp*area
 */
            __pyx_v_area = (((__pyx_v_s * (__pyx_v_s - (__pyx_v_fv[0]))) * (__pyx_v_s - (__pyx_v_fv[1]))) * (__pyx_v_s - (__pyx_v_fv[2])));

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1159
 *                             s += 0.5 * fv[n]
 *                         area = (s*(s-fv[0])*(s-fv[1])*(s-fv[2]))
 *                         area = area**0.5             # <<<<<<<<<<<<<<
 *                         flux += temp*area
 *                         last = current
 */
            __pyx_v_area = pow(((double)__pyx_v_area), 0.5);

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1160
 *                         area = (s*(s-fv[0])*(s-fv[1])*(s-fv[2]))
 *                         area = area**0.5
 *                         flux += temp*area             # <<<<<<<<<<<<<<
 *                         last = current
 *                         if current.next == NULL: break
 */
            __pyx_v_flux = (__pyx_v_flux + (__pyx_v_temp * __pyx_v_area));

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1161
 *                         area = area**0.5
 *                         flux += temp*area
 *                         last = current             # <<<<<<<<<<<<<<
 *                         if current.next == NULL: break
 *                         current = current.next
 */
            __pyx_v_last = __pyx_v_current;

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1162
 *                         flux += temp*area
 *                         last = current
 *                         if current.next == NULL: break             # <<<<<<<<<<<<<<
 *                         current = current.next
 *                 cell_pos[2] += dds[2]
 */
            __pyx_t_15 = (__pyx_v_current->next == NULL);
            if (__pyx_t_15) {
              goto __pyx_L14_break;
              goto __pyx_L33;
            }
            __pyx_L33:;

            /* "yt/utilities/lib/VolumeIntegrator.pyx":1163
 *                         last = current
 *                         if current.next == NULL: break
 *                         current = current.next             # <<<<<<<<<<<<<<
 *                 cell_pos[2] += dds[2]
 *             cell_pos[1] += dds[1]
 */
            __pyx_v_current = __pyx_v_current->next;
          }
          __pyx_L14_break:;
          goto __pyx_L11;
        }
        __pyx_L11:;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1164
 *                         if current.next == NULL: break
 *                         current = current.next
 *                 cell_pos[2] += dds[2]             # <<<<<<<<<<<<<<
 *             cell_pos[1] += dds[1]
 *         cell_pos[0] += dds[0]
 */
        __pyx_t_19 = 2;
        (__pyx_v_cell_pos[__pyx_t_19]) = ((__pyx_v_cell_pos[__pyx_t_19]) + (__pyx_v_dds[2]));
      }

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1165
 *                         current = current.next
 *                 cell_pos[2] += dds[2]
 *             cell_pos[1] += dds[1]             # <<<<<<<<<<<<<<
 *         cell_pos[0] += dds[0]
 *     # Hallo, we are all done.
 */
      __pyx_t_19 = 1;
      (__pyx_v_cell_pos[__pyx_t_19]) = ((__pyx_v_cell_pos[__pyx_t_19]) + (__pyx_v_dds[1]));
    }

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1166
 *                 cell_pos[2] += dds[2]
 *             cell_pos[1] += dds[1]
 *         cell_pos[0] += dds[0]             # <<<<<<<<<<<<<<
 *     # Hallo, we are all done.
 *     WipeTriangles(triangles.first)
 */
    __pyx_t_19 = 0;
    (__pyx_v_cell_pos[__pyx_t_19]) = ((__pyx_v_cell_pos[__pyx_t_19]) + (__pyx_v_dds[0]));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1168
 *         cell_pos[0] += dds[0]
 *     # Hallo, we are all done.
 *     WipeTriangles(triangles.first)             # <<<<<<<<<<<<<<
 *     return flux
 * 
 */
  __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_WipeTriangles(__pyx_v_triangles.first);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1169
 *     # Hallo, we are all done.
 *     WipeTriangles(triangles.first)
 *     return flux             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_20 = PyFloat_FromDouble(__pyx_v_flux); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_20);
  __pyx_r = __pyx_t_20;
  __pyx_t_20 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_20);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dxs.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_flux_field.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_edge.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v1.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v2.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v3.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.march_cubes_grid_flux", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dxs.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_flux_field.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_edge.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v1.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v2.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_v3.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1174
 * @cython.wraparound(False)
 * @cython.cdivision(True)
 * cdef int march_cubes(             # <<<<<<<<<<<<<<
 *                  np.float64_t gv[8], np.float64_t isovalue,
 *                  np.float64_t dds[3],
 */

static int __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_march_cubes(__pyx_t_5numpy_float64_t *__pyx_v_gv, __pyx_t_5numpy_float64_t __pyx_v_isovalue, __pyx_t_5numpy_float64_t *__pyx_v_dds, __pyx_t_5numpy_float64_t __pyx_v_x, __pyx_t_5numpy_float64_t __pyx_v_y, __pyx_t_5numpy_float64_t __pyx_v_z, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_TriangleCollection *__pyx_v_triangles) {
  int *__pyx_v_edge_table;
  int **__pyx_v_tri_table;
  __pyx_t_5numpy_float64_t __pyx_v_vertlist[12][3];
  int __pyx_v_cubeindex;
  int __pyx_v_n;
  int __pyx_v_nt;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1[256];
  int __pyx_t_2[16];
  int __pyx_t_3[16];
  int __pyx_t_4[16];
  int __pyx_t_5[16];
  int __pyx_t_6[16];
  int __pyx_t_7[16];
  int __pyx_t_8[16];
  int __pyx_t_9[16];
  int __pyx_t_10[16];
  int __pyx_t_11[16];
  int __pyx_t_12[16];
  int __pyx_t_13[16];
  int __pyx_t_14[16];
  int __pyx_t_15[16];
  int __pyx_t_16[16];
  int __pyx_t_17[16];
  int __pyx_t_18[16];
  int __pyx_t_19[16];
  int __pyx_t_20[16];
  int __pyx_t_21[16];
  int __pyx_t_22[16];
  int __pyx_t_23[16];
  int __pyx_t_24[16];
  int __pyx_t_25[16];
  int __pyx_t_26[16];
  int __pyx_t_27[16];
  int __pyx_t_28[16];
  int __pyx_t_29[16];
  int __pyx_t_30[16];
  int __pyx_t_31[16];
  int __pyx_t_32[16];
  int __pyx_t_33[16];
  int __pyx_t_34[16];
  int __pyx_t_35[16];
  int __pyx_t_36[16];
  int __pyx_t_37[16];
  int __pyx_t_38[16];
  int __pyx_t_39[16];
  int __pyx_t_40[16];
  int __pyx_t_41[16];
  int __pyx_t_42[16];
  int __pyx_t_43[16];
  int __pyx_t_44[16];
  int __pyx_t_45[16];
  int __pyx_t_46[16];
  int __pyx_t_47[16];
  int __pyx_t_48[16];
  int __pyx_t_49[16];
  int __pyx_t_50[16];
  int __pyx_t_51[16];
  int __pyx_t_52[16];
  int __pyx_t_53[16];
  int __pyx_t_54[16];
  int __pyx_t_55[16];
  int __pyx_t_56[16];
  int __pyx_t_57[16];
  int __pyx_t_58[16];
  int __pyx_t_59[16];
  int __pyx_t_60[16];
  int __pyx_t_61[16];
  int __pyx_t_62[16];
  int __pyx_t_63[16];
  int __pyx_t_64[16];
  int __pyx_t_65[16];
  int __pyx_t_66[16];
  int __pyx_t_67[16];
  int __pyx_t_68[16];
  int __pyx_t_69[16];
  int __pyx_t_70[16];
  int __pyx_t_71[16];
  int __pyx_t_72[16];
  int __pyx_t_73[16];
  int __pyx_t_74[16];
  int __pyx_t_75[16];
  int __pyx_t_76[16];
  int __pyx_t_77[16];
  int __pyx_t_78[16];
  int __pyx_t_79[16];
  int __pyx_t_80[16];
  int __pyx_t_81[16];
  int __pyx_t_82[16];
  int __pyx_t_83[16];
  int __pyx_t_84[16];
  int __pyx_t_85[16];
  int __pyx_t_86[16];
  int __pyx_t_87[16];
  int __pyx_t_88[16];
  int __pyx_t_89[16];
  int __pyx_t_90[16];
  int __pyx_t_91[16];
  int __pyx_t_92[16];
  int __pyx_t_93[16];
  int __pyx_t_94[16];
  int __pyx_t_95[16];
  int __pyx_t_96[16];
  int __pyx_t_97[16];
  int __pyx_t_98[16];
  int __pyx_t_99[16];
  int __pyx_t_100[16];
  int __pyx_t_101[16];
  int __pyx_t_102[16];
  int __pyx_t_103[16];
  int __pyx_t_104[16];
  int __pyx_t_105[16];
  int __pyx_t_106[16];
  int __pyx_t_107[16];
  int __pyx_t_108[16];
  int __pyx_t_109[16];
  int __pyx_t_110[16];
  int __pyx_t_111[16];
  int __pyx_t_112[16];
  int __pyx_t_113[16];
  int __pyx_t_114[16];
  int __pyx_t_115[16];
  int __pyx_t_116[16];
  int __pyx_t_117[16];
  int __pyx_t_118[16];
  int __pyx_t_119[16];
  int __pyx_t_120[16];
  int __pyx_t_121[16];
  int __pyx_t_122[16];
  int __pyx_t_123[16];
  int __pyx_t_124[16];
  int __pyx_t_125[16];
  int __pyx_t_126[16];
  int __pyx_t_127[16];
  int __pyx_t_128[16];
  int __pyx_t_129[16];
  int __pyx_t_130[16];
  int __pyx_t_131[16];
  int __pyx_t_132[16];
  int __pyx_t_133[16];
  int __pyx_t_134[16];
  int __pyx_t_135[16];
  int __pyx_t_136[16];
  int __pyx_t_137[16];
  int __pyx_t_138[16];
  int __pyx_t_139[16];
  int __pyx_t_140[16];
  int __pyx_t_141[16];
  int __pyx_t_142[16];
  int __pyx_t_143[16];
  int __pyx_t_144[16];
  int __pyx_t_145[16];
  int __pyx_t_146[16];
  int __pyx_t_147[16];
  int __pyx_t_148[16];
  int __pyx_t_149[16];
  int __pyx_t_150[16];
  int __pyx_t_151[16];
  int __pyx_t_152[16];
  int __pyx_t_153[16];
  int __pyx_t_154[16];
  int __pyx_t_155[16];
  int __pyx_t_156[16];
  int __pyx_t_157[16];
  int __pyx_t_158[16];
  int __pyx_t_159[16];
  int __pyx_t_160[16];
  int __pyx_t_161[16];
  int __pyx_t_162[16];
  int __pyx_t_163[16];
  int __pyx_t_164[16];
  int __pyx_t_165[16];
  int __pyx_t_166[16];
  int __pyx_t_167[16];
  int __pyx_t_168[16];
  int __pyx_t_169[16];
  int __pyx_t_170[16];
  int __pyx_t_171[16];
  int __pyx_t_172[16];
  int __pyx_t_173[16];
  int __pyx_t_174[16];
  int __pyx_t_175[16];
  int __pyx_t_176[16];
  int __pyx_t_177[16];
  int __pyx_t_178[16];
  int __pyx_t_179[16];
  int __pyx_t_180[16];
  int __pyx_t_181[16];
  int __pyx_t_182[16];
  int __pyx_t_183[16];
  int __pyx_t_184[16];
  int __pyx_t_185[16];
  int __pyx_t_186[16];
  int __pyx_t_187[16];
  int __pyx_t_188[16];
  int __pyx_t_189[16];
  int __pyx_t_190[16];
  int __pyx_t_191[16];
  int __pyx_t_192[16];
  int __pyx_t_193[16];
  int __pyx_t_194[16];
  int __pyx_t_195[16];
  int __pyx_t_196[16];
  int __pyx_t_197[16];
  int __pyx_t_198[16];
  int __pyx_t_199[16];
  int __pyx_t_200[16];
  int __pyx_t_201[16];
  int __pyx_t_202[16];
  int __pyx_t_203[16];
  int __pyx_t_204[16];
  int __pyx_t_205[16];
  int __pyx_t_206[16];
  int __pyx_t_207[16];
  int __pyx_t_208[16];
  int __pyx_t_209[16];
  int __pyx_t_210[16];
  int __pyx_t_211[16];
  int __pyx_t_212[16];
  int __pyx_t_213[16];
  int __pyx_t_214[16];
  int __pyx_t_215[16];
  int __pyx_t_216[16];
  int __pyx_t_217[16];
  int __pyx_t_218[16];
  int __pyx_t_219[16];
  int __pyx_t_220[16];
  int __pyx_t_221[16];
  int __pyx_t_222[16];
  int __pyx_t_223[16];
  int __pyx_t_224[16];
  int __pyx_t_225[16];
  int __pyx_t_226[16];
  int __pyx_t_227[16];
  int __pyx_t_228[16];
  int __pyx_t_229[16];
  int __pyx_t_230[16];
  int __pyx_t_231[16];
  int __pyx_t_232[16];
  int __pyx_t_233[16];
  int __pyx_t_234[16];
  int __pyx_t_235[16];
  int __pyx_t_236[16];
  int __pyx_t_237[16];
  int __pyx_t_238[16];
  int __pyx_t_239[16];
  int __pyx_t_240[16];
  int __pyx_t_241[16];
  int __pyx_t_242[16];
  int __pyx_t_243[16];
  int __pyx_t_244[16];
  int __pyx_t_245[16];
  int __pyx_t_246[16];
  int __pyx_t_247[16];
  int __pyx_t_248[16];
  int __pyx_t_249[16];
  int __pyx_t_250[16];
  int __pyx_t_251[16];
  int __pyx_t_252[16];
  int __pyx_t_253[16];
  int __pyx_t_254[16];
  int __pyx_t_255[16];
  int __pyx_t_256[16];
  int __pyx_t_257[16];
  int *__pyx_t_258[256];
  int __pyx_t_259;
  int __pyx_t_260;
  long __pyx_t_261;
  __Pyx_RefNannySetupContext("march_cubes", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1179
 *                  np.float64_t x, np.float64_t y, np.float64_t z,
 *                  TriangleCollection *triangles):
 *     cdef int *edge_table=[             # <<<<<<<<<<<<<<
 *     0x0  , 0x109, 0x203, 0x30a, 0x406, 0x50f, 0x605, 0x70c,
 *     0x80c, 0x905, 0xa0f, 0xb06, 0xc0a, 0xd03, 0xe09, 0xf00,
 */
  __pyx_t_1[0] = 0x0;
  __pyx_t_1[1] = 0x109;
  __pyx_t_1[2] = 0x203;
  __pyx_t_1[3] = 0x30a;
  __pyx_t_1[4] = 0x406;
  __pyx_t_1[5] = 0x50f;
  __pyx_t_1[6] = 0x605;
  __pyx_t_1[7] = 0x70c;
  __pyx_t_1[8] = 0x80c;
  __pyx_t_1[9] = 0x905;
  __pyx_t_1[10] = 0xa0f;
  __pyx_t_1[11] = 0xb06;
  __pyx_t_1[12] = 0xc0a;
  __pyx_t_1[13] = 0xd03;
  __pyx_t_1[14] = 0xe09;
  __pyx_t_1[15] = 0xf00;
  __pyx_t_1[16] = 0x190;
  __pyx_t_1[17] = 0x99;
  __pyx_t_1[18] = 0x393;
  __pyx_t_1[19] = 0x29a;
  __pyx_t_1[20] = 0x596;
  __pyx_t_1[21] = 0x49f;
  __pyx_t_1[22] = 0x795;
  __pyx_t_1[23] = 0x69c;
  __pyx_t_1[24] = 0x99c;
  __pyx_t_1[25] = 0x895;
  __pyx_t_1[26] = 0xb9f;
  __pyx_t_1[27] = 0xa96;
  __pyx_t_1[28] = 0xd9a;
  __pyx_t_1[29] = 0xc93;
  __pyx_t_1[30] = 0xf99;
  __pyx_t_1[31] = 0xe90;
  __pyx_t_1[32] = 0x230;
  __pyx_t_1[33] = 0x339;
  __pyx_t_1[34] = 0x33;
  __pyx_t_1[35] = 0x13a;
  __pyx_t_1[36] = 0x636;
  __pyx_t_1[37] = 0x73f;
  __pyx_t_1[38] = 0x435;
  __pyx_t_1[39] = 0x53c;
  __pyx_t_1[40] = 0xa3c;
  __pyx_t_1[41] = 0xb35;
  __pyx_t_1[42] = 0x83f;
  __pyx_t_1[43] = 0x936;
  __pyx_t_1[44] = 0xe3a;
  __pyx_t_1[45] = 0xf33;
  __pyx_t_1[46] = 0xc39;
  __pyx_t_1[47] = 0xd30;
  __pyx_t_1[48] = 0x3a0;
  __pyx_t_1[49] = 0x2a9;
  __pyx_t_1[50] = 0x1a3;
  __pyx_t_1[51] = 0xaa;
  __pyx_t_1[52] = 0x7a6;
  __pyx_t_1[53] = 0x6af;
  __pyx_t_1[54] = 0x5a5;
  __pyx_t_1[55] = 0x4ac;
  __pyx_t_1[56] = 0xbac;
  __pyx_t_1[57] = 0xaa5;
  __pyx_t_1[58] = 0x9af;
  __pyx_t_1[59] = 0x8a6;
  __pyx_t_1[60] = 0xfaa;
  __pyx_t_1[61] = 0xea3;
  __pyx_t_1[62] = 0xda9;
  __pyx_t_1[63] = 0xca0;
  __pyx_t_1[64] = 0x460;
  __pyx_t_1[65] = 0x569;
  __pyx_t_1[66] = 0x663;
  __pyx_t_1[67] = 0x76a;
  __pyx_t_1[68] = 0x66;
  __pyx_t_1[69] = 0x16f;
  __pyx_t_1[70] = 0x265;
  __pyx_t_1[71] = 0x36c;
  __pyx_t_1[72] = 0xc6c;
  __pyx_t_1[73] = 0xd65;
  __pyx_t_1[74] = 0xe6f;
  __pyx_t_1[75] = 0xf66;
  __pyx_t_1[76] = 0x86a;
  __pyx_t_1[77] = 0x963;
  __pyx_t_1[78] = 0xa69;
  __pyx_t_1[79] = 0xb60;
  __pyx_t_1[80] = 0x5f0;
  __pyx_t_1[81] = 0x4f9;
  __pyx_t_1[82] = 0x7f3;
  __pyx_t_1[83] = 0x6fa;
  __pyx_t_1[84] = 0x1f6;
  __pyx_t_1[85] = 0xff;
  __pyx_t_1[86] = 0x3f5;
  __pyx_t_1[87] = 0x2fc;
  __pyx_t_1[88] = 0xdfc;
  __pyx_t_1[89] = 0xcf5;
  __pyx_t_1[90] = 0xfff;
  __pyx_t_1[91] = 0xef6;
  __pyx_t_1[92] = 0x9fa;
  __pyx_t_1[93] = 0x8f3;
  __pyx_t_1[94] = 0xbf9;
  __pyx_t_1[95] = 0xaf0;
  __pyx_t_1[96] = 0x650;
  __pyx_t_1[97] = 0x759;
  __pyx_t_1[98] = 0x453;
  __pyx_t_1[99] = 0x55a;
  __pyx_t_1[100] = 0x256;
  __pyx_t_1[101] = 0x35f;
  __pyx_t_1[102] = 0x55;
  __pyx_t_1[103] = 0x15c;
  __pyx_t_1[104] = 0xe5c;
  __pyx_t_1[105] = 0xf55;
  __pyx_t_1[106] = 0xc5f;
  __pyx_t_1[107] = 0xd56;
  __pyx_t_1[108] = 0xa5a;
  __pyx_t_1[109] = 0xb53;
  __pyx_t_1[110] = 0x859;
  __pyx_t_1[111] = 0x950;
  __pyx_t_1[112] = 0x7c0;
  __pyx_t_1[113] = 0x6c9;
  __pyx_t_1[114] = 0x5c3;
  __pyx_t_1[115] = 0x4ca;
  __pyx_t_1[116] = 0x3c6;
  __pyx_t_1[117] = 0x2cf;
  __pyx_t_1[118] = 0x1c5;
  __pyx_t_1[119] = 0xcc;
  __pyx_t_1[120] = 0xfcc;
  __pyx_t_1[121] = 0xec5;
  __pyx_t_1[122] = 0xdcf;
  __pyx_t_1[123] = 0xcc6;
  __pyx_t_1[124] = 0xbca;
  __pyx_t_1[125] = 0xac3;
  __pyx_t_1[126] = 0x9c9;
  __pyx_t_1[127] = 0x8c0;
  __pyx_t_1[128] = 0x8c0;
  __pyx_t_1[129] = 0x9c9;
  __pyx_t_1[130] = 0xac3;
  __pyx_t_1[131] = 0xbca;
  __pyx_t_1[132] = 0xcc6;
  __pyx_t_1[133] = 0xdcf;
  __pyx_t_1[134] = 0xec5;
  __pyx_t_1[135] = 0xfcc;
  __pyx_t_1[136] = 0xcc;
  __pyx_t_1[137] = 0x1c5;
  __pyx_t_1[138] = 0x2cf;
  __pyx_t_1[139] = 0x3c6;
  __pyx_t_1[140] = 0x4ca;
  __pyx_t_1[141] = 0x5c3;
  __pyx_t_1[142] = 0x6c9;
  __pyx_t_1[143] = 0x7c0;
  __pyx_t_1[144] = 0x950;
  __pyx_t_1[145] = 0x859;
  __pyx_t_1[146] = 0xb53;
  __pyx_t_1[147] = 0xa5a;
  __pyx_t_1[148] = 0xd56;
  __pyx_t_1[149] = 0xc5f;
  __pyx_t_1[150] = 0xf55;
  __pyx_t_1[151] = 0xe5c;
  __pyx_t_1[152] = 0x15c;
  __pyx_t_1[153] = 0x55;
  __pyx_t_1[154] = 0x35f;
  __pyx_t_1[155] = 0x256;
  __pyx_t_1[156] = 0x55a;
  __pyx_t_1[157] = 0x453;
  __pyx_t_1[158] = 0x759;
  __pyx_t_1[159] = 0x650;
  __pyx_t_1[160] = 0xaf0;
  __pyx_t_1[161] = 0xbf9;
  __pyx_t_1[162] = 0x8f3;
  __pyx_t_1[163] = 0x9fa;
  __pyx_t_1[164] = 0xef6;
  __pyx_t_1[165] = 0xfff;
  __pyx_t_1[166] = 0xcf5;
  __pyx_t_1[167] = 0xdfc;
  __pyx_t_1[168] = 0x2fc;
  __pyx_t_1[169] = 0x3f5;
  __pyx_t_1[170] = 0xff;
  __pyx_t_1[171] = 0x1f6;
  __pyx_t_1[172] = 0x6fa;
  __pyx_t_1[173] = 0x7f3;
  __pyx_t_1[174] = 0x4f9;
  __pyx_t_1[175] = 0x5f0;
  __pyx_t_1[176] = 0xb60;
  __pyx_t_1[177] = 0xa69;
  __pyx_t_1[178] = 0x963;
  __pyx_t_1[179] = 0x86a;
  __pyx_t_1[180] = 0xf66;
  __pyx_t_1[181] = 0xe6f;
  __pyx_t_1[182] = 0xd65;
  __pyx_t_1[183] = 0xc6c;
  __pyx_t_1[184] = 0x36c;
  __pyx_t_1[185] = 0x265;
  __pyx_t_1[186] = 0x16f;
  __pyx_t_1[187] = 0x66;
  __pyx_t_1[188] = 0x76a;
  __pyx_t_1[189] = 0x663;
  __pyx_t_1[190] = 0x569;
  __pyx_t_1[191] = 0x460;
  __pyx_t_1[192] = 0xca0;
  __pyx_t_1[193] = 0xda9;
  __pyx_t_1[194] = 0xea3;
  __pyx_t_1[195] = 0xfaa;
  __pyx_t_1[196] = 0x8a6;
  __pyx_t_1[197] = 0x9af;
  __pyx_t_1[198] = 0xaa5;
  __pyx_t_1[199] = 0xbac;
  __pyx_t_1[200] = 0x4ac;
  __pyx_t_1[201] = 0x5a5;
  __pyx_t_1[202] = 0x6af;
  __pyx_t_1[203] = 0x7a6;
  __pyx_t_1[204] = 0xaa;
  __pyx_t_1[205] = 0x1a3;
  __pyx_t_1[206] = 0x2a9;
  __pyx_t_1[207] = 0x3a0;
  __pyx_t_1[208] = 0xd30;
  __pyx_t_1[209] = 0xc39;
  __pyx_t_1[210] = 0xf33;
  __pyx_t_1[211] = 0xe3a;
  __pyx_t_1[212] = 0x936;
  __pyx_t_1[213] = 0x83f;
  __pyx_t_1[214] = 0xb35;
  __pyx_t_1[215] = 0xa3c;
  __pyx_t_1[216] = 0x53c;
  __pyx_t_1[217] = 0x435;
  __pyx_t_1[218] = 0x73f;
  __pyx_t_1[219] = 0x636;
  __pyx_t_1[220] = 0x13a;
  __pyx_t_1[221] = 0x33;
  __pyx_t_1[222] = 0x339;
  __pyx_t_1[223] = 0x230;
  __pyx_t_1[224] = 0xe90;
  __pyx_t_1[225] = 0xf99;
  __pyx_t_1[226] = 0xc93;
  __pyx_t_1[227] = 0xd9a;
  __pyx_t_1[228] = 0xa96;
  __pyx_t_1[229] = 0xb9f;
  __pyx_t_1[230] = 0x895;
  __pyx_t_1[231] = 0x99c;
  __pyx_t_1[232] = 0x69c;
  __pyx_t_1[233] = 0x795;
  __pyx_t_1[234] = 0x49f;
  __pyx_t_1[235] = 0x596;
  __pyx_t_1[236] = 0x29a;
  __pyx_t_1[237] = 0x393;
  __pyx_t_1[238] = 0x99;
  __pyx_t_1[239] = 0x190;
  __pyx_t_1[240] = 0xf00;
  __pyx_t_1[241] = 0xe09;
  __pyx_t_1[242] = 0xd03;
  __pyx_t_1[243] = 0xc0a;
  __pyx_t_1[244] = 0xb06;
  __pyx_t_1[245] = 0xa0f;
  __pyx_t_1[246] = 0x905;
  __pyx_t_1[247] = 0x80c;
  __pyx_t_1[248] = 0x70c;
  __pyx_t_1[249] = 0x605;
  __pyx_t_1[250] = 0x50f;
  __pyx_t_1[251] = 0x406;
  __pyx_t_1[252] = 0x30a;
  __pyx_t_1[253] = 0x203;
  __pyx_t_1[254] = 0x109;
  __pyx_t_1[255] = 0x0;
  __pyx_v_edge_table = __pyx_t_1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1214
 * 
 *     cdef int **tri_table = \
 *     [[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_2[0] = -1;
  __pyx_t_2[1] = -1;
  __pyx_t_2[2] = -1;
  __pyx_t_2[3] = -1;
  __pyx_t_2[4] = -1;
  __pyx_t_2[5] = -1;
  __pyx_t_2[6] = -1;
  __pyx_t_2[7] = -1;
  __pyx_t_2[8] = -1;
  __pyx_t_2[9] = -1;
  __pyx_t_2[10] = -1;
  __pyx_t_2[11] = -1;
  __pyx_t_2[12] = -1;
  __pyx_t_2[13] = -1;
  __pyx_t_2[14] = -1;
  __pyx_t_2[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1215
 *     cdef int **tri_table = \
 *     [[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 8, 3, 9, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_3[0] = 0;
  __pyx_t_3[1] = 8;
  __pyx_t_3[2] = 3;
  __pyx_t_3[3] = -1;
  __pyx_t_3[4] = -1;
  __pyx_t_3[5] = -1;
  __pyx_t_3[6] = -1;
  __pyx_t_3[7] = -1;
  __pyx_t_3[8] = -1;
  __pyx_t_3[9] = -1;
  __pyx_t_3[10] = -1;
  __pyx_t_3[11] = -1;
  __pyx_t_3[12] = -1;
  __pyx_t_3[13] = -1;
  __pyx_t_3[14] = -1;
  __pyx_t_3[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1216
 *     [[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 8, 3, 9, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_4[0] = 0;
  __pyx_t_4[1] = 1;
  __pyx_t_4[2] = 9;
  __pyx_t_4[3] = -1;
  __pyx_t_4[4] = -1;
  __pyx_t_4[5] = -1;
  __pyx_t_4[6] = -1;
  __pyx_t_4[7] = -1;
  __pyx_t_4[8] = -1;
  __pyx_t_4[9] = -1;
  __pyx_t_4[10] = -1;
  __pyx_t_4[11] = -1;
  __pyx_t_4[12] = -1;
  __pyx_t_4[13] = -1;
  __pyx_t_4[14] = -1;
  __pyx_t_4[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1217
 *     [0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 8, 3, 9, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_5[0] = 1;
  __pyx_t_5[1] = 8;
  __pyx_t_5[2] = 3;
  __pyx_t_5[3] = 9;
  __pyx_t_5[4] = 8;
  __pyx_t_5[5] = 1;
  __pyx_t_5[6] = -1;
  __pyx_t_5[7] = -1;
  __pyx_t_5[8] = -1;
  __pyx_t_5[9] = -1;
  __pyx_t_5[10] = -1;
  __pyx_t_5[11] = -1;
  __pyx_t_5[12] = -1;
  __pyx_t_5[13] = -1;
  __pyx_t_5[14] = -1;
  __pyx_t_5[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1218
 *     [0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 8, 3, 9, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 8, 3, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 2, 10, 0, 2, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_6[0] = 1;
  __pyx_t_6[1] = 2;
  __pyx_t_6[2] = 10;
  __pyx_t_6[3] = -1;
  __pyx_t_6[4] = -1;
  __pyx_t_6[5] = -1;
  __pyx_t_6[6] = -1;
  __pyx_t_6[7] = -1;
  __pyx_t_6[8] = -1;
  __pyx_t_6[9] = -1;
  __pyx_t_6[10] = -1;
  __pyx_t_6[11] = -1;
  __pyx_t_6[12] = -1;
  __pyx_t_6[13] = -1;
  __pyx_t_6[14] = -1;
  __pyx_t_6[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1219
 *     [1, 8, 3, 9, 8, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 2, 10, 0, 2, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 8, 3, 2, 10, 8, 10, 9, 8, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_7[0] = 0;
  __pyx_t_7[1] = 8;
  __pyx_t_7[2] = 3;
  __pyx_t_7[3] = 1;
  __pyx_t_7[4] = 2;
  __pyx_t_7[5] = 10;
  __pyx_t_7[6] = -1;
  __pyx_t_7[7] = -1;
  __pyx_t_7[8] = -1;
  __pyx_t_7[9] = -1;
  __pyx_t_7[10] = -1;
  __pyx_t_7[11] = -1;
  __pyx_t_7[12] = -1;
  __pyx_t_7[13] = -1;
  __pyx_t_7[14] = -1;
  __pyx_t_7[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1220
 *     [1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 2, 10, 0, 2, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [2, 8, 3, 2, 10, 8, 10, 9, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_8[0] = 9;
  __pyx_t_8[1] = 2;
  __pyx_t_8[2] = 10;
  __pyx_t_8[3] = 0;
  __pyx_t_8[4] = 2;
  __pyx_t_8[5] = 9;
  __pyx_t_8[6] = -1;
  __pyx_t_8[7] = -1;
  __pyx_t_8[8] = -1;
  __pyx_t_8[9] = -1;
  __pyx_t_8[10] = -1;
  __pyx_t_8[11] = -1;
  __pyx_t_8[12] = -1;
  __pyx_t_8[13] = -1;
  __pyx_t_8[14] = -1;
  __pyx_t_8[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1221
 *     [0, 8, 3, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 2, 10, 0, 2, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 8, 3, 2, 10, 8, 10, 9, 8, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 11, 2, 8, 11, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_9[0] = 2;
  __pyx_t_9[1] = 8;
  __pyx_t_9[2] = 3;
  __pyx_t_9[3] = 2;
  __pyx_t_9[4] = 10;
  __pyx_t_9[5] = 8;
  __pyx_t_9[6] = 10;
  __pyx_t_9[7] = 9;
  __pyx_t_9[8] = 8;
  __pyx_t_9[9] = -1;
  __pyx_t_9[10] = -1;
  __pyx_t_9[11] = -1;
  __pyx_t_9[12] = -1;
  __pyx_t_9[13] = -1;
  __pyx_t_9[14] = -1;
  __pyx_t_9[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1222
 *     [9, 2, 10, 0, 2, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 8, 3, 2, 10, 8, 10, 9, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 11, 2, 8, 11, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 9, 0, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_10[0] = 3;
  __pyx_t_10[1] = 11;
  __pyx_t_10[2] = 2;
  __pyx_t_10[3] = -1;
  __pyx_t_10[4] = -1;
  __pyx_t_10[5] = -1;
  __pyx_t_10[6] = -1;
  __pyx_t_10[7] = -1;
  __pyx_t_10[8] = -1;
  __pyx_t_10[9] = -1;
  __pyx_t_10[10] = -1;
  __pyx_t_10[11] = -1;
  __pyx_t_10[12] = -1;
  __pyx_t_10[13] = -1;
  __pyx_t_10[14] = -1;
  __pyx_t_10[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1223
 *     [2, 8, 3, 2, 10, 8, 10, 9, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 11, 2, 8, 11, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 9, 0, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 11, 2, 1, 9, 11, 9, 8, 11, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_11[0] = 0;
  __pyx_t_11[1] = 11;
  __pyx_t_11[2] = 2;
  __pyx_t_11[3] = 8;
  __pyx_t_11[4] = 11;
  __pyx_t_11[5] = 0;
  __pyx_t_11[6] = -1;
  __pyx_t_11[7] = -1;
  __pyx_t_11[8] = -1;
  __pyx_t_11[9] = -1;
  __pyx_t_11[10] = -1;
  __pyx_t_11[11] = -1;
  __pyx_t_11[12] = -1;
  __pyx_t_11[13] = -1;
  __pyx_t_11[14] = -1;
  __pyx_t_11[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1224
 *     [3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 11, 2, 8, 11, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 9, 0, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 11, 2, 1, 9, 11, 9, 8, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 10, 1, 11, 10, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_12[0] = 1;
  __pyx_t_12[1] = 9;
  __pyx_t_12[2] = 0;
  __pyx_t_12[3] = 2;
  __pyx_t_12[4] = 3;
  __pyx_t_12[5] = 11;
  __pyx_t_12[6] = -1;
  __pyx_t_12[7] = -1;
  __pyx_t_12[8] = -1;
  __pyx_t_12[9] = -1;
  __pyx_t_12[10] = -1;
  __pyx_t_12[11] = -1;
  __pyx_t_12[12] = -1;
  __pyx_t_12[13] = -1;
  __pyx_t_12[14] = -1;
  __pyx_t_12[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1225
 *     [0, 11, 2, 8, 11, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 9, 0, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 11, 2, 1, 9, 11, 9, 8, 11, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 10, 1, 11, 10, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 10, 1, 0, 8, 10, 8, 11, 10, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_13[0] = 1;
  __pyx_t_13[1] = 11;
  __pyx_t_13[2] = 2;
  __pyx_t_13[3] = 1;
  __pyx_t_13[4] = 9;
  __pyx_t_13[5] = 11;
  __pyx_t_13[6] = 9;
  __pyx_t_13[7] = 8;
  __pyx_t_13[8] = 11;
  __pyx_t_13[9] = -1;
  __pyx_t_13[10] = -1;
  __pyx_t_13[11] = -1;
  __pyx_t_13[12] = -1;
  __pyx_t_13[13] = -1;
  __pyx_t_13[14] = -1;
  __pyx_t_13[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1226
 *     [1, 9, 0, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 11, 2, 1, 9, 11, 9, 8, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 10, 1, 11, 10, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 10, 1, 0, 8, 10, 8, 11, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 9, 0, 3, 11, 9, 11, 10, 9, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_14[0] = 3;
  __pyx_t_14[1] = 10;
  __pyx_t_14[2] = 1;
  __pyx_t_14[3] = 11;
  __pyx_t_14[4] = 10;
  __pyx_t_14[5] = 3;
  __pyx_t_14[6] = -1;
  __pyx_t_14[7] = -1;
  __pyx_t_14[8] = -1;
  __pyx_t_14[9] = -1;
  __pyx_t_14[10] = -1;
  __pyx_t_14[11] = -1;
  __pyx_t_14[12] = -1;
  __pyx_t_14[13] = -1;
  __pyx_t_14[14] = -1;
  __pyx_t_14[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1227
 *     [1, 11, 2, 1, 9, 11, 9, 8, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 10, 1, 11, 10, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 10, 1, 0, 8, 10, 8, 11, 10, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 9, 0, 3, 11, 9, 11, 10, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_15[0] = 0;
  __pyx_t_15[1] = 10;
  __pyx_t_15[2] = 1;
  __pyx_t_15[3] = 0;
  __pyx_t_15[4] = 8;
  __pyx_t_15[5] = 10;
  __pyx_t_15[6] = 8;
  __pyx_t_15[7] = 11;
  __pyx_t_15[8] = 10;
  __pyx_t_15[9] = -1;
  __pyx_t_15[10] = -1;
  __pyx_t_15[11] = -1;
  __pyx_t_15[12] = -1;
  __pyx_t_15[13] = -1;
  __pyx_t_15[14] = -1;
  __pyx_t_15[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1228
 *     [3, 10, 1, 11, 10, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 10, 1, 0, 8, 10, 8, 11, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 9, 0, 3, 11, 9, 11, 10, 9, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_16[0] = 3;
  __pyx_t_16[1] = 9;
  __pyx_t_16[2] = 0;
  __pyx_t_16[3] = 3;
  __pyx_t_16[4] = 11;
  __pyx_t_16[5] = 9;
  __pyx_t_16[6] = 11;
  __pyx_t_16[7] = 10;
  __pyx_t_16[8] = 9;
  __pyx_t_16[9] = -1;
  __pyx_t_16[10] = -1;
  __pyx_t_16[11] = -1;
  __pyx_t_16[12] = -1;
  __pyx_t_16[13] = -1;
  __pyx_t_16[14] = -1;
  __pyx_t_16[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1229
 *     [0, 10, 1, 0, 8, 10, 8, 11, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 9, 0, 3, 11, 9, 11, 10, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 3, 0, 7, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_17[0] = 9;
  __pyx_t_17[1] = 8;
  __pyx_t_17[2] = 10;
  __pyx_t_17[3] = 10;
  __pyx_t_17[4] = 8;
  __pyx_t_17[5] = 11;
  __pyx_t_17[6] = -1;
  __pyx_t_17[7] = -1;
  __pyx_t_17[8] = -1;
  __pyx_t_17[9] = -1;
  __pyx_t_17[10] = -1;
  __pyx_t_17[11] = -1;
  __pyx_t_17[12] = -1;
  __pyx_t_17[13] = -1;
  __pyx_t_17[14] = -1;
  __pyx_t_17[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1230
 *     [3, 9, 0, 3, 11, 9, 11, 10, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 3, 0, 7, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 1, 9, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_18[0] = 4;
  __pyx_t_18[1] = 7;
  __pyx_t_18[2] = 8;
  __pyx_t_18[3] = -1;
  __pyx_t_18[4] = -1;
  __pyx_t_18[5] = -1;
  __pyx_t_18[6] = -1;
  __pyx_t_18[7] = -1;
  __pyx_t_18[8] = -1;
  __pyx_t_18[9] = -1;
  __pyx_t_18[10] = -1;
  __pyx_t_18[11] = -1;
  __pyx_t_18[12] = -1;
  __pyx_t_18[13] = -1;
  __pyx_t_18[14] = -1;
  __pyx_t_18[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1231
 *     [9, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 3, 0, 7, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 1, 9, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 1, 9, 4, 7, 1, 7, 3, 1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_19[0] = 4;
  __pyx_t_19[1] = 3;
  __pyx_t_19[2] = 0;
  __pyx_t_19[3] = 7;
  __pyx_t_19[4] = 3;
  __pyx_t_19[5] = 4;
  __pyx_t_19[6] = -1;
  __pyx_t_19[7] = -1;
  __pyx_t_19[8] = -1;
  __pyx_t_19[9] = -1;
  __pyx_t_19[10] = -1;
  __pyx_t_19[11] = -1;
  __pyx_t_19[12] = -1;
  __pyx_t_19[13] = -1;
  __pyx_t_19[14] = -1;
  __pyx_t_19[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1232
 *     [4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 3, 0, 7, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 1, 9, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 1, 9, 4, 7, 1, 7, 3, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_20[0] = 0;
  __pyx_t_20[1] = 1;
  __pyx_t_20[2] = 9;
  __pyx_t_20[3] = 8;
  __pyx_t_20[4] = 4;
  __pyx_t_20[5] = 7;
  __pyx_t_20[6] = -1;
  __pyx_t_20[7] = -1;
  __pyx_t_20[8] = -1;
  __pyx_t_20[9] = -1;
  __pyx_t_20[10] = -1;
  __pyx_t_20[11] = -1;
  __pyx_t_20[12] = -1;
  __pyx_t_20[13] = -1;
  __pyx_t_20[14] = -1;
  __pyx_t_20[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1233
 *     [4, 3, 0, 7, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 1, 9, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 1, 9, 4, 7, 1, 7, 3, 1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 2, 10, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 4, 7, 3, 0, 4, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_21[0] = 4;
  __pyx_t_21[1] = 1;
  __pyx_t_21[2] = 9;
  __pyx_t_21[3] = 4;
  __pyx_t_21[4] = 7;
  __pyx_t_21[5] = 1;
  __pyx_t_21[6] = 7;
  __pyx_t_21[7] = 3;
  __pyx_t_21[8] = 1;
  __pyx_t_21[9] = -1;
  __pyx_t_21[10] = -1;
  __pyx_t_21[11] = -1;
  __pyx_t_21[12] = -1;
  __pyx_t_21[13] = -1;
  __pyx_t_21[14] = -1;
  __pyx_t_21[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1234
 *     [0, 1, 9, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 1, 9, 4, 7, 1, 7, 3, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 4, 7, 3, 0, 4, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 2, 10, 9, 0, 2, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_22[0] = 1;
  __pyx_t_22[1] = 2;
  __pyx_t_22[2] = 10;
  __pyx_t_22[3] = 8;
  __pyx_t_22[4] = 4;
  __pyx_t_22[5] = 7;
  __pyx_t_22[6] = -1;
  __pyx_t_22[7] = -1;
  __pyx_t_22[8] = -1;
  __pyx_t_22[9] = -1;
  __pyx_t_22[10] = -1;
  __pyx_t_22[11] = -1;
  __pyx_t_22[12] = -1;
  __pyx_t_22[13] = -1;
  __pyx_t_22[14] = -1;
  __pyx_t_22[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1235
 *     [4, 1, 9, 4, 7, 1, 7, 3, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 4, 7, 3, 0, 4, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 2, 10, 9, 0, 2, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 10, 9, 2, 9, 7, 2, 7, 3, 7, 9, 4, -1, -1, -1, -1],
 */
  __pyx_t_23[0] = 3;
  __pyx_t_23[1] = 4;
  __pyx_t_23[2] = 7;
  __pyx_t_23[3] = 3;
  __pyx_t_23[4] = 0;
  __pyx_t_23[5] = 4;
  __pyx_t_23[6] = 1;
  __pyx_t_23[7] = 2;
  __pyx_t_23[8] = 10;
  __pyx_t_23[9] = -1;
  __pyx_t_23[10] = -1;
  __pyx_t_23[11] = -1;
  __pyx_t_23[12] = -1;
  __pyx_t_23[13] = -1;
  __pyx_t_23[14] = -1;
  __pyx_t_23[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1236
 *     [1, 2, 10, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 4, 7, 3, 0, 4, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 2, 10, 9, 0, 2, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [2, 10, 9, 2, 9, 7, 2, 7, 3, 7, 9, 4, -1, -1, -1, -1],
 *     [8, 4, 7, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_24[0] = 9;
  __pyx_t_24[1] = 2;
  __pyx_t_24[2] = 10;
  __pyx_t_24[3] = 9;
  __pyx_t_24[4] = 0;
  __pyx_t_24[5] = 2;
  __pyx_t_24[6] = 8;
  __pyx_t_24[7] = 4;
  __pyx_t_24[8] = 7;
  __pyx_t_24[9] = -1;
  __pyx_t_24[10] = -1;
  __pyx_t_24[11] = -1;
  __pyx_t_24[12] = -1;
  __pyx_t_24[13] = -1;
  __pyx_t_24[14] = -1;
  __pyx_t_24[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1237
 *     [3, 4, 7, 3, 0, 4, 1, 2, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 2, 10, 9, 0, 2, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 10, 9, 2, 9, 7, 2, 7, 3, 7, 9, 4, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [8, 4, 7, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 4, 7, 11, 2, 4, 2, 0, 4, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_25[0] = 2;
  __pyx_t_25[1] = 10;
  __pyx_t_25[2] = 9;
  __pyx_t_25[3] = 2;
  __pyx_t_25[4] = 9;
  __pyx_t_25[5] = 7;
  __pyx_t_25[6] = 2;
  __pyx_t_25[7] = 7;
  __pyx_t_25[8] = 3;
  __pyx_t_25[9] = 7;
  __pyx_t_25[10] = 9;
  __pyx_t_25[11] = 4;
  __pyx_t_25[12] = -1;
  __pyx_t_25[13] = -1;
  __pyx_t_25[14] = -1;
  __pyx_t_25[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1238
 *     [9, 2, 10, 9, 0, 2, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 10, 9, 2, 9, 7, 2, 7, 3, 7, 9, 4, -1, -1, -1, -1],
 *     [8, 4, 7, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [11, 4, 7, 11, 2, 4, 2, 0, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 0, 1, 8, 4, 7, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_26[0] = 8;
  __pyx_t_26[1] = 4;
  __pyx_t_26[2] = 7;
  __pyx_t_26[3] = 3;
  __pyx_t_26[4] = 11;
  __pyx_t_26[5] = 2;
  __pyx_t_26[6] = -1;
  __pyx_t_26[7] = -1;
  __pyx_t_26[8] = -1;
  __pyx_t_26[9] = -1;
  __pyx_t_26[10] = -1;
  __pyx_t_26[11] = -1;
  __pyx_t_26[12] = -1;
  __pyx_t_26[13] = -1;
  __pyx_t_26[14] = -1;
  __pyx_t_26[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1239
 *     [2, 10, 9, 2, 9, 7, 2, 7, 3, 7, 9, 4, -1, -1, -1, -1],
 *     [8, 4, 7, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 4, 7, 11, 2, 4, 2, 0, 4, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 0, 1, 8, 4, 7, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 7, 11, 9, 4, 11, 9, 11, 2, 9, 2, 1, -1, -1, -1, -1],
 */
  __pyx_t_27[0] = 11;
  __pyx_t_27[1] = 4;
  __pyx_t_27[2] = 7;
  __pyx_t_27[3] = 11;
  __pyx_t_27[4] = 2;
  __pyx_t_27[5] = 4;
  __pyx_t_27[6] = 2;
  __pyx_t_27[7] = 0;
  __pyx_t_27[8] = 4;
  __pyx_t_27[9] = -1;
  __pyx_t_27[10] = -1;
  __pyx_t_27[11] = -1;
  __pyx_t_27[12] = -1;
  __pyx_t_27[13] = -1;
  __pyx_t_27[14] = -1;
  __pyx_t_27[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1240
 *     [8, 4, 7, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 4, 7, 11, 2, 4, 2, 0, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 0, 1, 8, 4, 7, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 7, 11, 9, 4, 11, 9, 11, 2, 9, 2, 1, -1, -1, -1, -1],
 *     [3, 10, 1, 3, 11, 10, 7, 8, 4, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_28[0] = 9;
  __pyx_t_28[1] = 0;
  __pyx_t_28[2] = 1;
  __pyx_t_28[3] = 8;
  __pyx_t_28[4] = 4;
  __pyx_t_28[5] = 7;
  __pyx_t_28[6] = 2;
  __pyx_t_28[7] = 3;
  __pyx_t_28[8] = 11;
  __pyx_t_28[9] = -1;
  __pyx_t_28[10] = -1;
  __pyx_t_28[11] = -1;
  __pyx_t_28[12] = -1;
  __pyx_t_28[13] = -1;
  __pyx_t_28[14] = -1;
  __pyx_t_28[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1241
 *     [11, 4, 7, 11, 2, 4, 2, 0, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 0, 1, 8, 4, 7, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 7, 11, 9, 4, 11, 9, 11, 2, 9, 2, 1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 10, 1, 3, 11, 10, 7, 8, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 11, 10, 1, 4, 11, 1, 0, 4, 7, 11, 4, -1, -1, -1, -1],
 */
  __pyx_t_29[0] = 4;
  __pyx_t_29[1] = 7;
  __pyx_t_29[2] = 11;
  __pyx_t_29[3] = 9;
  __pyx_t_29[4] = 4;
  __pyx_t_29[5] = 11;
  __pyx_t_29[6] = 9;
  __pyx_t_29[7] = 11;
  __pyx_t_29[8] = 2;
  __pyx_t_29[9] = 9;
  __pyx_t_29[10] = 2;
  __pyx_t_29[11] = 1;
  __pyx_t_29[12] = -1;
  __pyx_t_29[13] = -1;
  __pyx_t_29[14] = -1;
  __pyx_t_29[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1242
 *     [9, 0, 1, 8, 4, 7, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 7, 11, 9, 4, 11, 9, 11, 2, 9, 2, 1, -1, -1, -1, -1],
 *     [3, 10, 1, 3, 11, 10, 7, 8, 4, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 11, 10, 1, 4, 11, 1, 0, 4, 7, 11, 4, -1, -1, -1, -1],
 *     [4, 7, 8, 9, 0, 11, 9, 11, 10, 11, 0, 3, -1, -1, -1, -1],
 */
  __pyx_t_30[0] = 3;
  __pyx_t_30[1] = 10;
  __pyx_t_30[2] = 1;
  __pyx_t_30[3] = 3;
  __pyx_t_30[4] = 11;
  __pyx_t_30[5] = 10;
  __pyx_t_30[6] = 7;
  __pyx_t_30[7] = 8;
  __pyx_t_30[8] = 4;
  __pyx_t_30[9] = -1;
  __pyx_t_30[10] = -1;
  __pyx_t_30[11] = -1;
  __pyx_t_30[12] = -1;
  __pyx_t_30[13] = -1;
  __pyx_t_30[14] = -1;
  __pyx_t_30[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1243
 *     [4, 7, 11, 9, 4, 11, 9, 11, 2, 9, 2, 1, -1, -1, -1, -1],
 *     [3, 10, 1, 3, 11, 10, 7, 8, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 11, 10, 1, 4, 11, 1, 0, 4, 7, 11, 4, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 7, 8, 9, 0, 11, 9, 11, 10, 11, 0, 3, -1, -1, -1, -1],
 *     [4, 7, 11, 4, 11, 9, 9, 11, 10, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_31[0] = 1;
  __pyx_t_31[1] = 11;
  __pyx_t_31[2] = 10;
  __pyx_t_31[3] = 1;
  __pyx_t_31[4] = 4;
  __pyx_t_31[5] = 11;
  __pyx_t_31[6] = 1;
  __pyx_t_31[7] = 0;
  __pyx_t_31[8] = 4;
  __pyx_t_31[9] = 7;
  __pyx_t_31[10] = 11;
  __pyx_t_31[11] = 4;
  __pyx_t_31[12] = -1;
  __pyx_t_31[13] = -1;
  __pyx_t_31[14] = -1;
  __pyx_t_31[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1244
 *     [3, 10, 1, 3, 11, 10, 7, 8, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 11, 10, 1, 4, 11, 1, 0, 4, 7, 11, 4, -1, -1, -1, -1],
 *     [4, 7, 8, 9, 0, 11, 9, 11, 10, 11, 0, 3, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 7, 11, 4, 11, 9, 9, 11, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_32[0] = 4;
  __pyx_t_32[1] = 7;
  __pyx_t_32[2] = 8;
  __pyx_t_32[3] = 9;
  __pyx_t_32[4] = 0;
  __pyx_t_32[5] = 11;
  __pyx_t_32[6] = 9;
  __pyx_t_32[7] = 11;
  __pyx_t_32[8] = 10;
  __pyx_t_32[9] = 11;
  __pyx_t_32[10] = 0;
  __pyx_t_32[11] = 3;
  __pyx_t_32[12] = -1;
  __pyx_t_32[13] = -1;
  __pyx_t_32[14] = -1;
  __pyx_t_32[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1245
 *     [1, 11, 10, 1, 4, 11, 1, 0, 4, 7, 11, 4, -1, -1, -1, -1],
 *     [4, 7, 8, 9, 0, 11, 9, 11, 10, 11, 0, 3, -1, -1, -1, -1],
 *     [4, 7, 11, 4, 11, 9, 9, 11, 10, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 5, 4, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_33[0] = 4;
  __pyx_t_33[1] = 7;
  __pyx_t_33[2] = 11;
  __pyx_t_33[3] = 4;
  __pyx_t_33[4] = 11;
  __pyx_t_33[5] = 9;
  __pyx_t_33[6] = 9;
  __pyx_t_33[7] = 11;
  __pyx_t_33[8] = 10;
  __pyx_t_33[9] = -1;
  __pyx_t_33[10] = -1;
  __pyx_t_33[11] = -1;
  __pyx_t_33[12] = -1;
  __pyx_t_33[13] = -1;
  __pyx_t_33[14] = -1;
  __pyx_t_33[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1246
 *     [4, 7, 8, 9, 0, 11, 9, 11, 10, 11, 0, 3, -1, -1, -1, -1],
 *     [4, 7, 11, 4, 11, 9, 9, 11, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 5, 4, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 5, 4, 1, 5, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_34[0] = 9;
  __pyx_t_34[1] = 5;
  __pyx_t_34[2] = 4;
  __pyx_t_34[3] = -1;
  __pyx_t_34[4] = -1;
  __pyx_t_34[5] = -1;
  __pyx_t_34[6] = -1;
  __pyx_t_34[7] = -1;
  __pyx_t_34[8] = -1;
  __pyx_t_34[9] = -1;
  __pyx_t_34[10] = -1;
  __pyx_t_34[11] = -1;
  __pyx_t_34[12] = -1;
  __pyx_t_34[13] = -1;
  __pyx_t_34[14] = -1;
  __pyx_t_34[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1247
 *     [4, 7, 11, 4, 11, 9, 9, 11, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 5, 4, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 5, 4, 1, 5, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 5, 4, 8, 3, 5, 3, 1, 5, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_35[0] = 9;
  __pyx_t_35[1] = 5;
  __pyx_t_35[2] = 4;
  __pyx_t_35[3] = 0;
  __pyx_t_35[4] = 8;
  __pyx_t_35[5] = 3;
  __pyx_t_35[6] = -1;
  __pyx_t_35[7] = -1;
  __pyx_t_35[8] = -1;
  __pyx_t_35[9] = -1;
  __pyx_t_35[10] = -1;
  __pyx_t_35[11] = -1;
  __pyx_t_35[12] = -1;
  __pyx_t_35[13] = -1;
  __pyx_t_35[14] = -1;
  __pyx_t_35[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1248
 *     [9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 5, 4, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 5, 4, 1, 5, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [8, 5, 4, 8, 3, 5, 3, 1, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_36[0] = 0;
  __pyx_t_36[1] = 5;
  __pyx_t_36[2] = 4;
  __pyx_t_36[3] = 1;
  __pyx_t_36[4] = 5;
  __pyx_t_36[5] = 0;
  __pyx_t_36[6] = -1;
  __pyx_t_36[7] = -1;
  __pyx_t_36[8] = -1;
  __pyx_t_36[9] = -1;
  __pyx_t_36[10] = -1;
  __pyx_t_36[11] = -1;
  __pyx_t_36[12] = -1;
  __pyx_t_36[13] = -1;
  __pyx_t_36[14] = -1;
  __pyx_t_36[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1249
 *     [9, 5, 4, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 5, 4, 1, 5, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 5, 4, 8, 3, 5, 3, 1, 5, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 2, 10, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 0, 8, 1, 2, 10, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_37[0] = 8;
  __pyx_t_37[1] = 5;
  __pyx_t_37[2] = 4;
  __pyx_t_37[3] = 8;
  __pyx_t_37[4] = 3;
  __pyx_t_37[5] = 5;
  __pyx_t_37[6] = 3;
  __pyx_t_37[7] = 1;
  __pyx_t_37[8] = 5;
  __pyx_t_37[9] = -1;
  __pyx_t_37[10] = -1;
  __pyx_t_37[11] = -1;
  __pyx_t_37[12] = -1;
  __pyx_t_37[13] = -1;
  __pyx_t_37[14] = -1;
  __pyx_t_37[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1250
 *     [0, 5, 4, 1, 5, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 5, 4, 8, 3, 5, 3, 1, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 0, 8, 1, 2, 10, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 2, 10, 5, 4, 2, 4, 0, 2, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_38[0] = 1;
  __pyx_t_38[1] = 2;
  __pyx_t_38[2] = 10;
  __pyx_t_38[3] = 9;
  __pyx_t_38[4] = 5;
  __pyx_t_38[5] = 4;
  __pyx_t_38[6] = -1;
  __pyx_t_38[7] = -1;
  __pyx_t_38[8] = -1;
  __pyx_t_38[9] = -1;
  __pyx_t_38[10] = -1;
  __pyx_t_38[11] = -1;
  __pyx_t_38[12] = -1;
  __pyx_t_38[13] = -1;
  __pyx_t_38[14] = -1;
  __pyx_t_38[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1251
 *     [8, 5, 4, 8, 3, 5, 3, 1, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 0, 8, 1, 2, 10, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [5, 2, 10, 5, 4, 2, 4, 0, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 10, 5, 3, 2, 5, 3, 5, 4, 3, 4, 8, -1, -1, -1, -1],
 */
  __pyx_t_39[0] = 3;
  __pyx_t_39[1] = 0;
  __pyx_t_39[2] = 8;
  __pyx_t_39[3] = 1;
  __pyx_t_39[4] = 2;
  __pyx_t_39[5] = 10;
  __pyx_t_39[6] = 4;
  __pyx_t_39[7] = 9;
  __pyx_t_39[8] = 5;
  __pyx_t_39[9] = -1;
  __pyx_t_39[10] = -1;
  __pyx_t_39[11] = -1;
  __pyx_t_39[12] = -1;
  __pyx_t_39[13] = -1;
  __pyx_t_39[14] = -1;
  __pyx_t_39[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1252
 *     [1, 2, 10, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 0, 8, 1, 2, 10, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 2, 10, 5, 4, 2, 4, 0, 2, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [2, 10, 5, 3, 2, 5, 3, 5, 4, 3, 4, 8, -1, -1, -1, -1],
 *     [9, 5, 4, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_40[0] = 5;
  __pyx_t_40[1] = 2;
  __pyx_t_40[2] = 10;
  __pyx_t_40[3] = 5;
  __pyx_t_40[4] = 4;
  __pyx_t_40[5] = 2;
  __pyx_t_40[6] = 4;
  __pyx_t_40[7] = 0;
  __pyx_t_40[8] = 2;
  __pyx_t_40[9] = -1;
  __pyx_t_40[10] = -1;
  __pyx_t_40[11] = -1;
  __pyx_t_40[12] = -1;
  __pyx_t_40[13] = -1;
  __pyx_t_40[14] = -1;
  __pyx_t_40[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1253
 *     [3, 0, 8, 1, 2, 10, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 2, 10, 5, 4, 2, 4, 0, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 10, 5, 3, 2, 5, 3, 5, 4, 3, 4, 8, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 5, 4, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 11, 2, 0, 8, 11, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_41[0] = 2;
  __pyx_t_41[1] = 10;
  __pyx_t_41[2] = 5;
  __pyx_t_41[3] = 3;
  __pyx_t_41[4] = 2;
  __pyx_t_41[5] = 5;
  __pyx_t_41[6] = 3;
  __pyx_t_41[7] = 5;
  __pyx_t_41[8] = 4;
  __pyx_t_41[9] = 3;
  __pyx_t_41[10] = 4;
  __pyx_t_41[11] = 8;
  __pyx_t_41[12] = -1;
  __pyx_t_41[13] = -1;
  __pyx_t_41[14] = -1;
  __pyx_t_41[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1254
 *     [5, 2, 10, 5, 4, 2, 4, 0, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 10, 5, 3, 2, 5, 3, 5, 4, 3, 4, 8, -1, -1, -1, -1],
 *     [9, 5, 4, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 11, 2, 0, 8, 11, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 5, 4, 0, 1, 5, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_42[0] = 9;
  __pyx_t_42[1] = 5;
  __pyx_t_42[2] = 4;
  __pyx_t_42[3] = 2;
  __pyx_t_42[4] = 3;
  __pyx_t_42[5] = 11;
  __pyx_t_42[6] = -1;
  __pyx_t_42[7] = -1;
  __pyx_t_42[8] = -1;
  __pyx_t_42[9] = -1;
  __pyx_t_42[10] = -1;
  __pyx_t_42[11] = -1;
  __pyx_t_42[12] = -1;
  __pyx_t_42[13] = -1;
  __pyx_t_42[14] = -1;
  __pyx_t_42[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1255
 *     [2, 10, 5, 3, 2, 5, 3, 5, 4, 3, 4, 8, -1, -1, -1, -1],
 *     [9, 5, 4, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 11, 2, 0, 8, 11, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 5, 4, 0, 1, 5, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 1, 5, 2, 5, 8, 2, 8, 11, 4, 8, 5, -1, -1, -1, -1],
 */
  __pyx_t_43[0] = 0;
  __pyx_t_43[1] = 11;
  __pyx_t_43[2] = 2;
  __pyx_t_43[3] = 0;
  __pyx_t_43[4] = 8;
  __pyx_t_43[5] = 11;
  __pyx_t_43[6] = 4;
  __pyx_t_43[7] = 9;
  __pyx_t_43[8] = 5;
  __pyx_t_43[9] = -1;
  __pyx_t_43[10] = -1;
  __pyx_t_43[11] = -1;
  __pyx_t_43[12] = -1;
  __pyx_t_43[13] = -1;
  __pyx_t_43[14] = -1;
  __pyx_t_43[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1256
 *     [9, 5, 4, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 11, 2, 0, 8, 11, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 5, 4, 0, 1, 5, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [2, 1, 5, 2, 5, 8, 2, 8, 11, 4, 8, 5, -1, -1, -1, -1],
 *     [10, 3, 11, 10, 1, 3, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_44[0] = 0;
  __pyx_t_44[1] = 5;
  __pyx_t_44[2] = 4;
  __pyx_t_44[3] = 0;
  __pyx_t_44[4] = 1;
  __pyx_t_44[5] = 5;
  __pyx_t_44[6] = 2;
  __pyx_t_44[7] = 3;
  __pyx_t_44[8] = 11;
  __pyx_t_44[9] = -1;
  __pyx_t_44[10] = -1;
  __pyx_t_44[11] = -1;
  __pyx_t_44[12] = -1;
  __pyx_t_44[13] = -1;
  __pyx_t_44[14] = -1;
  __pyx_t_44[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1257
 *     [0, 11, 2, 0, 8, 11, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 5, 4, 0, 1, 5, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 1, 5, 2, 5, 8, 2, 8, 11, 4, 8, 5, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 3, 11, 10, 1, 3, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 9, 5, 0, 8, 1, 8, 10, 1, 8, 11, 10, -1, -1, -1, -1],
 */
  __pyx_t_45[0] = 2;
  __pyx_t_45[1] = 1;
  __pyx_t_45[2] = 5;
  __pyx_t_45[3] = 2;
  __pyx_t_45[4] = 5;
  __pyx_t_45[5] = 8;
  __pyx_t_45[6] = 2;
  __pyx_t_45[7] = 8;
  __pyx_t_45[8] = 11;
  __pyx_t_45[9] = 4;
  __pyx_t_45[10] = 8;
  __pyx_t_45[11] = 5;
  __pyx_t_45[12] = -1;
  __pyx_t_45[13] = -1;
  __pyx_t_45[14] = -1;
  __pyx_t_45[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1258
 *     [0, 5, 4, 0, 1, 5, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 1, 5, 2, 5, 8, 2, 8, 11, 4, 8, 5, -1, -1, -1, -1],
 *     [10, 3, 11, 10, 1, 3, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 9, 5, 0, 8, 1, 8, 10, 1, 8, 11, 10, -1, -1, -1, -1],
 *     [5, 4, 0, 5, 0, 11, 5, 11, 10, 11, 0, 3, -1, -1, -1, -1],
 */
  __pyx_t_46[0] = 10;
  __pyx_t_46[1] = 3;
  __pyx_t_46[2] = 11;
  __pyx_t_46[3] = 10;
  __pyx_t_46[4] = 1;
  __pyx_t_46[5] = 3;
  __pyx_t_46[6] = 9;
  __pyx_t_46[7] = 5;
  __pyx_t_46[8] = 4;
  __pyx_t_46[9] = -1;
  __pyx_t_46[10] = -1;
  __pyx_t_46[11] = -1;
  __pyx_t_46[12] = -1;
  __pyx_t_46[13] = -1;
  __pyx_t_46[14] = -1;
  __pyx_t_46[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1259
 *     [2, 1, 5, 2, 5, 8, 2, 8, 11, 4, 8, 5, -1, -1, -1, -1],
 *     [10, 3, 11, 10, 1, 3, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 9, 5, 0, 8, 1, 8, 10, 1, 8, 11, 10, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [5, 4, 0, 5, 0, 11, 5, 11, 10, 11, 0, 3, -1, -1, -1, -1],
 *     [5, 4, 8, 5, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_47[0] = 4;
  __pyx_t_47[1] = 9;
  __pyx_t_47[2] = 5;
  __pyx_t_47[3] = 0;
  __pyx_t_47[4] = 8;
  __pyx_t_47[5] = 1;
  __pyx_t_47[6] = 8;
  __pyx_t_47[7] = 10;
  __pyx_t_47[8] = 1;
  __pyx_t_47[9] = 8;
  __pyx_t_47[10] = 11;
  __pyx_t_47[11] = 10;
  __pyx_t_47[12] = -1;
  __pyx_t_47[13] = -1;
  __pyx_t_47[14] = -1;
  __pyx_t_47[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1260
 *     [10, 3, 11, 10, 1, 3, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 9, 5, 0, 8, 1, 8, 10, 1, 8, 11, 10, -1, -1, -1, -1],
 *     [5, 4, 0, 5, 0, 11, 5, 11, 10, 11, 0, 3, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [5, 4, 8, 5, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 7, 8, 5, 7, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_48[0] = 5;
  __pyx_t_48[1] = 4;
  __pyx_t_48[2] = 0;
  __pyx_t_48[3] = 5;
  __pyx_t_48[4] = 0;
  __pyx_t_48[5] = 11;
  __pyx_t_48[6] = 5;
  __pyx_t_48[7] = 11;
  __pyx_t_48[8] = 10;
  __pyx_t_48[9] = 11;
  __pyx_t_48[10] = 0;
  __pyx_t_48[11] = 3;
  __pyx_t_48[12] = -1;
  __pyx_t_48[13] = -1;
  __pyx_t_48[14] = -1;
  __pyx_t_48[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1261
 *     [4, 9, 5, 0, 8, 1, 8, 10, 1, 8, 11, 10, -1, -1, -1, -1],
 *     [5, 4, 0, 5, 0, 11, 5, 11, 10, 11, 0, 3, -1, -1, -1, -1],
 *     [5, 4, 8, 5, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 7, 8, 5, 7, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 3, 0, 9, 5, 3, 5, 7, 3, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_49[0] = 5;
  __pyx_t_49[1] = 4;
  __pyx_t_49[2] = 8;
  __pyx_t_49[3] = 5;
  __pyx_t_49[4] = 8;
  __pyx_t_49[5] = 10;
  __pyx_t_49[6] = 10;
  __pyx_t_49[7] = 8;
  __pyx_t_49[8] = 11;
  __pyx_t_49[9] = -1;
  __pyx_t_49[10] = -1;
  __pyx_t_49[11] = -1;
  __pyx_t_49[12] = -1;
  __pyx_t_49[13] = -1;
  __pyx_t_49[14] = -1;
  __pyx_t_49[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1262
 *     [5, 4, 0, 5, 0, 11, 5, 11, 10, 11, 0, 3, -1, -1, -1, -1],
 *     [5, 4, 8, 5, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 7, 8, 5, 7, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 3, 0, 9, 5, 3, 5, 7, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 7, 8, 0, 1, 7, 1, 5, 7, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_50[0] = 9;
  __pyx_t_50[1] = 7;
  __pyx_t_50[2] = 8;
  __pyx_t_50[3] = 5;
  __pyx_t_50[4] = 7;
  __pyx_t_50[5] = 9;
  __pyx_t_50[6] = -1;
  __pyx_t_50[7] = -1;
  __pyx_t_50[8] = -1;
  __pyx_t_50[9] = -1;
  __pyx_t_50[10] = -1;
  __pyx_t_50[11] = -1;
  __pyx_t_50[12] = -1;
  __pyx_t_50[13] = -1;
  __pyx_t_50[14] = -1;
  __pyx_t_50[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1263
 *     [5, 4, 8, 5, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 7, 8, 5, 7, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 3, 0, 9, 5, 3, 5, 7, 3, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 7, 8, 0, 1, 7, 1, 5, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_51[0] = 9;
  __pyx_t_51[1] = 3;
  __pyx_t_51[2] = 0;
  __pyx_t_51[3] = 9;
  __pyx_t_51[4] = 5;
  __pyx_t_51[5] = 3;
  __pyx_t_51[6] = 5;
  __pyx_t_51[7] = 7;
  __pyx_t_51[8] = 3;
  __pyx_t_51[9] = -1;
  __pyx_t_51[10] = -1;
  __pyx_t_51[11] = -1;
  __pyx_t_51[12] = -1;
  __pyx_t_51[13] = -1;
  __pyx_t_51[14] = -1;
  __pyx_t_51[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1264
 *     [9, 7, 8, 5, 7, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 3, 0, 9, 5, 3, 5, 7, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 7, 8, 0, 1, 7, 1, 5, 7, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 7, 8, 9, 5, 7, 10, 1, 2, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_52[0] = 0;
  __pyx_t_52[1] = 7;
  __pyx_t_52[2] = 8;
  __pyx_t_52[3] = 0;
  __pyx_t_52[4] = 1;
  __pyx_t_52[5] = 7;
  __pyx_t_52[6] = 1;
  __pyx_t_52[7] = 5;
  __pyx_t_52[8] = 7;
  __pyx_t_52[9] = -1;
  __pyx_t_52[10] = -1;
  __pyx_t_52[11] = -1;
  __pyx_t_52[12] = -1;
  __pyx_t_52[13] = -1;
  __pyx_t_52[14] = -1;
  __pyx_t_52[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1265
 *     [9, 3, 0, 9, 5, 3, 5, 7, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 7, 8, 0, 1, 7, 1, 5, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 7, 8, 9, 5, 7, 10, 1, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 1, 2, 9, 5, 0, 5, 3, 0, 5, 7, 3, -1, -1, -1, -1],
 */
  __pyx_t_53[0] = 1;
  __pyx_t_53[1] = 5;
  __pyx_t_53[2] = 3;
  __pyx_t_53[3] = 3;
  __pyx_t_53[4] = 5;
  __pyx_t_53[5] = 7;
  __pyx_t_53[6] = -1;
  __pyx_t_53[7] = -1;
  __pyx_t_53[8] = -1;
  __pyx_t_53[9] = -1;
  __pyx_t_53[10] = -1;
  __pyx_t_53[11] = -1;
  __pyx_t_53[12] = -1;
  __pyx_t_53[13] = -1;
  __pyx_t_53[14] = -1;
  __pyx_t_53[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1266
 *     [0, 7, 8, 0, 1, 7, 1, 5, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 7, 8, 9, 5, 7, 10, 1, 2, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 1, 2, 9, 5, 0, 5, 3, 0, 5, 7, 3, -1, -1, -1, -1],
 *     [8, 0, 2, 8, 2, 5, 8, 5, 7, 10, 5, 2, -1, -1, -1, -1],
 */
  __pyx_t_54[0] = 9;
  __pyx_t_54[1] = 7;
  __pyx_t_54[2] = 8;
  __pyx_t_54[3] = 9;
  __pyx_t_54[4] = 5;
  __pyx_t_54[5] = 7;
  __pyx_t_54[6] = 10;
  __pyx_t_54[7] = 1;
  __pyx_t_54[8] = 2;
  __pyx_t_54[9] = -1;
  __pyx_t_54[10] = -1;
  __pyx_t_54[11] = -1;
  __pyx_t_54[12] = -1;
  __pyx_t_54[13] = -1;
  __pyx_t_54[14] = -1;
  __pyx_t_54[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1267
 *     [1, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 7, 8, 9, 5, 7, 10, 1, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 1, 2, 9, 5, 0, 5, 3, 0, 5, 7, 3, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [8, 0, 2, 8, 2, 5, 8, 5, 7, 10, 5, 2, -1, -1, -1, -1],
 *     [2, 10, 5, 2, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_55[0] = 10;
  __pyx_t_55[1] = 1;
  __pyx_t_55[2] = 2;
  __pyx_t_55[3] = 9;
  __pyx_t_55[4] = 5;
  __pyx_t_55[5] = 0;
  __pyx_t_55[6] = 5;
  __pyx_t_55[7] = 3;
  __pyx_t_55[8] = 0;
  __pyx_t_55[9] = 5;
  __pyx_t_55[10] = 7;
  __pyx_t_55[11] = 3;
  __pyx_t_55[12] = -1;
  __pyx_t_55[13] = -1;
  __pyx_t_55[14] = -1;
  __pyx_t_55[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1268
 *     [9, 7, 8, 9, 5, 7, 10, 1, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 1, 2, 9, 5, 0, 5, 3, 0, 5, 7, 3, -1, -1, -1, -1],
 *     [8, 0, 2, 8, 2, 5, 8, 5, 7, 10, 5, 2, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [2, 10, 5, 2, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 9, 5, 7, 8, 9, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_56[0] = 8;
  __pyx_t_56[1] = 0;
  __pyx_t_56[2] = 2;
  __pyx_t_56[3] = 8;
  __pyx_t_56[4] = 2;
  __pyx_t_56[5] = 5;
  __pyx_t_56[6] = 8;
  __pyx_t_56[7] = 5;
  __pyx_t_56[8] = 7;
  __pyx_t_56[9] = 10;
  __pyx_t_56[10] = 5;
  __pyx_t_56[11] = 2;
  __pyx_t_56[12] = -1;
  __pyx_t_56[13] = -1;
  __pyx_t_56[14] = -1;
  __pyx_t_56[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1269
 *     [10, 1, 2, 9, 5, 0, 5, 3, 0, 5, 7, 3, -1, -1, -1, -1],
 *     [8, 0, 2, 8, 2, 5, 8, 5, 7, 10, 5, 2, -1, -1, -1, -1],
 *     [2, 10, 5, 2, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [7, 9, 5, 7, 8, 9, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 5, 7, 9, 7, 2, 9, 2, 0, 2, 7, 11, -1, -1, -1, -1],
 */
  __pyx_t_57[0] = 2;
  __pyx_t_57[1] = 10;
  __pyx_t_57[2] = 5;
  __pyx_t_57[3] = 2;
  __pyx_t_57[4] = 5;
  __pyx_t_57[5] = 3;
  __pyx_t_57[6] = 3;
  __pyx_t_57[7] = 5;
  __pyx_t_57[8] = 7;
  __pyx_t_57[9] = -1;
  __pyx_t_57[10] = -1;
  __pyx_t_57[11] = -1;
  __pyx_t_57[12] = -1;
  __pyx_t_57[13] = -1;
  __pyx_t_57[14] = -1;
  __pyx_t_57[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1270
 *     [8, 0, 2, 8, 2, 5, 8, 5, 7, 10, 5, 2, -1, -1, -1, -1],
 *     [2, 10, 5, 2, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 9, 5, 7, 8, 9, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 5, 7, 9, 7, 2, 9, 2, 0, 2, 7, 11, -1, -1, -1, -1],
 *     [2, 3, 11, 0, 1, 8, 1, 7, 8, 1, 5, 7, -1, -1, -1, -1],
 */
  __pyx_t_58[0] = 7;
  __pyx_t_58[1] = 9;
  __pyx_t_58[2] = 5;
  __pyx_t_58[3] = 7;
  __pyx_t_58[4] = 8;
  __pyx_t_58[5] = 9;
  __pyx_t_58[6] = 3;
  __pyx_t_58[7] = 11;
  __pyx_t_58[8] = 2;
  __pyx_t_58[9] = -1;
  __pyx_t_58[10] = -1;
  __pyx_t_58[11] = -1;
  __pyx_t_58[12] = -1;
  __pyx_t_58[13] = -1;
  __pyx_t_58[14] = -1;
  __pyx_t_58[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1271
 *     [2, 10, 5, 2, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 9, 5, 7, 8, 9, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 5, 7, 9, 7, 2, 9, 2, 0, 2, 7, 11, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [2, 3, 11, 0, 1, 8, 1, 7, 8, 1, 5, 7, -1, -1, -1, -1],
 *     [11, 2, 1, 11, 1, 7, 7, 1, 5, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_59[0] = 9;
  __pyx_t_59[1] = 5;
  __pyx_t_59[2] = 7;
  __pyx_t_59[3] = 9;
  __pyx_t_59[4] = 7;
  __pyx_t_59[5] = 2;
  __pyx_t_59[6] = 9;
  __pyx_t_59[7] = 2;
  __pyx_t_59[8] = 0;
  __pyx_t_59[9] = 2;
  __pyx_t_59[10] = 7;
  __pyx_t_59[11] = 11;
  __pyx_t_59[12] = -1;
  __pyx_t_59[13] = -1;
  __pyx_t_59[14] = -1;
  __pyx_t_59[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1272
 *     [7, 9, 5, 7, 8, 9, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 5, 7, 9, 7, 2, 9, 2, 0, 2, 7, 11, -1, -1, -1, -1],
 *     [2, 3, 11, 0, 1, 8, 1, 7, 8, 1, 5, 7, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [11, 2, 1, 11, 1, 7, 7, 1, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 5, 8, 8, 5, 7, 10, 1, 3, 10, 3, 11, -1, -1, -1, -1],
 */
  __pyx_t_60[0] = 2;
  __pyx_t_60[1] = 3;
  __pyx_t_60[2] = 11;
  __pyx_t_60[3] = 0;
  __pyx_t_60[4] = 1;
  __pyx_t_60[5] = 8;
  __pyx_t_60[6] = 1;
  __pyx_t_60[7] = 7;
  __pyx_t_60[8] = 8;
  __pyx_t_60[9] = 1;
  __pyx_t_60[10] = 5;
  __pyx_t_60[11] = 7;
  __pyx_t_60[12] = -1;
  __pyx_t_60[13] = -1;
  __pyx_t_60[14] = -1;
  __pyx_t_60[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1273
 *     [9, 5, 7, 9, 7, 2, 9, 2, 0, 2, 7, 11, -1, -1, -1, -1],
 *     [2, 3, 11, 0, 1, 8, 1, 7, 8, 1, 5, 7, -1, -1, -1, -1],
 *     [11, 2, 1, 11, 1, 7, 7, 1, 5, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 5, 8, 8, 5, 7, 10, 1, 3, 10, 3, 11, -1, -1, -1, -1],
 *     [5, 7, 0, 5, 0, 9, 7, 11, 0, 1, 0, 10, 11, 10, 0, -1],
 */
  __pyx_t_61[0] = 11;
  __pyx_t_61[1] = 2;
  __pyx_t_61[2] = 1;
  __pyx_t_61[3] = 11;
  __pyx_t_61[4] = 1;
  __pyx_t_61[5] = 7;
  __pyx_t_61[6] = 7;
  __pyx_t_61[7] = 1;
  __pyx_t_61[8] = 5;
  __pyx_t_61[9] = -1;
  __pyx_t_61[10] = -1;
  __pyx_t_61[11] = -1;
  __pyx_t_61[12] = -1;
  __pyx_t_61[13] = -1;
  __pyx_t_61[14] = -1;
  __pyx_t_61[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1274
 *     [2, 3, 11, 0, 1, 8, 1, 7, 8, 1, 5, 7, -1, -1, -1, -1],
 *     [11, 2, 1, 11, 1, 7, 7, 1, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 5, 8, 8, 5, 7, 10, 1, 3, 10, 3, 11, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [5, 7, 0, 5, 0, 9, 7, 11, 0, 1, 0, 10, 11, 10, 0, -1],
 *     [11, 10, 0, 11, 0, 3, 10, 5, 0, 8, 0, 7, 5, 7, 0, -1],
 */
  __pyx_t_62[0] = 9;
  __pyx_t_62[1] = 5;
  __pyx_t_62[2] = 8;
  __pyx_t_62[3] = 8;
  __pyx_t_62[4] = 5;
  __pyx_t_62[5] = 7;
  __pyx_t_62[6] = 10;
  __pyx_t_62[7] = 1;
  __pyx_t_62[8] = 3;
  __pyx_t_62[9] = 10;
  __pyx_t_62[10] = 3;
  __pyx_t_62[11] = 11;
  __pyx_t_62[12] = -1;
  __pyx_t_62[13] = -1;
  __pyx_t_62[14] = -1;
  __pyx_t_62[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1275
 *     [11, 2, 1, 11, 1, 7, 7, 1, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 5, 8, 8, 5, 7, 10, 1, 3, 10, 3, 11, -1, -1, -1, -1],
 *     [5, 7, 0, 5, 0, 9, 7, 11, 0, 1, 0, 10, 11, 10, 0, -1],             # <<<<<<<<<<<<<<
 *     [11, 10, 0, 11, 0, 3, 10, 5, 0, 8, 0, 7, 5, 7, 0, -1],
 *     [11, 10, 5, 7, 11, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_63[0] = 5;
  __pyx_t_63[1] = 7;
  __pyx_t_63[2] = 0;
  __pyx_t_63[3] = 5;
  __pyx_t_63[4] = 0;
  __pyx_t_63[5] = 9;
  __pyx_t_63[6] = 7;
  __pyx_t_63[7] = 11;
  __pyx_t_63[8] = 0;
  __pyx_t_63[9] = 1;
  __pyx_t_63[10] = 0;
  __pyx_t_63[11] = 10;
  __pyx_t_63[12] = 11;
  __pyx_t_63[13] = 10;
  __pyx_t_63[14] = 0;
  __pyx_t_63[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1276
 *     [9, 5, 8, 8, 5, 7, 10, 1, 3, 10, 3, 11, -1, -1, -1, -1],
 *     [5, 7, 0, 5, 0, 9, 7, 11, 0, 1, 0, 10, 11, 10, 0, -1],
 *     [11, 10, 0, 11, 0, 3, 10, 5, 0, 8, 0, 7, 5, 7, 0, -1],             # <<<<<<<<<<<<<<
 *     [11, 10, 5, 7, 11, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_64[0] = 11;
  __pyx_t_64[1] = 10;
  __pyx_t_64[2] = 0;
  __pyx_t_64[3] = 11;
  __pyx_t_64[4] = 0;
  __pyx_t_64[5] = 3;
  __pyx_t_64[6] = 10;
  __pyx_t_64[7] = 5;
  __pyx_t_64[8] = 0;
  __pyx_t_64[9] = 8;
  __pyx_t_64[10] = 0;
  __pyx_t_64[11] = 7;
  __pyx_t_64[12] = 5;
  __pyx_t_64[13] = 7;
  __pyx_t_64[14] = 0;
  __pyx_t_64[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1277
 *     [5, 7, 0, 5, 0, 9, 7, 11, 0, 1, 0, 10, 11, 10, 0, -1],
 *     [11, 10, 0, 11, 0, 3, 10, 5, 0, 8, 0, 7, 5, 7, 0, -1],
 *     [11, 10, 5, 7, 11, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_65[0] = 11;
  __pyx_t_65[1] = 10;
  __pyx_t_65[2] = 5;
  __pyx_t_65[3] = 7;
  __pyx_t_65[4] = 11;
  __pyx_t_65[5] = 5;
  __pyx_t_65[6] = -1;
  __pyx_t_65[7] = -1;
  __pyx_t_65[8] = -1;
  __pyx_t_65[9] = -1;
  __pyx_t_65[10] = -1;
  __pyx_t_65[11] = -1;
  __pyx_t_65[12] = -1;
  __pyx_t_65[13] = -1;
  __pyx_t_65[14] = -1;
  __pyx_t_65[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1278
 *     [11, 10, 0, 11, 0, 3, 10, 5, 0, 8, 0, 7, 5, 7, 0, -1],
 *     [11, 10, 5, 7, 11, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 8, 3, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 0, 1, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_66[0] = 10;
  __pyx_t_66[1] = 6;
  __pyx_t_66[2] = 5;
  __pyx_t_66[3] = -1;
  __pyx_t_66[4] = -1;
  __pyx_t_66[5] = -1;
  __pyx_t_66[6] = -1;
  __pyx_t_66[7] = -1;
  __pyx_t_66[8] = -1;
  __pyx_t_66[9] = -1;
  __pyx_t_66[10] = -1;
  __pyx_t_66[11] = -1;
  __pyx_t_66[12] = -1;
  __pyx_t_66[13] = -1;
  __pyx_t_66[14] = -1;
  __pyx_t_66[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1279
 *     [11, 10, 5, 7, 11, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 0, 1, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 8, 3, 1, 9, 8, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_67[0] = 0;
  __pyx_t_67[1] = 8;
  __pyx_t_67[2] = 3;
  __pyx_t_67[3] = 5;
  __pyx_t_67[4] = 10;
  __pyx_t_67[5] = 6;
  __pyx_t_67[6] = -1;
  __pyx_t_67[7] = -1;
  __pyx_t_67[8] = -1;
  __pyx_t_67[9] = -1;
  __pyx_t_67[10] = -1;
  __pyx_t_67[11] = -1;
  __pyx_t_67[12] = -1;
  __pyx_t_67[13] = -1;
  __pyx_t_67[14] = -1;
  __pyx_t_67[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1280
 *     [10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 0, 1, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 8, 3, 1, 9, 8, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 6, 5, 2, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_68[0] = 9;
  __pyx_t_68[1] = 0;
  __pyx_t_68[2] = 1;
  __pyx_t_68[3] = 5;
  __pyx_t_68[4] = 10;
  __pyx_t_68[5] = 6;
  __pyx_t_68[6] = -1;
  __pyx_t_68[7] = -1;
  __pyx_t_68[8] = -1;
  __pyx_t_68[9] = -1;
  __pyx_t_68[10] = -1;
  __pyx_t_68[11] = -1;
  __pyx_t_68[12] = -1;
  __pyx_t_68[13] = -1;
  __pyx_t_68[14] = -1;
  __pyx_t_68[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1281
 *     [0, 8, 3, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 0, 1, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 8, 3, 1, 9, 8, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 6, 5, 2, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 6, 5, 1, 2, 6, 3, 0, 8, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_69[0] = 1;
  __pyx_t_69[1] = 8;
  __pyx_t_69[2] = 3;
  __pyx_t_69[3] = 1;
  __pyx_t_69[4] = 9;
  __pyx_t_69[5] = 8;
  __pyx_t_69[6] = 5;
  __pyx_t_69[7] = 10;
  __pyx_t_69[8] = 6;
  __pyx_t_69[9] = -1;
  __pyx_t_69[10] = -1;
  __pyx_t_69[11] = -1;
  __pyx_t_69[12] = -1;
  __pyx_t_69[13] = -1;
  __pyx_t_69[14] = -1;
  __pyx_t_69[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1282
 *     [9, 0, 1, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 8, 3, 1, 9, 8, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 6, 5, 2, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 6, 5, 1, 2, 6, 3, 0, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 6, 5, 9, 0, 6, 0, 2, 6, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_70[0] = 1;
  __pyx_t_70[1] = 6;
  __pyx_t_70[2] = 5;
  __pyx_t_70[3] = 2;
  __pyx_t_70[4] = 6;
  __pyx_t_70[5] = 1;
  __pyx_t_70[6] = -1;
  __pyx_t_70[7] = -1;
  __pyx_t_70[8] = -1;
  __pyx_t_70[9] = -1;
  __pyx_t_70[10] = -1;
  __pyx_t_70[11] = -1;
  __pyx_t_70[12] = -1;
  __pyx_t_70[13] = -1;
  __pyx_t_70[14] = -1;
  __pyx_t_70[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1283
 *     [1, 8, 3, 1, 9, 8, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 6, 5, 2, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 6, 5, 1, 2, 6, 3, 0, 8, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 6, 5, 9, 0, 6, 0, 2, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 9, 8, 5, 8, 2, 5, 2, 6, 3, 2, 8, -1, -1, -1, -1],
 */
  __pyx_t_71[0] = 1;
  __pyx_t_71[1] = 6;
  __pyx_t_71[2] = 5;
  __pyx_t_71[3] = 1;
  __pyx_t_71[4] = 2;
  __pyx_t_71[5] = 6;
  __pyx_t_71[6] = 3;
  __pyx_t_71[7] = 0;
  __pyx_t_71[8] = 8;
  __pyx_t_71[9] = -1;
  __pyx_t_71[10] = -1;
  __pyx_t_71[11] = -1;
  __pyx_t_71[12] = -1;
  __pyx_t_71[13] = -1;
  __pyx_t_71[14] = -1;
  __pyx_t_71[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1284
 *     [1, 6, 5, 2, 6, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 6, 5, 1, 2, 6, 3, 0, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 6, 5, 9, 0, 6, 0, 2, 6, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [5, 9, 8, 5, 8, 2, 5, 2, 6, 3, 2, 8, -1, -1, -1, -1],
 *     [2, 3, 11, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_72[0] = 9;
  __pyx_t_72[1] = 6;
  __pyx_t_72[2] = 5;
  __pyx_t_72[3] = 9;
  __pyx_t_72[4] = 0;
  __pyx_t_72[5] = 6;
  __pyx_t_72[6] = 0;
  __pyx_t_72[7] = 2;
  __pyx_t_72[8] = 6;
  __pyx_t_72[9] = -1;
  __pyx_t_72[10] = -1;
  __pyx_t_72[11] = -1;
  __pyx_t_72[12] = -1;
  __pyx_t_72[13] = -1;
  __pyx_t_72[14] = -1;
  __pyx_t_72[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1285
 *     [1, 6, 5, 1, 2, 6, 3, 0, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 6, 5, 9, 0, 6, 0, 2, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 9, 8, 5, 8, 2, 5, 2, 6, 3, 2, 8, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [2, 3, 11, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 0, 8, 11, 2, 0, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_73[0] = 5;
  __pyx_t_73[1] = 9;
  __pyx_t_73[2] = 8;
  __pyx_t_73[3] = 5;
  __pyx_t_73[4] = 8;
  __pyx_t_73[5] = 2;
  __pyx_t_73[6] = 5;
  __pyx_t_73[7] = 2;
  __pyx_t_73[8] = 6;
  __pyx_t_73[9] = 3;
  __pyx_t_73[10] = 2;
  __pyx_t_73[11] = 8;
  __pyx_t_73[12] = -1;
  __pyx_t_73[13] = -1;
  __pyx_t_73[14] = -1;
  __pyx_t_73[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1286
 *     [9, 6, 5, 9, 0, 6, 0, 2, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 9, 8, 5, 8, 2, 5, 2, 6, 3, 2, 8, -1, -1, -1, -1],
 *     [2, 3, 11, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [11, 0, 8, 11, 2, 0, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 1, 9, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_74[0] = 2;
  __pyx_t_74[1] = 3;
  __pyx_t_74[2] = 11;
  __pyx_t_74[3] = 10;
  __pyx_t_74[4] = 6;
  __pyx_t_74[5] = 5;
  __pyx_t_74[6] = -1;
  __pyx_t_74[7] = -1;
  __pyx_t_74[8] = -1;
  __pyx_t_74[9] = -1;
  __pyx_t_74[10] = -1;
  __pyx_t_74[11] = -1;
  __pyx_t_74[12] = -1;
  __pyx_t_74[13] = -1;
  __pyx_t_74[14] = -1;
  __pyx_t_74[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1287
 *     [5, 9, 8, 5, 8, 2, 5, 2, 6, 3, 2, 8, -1, -1, -1, -1],
 *     [2, 3, 11, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 0, 8, 11, 2, 0, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 1, 9, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 10, 6, 1, 9, 2, 9, 11, 2, 9, 8, 11, -1, -1, -1, -1],
 */
  __pyx_t_75[0] = 11;
  __pyx_t_75[1] = 0;
  __pyx_t_75[2] = 8;
  __pyx_t_75[3] = 11;
  __pyx_t_75[4] = 2;
  __pyx_t_75[5] = 0;
  __pyx_t_75[6] = 10;
  __pyx_t_75[7] = 6;
  __pyx_t_75[8] = 5;
  __pyx_t_75[9] = -1;
  __pyx_t_75[10] = -1;
  __pyx_t_75[11] = -1;
  __pyx_t_75[12] = -1;
  __pyx_t_75[13] = -1;
  __pyx_t_75[14] = -1;
  __pyx_t_75[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1288
 *     [2, 3, 11, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 0, 8, 11, 2, 0, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 1, 9, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [5, 10, 6, 1, 9, 2, 9, 11, 2, 9, 8, 11, -1, -1, -1, -1],
 *     [6, 3, 11, 6, 5, 3, 5, 1, 3, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_76[0] = 0;
  __pyx_t_76[1] = 1;
  __pyx_t_76[2] = 9;
  __pyx_t_76[3] = 2;
  __pyx_t_76[4] = 3;
  __pyx_t_76[5] = 11;
  __pyx_t_76[6] = 5;
  __pyx_t_76[7] = 10;
  __pyx_t_76[8] = 6;
  __pyx_t_76[9] = -1;
  __pyx_t_76[10] = -1;
  __pyx_t_76[11] = -1;
  __pyx_t_76[12] = -1;
  __pyx_t_76[13] = -1;
  __pyx_t_76[14] = -1;
  __pyx_t_76[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1289
 *     [11, 0, 8, 11, 2, 0, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 1, 9, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 10, 6, 1, 9, 2, 9, 11, 2, 9, 8, 11, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [6, 3, 11, 6, 5, 3, 5, 1, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 11, 0, 11, 5, 0, 5, 1, 5, 11, 6, -1, -1, -1, -1],
 */
  __pyx_t_77[0] = 5;
  __pyx_t_77[1] = 10;
  __pyx_t_77[2] = 6;
  __pyx_t_77[3] = 1;
  __pyx_t_77[4] = 9;
  __pyx_t_77[5] = 2;
  __pyx_t_77[6] = 9;
  __pyx_t_77[7] = 11;
  __pyx_t_77[8] = 2;
  __pyx_t_77[9] = 9;
  __pyx_t_77[10] = 8;
  __pyx_t_77[11] = 11;
  __pyx_t_77[12] = -1;
  __pyx_t_77[13] = -1;
  __pyx_t_77[14] = -1;
  __pyx_t_77[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1290
 *     [0, 1, 9, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 10, 6, 1, 9, 2, 9, 11, 2, 9, 8, 11, -1, -1, -1, -1],
 *     [6, 3, 11, 6, 5, 3, 5, 1, 3, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 8, 11, 0, 11, 5, 0, 5, 1, 5, 11, 6, -1, -1, -1, -1],
 *     [3, 11, 6, 0, 3, 6, 0, 6, 5, 0, 5, 9, -1, -1, -1, -1],
 */
  __pyx_t_78[0] = 6;
  __pyx_t_78[1] = 3;
  __pyx_t_78[2] = 11;
  __pyx_t_78[3] = 6;
  __pyx_t_78[4] = 5;
  __pyx_t_78[5] = 3;
  __pyx_t_78[6] = 5;
  __pyx_t_78[7] = 1;
  __pyx_t_78[8] = 3;
  __pyx_t_78[9] = -1;
  __pyx_t_78[10] = -1;
  __pyx_t_78[11] = -1;
  __pyx_t_78[12] = -1;
  __pyx_t_78[13] = -1;
  __pyx_t_78[14] = -1;
  __pyx_t_78[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1291
 *     [5, 10, 6, 1, 9, 2, 9, 11, 2, 9, 8, 11, -1, -1, -1, -1],
 *     [6, 3, 11, 6, 5, 3, 5, 1, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 11, 0, 11, 5, 0, 5, 1, 5, 11, 6, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 11, 6, 0, 3, 6, 0, 6, 5, 0, 5, 9, -1, -1, -1, -1],
 *     [6, 5, 9, 6, 9, 11, 11, 9, 8, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_79[0] = 0;
  __pyx_t_79[1] = 8;
  __pyx_t_79[2] = 11;
  __pyx_t_79[3] = 0;
  __pyx_t_79[4] = 11;
  __pyx_t_79[5] = 5;
  __pyx_t_79[6] = 0;
  __pyx_t_79[7] = 5;
  __pyx_t_79[8] = 1;
  __pyx_t_79[9] = 5;
  __pyx_t_79[10] = 11;
  __pyx_t_79[11] = 6;
  __pyx_t_79[12] = -1;
  __pyx_t_79[13] = -1;
  __pyx_t_79[14] = -1;
  __pyx_t_79[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1292
 *     [6, 3, 11, 6, 5, 3, 5, 1, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 11, 0, 11, 5, 0, 5, 1, 5, 11, 6, -1, -1, -1, -1],
 *     [3, 11, 6, 0, 3, 6, 0, 6, 5, 0, 5, 9, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [6, 5, 9, 6, 9, 11, 11, 9, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 10, 6, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_80[0] = 3;
  __pyx_t_80[1] = 11;
  __pyx_t_80[2] = 6;
  __pyx_t_80[3] = 0;
  __pyx_t_80[4] = 3;
  __pyx_t_80[5] = 6;
  __pyx_t_80[6] = 0;
  __pyx_t_80[7] = 6;
  __pyx_t_80[8] = 5;
  __pyx_t_80[9] = 0;
  __pyx_t_80[10] = 5;
  __pyx_t_80[11] = 9;
  __pyx_t_80[12] = -1;
  __pyx_t_80[13] = -1;
  __pyx_t_80[14] = -1;
  __pyx_t_80[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1293
 *     [0, 8, 11, 0, 11, 5, 0, 5, 1, 5, 11, 6, -1, -1, -1, -1],
 *     [3, 11, 6, 0, 3, 6, 0, 6, 5, 0, 5, 9, -1, -1, -1, -1],
 *     [6, 5, 9, 6, 9, 11, 11, 9, 8, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [5, 10, 6, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 3, 0, 4, 7, 3, 6, 5, 10, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_81[0] = 6;
  __pyx_t_81[1] = 5;
  __pyx_t_81[2] = 9;
  __pyx_t_81[3] = 6;
  __pyx_t_81[4] = 9;
  __pyx_t_81[5] = 11;
  __pyx_t_81[6] = 11;
  __pyx_t_81[7] = 9;
  __pyx_t_81[8] = 8;
  __pyx_t_81[9] = -1;
  __pyx_t_81[10] = -1;
  __pyx_t_81[11] = -1;
  __pyx_t_81[12] = -1;
  __pyx_t_81[13] = -1;
  __pyx_t_81[14] = -1;
  __pyx_t_81[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1294
 *     [3, 11, 6, 0, 3, 6, 0, 6, 5, 0, 5, 9, -1, -1, -1, -1],
 *     [6, 5, 9, 6, 9, 11, 11, 9, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 10, 6, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 3, 0, 4, 7, 3, 6, 5, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 9, 0, 5, 10, 6, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_82[0] = 5;
  __pyx_t_82[1] = 10;
  __pyx_t_82[2] = 6;
  __pyx_t_82[3] = 4;
  __pyx_t_82[4] = 7;
  __pyx_t_82[5] = 8;
  __pyx_t_82[6] = -1;
  __pyx_t_82[7] = -1;
  __pyx_t_82[8] = -1;
  __pyx_t_82[9] = -1;
  __pyx_t_82[10] = -1;
  __pyx_t_82[11] = -1;
  __pyx_t_82[12] = -1;
  __pyx_t_82[13] = -1;
  __pyx_t_82[14] = -1;
  __pyx_t_82[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1295
 *     [6, 5, 9, 6, 9, 11, 11, 9, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 10, 6, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 3, 0, 4, 7, 3, 6, 5, 10, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 9, 0, 5, 10, 6, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 6, 5, 1, 9, 7, 1, 7, 3, 7, 9, 4, -1, -1, -1, -1],
 */
  __pyx_t_83[0] = 4;
  __pyx_t_83[1] = 3;
  __pyx_t_83[2] = 0;
  __pyx_t_83[3] = 4;
  __pyx_t_83[4] = 7;
  __pyx_t_83[5] = 3;
  __pyx_t_83[6] = 6;
  __pyx_t_83[7] = 5;
  __pyx_t_83[8] = 10;
  __pyx_t_83[9] = -1;
  __pyx_t_83[10] = -1;
  __pyx_t_83[11] = -1;
  __pyx_t_83[12] = -1;
  __pyx_t_83[13] = -1;
  __pyx_t_83[14] = -1;
  __pyx_t_83[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1296
 *     [5, 10, 6, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 3, 0, 4, 7, 3, 6, 5, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 9, 0, 5, 10, 6, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 6, 5, 1, 9, 7, 1, 7, 3, 7, 9, 4, -1, -1, -1, -1],
 *     [6, 1, 2, 6, 5, 1, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_84[0] = 1;
  __pyx_t_84[1] = 9;
  __pyx_t_84[2] = 0;
  __pyx_t_84[3] = 5;
  __pyx_t_84[4] = 10;
  __pyx_t_84[5] = 6;
  __pyx_t_84[6] = 8;
  __pyx_t_84[7] = 4;
  __pyx_t_84[8] = 7;
  __pyx_t_84[9] = -1;
  __pyx_t_84[10] = -1;
  __pyx_t_84[11] = -1;
  __pyx_t_84[12] = -1;
  __pyx_t_84[13] = -1;
  __pyx_t_84[14] = -1;
  __pyx_t_84[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1297
 *     [4, 3, 0, 4, 7, 3, 6, 5, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 9, 0, 5, 10, 6, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 6, 5, 1, 9, 7, 1, 7, 3, 7, 9, 4, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [6, 1, 2, 6, 5, 1, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 5, 5, 2, 6, 3, 0, 4, 3, 4, 7, -1, -1, -1, -1],
 */
  __pyx_t_85[0] = 10;
  __pyx_t_85[1] = 6;
  __pyx_t_85[2] = 5;
  __pyx_t_85[3] = 1;
  __pyx_t_85[4] = 9;
  __pyx_t_85[5] = 7;
  __pyx_t_85[6] = 1;
  __pyx_t_85[7] = 7;
  __pyx_t_85[8] = 3;
  __pyx_t_85[9] = 7;
  __pyx_t_85[10] = 9;
  __pyx_t_85[11] = 4;
  __pyx_t_85[12] = -1;
  __pyx_t_85[13] = -1;
  __pyx_t_85[14] = -1;
  __pyx_t_85[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1298
 *     [1, 9, 0, 5, 10, 6, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 6, 5, 1, 9, 7, 1, 7, 3, 7, 9, 4, -1, -1, -1, -1],
 *     [6, 1, 2, 6, 5, 1, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 2, 5, 5, 2, 6, 3, 0, 4, 3, 4, 7, -1, -1, -1, -1],
 *     [8, 4, 7, 9, 0, 5, 0, 6, 5, 0, 2, 6, -1, -1, -1, -1],
 */
  __pyx_t_86[0] = 6;
  __pyx_t_86[1] = 1;
  __pyx_t_86[2] = 2;
  __pyx_t_86[3] = 6;
  __pyx_t_86[4] = 5;
  __pyx_t_86[5] = 1;
  __pyx_t_86[6] = 4;
  __pyx_t_86[7] = 7;
  __pyx_t_86[8] = 8;
  __pyx_t_86[9] = -1;
  __pyx_t_86[10] = -1;
  __pyx_t_86[11] = -1;
  __pyx_t_86[12] = -1;
  __pyx_t_86[13] = -1;
  __pyx_t_86[14] = -1;
  __pyx_t_86[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1299
 *     [10, 6, 5, 1, 9, 7, 1, 7, 3, 7, 9, 4, -1, -1, -1, -1],
 *     [6, 1, 2, 6, 5, 1, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 5, 5, 2, 6, 3, 0, 4, 3, 4, 7, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [8, 4, 7, 9, 0, 5, 0, 6, 5, 0, 2, 6, -1, -1, -1, -1],
 *     [7, 3, 9, 7, 9, 4, 3, 2, 9, 5, 9, 6, 2, 6, 9, -1],
 */
  __pyx_t_87[0] = 1;
  __pyx_t_87[1] = 2;
  __pyx_t_87[2] = 5;
  __pyx_t_87[3] = 5;
  __pyx_t_87[4] = 2;
  __pyx_t_87[5] = 6;
  __pyx_t_87[6] = 3;
  __pyx_t_87[7] = 0;
  __pyx_t_87[8] = 4;
  __pyx_t_87[9] = 3;
  __pyx_t_87[10] = 4;
  __pyx_t_87[11] = 7;
  __pyx_t_87[12] = -1;
  __pyx_t_87[13] = -1;
  __pyx_t_87[14] = -1;
  __pyx_t_87[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1300
 *     [6, 1, 2, 6, 5, 1, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 5, 5, 2, 6, 3, 0, 4, 3, 4, 7, -1, -1, -1, -1],
 *     [8, 4, 7, 9, 0, 5, 0, 6, 5, 0, 2, 6, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [7, 3, 9, 7, 9, 4, 3, 2, 9, 5, 9, 6, 2, 6, 9, -1],
 *     [3, 11, 2, 7, 8, 4, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_88[0] = 8;
  __pyx_t_88[1] = 4;
  __pyx_t_88[2] = 7;
  __pyx_t_88[3] = 9;
  __pyx_t_88[4] = 0;
  __pyx_t_88[5] = 5;
  __pyx_t_88[6] = 0;
  __pyx_t_88[7] = 6;
  __pyx_t_88[8] = 5;
  __pyx_t_88[9] = 0;
  __pyx_t_88[10] = 2;
  __pyx_t_88[11] = 6;
  __pyx_t_88[12] = -1;
  __pyx_t_88[13] = -1;
  __pyx_t_88[14] = -1;
  __pyx_t_88[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1301
 *     [1, 2, 5, 5, 2, 6, 3, 0, 4, 3, 4, 7, -1, -1, -1, -1],
 *     [8, 4, 7, 9, 0, 5, 0, 6, 5, 0, 2, 6, -1, -1, -1, -1],
 *     [7, 3, 9, 7, 9, 4, 3, 2, 9, 5, 9, 6, 2, 6, 9, -1],             # <<<<<<<<<<<<<<
 *     [3, 11, 2, 7, 8, 4, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 10, 6, 4, 7, 2, 4, 2, 0, 2, 7, 11, -1, -1, -1, -1],
 */
  __pyx_t_89[0] = 7;
  __pyx_t_89[1] = 3;
  __pyx_t_89[2] = 9;
  __pyx_t_89[3] = 7;
  __pyx_t_89[4] = 9;
  __pyx_t_89[5] = 4;
  __pyx_t_89[6] = 3;
  __pyx_t_89[7] = 2;
  __pyx_t_89[8] = 9;
  __pyx_t_89[9] = 5;
  __pyx_t_89[10] = 9;
  __pyx_t_89[11] = 6;
  __pyx_t_89[12] = 2;
  __pyx_t_89[13] = 6;
  __pyx_t_89[14] = 9;
  __pyx_t_89[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1302
 *     [8, 4, 7, 9, 0, 5, 0, 6, 5, 0, 2, 6, -1, -1, -1, -1],
 *     [7, 3, 9, 7, 9, 4, 3, 2, 9, 5, 9, 6, 2, 6, 9, -1],
 *     [3, 11, 2, 7, 8, 4, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [5, 10, 6, 4, 7, 2, 4, 2, 0, 2, 7, 11, -1, -1, -1, -1],
 *     [0, 1, 9, 4, 7, 8, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1],
 */
  __pyx_t_90[0] = 3;
  __pyx_t_90[1] = 11;
  __pyx_t_90[2] = 2;
  __pyx_t_90[3] = 7;
  __pyx_t_90[4] = 8;
  __pyx_t_90[5] = 4;
  __pyx_t_90[6] = 10;
  __pyx_t_90[7] = 6;
  __pyx_t_90[8] = 5;
  __pyx_t_90[9] = -1;
  __pyx_t_90[10] = -1;
  __pyx_t_90[11] = -1;
  __pyx_t_90[12] = -1;
  __pyx_t_90[13] = -1;
  __pyx_t_90[14] = -1;
  __pyx_t_90[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1303
 *     [7, 3, 9, 7, 9, 4, 3, 2, 9, 5, 9, 6, 2, 6, 9, -1],
 *     [3, 11, 2, 7, 8, 4, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 10, 6, 4, 7, 2, 4, 2, 0, 2, 7, 11, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 1, 9, 4, 7, 8, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1],
 *     [9, 2, 1, 9, 11, 2, 9, 4, 11, 7, 11, 4, 5, 10, 6, -1],
 */
  __pyx_t_91[0] = 5;
  __pyx_t_91[1] = 10;
  __pyx_t_91[2] = 6;
  __pyx_t_91[3] = 4;
  __pyx_t_91[4] = 7;
  __pyx_t_91[5] = 2;
  __pyx_t_91[6] = 4;
  __pyx_t_91[7] = 2;
  __pyx_t_91[8] = 0;
  __pyx_t_91[9] = 2;
  __pyx_t_91[10] = 7;
  __pyx_t_91[11] = 11;
  __pyx_t_91[12] = -1;
  __pyx_t_91[13] = -1;
  __pyx_t_91[14] = -1;
  __pyx_t_91[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1304
 *     [3, 11, 2, 7, 8, 4, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 10, 6, 4, 7, 2, 4, 2, 0, 2, 7, 11, -1, -1, -1, -1],
 *     [0, 1, 9, 4, 7, 8, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 2, 1, 9, 11, 2, 9, 4, 11, 7, 11, 4, 5, 10, 6, -1],
 *     [8, 4, 7, 3, 11, 5, 3, 5, 1, 5, 11, 6, -1, -1, -1, -1],
 */
  __pyx_t_92[0] = 0;
  __pyx_t_92[1] = 1;
  __pyx_t_92[2] = 9;
  __pyx_t_92[3] = 4;
  __pyx_t_92[4] = 7;
  __pyx_t_92[5] = 8;
  __pyx_t_92[6] = 2;
  __pyx_t_92[7] = 3;
  __pyx_t_92[8] = 11;
  __pyx_t_92[9] = 5;
  __pyx_t_92[10] = 10;
  __pyx_t_92[11] = 6;
  __pyx_t_92[12] = -1;
  __pyx_t_92[13] = -1;
  __pyx_t_92[14] = -1;
  __pyx_t_92[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1305
 *     [5, 10, 6, 4, 7, 2, 4, 2, 0, 2, 7, 11, -1, -1, -1, -1],
 *     [0, 1, 9, 4, 7, 8, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1],
 *     [9, 2, 1, 9, 11, 2, 9, 4, 11, 7, 11, 4, 5, 10, 6, -1],             # <<<<<<<<<<<<<<
 *     [8, 4, 7, 3, 11, 5, 3, 5, 1, 5, 11, 6, -1, -1, -1, -1],
 *     [5, 1, 11, 5, 11, 6, 1, 0, 11, 7, 11, 4, 0, 4, 11, -1],
 */
  __pyx_t_93[0] = 9;
  __pyx_t_93[1] = 2;
  __pyx_t_93[2] = 1;
  __pyx_t_93[3] = 9;
  __pyx_t_93[4] = 11;
  __pyx_t_93[5] = 2;
  __pyx_t_93[6] = 9;
  __pyx_t_93[7] = 4;
  __pyx_t_93[8] = 11;
  __pyx_t_93[9] = 7;
  __pyx_t_93[10] = 11;
  __pyx_t_93[11] = 4;
  __pyx_t_93[12] = 5;
  __pyx_t_93[13] = 10;
  __pyx_t_93[14] = 6;
  __pyx_t_93[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1306
 *     [0, 1, 9, 4, 7, 8, 2, 3, 11, 5, 10, 6, -1, -1, -1, -1],
 *     [9, 2, 1, 9, 11, 2, 9, 4, 11, 7, 11, 4, 5, 10, 6, -1],
 *     [8, 4, 7, 3, 11, 5, 3, 5, 1, 5, 11, 6, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [5, 1, 11, 5, 11, 6, 1, 0, 11, 7, 11, 4, 0, 4, 11, -1],
 *     [0, 5, 9, 0, 6, 5, 0, 3, 6, 11, 6, 3, 8, 4, 7, -1],
 */
  __pyx_t_94[0] = 8;
  __pyx_t_94[1] = 4;
  __pyx_t_94[2] = 7;
  __pyx_t_94[3] = 3;
  __pyx_t_94[4] = 11;
  __pyx_t_94[5] = 5;
  __pyx_t_94[6] = 3;
  __pyx_t_94[7] = 5;
  __pyx_t_94[8] = 1;
  __pyx_t_94[9] = 5;
  __pyx_t_94[10] = 11;
  __pyx_t_94[11] = 6;
  __pyx_t_94[12] = -1;
  __pyx_t_94[13] = -1;
  __pyx_t_94[14] = -1;
  __pyx_t_94[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1307
 *     [9, 2, 1, 9, 11, 2, 9, 4, 11, 7, 11, 4, 5, 10, 6, -1],
 *     [8, 4, 7, 3, 11, 5, 3, 5, 1, 5, 11, 6, -1, -1, -1, -1],
 *     [5, 1, 11, 5, 11, 6, 1, 0, 11, 7, 11, 4, 0, 4, 11, -1],             # <<<<<<<<<<<<<<
 *     [0, 5, 9, 0, 6, 5, 0, 3, 6, 11, 6, 3, 8, 4, 7, -1],
 *     [6, 5, 9, 6, 9, 11, 4, 7, 9, 7, 11, 9, -1, -1, -1, -1],
 */
  __pyx_t_95[0] = 5;
  __pyx_t_95[1] = 1;
  __pyx_t_95[2] = 11;
  __pyx_t_95[3] = 5;
  __pyx_t_95[4] = 11;
  __pyx_t_95[5] = 6;
  __pyx_t_95[6] = 1;
  __pyx_t_95[7] = 0;
  __pyx_t_95[8] = 11;
  __pyx_t_95[9] = 7;
  __pyx_t_95[10] = 11;
  __pyx_t_95[11] = 4;
  __pyx_t_95[12] = 0;
  __pyx_t_95[13] = 4;
  __pyx_t_95[14] = 11;
  __pyx_t_95[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1308
 *     [8, 4, 7, 3, 11, 5, 3, 5, 1, 5, 11, 6, -1, -1, -1, -1],
 *     [5, 1, 11, 5, 11, 6, 1, 0, 11, 7, 11, 4, 0, 4, 11, -1],
 *     [0, 5, 9, 0, 6, 5, 0, 3, 6, 11, 6, 3, 8, 4, 7, -1],             # <<<<<<<<<<<<<<
 *     [6, 5, 9, 6, 9, 11, 4, 7, 9, 7, 11, 9, -1, -1, -1, -1],
 *     [10, 4, 9, 6, 4, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_96[0] = 0;
  __pyx_t_96[1] = 5;
  __pyx_t_96[2] = 9;
  __pyx_t_96[3] = 0;
  __pyx_t_96[4] = 6;
  __pyx_t_96[5] = 5;
  __pyx_t_96[6] = 0;
  __pyx_t_96[7] = 3;
  __pyx_t_96[8] = 6;
  __pyx_t_96[9] = 11;
  __pyx_t_96[10] = 6;
  __pyx_t_96[11] = 3;
  __pyx_t_96[12] = 8;
  __pyx_t_96[13] = 4;
  __pyx_t_96[14] = 7;
  __pyx_t_96[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1309
 *     [5, 1, 11, 5, 11, 6, 1, 0, 11, 7, 11, 4, 0, 4, 11, -1],
 *     [0, 5, 9, 0, 6, 5, 0, 3, 6, 11, 6, 3, 8, 4, 7, -1],
 *     [6, 5, 9, 6, 9, 11, 4, 7, 9, 7, 11, 9, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 4, 9, 6, 4, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 10, 6, 4, 9, 10, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_97[0] = 6;
  __pyx_t_97[1] = 5;
  __pyx_t_97[2] = 9;
  __pyx_t_97[3] = 6;
  __pyx_t_97[4] = 9;
  __pyx_t_97[5] = 11;
  __pyx_t_97[6] = 4;
  __pyx_t_97[7] = 7;
  __pyx_t_97[8] = 9;
  __pyx_t_97[9] = 7;
  __pyx_t_97[10] = 11;
  __pyx_t_97[11] = 9;
  __pyx_t_97[12] = -1;
  __pyx_t_97[13] = -1;
  __pyx_t_97[14] = -1;
  __pyx_t_97[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1310
 *     [0, 5, 9, 0, 6, 5, 0, 3, 6, 11, 6, 3, 8, 4, 7, -1],
 *     [6, 5, 9, 6, 9, 11, 4, 7, 9, 7, 11, 9, -1, -1, -1, -1],
 *     [10, 4, 9, 6, 4, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 10, 6, 4, 9, 10, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 0, 1, 10, 6, 0, 6, 4, 0, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_98[0] = 10;
  __pyx_t_98[1] = 4;
  __pyx_t_98[2] = 9;
  __pyx_t_98[3] = 6;
  __pyx_t_98[4] = 4;
  __pyx_t_98[5] = 10;
  __pyx_t_98[6] = -1;
  __pyx_t_98[7] = -1;
  __pyx_t_98[8] = -1;
  __pyx_t_98[9] = -1;
  __pyx_t_98[10] = -1;
  __pyx_t_98[11] = -1;
  __pyx_t_98[12] = -1;
  __pyx_t_98[13] = -1;
  __pyx_t_98[14] = -1;
  __pyx_t_98[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1311
 *     [6, 5, 9, 6, 9, 11, 4, 7, 9, 7, 11, 9, -1, -1, -1, -1],
 *     [10, 4, 9, 6, 4, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 10, 6, 4, 9, 10, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 0, 1, 10, 6, 0, 6, 4, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 3, 1, 8, 1, 6, 8, 6, 4, 6, 1, 10, -1, -1, -1, -1],
 */
  __pyx_t_99[0] = 4;
  __pyx_t_99[1] = 10;
  __pyx_t_99[2] = 6;
  __pyx_t_99[3] = 4;
  __pyx_t_99[4] = 9;
  __pyx_t_99[5] = 10;
  __pyx_t_99[6] = 0;
  __pyx_t_99[7] = 8;
  __pyx_t_99[8] = 3;
  __pyx_t_99[9] = -1;
  __pyx_t_99[10] = -1;
  __pyx_t_99[11] = -1;
  __pyx_t_99[12] = -1;
  __pyx_t_99[13] = -1;
  __pyx_t_99[14] = -1;
  __pyx_t_99[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1312
 *     [10, 4, 9, 6, 4, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 10, 6, 4, 9, 10, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 0, 1, 10, 6, 0, 6, 4, 0, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [8, 3, 1, 8, 1, 6, 8, 6, 4, 6, 1, 10, -1, -1, -1, -1],
 *     [1, 4, 9, 1, 2, 4, 2, 6, 4, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_100[0] = 10;
  __pyx_t_100[1] = 0;
  __pyx_t_100[2] = 1;
  __pyx_t_100[3] = 10;
  __pyx_t_100[4] = 6;
  __pyx_t_100[5] = 0;
  __pyx_t_100[6] = 6;
  __pyx_t_100[7] = 4;
  __pyx_t_100[8] = 0;
  __pyx_t_100[9] = -1;
  __pyx_t_100[10] = -1;
  __pyx_t_100[11] = -1;
  __pyx_t_100[12] = -1;
  __pyx_t_100[13] = -1;
  __pyx_t_100[14] = -1;
  __pyx_t_100[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1313
 *     [4, 10, 6, 4, 9, 10, 0, 8, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 0, 1, 10, 6, 0, 6, 4, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 3, 1, 8, 1, 6, 8, 6, 4, 6, 1, 10, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 4, 9, 1, 2, 4, 2, 6, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 0, 8, 1, 2, 9, 2, 4, 9, 2, 6, 4, -1, -1, -1, -1],
 */
  __pyx_t_101[0] = 8;
  __pyx_t_101[1] = 3;
  __pyx_t_101[2] = 1;
  __pyx_t_101[3] = 8;
  __pyx_t_101[4] = 1;
  __pyx_t_101[5] = 6;
  __pyx_t_101[6] = 8;
  __pyx_t_101[7] = 6;
  __pyx_t_101[8] = 4;
  __pyx_t_101[9] = 6;
  __pyx_t_101[10] = 1;
  __pyx_t_101[11] = 10;
  __pyx_t_101[12] = -1;
  __pyx_t_101[13] = -1;
  __pyx_t_101[14] = -1;
  __pyx_t_101[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1314
 *     [10, 0, 1, 10, 6, 0, 6, 4, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 3, 1, 8, 1, 6, 8, 6, 4, 6, 1, 10, -1, -1, -1, -1],
 *     [1, 4, 9, 1, 2, 4, 2, 6, 4, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 0, 8, 1, 2, 9, 2, 4, 9, 2, 6, 4, -1, -1, -1, -1],
 *     [0, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_102[0] = 1;
  __pyx_t_102[1] = 4;
  __pyx_t_102[2] = 9;
  __pyx_t_102[3] = 1;
  __pyx_t_102[4] = 2;
  __pyx_t_102[5] = 4;
  __pyx_t_102[6] = 2;
  __pyx_t_102[7] = 6;
  __pyx_t_102[8] = 4;
  __pyx_t_102[9] = -1;
  __pyx_t_102[10] = -1;
  __pyx_t_102[11] = -1;
  __pyx_t_102[12] = -1;
  __pyx_t_102[13] = -1;
  __pyx_t_102[14] = -1;
  __pyx_t_102[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1315
 *     [8, 3, 1, 8, 1, 6, 8, 6, 4, 6, 1, 10, -1, -1, -1, -1],
 *     [1, 4, 9, 1, 2, 4, 2, 6, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 0, 8, 1, 2, 9, 2, 4, 9, 2, 6, 4, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 3, 2, 8, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_103[0] = 3;
  __pyx_t_103[1] = 0;
  __pyx_t_103[2] = 8;
  __pyx_t_103[3] = 1;
  __pyx_t_103[4] = 2;
  __pyx_t_103[5] = 9;
  __pyx_t_103[6] = 2;
  __pyx_t_103[7] = 4;
  __pyx_t_103[8] = 9;
  __pyx_t_103[9] = 2;
  __pyx_t_103[10] = 6;
  __pyx_t_103[11] = 4;
  __pyx_t_103[12] = -1;
  __pyx_t_103[13] = -1;
  __pyx_t_103[14] = -1;
  __pyx_t_103[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1316
 *     [1, 4, 9, 1, 2, 4, 2, 6, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 0, 8, 1, 2, 9, 2, 4, 9, 2, 6, 4, -1, -1, -1, -1],
 *     [0, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [8, 3, 2, 8, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 4, 9, 10, 6, 4, 11, 2, 3, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_104[0] = 0;
  __pyx_t_104[1] = 2;
  __pyx_t_104[2] = 4;
  __pyx_t_104[3] = 4;
  __pyx_t_104[4] = 2;
  __pyx_t_104[5] = 6;
  __pyx_t_104[6] = -1;
  __pyx_t_104[7] = -1;
  __pyx_t_104[8] = -1;
  __pyx_t_104[9] = -1;
  __pyx_t_104[10] = -1;
  __pyx_t_104[11] = -1;
  __pyx_t_104[12] = -1;
  __pyx_t_104[13] = -1;
  __pyx_t_104[14] = -1;
  __pyx_t_104[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1317
 *     [3, 0, 8, 1, 2, 9, 2, 4, 9, 2, 6, 4, -1, -1, -1, -1],
 *     [0, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 3, 2, 8, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 4, 9, 10, 6, 4, 11, 2, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 2, 2, 8, 11, 4, 9, 10, 4, 10, 6, -1, -1, -1, -1],
 */
  __pyx_t_105[0] = 8;
  __pyx_t_105[1] = 3;
  __pyx_t_105[2] = 2;
  __pyx_t_105[3] = 8;
  __pyx_t_105[4] = 2;
  __pyx_t_105[5] = 4;
  __pyx_t_105[6] = 4;
  __pyx_t_105[7] = 2;
  __pyx_t_105[8] = 6;
  __pyx_t_105[9] = -1;
  __pyx_t_105[10] = -1;
  __pyx_t_105[11] = -1;
  __pyx_t_105[12] = -1;
  __pyx_t_105[13] = -1;
  __pyx_t_105[14] = -1;
  __pyx_t_105[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1318
 *     [0, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 3, 2, 8, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 4, 9, 10, 6, 4, 11, 2, 3, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 8, 2, 2, 8, 11, 4, 9, 10, 4, 10, 6, -1, -1, -1, -1],
 *     [3, 11, 2, 0, 1, 6, 0, 6, 4, 6, 1, 10, -1, -1, -1, -1],
 */
  __pyx_t_106[0] = 10;
  __pyx_t_106[1] = 4;
  __pyx_t_106[2] = 9;
  __pyx_t_106[3] = 10;
  __pyx_t_106[4] = 6;
  __pyx_t_106[5] = 4;
  __pyx_t_106[6] = 11;
  __pyx_t_106[7] = 2;
  __pyx_t_106[8] = 3;
  __pyx_t_106[9] = -1;
  __pyx_t_106[10] = -1;
  __pyx_t_106[11] = -1;
  __pyx_t_106[12] = -1;
  __pyx_t_106[13] = -1;
  __pyx_t_106[14] = -1;
  __pyx_t_106[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1319
 *     [8, 3, 2, 8, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 4, 9, 10, 6, 4, 11, 2, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 2, 2, 8, 11, 4, 9, 10, 4, 10, 6, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 11, 2, 0, 1, 6, 0, 6, 4, 6, 1, 10, -1, -1, -1, -1],
 *     [6, 4, 1, 6, 1, 10, 4, 8, 1, 2, 1, 11, 8, 11, 1, -1],
 */
  __pyx_t_107[0] = 0;
  __pyx_t_107[1] = 8;
  __pyx_t_107[2] = 2;
  __pyx_t_107[3] = 2;
  __pyx_t_107[4] = 8;
  __pyx_t_107[5] = 11;
  __pyx_t_107[6] = 4;
  __pyx_t_107[7] = 9;
  __pyx_t_107[8] = 10;
  __pyx_t_107[9] = 4;
  __pyx_t_107[10] = 10;
  __pyx_t_107[11] = 6;
  __pyx_t_107[12] = -1;
  __pyx_t_107[13] = -1;
  __pyx_t_107[14] = -1;
  __pyx_t_107[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1320
 *     [10, 4, 9, 10, 6, 4, 11, 2, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 2, 2, 8, 11, 4, 9, 10, 4, 10, 6, -1, -1, -1, -1],
 *     [3, 11, 2, 0, 1, 6, 0, 6, 4, 6, 1, 10, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [6, 4, 1, 6, 1, 10, 4, 8, 1, 2, 1, 11, 8, 11, 1, -1],
 *     [9, 6, 4, 9, 3, 6, 9, 1, 3, 11, 6, 3, -1, -1, -1, -1],
 */
  __pyx_t_108[0] = 3;
  __pyx_t_108[1] = 11;
  __pyx_t_108[2] = 2;
  __pyx_t_108[3] = 0;
  __pyx_t_108[4] = 1;
  __pyx_t_108[5] = 6;
  __pyx_t_108[6] = 0;
  __pyx_t_108[7] = 6;
  __pyx_t_108[8] = 4;
  __pyx_t_108[9] = 6;
  __pyx_t_108[10] = 1;
  __pyx_t_108[11] = 10;
  __pyx_t_108[12] = -1;
  __pyx_t_108[13] = -1;
  __pyx_t_108[14] = -1;
  __pyx_t_108[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1321
 *     [0, 8, 2, 2, 8, 11, 4, 9, 10, 4, 10, 6, -1, -1, -1, -1],
 *     [3, 11, 2, 0, 1, 6, 0, 6, 4, 6, 1, 10, -1, -1, -1, -1],
 *     [6, 4, 1, 6, 1, 10, 4, 8, 1, 2, 1, 11, 8, 11, 1, -1],             # <<<<<<<<<<<<<<
 *     [9, 6, 4, 9, 3, 6, 9, 1, 3, 11, 6, 3, -1, -1, -1, -1],
 *     [8, 11, 1, 8, 1, 0, 11, 6, 1, 9, 1, 4, 6, 4, 1, -1],
 */
  __pyx_t_109[0] = 6;
  __pyx_t_109[1] = 4;
  __pyx_t_109[2] = 1;
  __pyx_t_109[3] = 6;
  __pyx_t_109[4] = 1;
  __pyx_t_109[5] = 10;
  __pyx_t_109[6] = 4;
  __pyx_t_109[7] = 8;
  __pyx_t_109[8] = 1;
  __pyx_t_109[9] = 2;
  __pyx_t_109[10] = 1;
  __pyx_t_109[11] = 11;
  __pyx_t_109[12] = 8;
  __pyx_t_109[13] = 11;
  __pyx_t_109[14] = 1;
  __pyx_t_109[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1322
 *     [3, 11, 2, 0, 1, 6, 0, 6, 4, 6, 1, 10, -1, -1, -1, -1],
 *     [6, 4, 1, 6, 1, 10, 4, 8, 1, 2, 1, 11, 8, 11, 1, -1],
 *     [9, 6, 4, 9, 3, 6, 9, 1, 3, 11, 6, 3, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [8, 11, 1, 8, 1, 0, 11, 6, 1, 9, 1, 4, 6, 4, 1, -1],
 *     [3, 11, 6, 3, 6, 0, 0, 6, 4, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_110[0] = 9;
  __pyx_t_110[1] = 6;
  __pyx_t_110[2] = 4;
  __pyx_t_110[3] = 9;
  __pyx_t_110[4] = 3;
  __pyx_t_110[5] = 6;
  __pyx_t_110[6] = 9;
  __pyx_t_110[7] = 1;
  __pyx_t_110[8] = 3;
  __pyx_t_110[9] = 11;
  __pyx_t_110[10] = 6;
  __pyx_t_110[11] = 3;
  __pyx_t_110[12] = -1;
  __pyx_t_110[13] = -1;
  __pyx_t_110[14] = -1;
  __pyx_t_110[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1323
 *     [6, 4, 1, 6, 1, 10, 4, 8, 1, 2, 1, 11, 8, 11, 1, -1],
 *     [9, 6, 4, 9, 3, 6, 9, 1, 3, 11, 6, 3, -1, -1, -1, -1],
 *     [8, 11, 1, 8, 1, 0, 11, 6, 1, 9, 1, 4, 6, 4, 1, -1],             # <<<<<<<<<<<<<<
 *     [3, 11, 6, 3, 6, 0, 0, 6, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [6, 4, 8, 11, 6, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_111[0] = 8;
  __pyx_t_111[1] = 11;
  __pyx_t_111[2] = 1;
  __pyx_t_111[3] = 8;
  __pyx_t_111[4] = 1;
  __pyx_t_111[5] = 0;
  __pyx_t_111[6] = 11;
  __pyx_t_111[7] = 6;
  __pyx_t_111[8] = 1;
  __pyx_t_111[9] = 9;
  __pyx_t_111[10] = 1;
  __pyx_t_111[11] = 4;
  __pyx_t_111[12] = 6;
  __pyx_t_111[13] = 4;
  __pyx_t_111[14] = 1;
  __pyx_t_111[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1324
 *     [9, 6, 4, 9, 3, 6, 9, 1, 3, 11, 6, 3, -1, -1, -1, -1],
 *     [8, 11, 1, 8, 1, 0, 11, 6, 1, 9, 1, 4, 6, 4, 1, -1],
 *     [3, 11, 6, 3, 6, 0, 0, 6, 4, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [6, 4, 8, 11, 6, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 10, 6, 7, 8, 10, 8, 9, 10, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_112[0] = 3;
  __pyx_t_112[1] = 11;
  __pyx_t_112[2] = 6;
  __pyx_t_112[3] = 3;
  __pyx_t_112[4] = 6;
  __pyx_t_112[5] = 0;
  __pyx_t_112[6] = 0;
  __pyx_t_112[7] = 6;
  __pyx_t_112[8] = 4;
  __pyx_t_112[9] = -1;
  __pyx_t_112[10] = -1;
  __pyx_t_112[11] = -1;
  __pyx_t_112[12] = -1;
  __pyx_t_112[13] = -1;
  __pyx_t_112[14] = -1;
  __pyx_t_112[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1325
 *     [8, 11, 1, 8, 1, 0, 11, 6, 1, 9, 1, 4, 6, 4, 1, -1],
 *     [3, 11, 6, 3, 6, 0, 0, 6, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [6, 4, 8, 11, 6, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [7, 10, 6, 7, 8, 10, 8, 9, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 7, 3, 0, 10, 7, 0, 9, 10, 6, 7, 10, -1, -1, -1, -1],
 */
  __pyx_t_113[0] = 6;
  __pyx_t_113[1] = 4;
  __pyx_t_113[2] = 8;
  __pyx_t_113[3] = 11;
  __pyx_t_113[4] = 6;
  __pyx_t_113[5] = 8;
  __pyx_t_113[6] = -1;
  __pyx_t_113[7] = -1;
  __pyx_t_113[8] = -1;
  __pyx_t_113[9] = -1;
  __pyx_t_113[10] = -1;
  __pyx_t_113[11] = -1;
  __pyx_t_113[12] = -1;
  __pyx_t_113[13] = -1;
  __pyx_t_113[14] = -1;
  __pyx_t_113[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1326
 *     [3, 11, 6, 3, 6, 0, 0, 6, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [6, 4, 8, 11, 6, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 10, 6, 7, 8, 10, 8, 9, 10, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 7, 3, 0, 10, 7, 0, 9, 10, 6, 7, 10, -1, -1, -1, -1],
 *     [10, 6, 7, 1, 10, 7, 1, 7, 8, 1, 8, 0, -1, -1, -1, -1],
 */
  __pyx_t_114[0] = 7;
  __pyx_t_114[1] = 10;
  __pyx_t_114[2] = 6;
  __pyx_t_114[3] = 7;
  __pyx_t_114[4] = 8;
  __pyx_t_114[5] = 10;
  __pyx_t_114[6] = 8;
  __pyx_t_114[7] = 9;
  __pyx_t_114[8] = 10;
  __pyx_t_114[9] = -1;
  __pyx_t_114[10] = -1;
  __pyx_t_114[11] = -1;
  __pyx_t_114[12] = -1;
  __pyx_t_114[13] = -1;
  __pyx_t_114[14] = -1;
  __pyx_t_114[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1327
 *     [6, 4, 8, 11, 6, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 10, 6, 7, 8, 10, 8, 9, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 7, 3, 0, 10, 7, 0, 9, 10, 6, 7, 10, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 6, 7, 1, 10, 7, 1, 7, 8, 1, 8, 0, -1, -1, -1, -1],
 *     [10, 6, 7, 10, 7, 1, 1, 7, 3, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_115[0] = 0;
  __pyx_t_115[1] = 7;
  __pyx_t_115[2] = 3;
  __pyx_t_115[3] = 0;
  __pyx_t_115[4] = 10;
  __pyx_t_115[5] = 7;
  __pyx_t_115[6] = 0;
  __pyx_t_115[7] = 9;
  __pyx_t_115[8] = 10;
  __pyx_t_115[9] = 6;
  __pyx_t_115[10] = 7;
  __pyx_t_115[11] = 10;
  __pyx_t_115[12] = -1;
  __pyx_t_115[13] = -1;
  __pyx_t_115[14] = -1;
  __pyx_t_115[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1328
 *     [7, 10, 6, 7, 8, 10, 8, 9, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 7, 3, 0, 10, 7, 0, 9, 10, 6, 7, 10, -1, -1, -1, -1],
 *     [10, 6, 7, 1, 10, 7, 1, 7, 8, 1, 8, 0, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 6, 7, 10, 7, 1, 1, 7, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 6, 1, 6, 8, 1, 8, 9, 8, 6, 7, -1, -1, -1, -1],
 */
  __pyx_t_116[0] = 10;
  __pyx_t_116[1] = 6;
  __pyx_t_116[2] = 7;
  __pyx_t_116[3] = 1;
  __pyx_t_116[4] = 10;
  __pyx_t_116[5] = 7;
  __pyx_t_116[6] = 1;
  __pyx_t_116[7] = 7;
  __pyx_t_116[8] = 8;
  __pyx_t_116[9] = 1;
  __pyx_t_116[10] = 8;
  __pyx_t_116[11] = 0;
  __pyx_t_116[12] = -1;
  __pyx_t_116[13] = -1;
  __pyx_t_116[14] = -1;
  __pyx_t_116[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1329
 *     [0, 7, 3, 0, 10, 7, 0, 9, 10, 6, 7, 10, -1, -1, -1, -1],
 *     [10, 6, 7, 1, 10, 7, 1, 7, 8, 1, 8, 0, -1, -1, -1, -1],
 *     [10, 6, 7, 10, 7, 1, 1, 7, 3, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 2, 6, 1, 6, 8, 1, 8, 9, 8, 6, 7, -1, -1, -1, -1],
 *     [2, 6, 9, 2, 9, 1, 6, 7, 9, 0, 9, 3, 7, 3, 9, -1],
 */
  __pyx_t_117[0] = 10;
  __pyx_t_117[1] = 6;
  __pyx_t_117[2] = 7;
  __pyx_t_117[3] = 10;
  __pyx_t_117[4] = 7;
  __pyx_t_117[5] = 1;
  __pyx_t_117[6] = 1;
  __pyx_t_117[7] = 7;
  __pyx_t_117[8] = 3;
  __pyx_t_117[9] = -1;
  __pyx_t_117[10] = -1;
  __pyx_t_117[11] = -1;
  __pyx_t_117[12] = -1;
  __pyx_t_117[13] = -1;
  __pyx_t_117[14] = -1;
  __pyx_t_117[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1330
 *     [10, 6, 7, 1, 10, 7, 1, 7, 8, 1, 8, 0, -1, -1, -1, -1],
 *     [10, 6, 7, 10, 7, 1, 1, 7, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 6, 1, 6, 8, 1, 8, 9, 8, 6, 7, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [2, 6, 9, 2, 9, 1, 6, 7, 9, 0, 9, 3, 7, 3, 9, -1],
 *     [7, 8, 0, 7, 0, 6, 6, 0, 2, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_118[0] = 1;
  __pyx_t_118[1] = 2;
  __pyx_t_118[2] = 6;
  __pyx_t_118[3] = 1;
  __pyx_t_118[4] = 6;
  __pyx_t_118[5] = 8;
  __pyx_t_118[6] = 1;
  __pyx_t_118[7] = 8;
  __pyx_t_118[8] = 9;
  __pyx_t_118[9] = 8;
  __pyx_t_118[10] = 6;
  __pyx_t_118[11] = 7;
  __pyx_t_118[12] = -1;
  __pyx_t_118[13] = -1;
  __pyx_t_118[14] = -1;
  __pyx_t_118[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1331
 *     [10, 6, 7, 10, 7, 1, 1, 7, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 6, 1, 6, 8, 1, 8, 9, 8, 6, 7, -1, -1, -1, -1],
 *     [2, 6, 9, 2, 9, 1, 6, 7, 9, 0, 9, 3, 7, 3, 9, -1],             # <<<<<<<<<<<<<<
 *     [7, 8, 0, 7, 0, 6, 6, 0, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 3, 2, 6, 7, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_119[0] = 2;
  __pyx_t_119[1] = 6;
  __pyx_t_119[2] = 9;
  __pyx_t_119[3] = 2;
  __pyx_t_119[4] = 9;
  __pyx_t_119[5] = 1;
  __pyx_t_119[6] = 6;
  __pyx_t_119[7] = 7;
  __pyx_t_119[8] = 9;
  __pyx_t_119[9] = 0;
  __pyx_t_119[10] = 9;
  __pyx_t_119[11] = 3;
  __pyx_t_119[12] = 7;
  __pyx_t_119[13] = 3;
  __pyx_t_119[14] = 9;
  __pyx_t_119[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1332
 *     [1, 2, 6, 1, 6, 8, 1, 8, 9, 8, 6, 7, -1, -1, -1, -1],
 *     [2, 6, 9, 2, 9, 1, 6, 7, 9, 0, 9, 3, 7, 3, 9, -1],
 *     [7, 8, 0, 7, 0, 6, 6, 0, 2, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [7, 3, 2, 6, 7, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 3, 11, 10, 6, 8, 10, 8, 9, 8, 6, 7, -1, -1, -1, -1],
 */
  __pyx_t_120[0] = 7;
  __pyx_t_120[1] = 8;
  __pyx_t_120[2] = 0;
  __pyx_t_120[3] = 7;
  __pyx_t_120[4] = 0;
  __pyx_t_120[5] = 6;
  __pyx_t_120[6] = 6;
  __pyx_t_120[7] = 0;
  __pyx_t_120[8] = 2;
  __pyx_t_120[9] = -1;
  __pyx_t_120[10] = -1;
  __pyx_t_120[11] = -1;
  __pyx_t_120[12] = -1;
  __pyx_t_120[13] = -1;
  __pyx_t_120[14] = -1;
  __pyx_t_120[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1333
 *     [2, 6, 9, 2, 9, 1, 6, 7, 9, 0, 9, 3, 7, 3, 9, -1],
 *     [7, 8, 0, 7, 0, 6, 6, 0, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 3, 2, 6, 7, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [2, 3, 11, 10, 6, 8, 10, 8, 9, 8, 6, 7, -1, -1, -1, -1],
 *     [2, 0, 7, 2, 7, 11, 0, 9, 7, 6, 7, 10, 9, 10, 7, -1],
 */
  __pyx_t_121[0] = 7;
  __pyx_t_121[1] = 3;
  __pyx_t_121[2] = 2;
  __pyx_t_121[3] = 6;
  __pyx_t_121[4] = 7;
  __pyx_t_121[5] = 2;
  __pyx_t_121[6] = -1;
  __pyx_t_121[7] = -1;
  __pyx_t_121[8] = -1;
  __pyx_t_121[9] = -1;
  __pyx_t_121[10] = -1;
  __pyx_t_121[11] = -1;
  __pyx_t_121[12] = -1;
  __pyx_t_121[13] = -1;
  __pyx_t_121[14] = -1;
  __pyx_t_121[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1334
 *     [7, 8, 0, 7, 0, 6, 6, 0, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 3, 2, 6, 7, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 3, 11, 10, 6, 8, 10, 8, 9, 8, 6, 7, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [2, 0, 7, 2, 7, 11, 0, 9, 7, 6, 7, 10, 9, 10, 7, -1],
 *     [1, 8, 0, 1, 7, 8, 1, 10, 7, 6, 7, 10, 2, 3, 11, -1],
 */
  __pyx_t_122[0] = 2;
  __pyx_t_122[1] = 3;
  __pyx_t_122[2] = 11;
  __pyx_t_122[3] = 10;
  __pyx_t_122[4] = 6;
  __pyx_t_122[5] = 8;
  __pyx_t_122[6] = 10;
  __pyx_t_122[7] = 8;
  __pyx_t_122[8] = 9;
  __pyx_t_122[9] = 8;
  __pyx_t_122[10] = 6;
  __pyx_t_122[11] = 7;
  __pyx_t_122[12] = -1;
  __pyx_t_122[13] = -1;
  __pyx_t_122[14] = -1;
  __pyx_t_122[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1335
 *     [7, 3, 2, 6, 7, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 3, 11, 10, 6, 8, 10, 8, 9, 8, 6, 7, -1, -1, -1, -1],
 *     [2, 0, 7, 2, 7, 11, 0, 9, 7, 6, 7, 10, 9, 10, 7, -1],             # <<<<<<<<<<<<<<
 *     [1, 8, 0, 1, 7, 8, 1, 10, 7, 6, 7, 10, 2, 3, 11, -1],
 *     [11, 2, 1, 11, 1, 7, 10, 6, 1, 6, 7, 1, -1, -1, -1, -1],
 */
  __pyx_t_123[0] = 2;
  __pyx_t_123[1] = 0;
  __pyx_t_123[2] = 7;
  __pyx_t_123[3] = 2;
  __pyx_t_123[4] = 7;
  __pyx_t_123[5] = 11;
  __pyx_t_123[6] = 0;
  __pyx_t_123[7] = 9;
  __pyx_t_123[8] = 7;
  __pyx_t_123[9] = 6;
  __pyx_t_123[10] = 7;
  __pyx_t_123[11] = 10;
  __pyx_t_123[12] = 9;
  __pyx_t_123[13] = 10;
  __pyx_t_123[14] = 7;
  __pyx_t_123[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1336
 *     [2, 3, 11, 10, 6, 8, 10, 8, 9, 8, 6, 7, -1, -1, -1, -1],
 *     [2, 0, 7, 2, 7, 11, 0, 9, 7, 6, 7, 10, 9, 10, 7, -1],
 *     [1, 8, 0, 1, 7, 8, 1, 10, 7, 6, 7, 10, 2, 3, 11, -1],             # <<<<<<<<<<<<<<
 *     [11, 2, 1, 11, 1, 7, 10, 6, 1, 6, 7, 1, -1, -1, -1, -1],
 *     [8, 9, 6, 8, 6, 7, 9, 1, 6, 11, 6, 3, 1, 3, 6, -1],
 */
  __pyx_t_124[0] = 1;
  __pyx_t_124[1] = 8;
  __pyx_t_124[2] = 0;
  __pyx_t_124[3] = 1;
  __pyx_t_124[4] = 7;
  __pyx_t_124[5] = 8;
  __pyx_t_124[6] = 1;
  __pyx_t_124[7] = 10;
  __pyx_t_124[8] = 7;
  __pyx_t_124[9] = 6;
  __pyx_t_124[10] = 7;
  __pyx_t_124[11] = 10;
  __pyx_t_124[12] = 2;
  __pyx_t_124[13] = 3;
  __pyx_t_124[14] = 11;
  __pyx_t_124[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1337
 *     [2, 0, 7, 2, 7, 11, 0, 9, 7, 6, 7, 10, 9, 10, 7, -1],
 *     [1, 8, 0, 1, 7, 8, 1, 10, 7, 6, 7, 10, 2, 3, 11, -1],
 *     [11, 2, 1, 11, 1, 7, 10, 6, 1, 6, 7, 1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [8, 9, 6, 8, 6, 7, 9, 1, 6, 11, 6, 3, 1, 3, 6, -1],
 *     [0, 9, 1, 11, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_125[0] = 11;
  __pyx_t_125[1] = 2;
  __pyx_t_125[2] = 1;
  __pyx_t_125[3] = 11;
  __pyx_t_125[4] = 1;
  __pyx_t_125[5] = 7;
  __pyx_t_125[6] = 10;
  __pyx_t_125[7] = 6;
  __pyx_t_125[8] = 1;
  __pyx_t_125[9] = 6;
  __pyx_t_125[10] = 7;
  __pyx_t_125[11] = 1;
  __pyx_t_125[12] = -1;
  __pyx_t_125[13] = -1;
  __pyx_t_125[14] = -1;
  __pyx_t_125[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1338
 *     [1, 8, 0, 1, 7, 8, 1, 10, 7, 6, 7, 10, 2, 3, 11, -1],
 *     [11, 2, 1, 11, 1, 7, 10, 6, 1, 6, 7, 1, -1, -1, -1, -1],
 *     [8, 9, 6, 8, 6, 7, 9, 1, 6, 11, 6, 3, 1, 3, 6, -1],             # <<<<<<<<<<<<<<
 *     [0, 9, 1, 11, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 8, 0, 7, 0, 6, 3, 11, 0, 11, 6, 0, -1, -1, -1, -1],
 */
  __pyx_t_126[0] = 8;
  __pyx_t_126[1] = 9;
  __pyx_t_126[2] = 6;
  __pyx_t_126[3] = 8;
  __pyx_t_126[4] = 6;
  __pyx_t_126[5] = 7;
  __pyx_t_126[6] = 9;
  __pyx_t_126[7] = 1;
  __pyx_t_126[8] = 6;
  __pyx_t_126[9] = 11;
  __pyx_t_126[10] = 6;
  __pyx_t_126[11] = 3;
  __pyx_t_126[12] = 1;
  __pyx_t_126[13] = 3;
  __pyx_t_126[14] = 6;
  __pyx_t_126[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1339
 *     [11, 2, 1, 11, 1, 7, 10, 6, 1, 6, 7, 1, -1, -1, -1, -1],
 *     [8, 9, 6, 8, 6, 7, 9, 1, 6, 11, 6, 3, 1, 3, 6, -1],
 *     [0, 9, 1, 11, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [7, 8, 0, 7, 0, 6, 3, 11, 0, 11, 6, 0, -1, -1, -1, -1],
 *     [7, 11, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_127[0] = 0;
  __pyx_t_127[1] = 9;
  __pyx_t_127[2] = 1;
  __pyx_t_127[3] = 11;
  __pyx_t_127[4] = 6;
  __pyx_t_127[5] = 7;
  __pyx_t_127[6] = -1;
  __pyx_t_127[7] = -1;
  __pyx_t_127[8] = -1;
  __pyx_t_127[9] = -1;
  __pyx_t_127[10] = -1;
  __pyx_t_127[11] = -1;
  __pyx_t_127[12] = -1;
  __pyx_t_127[13] = -1;
  __pyx_t_127[14] = -1;
  __pyx_t_127[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1340
 *     [8, 9, 6, 8, 6, 7, 9, 1, 6, 11, 6, 3, 1, 3, 6, -1],
 *     [0, 9, 1, 11, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 8, 0, 7, 0, 6, 3, 11, 0, 11, 6, 0, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [7, 11, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_128[0] = 7;
  __pyx_t_128[1] = 8;
  __pyx_t_128[2] = 0;
  __pyx_t_128[3] = 7;
  __pyx_t_128[4] = 0;
  __pyx_t_128[5] = 6;
  __pyx_t_128[6] = 3;
  __pyx_t_128[7] = 11;
  __pyx_t_128[8] = 0;
  __pyx_t_128[9] = 11;
  __pyx_t_128[10] = 6;
  __pyx_t_128[11] = 0;
  __pyx_t_128[12] = -1;
  __pyx_t_128[13] = -1;
  __pyx_t_128[14] = -1;
  __pyx_t_128[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1341
 *     [0, 9, 1, 11, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 8, 0, 7, 0, 6, 3, 11, 0, 11, 6, 0, -1, -1, -1, -1],
 *     [7, 11, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 0, 8, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_129[0] = 7;
  __pyx_t_129[1] = 11;
  __pyx_t_129[2] = 6;
  __pyx_t_129[3] = -1;
  __pyx_t_129[4] = -1;
  __pyx_t_129[5] = -1;
  __pyx_t_129[6] = -1;
  __pyx_t_129[7] = -1;
  __pyx_t_129[8] = -1;
  __pyx_t_129[9] = -1;
  __pyx_t_129[10] = -1;
  __pyx_t_129[11] = -1;
  __pyx_t_129[12] = -1;
  __pyx_t_129[13] = -1;
  __pyx_t_129[14] = -1;
  __pyx_t_129[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1342
 *     [7, 8, 0, 7, 0, 6, 3, 11, 0, 11, 6, 0, -1, -1, -1, -1],
 *     [7, 11, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 0, 8, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 1, 9, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_130[0] = 7;
  __pyx_t_130[1] = 6;
  __pyx_t_130[2] = 11;
  __pyx_t_130[3] = -1;
  __pyx_t_130[4] = -1;
  __pyx_t_130[5] = -1;
  __pyx_t_130[6] = -1;
  __pyx_t_130[7] = -1;
  __pyx_t_130[8] = -1;
  __pyx_t_130[9] = -1;
  __pyx_t_130[10] = -1;
  __pyx_t_130[11] = -1;
  __pyx_t_130[12] = -1;
  __pyx_t_130[13] = -1;
  __pyx_t_130[14] = -1;
  __pyx_t_130[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1343
 *     [7, 11, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 0, 8, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 1, 9, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 1, 9, 8, 3, 1, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_131[0] = 3;
  __pyx_t_131[1] = 0;
  __pyx_t_131[2] = 8;
  __pyx_t_131[3] = 11;
  __pyx_t_131[4] = 7;
  __pyx_t_131[5] = 6;
  __pyx_t_131[6] = -1;
  __pyx_t_131[7] = -1;
  __pyx_t_131[8] = -1;
  __pyx_t_131[9] = -1;
  __pyx_t_131[10] = -1;
  __pyx_t_131[11] = -1;
  __pyx_t_131[12] = -1;
  __pyx_t_131[13] = -1;
  __pyx_t_131[14] = -1;
  __pyx_t_131[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1344
 *     [7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 0, 8, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 1, 9, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [8, 1, 9, 8, 3, 1, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 1, 2, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_132[0] = 0;
  __pyx_t_132[1] = 1;
  __pyx_t_132[2] = 9;
  __pyx_t_132[3] = 11;
  __pyx_t_132[4] = 7;
  __pyx_t_132[5] = 6;
  __pyx_t_132[6] = -1;
  __pyx_t_132[7] = -1;
  __pyx_t_132[8] = -1;
  __pyx_t_132[9] = -1;
  __pyx_t_132[10] = -1;
  __pyx_t_132[11] = -1;
  __pyx_t_132[12] = -1;
  __pyx_t_132[13] = -1;
  __pyx_t_132[14] = -1;
  __pyx_t_132[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1345
 *     [3, 0, 8, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 1, 9, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 1, 9, 8, 3, 1, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 1, 2, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, 3, 0, 8, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_133[0] = 8;
  __pyx_t_133[1] = 1;
  __pyx_t_133[2] = 9;
  __pyx_t_133[3] = 8;
  __pyx_t_133[4] = 3;
  __pyx_t_133[5] = 1;
  __pyx_t_133[6] = 11;
  __pyx_t_133[7] = 7;
  __pyx_t_133[8] = 6;
  __pyx_t_133[9] = -1;
  __pyx_t_133[10] = -1;
  __pyx_t_133[11] = -1;
  __pyx_t_133[12] = -1;
  __pyx_t_133[13] = -1;
  __pyx_t_133[14] = -1;
  __pyx_t_133[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1346
 *     [0, 1, 9, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 1, 9, 8, 3, 1, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 1, 2, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 2, 10, 3, 0, 8, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 9, 0, 2, 10, 9, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_134[0] = 10;
  __pyx_t_134[1] = 1;
  __pyx_t_134[2] = 2;
  __pyx_t_134[3] = 6;
  __pyx_t_134[4] = 11;
  __pyx_t_134[5] = 7;
  __pyx_t_134[6] = -1;
  __pyx_t_134[7] = -1;
  __pyx_t_134[8] = -1;
  __pyx_t_134[9] = -1;
  __pyx_t_134[10] = -1;
  __pyx_t_134[11] = -1;
  __pyx_t_134[12] = -1;
  __pyx_t_134[13] = -1;
  __pyx_t_134[14] = -1;
  __pyx_t_134[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1347
 *     [8, 1, 9, 8, 3, 1, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 1, 2, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, 3, 0, 8, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [2, 9, 0, 2, 10, 9, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [6, 11, 7, 2, 10, 3, 10, 8, 3, 10, 9, 8, -1, -1, -1, -1],
 */
  __pyx_t_135[0] = 1;
  __pyx_t_135[1] = 2;
  __pyx_t_135[2] = 10;
  __pyx_t_135[3] = 3;
  __pyx_t_135[4] = 0;
  __pyx_t_135[5] = 8;
  __pyx_t_135[6] = 6;
  __pyx_t_135[7] = 11;
  __pyx_t_135[8] = 7;
  __pyx_t_135[9] = -1;
  __pyx_t_135[10] = -1;
  __pyx_t_135[11] = -1;
  __pyx_t_135[12] = -1;
  __pyx_t_135[13] = -1;
  __pyx_t_135[14] = -1;
  __pyx_t_135[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1348
 *     [10, 1, 2, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, 3, 0, 8, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 9, 0, 2, 10, 9, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [6, 11, 7, 2, 10, 3, 10, 8, 3, 10, 9, 8, -1, -1, -1, -1],
 *     [7, 2, 3, 6, 2, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_136[0] = 2;
  __pyx_t_136[1] = 9;
  __pyx_t_136[2] = 0;
  __pyx_t_136[3] = 2;
  __pyx_t_136[4] = 10;
  __pyx_t_136[5] = 9;
  __pyx_t_136[6] = 6;
  __pyx_t_136[7] = 11;
  __pyx_t_136[8] = 7;
  __pyx_t_136[9] = -1;
  __pyx_t_136[10] = -1;
  __pyx_t_136[11] = -1;
  __pyx_t_136[12] = -1;
  __pyx_t_136[13] = -1;
  __pyx_t_136[14] = -1;
  __pyx_t_136[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1349
 *     [1, 2, 10, 3, 0, 8, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 9, 0, 2, 10, 9, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [6, 11, 7, 2, 10, 3, 10, 8, 3, 10, 9, 8, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [7, 2, 3, 6, 2, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 0, 8, 7, 6, 0, 6, 2, 0, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_137[0] = 6;
  __pyx_t_137[1] = 11;
  __pyx_t_137[2] = 7;
  __pyx_t_137[3] = 2;
  __pyx_t_137[4] = 10;
  __pyx_t_137[5] = 3;
  __pyx_t_137[6] = 10;
  __pyx_t_137[7] = 8;
  __pyx_t_137[8] = 3;
  __pyx_t_137[9] = 10;
  __pyx_t_137[10] = 9;
  __pyx_t_137[11] = 8;
  __pyx_t_137[12] = -1;
  __pyx_t_137[13] = -1;
  __pyx_t_137[14] = -1;
  __pyx_t_137[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1350
 *     [2, 9, 0, 2, 10, 9, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [6, 11, 7, 2, 10, 3, 10, 8, 3, 10, 9, 8, -1, -1, -1, -1],
 *     [7, 2, 3, 6, 2, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [7, 0, 8, 7, 6, 0, 6, 2, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 7, 6, 2, 3, 7, 0, 1, 9, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_138[0] = 7;
  __pyx_t_138[1] = 2;
  __pyx_t_138[2] = 3;
  __pyx_t_138[3] = 6;
  __pyx_t_138[4] = 2;
  __pyx_t_138[5] = 7;
  __pyx_t_138[6] = -1;
  __pyx_t_138[7] = -1;
  __pyx_t_138[8] = -1;
  __pyx_t_138[9] = -1;
  __pyx_t_138[10] = -1;
  __pyx_t_138[11] = -1;
  __pyx_t_138[12] = -1;
  __pyx_t_138[13] = -1;
  __pyx_t_138[14] = -1;
  __pyx_t_138[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1351
 *     [6, 11, 7, 2, 10, 3, 10, 8, 3, 10, 9, 8, -1, -1, -1, -1],
 *     [7, 2, 3, 6, 2, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 0, 8, 7, 6, 0, 6, 2, 0, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [2, 7, 6, 2, 3, 7, 0, 1, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 6, 2, 1, 8, 6, 1, 9, 8, 8, 7, 6, -1, -1, -1, -1],
 */
  __pyx_t_139[0] = 7;
  __pyx_t_139[1] = 0;
  __pyx_t_139[2] = 8;
  __pyx_t_139[3] = 7;
  __pyx_t_139[4] = 6;
  __pyx_t_139[5] = 0;
  __pyx_t_139[6] = 6;
  __pyx_t_139[7] = 2;
  __pyx_t_139[8] = 0;
  __pyx_t_139[9] = -1;
  __pyx_t_139[10] = -1;
  __pyx_t_139[11] = -1;
  __pyx_t_139[12] = -1;
  __pyx_t_139[13] = -1;
  __pyx_t_139[14] = -1;
  __pyx_t_139[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1352
 *     [7, 2, 3, 6, 2, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [7, 0, 8, 7, 6, 0, 6, 2, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 7, 6, 2, 3, 7, 0, 1, 9, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 6, 2, 1, 8, 6, 1, 9, 8, 8, 7, 6, -1, -1, -1, -1],
 *     [10, 7, 6, 10, 1, 7, 1, 3, 7, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_140[0] = 2;
  __pyx_t_140[1] = 7;
  __pyx_t_140[2] = 6;
  __pyx_t_140[3] = 2;
  __pyx_t_140[4] = 3;
  __pyx_t_140[5] = 7;
  __pyx_t_140[6] = 0;
  __pyx_t_140[7] = 1;
  __pyx_t_140[8] = 9;
  __pyx_t_140[9] = -1;
  __pyx_t_140[10] = -1;
  __pyx_t_140[11] = -1;
  __pyx_t_140[12] = -1;
  __pyx_t_140[13] = -1;
  __pyx_t_140[14] = -1;
  __pyx_t_140[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1353
 *     [7, 0, 8, 7, 6, 0, 6, 2, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 7, 6, 2, 3, 7, 0, 1, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 6, 2, 1, 8, 6, 1, 9, 8, 8, 7, 6, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 7, 6, 10, 1, 7, 1, 3, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 7, 6, 1, 7, 10, 1, 8, 7, 1, 0, 8, -1, -1, -1, -1],
 */
  __pyx_t_141[0] = 1;
  __pyx_t_141[1] = 6;
  __pyx_t_141[2] = 2;
  __pyx_t_141[3] = 1;
  __pyx_t_141[4] = 8;
  __pyx_t_141[5] = 6;
  __pyx_t_141[6] = 1;
  __pyx_t_141[7] = 9;
  __pyx_t_141[8] = 8;
  __pyx_t_141[9] = 8;
  __pyx_t_141[10] = 7;
  __pyx_t_141[11] = 6;
  __pyx_t_141[12] = -1;
  __pyx_t_141[13] = -1;
  __pyx_t_141[14] = -1;
  __pyx_t_141[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1354
 *     [2, 7, 6, 2, 3, 7, 0, 1, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 6, 2, 1, 8, 6, 1, 9, 8, 8, 7, 6, -1, -1, -1, -1],
 *     [10, 7, 6, 10, 1, 7, 1, 3, 7, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 7, 6, 1, 7, 10, 1, 8, 7, 1, 0, 8, -1, -1, -1, -1],
 *     [0, 3, 7, 0, 7, 10, 0, 10, 9, 6, 10, 7, -1, -1, -1, -1],
 */
  __pyx_t_142[0] = 10;
  __pyx_t_142[1] = 7;
  __pyx_t_142[2] = 6;
  __pyx_t_142[3] = 10;
  __pyx_t_142[4] = 1;
  __pyx_t_142[5] = 7;
  __pyx_t_142[6] = 1;
  __pyx_t_142[7] = 3;
  __pyx_t_142[8] = 7;
  __pyx_t_142[9] = -1;
  __pyx_t_142[10] = -1;
  __pyx_t_142[11] = -1;
  __pyx_t_142[12] = -1;
  __pyx_t_142[13] = -1;
  __pyx_t_142[14] = -1;
  __pyx_t_142[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1355
 *     [1, 6, 2, 1, 8, 6, 1, 9, 8, 8, 7, 6, -1, -1, -1, -1],
 *     [10, 7, 6, 10, 1, 7, 1, 3, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 7, 6, 1, 7, 10, 1, 8, 7, 1, 0, 8, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 3, 7, 0, 7, 10, 0, 10, 9, 6, 10, 7, -1, -1, -1, -1],
 *     [7, 6, 10, 7, 10, 8, 8, 10, 9, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_143[0] = 10;
  __pyx_t_143[1] = 7;
  __pyx_t_143[2] = 6;
  __pyx_t_143[3] = 1;
  __pyx_t_143[4] = 7;
  __pyx_t_143[5] = 10;
  __pyx_t_143[6] = 1;
  __pyx_t_143[7] = 8;
  __pyx_t_143[8] = 7;
  __pyx_t_143[9] = 1;
  __pyx_t_143[10] = 0;
  __pyx_t_143[11] = 8;
  __pyx_t_143[12] = -1;
  __pyx_t_143[13] = -1;
  __pyx_t_143[14] = -1;
  __pyx_t_143[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1356
 *     [10, 7, 6, 10, 1, 7, 1, 3, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 7, 6, 1, 7, 10, 1, 8, 7, 1, 0, 8, -1, -1, -1, -1],
 *     [0, 3, 7, 0, 7, 10, 0, 10, 9, 6, 10, 7, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [7, 6, 10, 7, 10, 8, 8, 10, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [6, 8, 4, 11, 8, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_144[0] = 0;
  __pyx_t_144[1] = 3;
  __pyx_t_144[2] = 7;
  __pyx_t_144[3] = 0;
  __pyx_t_144[4] = 7;
  __pyx_t_144[5] = 10;
  __pyx_t_144[6] = 0;
  __pyx_t_144[7] = 10;
  __pyx_t_144[8] = 9;
  __pyx_t_144[9] = 6;
  __pyx_t_144[10] = 10;
  __pyx_t_144[11] = 7;
  __pyx_t_144[12] = -1;
  __pyx_t_144[13] = -1;
  __pyx_t_144[14] = -1;
  __pyx_t_144[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1357
 *     [10, 7, 6, 1, 7, 10, 1, 8, 7, 1, 0, 8, -1, -1, -1, -1],
 *     [0, 3, 7, 0, 7, 10, 0, 10, 9, 6, 10, 7, -1, -1, -1, -1],
 *     [7, 6, 10, 7, 10, 8, 8, 10, 9, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [6, 8, 4, 11, 8, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 6, 11, 3, 0, 6, 0, 4, 6, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_145[0] = 7;
  __pyx_t_145[1] = 6;
  __pyx_t_145[2] = 10;
  __pyx_t_145[3] = 7;
  __pyx_t_145[4] = 10;
  __pyx_t_145[5] = 8;
  __pyx_t_145[6] = 8;
  __pyx_t_145[7] = 10;
  __pyx_t_145[8] = 9;
  __pyx_t_145[9] = -1;
  __pyx_t_145[10] = -1;
  __pyx_t_145[11] = -1;
  __pyx_t_145[12] = -1;
  __pyx_t_145[13] = -1;
  __pyx_t_145[14] = -1;
  __pyx_t_145[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1358
 *     [0, 3, 7, 0, 7, 10, 0, 10, 9, 6, 10, 7, -1, -1, -1, -1],
 *     [7, 6, 10, 7, 10, 8, 8, 10, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [6, 8, 4, 11, 8, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 6, 11, 3, 0, 6, 0, 4, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 6, 11, 8, 4, 6, 9, 0, 1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_146[0] = 6;
  __pyx_t_146[1] = 8;
  __pyx_t_146[2] = 4;
  __pyx_t_146[3] = 11;
  __pyx_t_146[4] = 8;
  __pyx_t_146[5] = 6;
  __pyx_t_146[6] = -1;
  __pyx_t_146[7] = -1;
  __pyx_t_146[8] = -1;
  __pyx_t_146[9] = -1;
  __pyx_t_146[10] = -1;
  __pyx_t_146[11] = -1;
  __pyx_t_146[12] = -1;
  __pyx_t_146[13] = -1;
  __pyx_t_146[14] = -1;
  __pyx_t_146[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1359
 *     [7, 6, 10, 7, 10, 8, 8, 10, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [6, 8, 4, 11, 8, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 6, 11, 3, 0, 6, 0, 4, 6, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [8, 6, 11, 8, 4, 6, 9, 0, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 4, 6, 9, 6, 3, 9, 3, 1, 11, 3, 6, -1, -1, -1, -1],
 */
  __pyx_t_147[0] = 3;
  __pyx_t_147[1] = 6;
  __pyx_t_147[2] = 11;
  __pyx_t_147[3] = 3;
  __pyx_t_147[4] = 0;
  __pyx_t_147[5] = 6;
  __pyx_t_147[6] = 0;
  __pyx_t_147[7] = 4;
  __pyx_t_147[8] = 6;
  __pyx_t_147[9] = -1;
  __pyx_t_147[10] = -1;
  __pyx_t_147[11] = -1;
  __pyx_t_147[12] = -1;
  __pyx_t_147[13] = -1;
  __pyx_t_147[14] = -1;
  __pyx_t_147[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1360
 *     [6, 8, 4, 11, 8, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 6, 11, 3, 0, 6, 0, 4, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 6, 11, 8, 4, 6, 9, 0, 1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 4, 6, 9, 6, 3, 9, 3, 1, 11, 3, 6, -1, -1, -1, -1],
 *     [6, 8, 4, 6, 11, 8, 2, 10, 1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_148[0] = 8;
  __pyx_t_148[1] = 6;
  __pyx_t_148[2] = 11;
  __pyx_t_148[3] = 8;
  __pyx_t_148[4] = 4;
  __pyx_t_148[5] = 6;
  __pyx_t_148[6] = 9;
  __pyx_t_148[7] = 0;
  __pyx_t_148[8] = 1;
  __pyx_t_148[9] = -1;
  __pyx_t_148[10] = -1;
  __pyx_t_148[11] = -1;
  __pyx_t_148[12] = -1;
  __pyx_t_148[13] = -1;
  __pyx_t_148[14] = -1;
  __pyx_t_148[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1361
 *     [3, 6, 11, 3, 0, 6, 0, 4, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 6, 11, 8, 4, 6, 9, 0, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 4, 6, 9, 6, 3, 9, 3, 1, 11, 3, 6, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [6, 8, 4, 6, 11, 8, 2, 10, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, 3, 0, 11, 0, 6, 11, 0, 4, 6, -1, -1, -1, -1],
 */
  __pyx_t_149[0] = 9;
  __pyx_t_149[1] = 4;
  __pyx_t_149[2] = 6;
  __pyx_t_149[3] = 9;
  __pyx_t_149[4] = 6;
  __pyx_t_149[5] = 3;
  __pyx_t_149[6] = 9;
  __pyx_t_149[7] = 3;
  __pyx_t_149[8] = 1;
  __pyx_t_149[9] = 11;
  __pyx_t_149[10] = 3;
  __pyx_t_149[11] = 6;
  __pyx_t_149[12] = -1;
  __pyx_t_149[13] = -1;
  __pyx_t_149[14] = -1;
  __pyx_t_149[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1362
 *     [8, 6, 11, 8, 4, 6, 9, 0, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 4, 6, 9, 6, 3, 9, 3, 1, 11, 3, 6, -1, -1, -1, -1],
 *     [6, 8, 4, 6, 11, 8, 2, 10, 1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 2, 10, 3, 0, 11, 0, 6, 11, 0, 4, 6, -1, -1, -1, -1],
 *     [4, 11, 8, 4, 6, 11, 0, 2, 9, 2, 10, 9, -1, -1, -1, -1],
 */
  __pyx_t_150[0] = 6;
  __pyx_t_150[1] = 8;
  __pyx_t_150[2] = 4;
  __pyx_t_150[3] = 6;
  __pyx_t_150[4] = 11;
  __pyx_t_150[5] = 8;
  __pyx_t_150[6] = 2;
  __pyx_t_150[7] = 10;
  __pyx_t_150[8] = 1;
  __pyx_t_150[9] = -1;
  __pyx_t_150[10] = -1;
  __pyx_t_150[11] = -1;
  __pyx_t_150[12] = -1;
  __pyx_t_150[13] = -1;
  __pyx_t_150[14] = -1;
  __pyx_t_150[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1363
 *     [9, 4, 6, 9, 6, 3, 9, 3, 1, 11, 3, 6, -1, -1, -1, -1],
 *     [6, 8, 4, 6, 11, 8, 2, 10, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, 3, 0, 11, 0, 6, 11, 0, 4, 6, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 11, 8, 4, 6, 11, 0, 2, 9, 2, 10, 9, -1, -1, -1, -1],
 *     [10, 9, 3, 10, 3, 2, 9, 4, 3, 11, 3, 6, 4, 6, 3, -1],
 */
  __pyx_t_151[0] = 1;
  __pyx_t_151[1] = 2;
  __pyx_t_151[2] = 10;
  __pyx_t_151[3] = 3;
  __pyx_t_151[4] = 0;
  __pyx_t_151[5] = 11;
  __pyx_t_151[6] = 0;
  __pyx_t_151[7] = 6;
  __pyx_t_151[8] = 11;
  __pyx_t_151[9] = 0;
  __pyx_t_151[10] = 4;
  __pyx_t_151[11] = 6;
  __pyx_t_151[12] = -1;
  __pyx_t_151[13] = -1;
  __pyx_t_151[14] = -1;
  __pyx_t_151[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1364
 *     [6, 8, 4, 6, 11, 8, 2, 10, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, 3, 0, 11, 0, 6, 11, 0, 4, 6, -1, -1, -1, -1],
 *     [4, 11, 8, 4, 6, 11, 0, 2, 9, 2, 10, 9, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 9, 3, 10, 3, 2, 9, 4, 3, 11, 3, 6, 4, 6, 3, -1],
 *     [8, 2, 3, 8, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_152[0] = 4;
  __pyx_t_152[1] = 11;
  __pyx_t_152[2] = 8;
  __pyx_t_152[3] = 4;
  __pyx_t_152[4] = 6;
  __pyx_t_152[5] = 11;
  __pyx_t_152[6] = 0;
  __pyx_t_152[7] = 2;
  __pyx_t_152[8] = 9;
  __pyx_t_152[9] = 2;
  __pyx_t_152[10] = 10;
  __pyx_t_152[11] = 9;
  __pyx_t_152[12] = -1;
  __pyx_t_152[13] = -1;
  __pyx_t_152[14] = -1;
  __pyx_t_152[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1365
 *     [1, 2, 10, 3, 0, 11, 0, 6, 11, 0, 4, 6, -1, -1, -1, -1],
 *     [4, 11, 8, 4, 6, 11, 0, 2, 9, 2, 10, 9, -1, -1, -1, -1],
 *     [10, 9, 3, 10, 3, 2, 9, 4, 3, 11, 3, 6, 4, 6, 3, -1],             # <<<<<<<<<<<<<<
 *     [8, 2, 3, 8, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_153[0] = 10;
  __pyx_t_153[1] = 9;
  __pyx_t_153[2] = 3;
  __pyx_t_153[3] = 10;
  __pyx_t_153[4] = 3;
  __pyx_t_153[5] = 2;
  __pyx_t_153[6] = 9;
  __pyx_t_153[7] = 4;
  __pyx_t_153[8] = 3;
  __pyx_t_153[9] = 11;
  __pyx_t_153[10] = 3;
  __pyx_t_153[11] = 6;
  __pyx_t_153[12] = 4;
  __pyx_t_153[13] = 6;
  __pyx_t_153[14] = 3;
  __pyx_t_153[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1366
 *     [4, 11, 8, 4, 6, 11, 0, 2, 9, 2, 10, 9, -1, -1, -1, -1],
 *     [10, 9, 3, 10, 3, 2, 9, 4, 3, 11, 3, 6, 4, 6, 3, -1],
 *     [8, 2, 3, 8, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 9, 0, 2, 3, 4, 2, 4, 6, 4, 3, 8, -1, -1, -1, -1],
 */
  __pyx_t_154[0] = 8;
  __pyx_t_154[1] = 2;
  __pyx_t_154[2] = 3;
  __pyx_t_154[3] = 8;
  __pyx_t_154[4] = 4;
  __pyx_t_154[5] = 2;
  __pyx_t_154[6] = 4;
  __pyx_t_154[7] = 6;
  __pyx_t_154[8] = 2;
  __pyx_t_154[9] = -1;
  __pyx_t_154[10] = -1;
  __pyx_t_154[11] = -1;
  __pyx_t_154[12] = -1;
  __pyx_t_154[13] = -1;
  __pyx_t_154[14] = -1;
  __pyx_t_154[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1367
 *     [10, 9, 3, 10, 3, 2, 9, 4, 3, 11, 3, 6, 4, 6, 3, -1],
 *     [8, 2, 3, 8, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 9, 0, 2, 3, 4, 2, 4, 6, 4, 3, 8, -1, -1, -1, -1],
 *     [1, 9, 4, 1, 4, 2, 2, 4, 6, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_155[0] = 0;
  __pyx_t_155[1] = 4;
  __pyx_t_155[2] = 2;
  __pyx_t_155[3] = 4;
  __pyx_t_155[4] = 6;
  __pyx_t_155[5] = 2;
  __pyx_t_155[6] = -1;
  __pyx_t_155[7] = -1;
  __pyx_t_155[8] = -1;
  __pyx_t_155[9] = -1;
  __pyx_t_155[10] = -1;
  __pyx_t_155[11] = -1;
  __pyx_t_155[12] = -1;
  __pyx_t_155[13] = -1;
  __pyx_t_155[14] = -1;
  __pyx_t_155[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1368
 *     [8, 2, 3, 8, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 9, 0, 2, 3, 4, 2, 4, 6, 4, 3, 8, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 9, 4, 1, 4, 2, 2, 4, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 1, 3, 8, 6, 1, 8, 4, 6, 6, 10, 1, -1, -1, -1, -1],
 */
  __pyx_t_156[0] = 1;
  __pyx_t_156[1] = 9;
  __pyx_t_156[2] = 0;
  __pyx_t_156[3] = 2;
  __pyx_t_156[4] = 3;
  __pyx_t_156[5] = 4;
  __pyx_t_156[6] = 2;
  __pyx_t_156[7] = 4;
  __pyx_t_156[8] = 6;
  __pyx_t_156[9] = 4;
  __pyx_t_156[10] = 3;
  __pyx_t_156[11] = 8;
  __pyx_t_156[12] = -1;
  __pyx_t_156[13] = -1;
  __pyx_t_156[14] = -1;
  __pyx_t_156[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1369
 *     [0, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 9, 0, 2, 3, 4, 2, 4, 6, 4, 3, 8, -1, -1, -1, -1],
 *     [1, 9, 4, 1, 4, 2, 2, 4, 6, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [8, 1, 3, 8, 6, 1, 8, 4, 6, 6, 10, 1, -1, -1, -1, -1],
 *     [10, 1, 0, 10, 0, 6, 6, 0, 4, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_157[0] = 1;
  __pyx_t_157[1] = 9;
  __pyx_t_157[2] = 4;
  __pyx_t_157[3] = 1;
  __pyx_t_157[4] = 4;
  __pyx_t_157[5] = 2;
  __pyx_t_157[6] = 2;
  __pyx_t_157[7] = 4;
  __pyx_t_157[8] = 6;
  __pyx_t_157[9] = -1;
  __pyx_t_157[10] = -1;
  __pyx_t_157[11] = -1;
  __pyx_t_157[12] = -1;
  __pyx_t_157[13] = -1;
  __pyx_t_157[14] = -1;
  __pyx_t_157[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1370
 *     [1, 9, 0, 2, 3, 4, 2, 4, 6, 4, 3, 8, -1, -1, -1, -1],
 *     [1, 9, 4, 1, 4, 2, 2, 4, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 1, 3, 8, 6, 1, 8, 4, 6, 6, 10, 1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 1, 0, 10, 0, 6, 6, 0, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 6, 3, 4, 3, 8, 6, 10, 3, 0, 3, 9, 10, 9, 3, -1],
 */
  __pyx_t_158[0] = 8;
  __pyx_t_158[1] = 1;
  __pyx_t_158[2] = 3;
  __pyx_t_158[3] = 8;
  __pyx_t_158[4] = 6;
  __pyx_t_158[5] = 1;
  __pyx_t_158[6] = 8;
  __pyx_t_158[7] = 4;
  __pyx_t_158[8] = 6;
  __pyx_t_158[9] = 6;
  __pyx_t_158[10] = 10;
  __pyx_t_158[11] = 1;
  __pyx_t_158[12] = -1;
  __pyx_t_158[13] = -1;
  __pyx_t_158[14] = -1;
  __pyx_t_158[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1371
 *     [1, 9, 4, 1, 4, 2, 2, 4, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 1, 3, 8, 6, 1, 8, 4, 6, 6, 10, 1, -1, -1, -1, -1],
 *     [10, 1, 0, 10, 0, 6, 6, 0, 4, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 6, 3, 4, 3, 8, 6, 10, 3, 0, 3, 9, 10, 9, 3, -1],
 *     [10, 9, 4, 6, 10, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_159[0] = 10;
  __pyx_t_159[1] = 1;
  __pyx_t_159[2] = 0;
  __pyx_t_159[3] = 10;
  __pyx_t_159[4] = 0;
  __pyx_t_159[5] = 6;
  __pyx_t_159[6] = 6;
  __pyx_t_159[7] = 0;
  __pyx_t_159[8] = 4;
  __pyx_t_159[9] = -1;
  __pyx_t_159[10] = -1;
  __pyx_t_159[11] = -1;
  __pyx_t_159[12] = -1;
  __pyx_t_159[13] = -1;
  __pyx_t_159[14] = -1;
  __pyx_t_159[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1372
 *     [8, 1, 3, 8, 6, 1, 8, 4, 6, 6, 10, 1, -1, -1, -1, -1],
 *     [10, 1, 0, 10, 0, 6, 6, 0, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 6, 3, 4, 3, 8, 6, 10, 3, 0, 3, 9, 10, 9, 3, -1],             # <<<<<<<<<<<<<<
 *     [10, 9, 4, 6, 10, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 9, 5, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_160[0] = 4;
  __pyx_t_160[1] = 6;
  __pyx_t_160[2] = 3;
  __pyx_t_160[3] = 4;
  __pyx_t_160[4] = 3;
  __pyx_t_160[5] = 8;
  __pyx_t_160[6] = 6;
  __pyx_t_160[7] = 10;
  __pyx_t_160[8] = 3;
  __pyx_t_160[9] = 0;
  __pyx_t_160[10] = 3;
  __pyx_t_160[11] = 9;
  __pyx_t_160[12] = 10;
  __pyx_t_160[13] = 9;
  __pyx_t_160[14] = 3;
  __pyx_t_160[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1373
 *     [10, 1, 0, 10, 0, 6, 6, 0, 4, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 6, 3, 4, 3, 8, 6, 10, 3, 0, 3, 9, 10, 9, 3, -1],
 *     [10, 9, 4, 6, 10, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 9, 5, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, 4, 9, 5, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_161[0] = 10;
  __pyx_t_161[1] = 9;
  __pyx_t_161[2] = 4;
  __pyx_t_161[3] = 6;
  __pyx_t_161[4] = 10;
  __pyx_t_161[5] = 4;
  __pyx_t_161[6] = -1;
  __pyx_t_161[7] = -1;
  __pyx_t_161[8] = -1;
  __pyx_t_161[9] = -1;
  __pyx_t_161[10] = -1;
  __pyx_t_161[11] = -1;
  __pyx_t_161[12] = -1;
  __pyx_t_161[13] = -1;
  __pyx_t_161[14] = -1;
  __pyx_t_161[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1374
 *     [4, 6, 3, 4, 3, 8, 6, 10, 3, 0, 3, 9, 10, 9, 3, -1],
 *     [10, 9, 4, 6, 10, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 9, 5, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 8, 3, 4, 9, 5, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 0, 1, 5, 4, 0, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_162[0] = 4;
  __pyx_t_162[1] = 9;
  __pyx_t_162[2] = 5;
  __pyx_t_162[3] = 7;
  __pyx_t_162[4] = 6;
  __pyx_t_162[5] = 11;
  __pyx_t_162[6] = -1;
  __pyx_t_162[7] = -1;
  __pyx_t_162[8] = -1;
  __pyx_t_162[9] = -1;
  __pyx_t_162[10] = -1;
  __pyx_t_162[11] = -1;
  __pyx_t_162[12] = -1;
  __pyx_t_162[13] = -1;
  __pyx_t_162[14] = -1;
  __pyx_t_162[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1375
 *     [10, 9, 4, 6, 10, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 9, 5, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, 4, 9, 5, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [5, 0, 1, 5, 4, 0, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 7, 6, 8, 3, 4, 3, 5, 4, 3, 1, 5, -1, -1, -1, -1],
 */
  __pyx_t_163[0] = 0;
  __pyx_t_163[1] = 8;
  __pyx_t_163[2] = 3;
  __pyx_t_163[3] = 4;
  __pyx_t_163[4] = 9;
  __pyx_t_163[5] = 5;
  __pyx_t_163[6] = 11;
  __pyx_t_163[7] = 7;
  __pyx_t_163[8] = 6;
  __pyx_t_163[9] = -1;
  __pyx_t_163[10] = -1;
  __pyx_t_163[11] = -1;
  __pyx_t_163[12] = -1;
  __pyx_t_163[13] = -1;
  __pyx_t_163[14] = -1;
  __pyx_t_163[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1376
 *     [4, 9, 5, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, 4, 9, 5, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 0, 1, 5, 4, 0, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [11, 7, 6, 8, 3, 4, 3, 5, 4, 3, 1, 5, -1, -1, -1, -1],
 *     [9, 5, 4, 10, 1, 2, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_164[0] = 5;
  __pyx_t_164[1] = 0;
  __pyx_t_164[2] = 1;
  __pyx_t_164[3] = 5;
  __pyx_t_164[4] = 4;
  __pyx_t_164[5] = 0;
  __pyx_t_164[6] = 7;
  __pyx_t_164[7] = 6;
  __pyx_t_164[8] = 11;
  __pyx_t_164[9] = -1;
  __pyx_t_164[10] = -1;
  __pyx_t_164[11] = -1;
  __pyx_t_164[12] = -1;
  __pyx_t_164[13] = -1;
  __pyx_t_164[14] = -1;
  __pyx_t_164[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1377
 *     [0, 8, 3, 4, 9, 5, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 0, 1, 5, 4, 0, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 7, 6, 8, 3, 4, 3, 5, 4, 3, 1, 5, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 5, 4, 10, 1, 2, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [6, 11, 7, 1, 2, 10, 0, 8, 3, 4, 9, 5, -1, -1, -1, -1],
 */
  __pyx_t_165[0] = 11;
  __pyx_t_165[1] = 7;
  __pyx_t_165[2] = 6;
  __pyx_t_165[3] = 8;
  __pyx_t_165[4] = 3;
  __pyx_t_165[5] = 4;
  __pyx_t_165[6] = 3;
  __pyx_t_165[7] = 5;
  __pyx_t_165[8] = 4;
  __pyx_t_165[9] = 3;
  __pyx_t_165[10] = 1;
  __pyx_t_165[11] = 5;
  __pyx_t_165[12] = -1;
  __pyx_t_165[13] = -1;
  __pyx_t_165[14] = -1;
  __pyx_t_165[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1378
 *     [5, 0, 1, 5, 4, 0, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 7, 6, 8, 3, 4, 3, 5, 4, 3, 1, 5, -1, -1, -1, -1],
 *     [9, 5, 4, 10, 1, 2, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [6, 11, 7, 1, 2, 10, 0, 8, 3, 4, 9, 5, -1, -1, -1, -1],
 *     [7, 6, 11, 5, 4, 10, 4, 2, 10, 4, 0, 2, -1, -1, -1, -1],
 */
  __pyx_t_166[0] = 9;
  __pyx_t_166[1] = 5;
  __pyx_t_166[2] = 4;
  __pyx_t_166[3] = 10;
  __pyx_t_166[4] = 1;
  __pyx_t_166[5] = 2;
  __pyx_t_166[6] = 7;
  __pyx_t_166[7] = 6;
  __pyx_t_166[8] = 11;
  __pyx_t_166[9] = -1;
  __pyx_t_166[10] = -1;
  __pyx_t_166[11] = -1;
  __pyx_t_166[12] = -1;
  __pyx_t_166[13] = -1;
  __pyx_t_166[14] = -1;
  __pyx_t_166[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1379
 *     [11, 7, 6, 8, 3, 4, 3, 5, 4, 3, 1, 5, -1, -1, -1, -1],
 *     [9, 5, 4, 10, 1, 2, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [6, 11, 7, 1, 2, 10, 0, 8, 3, 4, 9, 5, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [7, 6, 11, 5, 4, 10, 4, 2, 10, 4, 0, 2, -1, -1, -1, -1],
 *     [3, 4, 8, 3, 5, 4, 3, 2, 5, 10, 5, 2, 11, 7, 6, -1],
 */
  __pyx_t_167[0] = 6;
  __pyx_t_167[1] = 11;
  __pyx_t_167[2] = 7;
  __pyx_t_167[3] = 1;
  __pyx_t_167[4] = 2;
  __pyx_t_167[5] = 10;
  __pyx_t_167[6] = 0;
  __pyx_t_167[7] = 8;
  __pyx_t_167[8] = 3;
  __pyx_t_167[9] = 4;
  __pyx_t_167[10] = 9;
  __pyx_t_167[11] = 5;
  __pyx_t_167[12] = -1;
  __pyx_t_167[13] = -1;
  __pyx_t_167[14] = -1;
  __pyx_t_167[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1380
 *     [9, 5, 4, 10, 1, 2, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [6, 11, 7, 1, 2, 10, 0, 8, 3, 4, 9, 5, -1, -1, -1, -1],
 *     [7, 6, 11, 5, 4, 10, 4, 2, 10, 4, 0, 2, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 4, 8, 3, 5, 4, 3, 2, 5, 10, 5, 2, 11, 7, 6, -1],
 *     [7, 2, 3, 7, 6, 2, 5, 4, 9, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_168[0] = 7;
  __pyx_t_168[1] = 6;
  __pyx_t_168[2] = 11;
  __pyx_t_168[3] = 5;
  __pyx_t_168[4] = 4;
  __pyx_t_168[5] = 10;
  __pyx_t_168[6] = 4;
  __pyx_t_168[7] = 2;
  __pyx_t_168[8] = 10;
  __pyx_t_168[9] = 4;
  __pyx_t_168[10] = 0;
  __pyx_t_168[11] = 2;
  __pyx_t_168[12] = -1;
  __pyx_t_168[13] = -1;
  __pyx_t_168[14] = -1;
  __pyx_t_168[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1381
 *     [6, 11, 7, 1, 2, 10, 0, 8, 3, 4, 9, 5, -1, -1, -1, -1],
 *     [7, 6, 11, 5, 4, 10, 4, 2, 10, 4, 0, 2, -1, -1, -1, -1],
 *     [3, 4, 8, 3, 5, 4, 3, 2, 5, 10, 5, 2, 11, 7, 6, -1],             # <<<<<<<<<<<<<<
 *     [7, 2, 3, 7, 6, 2, 5, 4, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 5, 4, 0, 8, 6, 0, 6, 2, 6, 8, 7, -1, -1, -1, -1],
 */
  __pyx_t_169[0] = 3;
  __pyx_t_169[1] = 4;
  __pyx_t_169[2] = 8;
  __pyx_t_169[3] = 3;
  __pyx_t_169[4] = 5;
  __pyx_t_169[5] = 4;
  __pyx_t_169[6] = 3;
  __pyx_t_169[7] = 2;
  __pyx_t_169[8] = 5;
  __pyx_t_169[9] = 10;
  __pyx_t_169[10] = 5;
  __pyx_t_169[11] = 2;
  __pyx_t_169[12] = 11;
  __pyx_t_169[13] = 7;
  __pyx_t_169[14] = 6;
  __pyx_t_169[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1382
 *     [7, 6, 11, 5, 4, 10, 4, 2, 10, 4, 0, 2, -1, -1, -1, -1],
 *     [3, 4, 8, 3, 5, 4, 3, 2, 5, 10, 5, 2, 11, 7, 6, -1],
 *     [7, 2, 3, 7, 6, 2, 5, 4, 9, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 5, 4, 0, 8, 6, 0, 6, 2, 6, 8, 7, -1, -1, -1, -1],
 *     [3, 6, 2, 3, 7, 6, 1, 5, 0, 5, 4, 0, -1, -1, -1, -1],
 */
  __pyx_t_170[0] = 7;
  __pyx_t_170[1] = 2;
  __pyx_t_170[2] = 3;
  __pyx_t_170[3] = 7;
  __pyx_t_170[4] = 6;
  __pyx_t_170[5] = 2;
  __pyx_t_170[6] = 5;
  __pyx_t_170[7] = 4;
  __pyx_t_170[8] = 9;
  __pyx_t_170[9] = -1;
  __pyx_t_170[10] = -1;
  __pyx_t_170[11] = -1;
  __pyx_t_170[12] = -1;
  __pyx_t_170[13] = -1;
  __pyx_t_170[14] = -1;
  __pyx_t_170[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1383
 *     [3, 4, 8, 3, 5, 4, 3, 2, 5, 10, 5, 2, 11, 7, 6, -1],
 *     [7, 2, 3, 7, 6, 2, 5, 4, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 5, 4, 0, 8, 6, 0, 6, 2, 6, 8, 7, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 6, 2, 3, 7, 6, 1, 5, 0, 5, 4, 0, -1, -1, -1, -1],
 *     [6, 2, 8, 6, 8, 7, 2, 1, 8, 4, 8, 5, 1, 5, 8, -1],
 */
  __pyx_t_171[0] = 9;
  __pyx_t_171[1] = 5;
  __pyx_t_171[2] = 4;
  __pyx_t_171[3] = 0;
  __pyx_t_171[4] = 8;
  __pyx_t_171[5] = 6;
  __pyx_t_171[6] = 0;
  __pyx_t_171[7] = 6;
  __pyx_t_171[8] = 2;
  __pyx_t_171[9] = 6;
  __pyx_t_171[10] = 8;
  __pyx_t_171[11] = 7;
  __pyx_t_171[12] = -1;
  __pyx_t_171[13] = -1;
  __pyx_t_171[14] = -1;
  __pyx_t_171[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1384
 *     [7, 2, 3, 7, 6, 2, 5, 4, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 5, 4, 0, 8, 6, 0, 6, 2, 6, 8, 7, -1, -1, -1, -1],
 *     [3, 6, 2, 3, 7, 6, 1, 5, 0, 5, 4, 0, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [6, 2, 8, 6, 8, 7, 2, 1, 8, 4, 8, 5, 1, 5, 8, -1],
 *     [9, 5, 4, 10, 1, 6, 1, 7, 6, 1, 3, 7, -1, -1, -1, -1],
 */
  __pyx_t_172[0] = 3;
  __pyx_t_172[1] = 6;
  __pyx_t_172[2] = 2;
  __pyx_t_172[3] = 3;
  __pyx_t_172[4] = 7;
  __pyx_t_172[5] = 6;
  __pyx_t_172[6] = 1;
  __pyx_t_172[7] = 5;
  __pyx_t_172[8] = 0;
  __pyx_t_172[9] = 5;
  __pyx_t_172[10] = 4;
  __pyx_t_172[11] = 0;
  __pyx_t_172[12] = -1;
  __pyx_t_172[13] = -1;
  __pyx_t_172[14] = -1;
  __pyx_t_172[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1385
 *     [9, 5, 4, 0, 8, 6, 0, 6, 2, 6, 8, 7, -1, -1, -1, -1],
 *     [3, 6, 2, 3, 7, 6, 1, 5, 0, 5, 4, 0, -1, -1, -1, -1],
 *     [6, 2, 8, 6, 8, 7, 2, 1, 8, 4, 8, 5, 1, 5, 8, -1],             # <<<<<<<<<<<<<<
 *     [9, 5, 4, 10, 1, 6, 1, 7, 6, 1, 3, 7, -1, -1, -1, -1],
 *     [1, 6, 10, 1, 7, 6, 1, 0, 7, 8, 7, 0, 9, 5, 4, -1],
 */
  __pyx_t_173[0] = 6;
  __pyx_t_173[1] = 2;
  __pyx_t_173[2] = 8;
  __pyx_t_173[3] = 6;
  __pyx_t_173[4] = 8;
  __pyx_t_173[5] = 7;
  __pyx_t_173[6] = 2;
  __pyx_t_173[7] = 1;
  __pyx_t_173[8] = 8;
  __pyx_t_173[9] = 4;
  __pyx_t_173[10] = 8;
  __pyx_t_173[11] = 5;
  __pyx_t_173[12] = 1;
  __pyx_t_173[13] = 5;
  __pyx_t_173[14] = 8;
  __pyx_t_173[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1386
 *     [3, 6, 2, 3, 7, 6, 1, 5, 0, 5, 4, 0, -1, -1, -1, -1],
 *     [6, 2, 8, 6, 8, 7, 2, 1, 8, 4, 8, 5, 1, 5, 8, -1],
 *     [9, 5, 4, 10, 1, 6, 1, 7, 6, 1, 3, 7, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 6, 10, 1, 7, 6, 1, 0, 7, 8, 7, 0, 9, 5, 4, -1],
 *     [4, 0, 10, 4, 10, 5, 0, 3, 10, 6, 10, 7, 3, 7, 10, -1],
 */
  __pyx_t_174[0] = 9;
  __pyx_t_174[1] = 5;
  __pyx_t_174[2] = 4;
  __pyx_t_174[3] = 10;
  __pyx_t_174[4] = 1;
  __pyx_t_174[5] = 6;
  __pyx_t_174[6] = 1;
  __pyx_t_174[7] = 7;
  __pyx_t_174[8] = 6;
  __pyx_t_174[9] = 1;
  __pyx_t_174[10] = 3;
  __pyx_t_174[11] = 7;
  __pyx_t_174[12] = -1;
  __pyx_t_174[13] = -1;
  __pyx_t_174[14] = -1;
  __pyx_t_174[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1387
 *     [6, 2, 8, 6, 8, 7, 2, 1, 8, 4, 8, 5, 1, 5, 8, -1],
 *     [9, 5, 4, 10, 1, 6, 1, 7, 6, 1, 3, 7, -1, -1, -1, -1],
 *     [1, 6, 10, 1, 7, 6, 1, 0, 7, 8, 7, 0, 9, 5, 4, -1],             # <<<<<<<<<<<<<<
 *     [4, 0, 10, 4, 10, 5, 0, 3, 10, 6, 10, 7, 3, 7, 10, -1],
 *     [7, 6, 10, 7, 10, 8, 5, 4, 10, 4, 8, 10, -1, -1, -1, -1],
 */
  __pyx_t_175[0] = 1;
  __pyx_t_175[1] = 6;
  __pyx_t_175[2] = 10;
  __pyx_t_175[3] = 1;
  __pyx_t_175[4] = 7;
  __pyx_t_175[5] = 6;
  __pyx_t_175[6] = 1;
  __pyx_t_175[7] = 0;
  __pyx_t_175[8] = 7;
  __pyx_t_175[9] = 8;
  __pyx_t_175[10] = 7;
  __pyx_t_175[11] = 0;
  __pyx_t_175[12] = 9;
  __pyx_t_175[13] = 5;
  __pyx_t_175[14] = 4;
  __pyx_t_175[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1388
 *     [9, 5, 4, 10, 1, 6, 1, 7, 6, 1, 3, 7, -1, -1, -1, -1],
 *     [1, 6, 10, 1, 7, 6, 1, 0, 7, 8, 7, 0, 9, 5, 4, -1],
 *     [4, 0, 10, 4, 10, 5, 0, 3, 10, 6, 10, 7, 3, 7, 10, -1],             # <<<<<<<<<<<<<<
 *     [7, 6, 10, 7, 10, 8, 5, 4, 10, 4, 8, 10, -1, -1, -1, -1],
 *     [6, 9, 5, 6, 11, 9, 11, 8, 9, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_176[0] = 4;
  __pyx_t_176[1] = 0;
  __pyx_t_176[2] = 10;
  __pyx_t_176[3] = 4;
  __pyx_t_176[4] = 10;
  __pyx_t_176[5] = 5;
  __pyx_t_176[6] = 0;
  __pyx_t_176[7] = 3;
  __pyx_t_176[8] = 10;
  __pyx_t_176[9] = 6;
  __pyx_t_176[10] = 10;
  __pyx_t_176[11] = 7;
  __pyx_t_176[12] = 3;
  __pyx_t_176[13] = 7;
  __pyx_t_176[14] = 10;
  __pyx_t_176[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1389
 *     [1, 6, 10, 1, 7, 6, 1, 0, 7, 8, 7, 0, 9, 5, 4, -1],
 *     [4, 0, 10, 4, 10, 5, 0, 3, 10, 6, 10, 7, 3, 7, 10, -1],
 *     [7, 6, 10, 7, 10, 8, 5, 4, 10, 4, 8, 10, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [6, 9, 5, 6, 11, 9, 11, 8, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 6, 11, 0, 6, 3, 0, 5, 6, 0, 9, 5, -1, -1, -1, -1],
 */
  __pyx_t_177[0] = 7;
  __pyx_t_177[1] = 6;
  __pyx_t_177[2] = 10;
  __pyx_t_177[3] = 7;
  __pyx_t_177[4] = 10;
  __pyx_t_177[5] = 8;
  __pyx_t_177[6] = 5;
  __pyx_t_177[7] = 4;
  __pyx_t_177[8] = 10;
  __pyx_t_177[9] = 4;
  __pyx_t_177[10] = 8;
  __pyx_t_177[11] = 10;
  __pyx_t_177[12] = -1;
  __pyx_t_177[13] = -1;
  __pyx_t_177[14] = -1;
  __pyx_t_177[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1390
 *     [4, 0, 10, 4, 10, 5, 0, 3, 10, 6, 10, 7, 3, 7, 10, -1],
 *     [7, 6, 10, 7, 10, 8, 5, 4, 10, 4, 8, 10, -1, -1, -1, -1],
 *     [6, 9, 5, 6, 11, 9, 11, 8, 9, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 6, 11, 0, 6, 3, 0, 5, 6, 0, 9, 5, -1, -1, -1, -1],
 *     [0, 11, 8, 0, 5, 11, 0, 1, 5, 5, 6, 11, -1, -1, -1, -1],
 */
  __pyx_t_178[0] = 6;
  __pyx_t_178[1] = 9;
  __pyx_t_178[2] = 5;
  __pyx_t_178[3] = 6;
  __pyx_t_178[4] = 11;
  __pyx_t_178[5] = 9;
  __pyx_t_178[6] = 11;
  __pyx_t_178[7] = 8;
  __pyx_t_178[8] = 9;
  __pyx_t_178[9] = -1;
  __pyx_t_178[10] = -1;
  __pyx_t_178[11] = -1;
  __pyx_t_178[12] = -1;
  __pyx_t_178[13] = -1;
  __pyx_t_178[14] = -1;
  __pyx_t_178[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1391
 *     [7, 6, 10, 7, 10, 8, 5, 4, 10, 4, 8, 10, -1, -1, -1, -1],
 *     [6, 9, 5, 6, 11, 9, 11, 8, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 6, 11, 0, 6, 3, 0, 5, 6, 0, 9, 5, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 11, 8, 0, 5, 11, 0, 1, 5, 5, 6, 11, -1, -1, -1, -1],
 *     [6, 11, 3, 6, 3, 5, 5, 3, 1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_179[0] = 3;
  __pyx_t_179[1] = 6;
  __pyx_t_179[2] = 11;
  __pyx_t_179[3] = 0;
  __pyx_t_179[4] = 6;
  __pyx_t_179[5] = 3;
  __pyx_t_179[6] = 0;
  __pyx_t_179[7] = 5;
  __pyx_t_179[8] = 6;
  __pyx_t_179[9] = 0;
  __pyx_t_179[10] = 9;
  __pyx_t_179[11] = 5;
  __pyx_t_179[12] = -1;
  __pyx_t_179[13] = -1;
  __pyx_t_179[14] = -1;
  __pyx_t_179[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1392
 *     [6, 9, 5, 6, 11, 9, 11, 8, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 6, 11, 0, 6, 3, 0, 5, 6, 0, 9, 5, -1, -1, -1, -1],
 *     [0, 11, 8, 0, 5, 11, 0, 1, 5, 5, 6, 11, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [6, 11, 3, 6, 3, 5, 5, 3, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, 9, 5, 11, 9, 11, 8, 11, 5, 6, -1, -1, -1, -1],
 */
  __pyx_t_180[0] = 0;
  __pyx_t_180[1] = 11;
  __pyx_t_180[2] = 8;
  __pyx_t_180[3] = 0;
  __pyx_t_180[4] = 5;
  __pyx_t_180[5] = 11;
  __pyx_t_180[6] = 0;
  __pyx_t_180[7] = 1;
  __pyx_t_180[8] = 5;
  __pyx_t_180[9] = 5;
  __pyx_t_180[10] = 6;
  __pyx_t_180[11] = 11;
  __pyx_t_180[12] = -1;
  __pyx_t_180[13] = -1;
  __pyx_t_180[14] = -1;
  __pyx_t_180[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1393
 *     [3, 6, 11, 0, 6, 3, 0, 5, 6, 0, 9, 5, -1, -1, -1, -1],
 *     [0, 11, 8, 0, 5, 11, 0, 1, 5, 5, 6, 11, -1, -1, -1, -1],
 *     [6, 11, 3, 6, 3, 5, 5, 3, 1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 2, 10, 9, 5, 11, 9, 11, 8, 11, 5, 6, -1, -1, -1, -1],
 *     [0, 11, 3, 0, 6, 11, 0, 9, 6, 5, 6, 9, 1, 2, 10, -1],
 */
  __pyx_t_181[0] = 6;
  __pyx_t_181[1] = 11;
  __pyx_t_181[2] = 3;
  __pyx_t_181[3] = 6;
  __pyx_t_181[4] = 3;
  __pyx_t_181[5] = 5;
  __pyx_t_181[6] = 5;
  __pyx_t_181[7] = 3;
  __pyx_t_181[8] = 1;
  __pyx_t_181[9] = -1;
  __pyx_t_181[10] = -1;
  __pyx_t_181[11] = -1;
  __pyx_t_181[12] = -1;
  __pyx_t_181[13] = -1;
  __pyx_t_181[14] = -1;
  __pyx_t_181[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1394
 *     [0, 11, 8, 0, 5, 11, 0, 1, 5, 5, 6, 11, -1, -1, -1, -1],
 *     [6, 11, 3, 6, 3, 5, 5, 3, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, 9, 5, 11, 9, 11, 8, 11, 5, 6, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 11, 3, 0, 6, 11, 0, 9, 6, 5, 6, 9, 1, 2, 10, -1],
 *     [11, 8, 5, 11, 5, 6, 8, 0, 5, 10, 5, 2, 0, 2, 5, -1],
 */
  __pyx_t_182[0] = 1;
  __pyx_t_182[1] = 2;
  __pyx_t_182[2] = 10;
  __pyx_t_182[3] = 9;
  __pyx_t_182[4] = 5;
  __pyx_t_182[5] = 11;
  __pyx_t_182[6] = 9;
  __pyx_t_182[7] = 11;
  __pyx_t_182[8] = 8;
  __pyx_t_182[9] = 11;
  __pyx_t_182[10] = 5;
  __pyx_t_182[11] = 6;
  __pyx_t_182[12] = -1;
  __pyx_t_182[13] = -1;
  __pyx_t_182[14] = -1;
  __pyx_t_182[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1395
 *     [6, 11, 3, 6, 3, 5, 5, 3, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 10, 9, 5, 11, 9, 11, 8, 11, 5, 6, -1, -1, -1, -1],
 *     [0, 11, 3, 0, 6, 11, 0, 9, 6, 5, 6, 9, 1, 2, 10, -1],             # <<<<<<<<<<<<<<
 *     [11, 8, 5, 11, 5, 6, 8, 0, 5, 10, 5, 2, 0, 2, 5, -1],
 *     [6, 11, 3, 6, 3, 5, 2, 10, 3, 10, 5, 3, -1, -1, -1, -1],
 */
  __pyx_t_183[0] = 0;
  __pyx_t_183[1] = 11;
  __pyx_t_183[2] = 3;
  __pyx_t_183[3] = 0;
  __pyx_t_183[4] = 6;
  __pyx_t_183[5] = 11;
  __pyx_t_183[6] = 0;
  __pyx_t_183[7] = 9;
  __pyx_t_183[8] = 6;
  __pyx_t_183[9] = 5;
  __pyx_t_183[10] = 6;
  __pyx_t_183[11] = 9;
  __pyx_t_183[12] = 1;
  __pyx_t_183[13] = 2;
  __pyx_t_183[14] = 10;
  __pyx_t_183[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1396
 *     [1, 2, 10, 9, 5, 11, 9, 11, 8, 11, 5, 6, -1, -1, -1, -1],
 *     [0, 11, 3, 0, 6, 11, 0, 9, 6, 5, 6, 9, 1, 2, 10, -1],
 *     [11, 8, 5, 11, 5, 6, 8, 0, 5, 10, 5, 2, 0, 2, 5, -1],             # <<<<<<<<<<<<<<
 *     [6, 11, 3, 6, 3, 5, 2, 10, 3, 10, 5, 3, -1, -1, -1, -1],
 *     [5, 8, 9, 5, 2, 8, 5, 6, 2, 3, 8, 2, -1, -1, -1, -1],
 */
  __pyx_t_184[0] = 11;
  __pyx_t_184[1] = 8;
  __pyx_t_184[2] = 5;
  __pyx_t_184[3] = 11;
  __pyx_t_184[4] = 5;
  __pyx_t_184[5] = 6;
  __pyx_t_184[6] = 8;
  __pyx_t_184[7] = 0;
  __pyx_t_184[8] = 5;
  __pyx_t_184[9] = 10;
  __pyx_t_184[10] = 5;
  __pyx_t_184[11] = 2;
  __pyx_t_184[12] = 0;
  __pyx_t_184[13] = 2;
  __pyx_t_184[14] = 5;
  __pyx_t_184[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1397
 *     [0, 11, 3, 0, 6, 11, 0, 9, 6, 5, 6, 9, 1, 2, 10, -1],
 *     [11, 8, 5, 11, 5, 6, 8, 0, 5, 10, 5, 2, 0, 2, 5, -1],
 *     [6, 11, 3, 6, 3, 5, 2, 10, 3, 10, 5, 3, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [5, 8, 9, 5, 2, 8, 5, 6, 2, 3, 8, 2, -1, -1, -1, -1],
 *     [9, 5, 6, 9, 6, 0, 0, 6, 2, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_185[0] = 6;
  __pyx_t_185[1] = 11;
  __pyx_t_185[2] = 3;
  __pyx_t_185[3] = 6;
  __pyx_t_185[4] = 3;
  __pyx_t_185[5] = 5;
  __pyx_t_185[6] = 2;
  __pyx_t_185[7] = 10;
  __pyx_t_185[8] = 3;
  __pyx_t_185[9] = 10;
  __pyx_t_185[10] = 5;
  __pyx_t_185[11] = 3;
  __pyx_t_185[12] = -1;
  __pyx_t_185[13] = -1;
  __pyx_t_185[14] = -1;
  __pyx_t_185[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1398
 *     [11, 8, 5, 11, 5, 6, 8, 0, 5, 10, 5, 2, 0, 2, 5, -1],
 *     [6, 11, 3, 6, 3, 5, 2, 10, 3, 10, 5, 3, -1, -1, -1, -1],
 *     [5, 8, 9, 5, 2, 8, 5, 6, 2, 3, 8, 2, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 5, 6, 9, 6, 0, 0, 6, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 5, 8, 1, 8, 0, 5, 6, 8, 3, 8, 2, 6, 2, 8, -1],
 */
  __pyx_t_186[0] = 5;
  __pyx_t_186[1] = 8;
  __pyx_t_186[2] = 9;
  __pyx_t_186[3] = 5;
  __pyx_t_186[4] = 2;
  __pyx_t_186[5] = 8;
  __pyx_t_186[6] = 5;
  __pyx_t_186[7] = 6;
  __pyx_t_186[8] = 2;
  __pyx_t_186[9] = 3;
  __pyx_t_186[10] = 8;
  __pyx_t_186[11] = 2;
  __pyx_t_186[12] = -1;
  __pyx_t_186[13] = -1;
  __pyx_t_186[14] = -1;
  __pyx_t_186[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1399
 *     [6, 11, 3, 6, 3, 5, 2, 10, 3, 10, 5, 3, -1, -1, -1, -1],
 *     [5, 8, 9, 5, 2, 8, 5, 6, 2, 3, 8, 2, -1, -1, -1, -1],
 *     [9, 5, 6, 9, 6, 0, 0, 6, 2, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 5, 8, 1, 8, 0, 5, 6, 8, 3, 8, 2, 6, 2, 8, -1],
 *     [1, 5, 6, 2, 1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_187[0] = 9;
  __pyx_t_187[1] = 5;
  __pyx_t_187[2] = 6;
  __pyx_t_187[3] = 9;
  __pyx_t_187[4] = 6;
  __pyx_t_187[5] = 0;
  __pyx_t_187[6] = 0;
  __pyx_t_187[7] = 6;
  __pyx_t_187[8] = 2;
  __pyx_t_187[9] = -1;
  __pyx_t_187[10] = -1;
  __pyx_t_187[11] = -1;
  __pyx_t_187[12] = -1;
  __pyx_t_187[13] = -1;
  __pyx_t_187[14] = -1;
  __pyx_t_187[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1400
 *     [5, 8, 9, 5, 2, 8, 5, 6, 2, 3, 8, 2, -1, -1, -1, -1],
 *     [9, 5, 6, 9, 6, 0, 0, 6, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 5, 8, 1, 8, 0, 5, 6, 8, 3, 8, 2, 6, 2, 8, -1],             # <<<<<<<<<<<<<<
 *     [1, 5, 6, 2, 1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 3, 6, 1, 6, 10, 3, 8, 6, 5, 6, 9, 8, 9, 6, -1],
 */
  __pyx_t_188[0] = 1;
  __pyx_t_188[1] = 5;
  __pyx_t_188[2] = 8;
  __pyx_t_188[3] = 1;
  __pyx_t_188[4] = 8;
  __pyx_t_188[5] = 0;
  __pyx_t_188[6] = 5;
  __pyx_t_188[7] = 6;
  __pyx_t_188[8] = 8;
  __pyx_t_188[9] = 3;
  __pyx_t_188[10] = 8;
  __pyx_t_188[11] = 2;
  __pyx_t_188[12] = 6;
  __pyx_t_188[13] = 2;
  __pyx_t_188[14] = 8;
  __pyx_t_188[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1401
 *     [9, 5, 6, 9, 6, 0, 0, 6, 2, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 5, 8, 1, 8, 0, 5, 6, 8, 3, 8, 2, 6, 2, 8, -1],
 *     [1, 5, 6, 2, 1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 3, 6, 1, 6, 10, 3, 8, 6, 5, 6, 9, 8, 9, 6, -1],
 *     [10, 1, 0, 10, 0, 6, 9, 5, 0, 5, 6, 0, -1, -1, -1, -1],
 */
  __pyx_t_189[0] = 1;
  __pyx_t_189[1] = 5;
  __pyx_t_189[2] = 6;
  __pyx_t_189[3] = 2;
  __pyx_t_189[4] = 1;
  __pyx_t_189[5] = 6;
  __pyx_t_189[6] = -1;
  __pyx_t_189[7] = -1;
  __pyx_t_189[8] = -1;
  __pyx_t_189[9] = -1;
  __pyx_t_189[10] = -1;
  __pyx_t_189[11] = -1;
  __pyx_t_189[12] = -1;
  __pyx_t_189[13] = -1;
  __pyx_t_189[14] = -1;
  __pyx_t_189[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1402
 *     [1, 5, 8, 1, 8, 0, 5, 6, 8, 3, 8, 2, 6, 2, 8, -1],
 *     [1, 5, 6, 2, 1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 3, 6, 1, 6, 10, 3, 8, 6, 5, 6, 9, 8, 9, 6, -1],             # <<<<<<<<<<<<<<
 *     [10, 1, 0, 10, 0, 6, 9, 5, 0, 5, 6, 0, -1, -1, -1, -1],
 *     [0, 3, 8, 5, 6, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_190[0] = 1;
  __pyx_t_190[1] = 3;
  __pyx_t_190[2] = 6;
  __pyx_t_190[3] = 1;
  __pyx_t_190[4] = 6;
  __pyx_t_190[5] = 10;
  __pyx_t_190[6] = 3;
  __pyx_t_190[7] = 8;
  __pyx_t_190[8] = 6;
  __pyx_t_190[9] = 5;
  __pyx_t_190[10] = 6;
  __pyx_t_190[11] = 9;
  __pyx_t_190[12] = 8;
  __pyx_t_190[13] = 9;
  __pyx_t_190[14] = 6;
  __pyx_t_190[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1403
 *     [1, 5, 6, 2, 1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 3, 6, 1, 6, 10, 3, 8, 6, 5, 6, 9, 8, 9, 6, -1],
 *     [10, 1, 0, 10, 0, 6, 9, 5, 0, 5, 6, 0, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 3, 8, 5, 6, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_191[0] = 10;
  __pyx_t_191[1] = 1;
  __pyx_t_191[2] = 0;
  __pyx_t_191[3] = 10;
  __pyx_t_191[4] = 0;
  __pyx_t_191[5] = 6;
  __pyx_t_191[6] = 9;
  __pyx_t_191[7] = 5;
  __pyx_t_191[8] = 0;
  __pyx_t_191[9] = 5;
  __pyx_t_191[10] = 6;
  __pyx_t_191[11] = 0;
  __pyx_t_191[12] = -1;
  __pyx_t_191[13] = -1;
  __pyx_t_191[14] = -1;
  __pyx_t_191[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1404
 *     [1, 3, 6, 1, 6, 10, 3, 8, 6, 5, 6, 9, 8, 9, 6, -1],
 *     [10, 1, 0, 10, 0, 6, 9, 5, 0, 5, 6, 0, -1, -1, -1, -1],
 *     [0, 3, 8, 5, 6, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 5, 10, 7, 5, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_192[0] = 0;
  __pyx_t_192[1] = 3;
  __pyx_t_192[2] = 8;
  __pyx_t_192[3] = 5;
  __pyx_t_192[4] = 6;
  __pyx_t_192[5] = 10;
  __pyx_t_192[6] = -1;
  __pyx_t_192[7] = -1;
  __pyx_t_192[8] = -1;
  __pyx_t_192[9] = -1;
  __pyx_t_192[10] = -1;
  __pyx_t_192[11] = -1;
  __pyx_t_192[12] = -1;
  __pyx_t_192[13] = -1;
  __pyx_t_192[14] = -1;
  __pyx_t_192[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1405
 *     [10, 1, 0, 10, 0, 6, 9, 5, 0, 5, 6, 0, -1, -1, -1, -1],
 *     [0, 3, 8, 5, 6, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [11, 5, 10, 7, 5, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 5, 10, 11, 7, 5, 8, 3, 0, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_193[0] = 10;
  __pyx_t_193[1] = 5;
  __pyx_t_193[2] = 6;
  __pyx_t_193[3] = -1;
  __pyx_t_193[4] = -1;
  __pyx_t_193[5] = -1;
  __pyx_t_193[6] = -1;
  __pyx_t_193[7] = -1;
  __pyx_t_193[8] = -1;
  __pyx_t_193[9] = -1;
  __pyx_t_193[10] = -1;
  __pyx_t_193[11] = -1;
  __pyx_t_193[12] = -1;
  __pyx_t_193[13] = -1;
  __pyx_t_193[14] = -1;
  __pyx_t_193[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1406
 *     [0, 3, 8, 5, 6, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 5, 10, 7, 5, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [11, 5, 10, 11, 7, 5, 8, 3, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 11, 7, 5, 10, 11, 1, 9, 0, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_194[0] = 11;
  __pyx_t_194[1] = 5;
  __pyx_t_194[2] = 10;
  __pyx_t_194[3] = 7;
  __pyx_t_194[4] = 5;
  __pyx_t_194[5] = 11;
  __pyx_t_194[6] = -1;
  __pyx_t_194[7] = -1;
  __pyx_t_194[8] = -1;
  __pyx_t_194[9] = -1;
  __pyx_t_194[10] = -1;
  __pyx_t_194[11] = -1;
  __pyx_t_194[12] = -1;
  __pyx_t_194[13] = -1;
  __pyx_t_194[14] = -1;
  __pyx_t_194[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1407
 *     [10, 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 5, 10, 7, 5, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 5, 10, 11, 7, 5, 8, 3, 0, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [5, 11, 7, 5, 10, 11, 1, 9, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 7, 5, 10, 11, 7, 9, 8, 1, 8, 3, 1, -1, -1, -1, -1],
 */
  __pyx_t_195[0] = 11;
  __pyx_t_195[1] = 5;
  __pyx_t_195[2] = 10;
  __pyx_t_195[3] = 11;
  __pyx_t_195[4] = 7;
  __pyx_t_195[5] = 5;
  __pyx_t_195[6] = 8;
  __pyx_t_195[7] = 3;
  __pyx_t_195[8] = 0;
  __pyx_t_195[9] = -1;
  __pyx_t_195[10] = -1;
  __pyx_t_195[11] = -1;
  __pyx_t_195[12] = -1;
  __pyx_t_195[13] = -1;
  __pyx_t_195[14] = -1;
  __pyx_t_195[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1408
 *     [11, 5, 10, 7, 5, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 5, 10, 11, 7, 5, 8, 3, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 11, 7, 5, 10, 11, 1, 9, 0, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 7, 5, 10, 11, 7, 9, 8, 1, 8, 3, 1, -1, -1, -1, -1],
 *     [11, 1, 2, 11, 7, 1, 7, 5, 1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_196[0] = 5;
  __pyx_t_196[1] = 11;
  __pyx_t_196[2] = 7;
  __pyx_t_196[3] = 5;
  __pyx_t_196[4] = 10;
  __pyx_t_196[5] = 11;
  __pyx_t_196[6] = 1;
  __pyx_t_196[7] = 9;
  __pyx_t_196[8] = 0;
  __pyx_t_196[9] = -1;
  __pyx_t_196[10] = -1;
  __pyx_t_196[11] = -1;
  __pyx_t_196[12] = -1;
  __pyx_t_196[13] = -1;
  __pyx_t_196[14] = -1;
  __pyx_t_196[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1409
 *     [11, 5, 10, 11, 7, 5, 8, 3, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 11, 7, 5, 10, 11, 1, 9, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 7, 5, 10, 11, 7, 9, 8, 1, 8, 3, 1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [11, 1, 2, 11, 7, 1, 7, 5, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, 1, 2, 7, 1, 7, 5, 7, 2, 11, -1, -1, -1, -1],
 */
  __pyx_t_197[0] = 10;
  __pyx_t_197[1] = 7;
  __pyx_t_197[2] = 5;
  __pyx_t_197[3] = 10;
  __pyx_t_197[4] = 11;
  __pyx_t_197[5] = 7;
  __pyx_t_197[6] = 9;
  __pyx_t_197[7] = 8;
  __pyx_t_197[8] = 1;
  __pyx_t_197[9] = 8;
  __pyx_t_197[10] = 3;
  __pyx_t_197[11] = 1;
  __pyx_t_197[12] = -1;
  __pyx_t_197[13] = -1;
  __pyx_t_197[14] = -1;
  __pyx_t_197[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1410
 *     [5, 11, 7, 5, 10, 11, 1, 9, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [10, 7, 5, 10, 11, 7, 9, 8, 1, 8, 3, 1, -1, -1, -1, -1],
 *     [11, 1, 2, 11, 7, 1, 7, 5, 1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 8, 3, 1, 2, 7, 1, 7, 5, 7, 2, 11, -1, -1, -1, -1],
 *     [9, 7, 5, 9, 2, 7, 9, 0, 2, 2, 11, 7, -1, -1, -1, -1],
 */
  __pyx_t_198[0] = 11;
  __pyx_t_198[1] = 1;
  __pyx_t_198[2] = 2;
  __pyx_t_198[3] = 11;
  __pyx_t_198[4] = 7;
  __pyx_t_198[5] = 1;
  __pyx_t_198[6] = 7;
  __pyx_t_198[7] = 5;
  __pyx_t_198[8] = 1;
  __pyx_t_198[9] = -1;
  __pyx_t_198[10] = -1;
  __pyx_t_198[11] = -1;
  __pyx_t_198[12] = -1;
  __pyx_t_198[13] = -1;
  __pyx_t_198[14] = -1;
  __pyx_t_198[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1411
 *     [10, 7, 5, 10, 11, 7, 9, 8, 1, 8, 3, 1, -1, -1, -1, -1],
 *     [11, 1, 2, 11, 7, 1, 7, 5, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, 1, 2, 7, 1, 7, 5, 7, 2, 11, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 7, 5, 9, 2, 7, 9, 0, 2, 2, 11, 7, -1, -1, -1, -1],
 *     [7, 5, 2, 7, 2, 11, 5, 9, 2, 3, 2, 8, 9, 8, 2, -1],
 */
  __pyx_t_199[0] = 0;
  __pyx_t_199[1] = 8;
  __pyx_t_199[2] = 3;
  __pyx_t_199[3] = 1;
  __pyx_t_199[4] = 2;
  __pyx_t_199[5] = 7;
  __pyx_t_199[6] = 1;
  __pyx_t_199[7] = 7;
  __pyx_t_199[8] = 5;
  __pyx_t_199[9] = 7;
  __pyx_t_199[10] = 2;
  __pyx_t_199[11] = 11;
  __pyx_t_199[12] = -1;
  __pyx_t_199[13] = -1;
  __pyx_t_199[14] = -1;
  __pyx_t_199[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1412
 *     [11, 1, 2, 11, 7, 1, 7, 5, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, 1, 2, 7, 1, 7, 5, 7, 2, 11, -1, -1, -1, -1],
 *     [9, 7, 5, 9, 2, 7, 9, 0, 2, 2, 11, 7, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [7, 5, 2, 7, 2, 11, 5, 9, 2, 3, 2, 8, 9, 8, 2, -1],
 *     [2, 5, 10, 2, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_200[0] = 9;
  __pyx_t_200[1] = 7;
  __pyx_t_200[2] = 5;
  __pyx_t_200[3] = 9;
  __pyx_t_200[4] = 2;
  __pyx_t_200[5] = 7;
  __pyx_t_200[6] = 9;
  __pyx_t_200[7] = 0;
  __pyx_t_200[8] = 2;
  __pyx_t_200[9] = 2;
  __pyx_t_200[10] = 11;
  __pyx_t_200[11] = 7;
  __pyx_t_200[12] = -1;
  __pyx_t_200[13] = -1;
  __pyx_t_200[14] = -1;
  __pyx_t_200[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1413
 *     [0, 8, 3, 1, 2, 7, 1, 7, 5, 7, 2, 11, -1, -1, -1, -1],
 *     [9, 7, 5, 9, 2, 7, 9, 0, 2, 2, 11, 7, -1, -1, -1, -1],
 *     [7, 5, 2, 7, 2, 11, 5, 9, 2, 3, 2, 8, 9, 8, 2, -1],             # <<<<<<<<<<<<<<
 *     [2, 5, 10, 2, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 2, 0, 8, 5, 2, 8, 7, 5, 10, 2, 5, -1, -1, -1, -1],
 */
  __pyx_t_201[0] = 7;
  __pyx_t_201[1] = 5;
  __pyx_t_201[2] = 2;
  __pyx_t_201[3] = 7;
  __pyx_t_201[4] = 2;
  __pyx_t_201[5] = 11;
  __pyx_t_201[6] = 5;
  __pyx_t_201[7] = 9;
  __pyx_t_201[8] = 2;
  __pyx_t_201[9] = 3;
  __pyx_t_201[10] = 2;
  __pyx_t_201[11] = 8;
  __pyx_t_201[12] = 9;
  __pyx_t_201[13] = 8;
  __pyx_t_201[14] = 2;
  __pyx_t_201[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1414
 *     [9, 7, 5, 9, 2, 7, 9, 0, 2, 2, 11, 7, -1, -1, -1, -1],
 *     [7, 5, 2, 7, 2, 11, 5, 9, 2, 3, 2, 8, 9, 8, 2, -1],
 *     [2, 5, 10, 2, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [8, 2, 0, 8, 5, 2, 8, 7, 5, 10, 2, 5, -1, -1, -1, -1],
 *     [9, 0, 1, 5, 10, 3, 5, 3, 7, 3, 10, 2, -1, -1, -1, -1],
 */
  __pyx_t_202[0] = 2;
  __pyx_t_202[1] = 5;
  __pyx_t_202[2] = 10;
  __pyx_t_202[3] = 2;
  __pyx_t_202[4] = 3;
  __pyx_t_202[5] = 5;
  __pyx_t_202[6] = 3;
  __pyx_t_202[7] = 7;
  __pyx_t_202[8] = 5;
  __pyx_t_202[9] = -1;
  __pyx_t_202[10] = -1;
  __pyx_t_202[11] = -1;
  __pyx_t_202[12] = -1;
  __pyx_t_202[13] = -1;
  __pyx_t_202[14] = -1;
  __pyx_t_202[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1415
 *     [7, 5, 2, 7, 2, 11, 5, 9, 2, 3, 2, 8, 9, 8, 2, -1],
 *     [2, 5, 10, 2, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 2, 0, 8, 5, 2, 8, 7, 5, 10, 2, 5, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 0, 1, 5, 10, 3, 5, 3, 7, 3, 10, 2, -1, -1, -1, -1],
 *     [9, 8, 2, 9, 2, 1, 8, 7, 2, 10, 2, 5, 7, 5, 2, -1],
 */
  __pyx_t_203[0] = 8;
  __pyx_t_203[1] = 2;
  __pyx_t_203[2] = 0;
  __pyx_t_203[3] = 8;
  __pyx_t_203[4] = 5;
  __pyx_t_203[5] = 2;
  __pyx_t_203[6] = 8;
  __pyx_t_203[7] = 7;
  __pyx_t_203[8] = 5;
  __pyx_t_203[9] = 10;
  __pyx_t_203[10] = 2;
  __pyx_t_203[11] = 5;
  __pyx_t_203[12] = -1;
  __pyx_t_203[13] = -1;
  __pyx_t_203[14] = -1;
  __pyx_t_203[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1416
 *     [2, 5, 10, 2, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 2, 0, 8, 5, 2, 8, 7, 5, 10, 2, 5, -1, -1, -1, -1],
 *     [9, 0, 1, 5, 10, 3, 5, 3, 7, 3, 10, 2, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 8, 2, 9, 2, 1, 8, 7, 2, 10, 2, 5, 7, 5, 2, -1],
 *     [1, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_204[0] = 9;
  __pyx_t_204[1] = 0;
  __pyx_t_204[2] = 1;
  __pyx_t_204[3] = 5;
  __pyx_t_204[4] = 10;
  __pyx_t_204[5] = 3;
  __pyx_t_204[6] = 5;
  __pyx_t_204[7] = 3;
  __pyx_t_204[8] = 7;
  __pyx_t_204[9] = 3;
  __pyx_t_204[10] = 10;
  __pyx_t_204[11] = 2;
  __pyx_t_204[12] = -1;
  __pyx_t_204[13] = -1;
  __pyx_t_204[14] = -1;
  __pyx_t_204[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1417
 *     [8, 2, 0, 8, 5, 2, 8, 7, 5, 10, 2, 5, -1, -1, -1, -1],
 *     [9, 0, 1, 5, 10, 3, 5, 3, 7, 3, 10, 2, -1, -1, -1, -1],
 *     [9, 8, 2, 9, 2, 1, 8, 7, 2, 10, 2, 5, 7, 5, 2, -1],             # <<<<<<<<<<<<<<
 *     [1, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 7, 0, 7, 1, 1, 7, 5, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_205[0] = 9;
  __pyx_t_205[1] = 8;
  __pyx_t_205[2] = 2;
  __pyx_t_205[3] = 9;
  __pyx_t_205[4] = 2;
  __pyx_t_205[5] = 1;
  __pyx_t_205[6] = 8;
  __pyx_t_205[7] = 7;
  __pyx_t_205[8] = 2;
  __pyx_t_205[9] = 10;
  __pyx_t_205[10] = 2;
  __pyx_t_205[11] = 5;
  __pyx_t_205[12] = 7;
  __pyx_t_205[13] = 5;
  __pyx_t_205[14] = 2;
  __pyx_t_205[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1418
 *     [9, 0, 1, 5, 10, 3, 5, 3, 7, 3, 10, 2, -1, -1, -1, -1],
 *     [9, 8, 2, 9, 2, 1, 8, 7, 2, 10, 2, 5, 7, 5, 2, -1],
 *     [1, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 8, 7, 0, 7, 1, 1, 7, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 0, 3, 9, 3, 5, 5, 3, 7, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_206[0] = 1;
  __pyx_t_206[1] = 3;
  __pyx_t_206[2] = 5;
  __pyx_t_206[3] = 3;
  __pyx_t_206[4] = 7;
  __pyx_t_206[5] = 5;
  __pyx_t_206[6] = -1;
  __pyx_t_206[7] = -1;
  __pyx_t_206[8] = -1;
  __pyx_t_206[9] = -1;
  __pyx_t_206[10] = -1;
  __pyx_t_206[11] = -1;
  __pyx_t_206[12] = -1;
  __pyx_t_206[13] = -1;
  __pyx_t_206[14] = -1;
  __pyx_t_206[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1419
 *     [9, 8, 2, 9, 2, 1, 8, 7, 2, 10, 2, 5, 7, 5, 2, -1],
 *     [1, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 7, 0, 7, 1, 1, 7, 5, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 0, 3, 9, 3, 5, 5, 3, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 8, 7, 5, 9, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_207[0] = 0;
  __pyx_t_207[1] = 8;
  __pyx_t_207[2] = 7;
  __pyx_t_207[3] = 0;
  __pyx_t_207[4] = 7;
  __pyx_t_207[5] = 1;
  __pyx_t_207[6] = 1;
  __pyx_t_207[7] = 7;
  __pyx_t_207[8] = 5;
  __pyx_t_207[9] = -1;
  __pyx_t_207[10] = -1;
  __pyx_t_207[11] = -1;
  __pyx_t_207[12] = -1;
  __pyx_t_207[13] = -1;
  __pyx_t_207[14] = -1;
  __pyx_t_207[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1420
 *     [1, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 7, 0, 7, 1, 1, 7, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 0, 3, 9, 3, 5, 5, 3, 7, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 8, 7, 5, 9, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 8, 4, 5, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_208[0] = 9;
  __pyx_t_208[1] = 0;
  __pyx_t_208[2] = 3;
  __pyx_t_208[3] = 9;
  __pyx_t_208[4] = 3;
  __pyx_t_208[5] = 5;
  __pyx_t_208[6] = 5;
  __pyx_t_208[7] = 3;
  __pyx_t_208[8] = 7;
  __pyx_t_208[9] = -1;
  __pyx_t_208[10] = -1;
  __pyx_t_208[11] = -1;
  __pyx_t_208[12] = -1;
  __pyx_t_208[13] = -1;
  __pyx_t_208[14] = -1;
  __pyx_t_208[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1421
 *     [0, 8, 7, 0, 7, 1, 1, 7, 5, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 0, 3, 9, 3, 5, 5, 3, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 8, 7, 5, 9, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [5, 8, 4, 5, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 0, 4, 5, 11, 0, 5, 10, 11, 11, 3, 0, -1, -1, -1, -1],
 */
  __pyx_t_209[0] = 9;
  __pyx_t_209[1] = 8;
  __pyx_t_209[2] = 7;
  __pyx_t_209[3] = 5;
  __pyx_t_209[4] = 9;
  __pyx_t_209[5] = 7;
  __pyx_t_209[6] = -1;
  __pyx_t_209[7] = -1;
  __pyx_t_209[8] = -1;
  __pyx_t_209[9] = -1;
  __pyx_t_209[10] = -1;
  __pyx_t_209[11] = -1;
  __pyx_t_209[12] = -1;
  __pyx_t_209[13] = -1;
  __pyx_t_209[14] = -1;
  __pyx_t_209[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1422
 *     [9, 0, 3, 9, 3, 5, 5, 3, 7, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 8, 7, 5, 9, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 8, 4, 5, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [5, 0, 4, 5, 11, 0, 5, 10, 11, 11, 3, 0, -1, -1, -1, -1],
 *     [0, 1, 9, 8, 4, 10, 8, 10, 11, 10, 4, 5, -1, -1, -1, -1],
 */
  __pyx_t_210[0] = 5;
  __pyx_t_210[1] = 8;
  __pyx_t_210[2] = 4;
  __pyx_t_210[3] = 5;
  __pyx_t_210[4] = 10;
  __pyx_t_210[5] = 8;
  __pyx_t_210[6] = 10;
  __pyx_t_210[7] = 11;
  __pyx_t_210[8] = 8;
  __pyx_t_210[9] = -1;
  __pyx_t_210[10] = -1;
  __pyx_t_210[11] = -1;
  __pyx_t_210[12] = -1;
  __pyx_t_210[13] = -1;
  __pyx_t_210[14] = -1;
  __pyx_t_210[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1423
 *     [9, 8, 7, 5, 9, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 8, 4, 5, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 0, 4, 5, 11, 0, 5, 10, 11, 11, 3, 0, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 1, 9, 8, 4, 10, 8, 10, 11, 10, 4, 5, -1, -1, -1, -1],
 *     [10, 11, 4, 10, 4, 5, 11, 3, 4, 9, 4, 1, 3, 1, 4, -1],
 */
  __pyx_t_211[0] = 5;
  __pyx_t_211[1] = 0;
  __pyx_t_211[2] = 4;
  __pyx_t_211[3] = 5;
  __pyx_t_211[4] = 11;
  __pyx_t_211[5] = 0;
  __pyx_t_211[6] = 5;
  __pyx_t_211[7] = 10;
  __pyx_t_211[8] = 11;
  __pyx_t_211[9] = 11;
  __pyx_t_211[10] = 3;
  __pyx_t_211[11] = 0;
  __pyx_t_211[12] = -1;
  __pyx_t_211[13] = -1;
  __pyx_t_211[14] = -1;
  __pyx_t_211[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1424
 *     [5, 8, 4, 5, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [5, 0, 4, 5, 11, 0, 5, 10, 11, 11, 3, 0, -1, -1, -1, -1],
 *     [0, 1, 9, 8, 4, 10, 8, 10, 11, 10, 4, 5, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [10, 11, 4, 10, 4, 5, 11, 3, 4, 9, 4, 1, 3, 1, 4, -1],
 *     [2, 5, 1, 2, 8, 5, 2, 11, 8, 4, 5, 8, -1, -1, -1, -1],
 */
  __pyx_t_212[0] = 0;
  __pyx_t_212[1] = 1;
  __pyx_t_212[2] = 9;
  __pyx_t_212[3] = 8;
  __pyx_t_212[4] = 4;
  __pyx_t_212[5] = 10;
  __pyx_t_212[6] = 8;
  __pyx_t_212[7] = 10;
  __pyx_t_212[8] = 11;
  __pyx_t_212[9] = 10;
  __pyx_t_212[10] = 4;
  __pyx_t_212[11] = 5;
  __pyx_t_212[12] = -1;
  __pyx_t_212[13] = -1;
  __pyx_t_212[14] = -1;
  __pyx_t_212[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1425
 *     [5, 0, 4, 5, 11, 0, 5, 10, 11, 11, 3, 0, -1, -1, -1, -1],
 *     [0, 1, 9, 8, 4, 10, 8, 10, 11, 10, 4, 5, -1, -1, -1, -1],
 *     [10, 11, 4, 10, 4, 5, 11, 3, 4, 9, 4, 1, 3, 1, 4, -1],             # <<<<<<<<<<<<<<
 *     [2, 5, 1, 2, 8, 5, 2, 11, 8, 4, 5, 8, -1, -1, -1, -1],
 *     [0, 4, 11, 0, 11, 3, 4, 5, 11, 2, 11, 1, 5, 1, 11, -1],
 */
  __pyx_t_213[0] = 10;
  __pyx_t_213[1] = 11;
  __pyx_t_213[2] = 4;
  __pyx_t_213[3] = 10;
  __pyx_t_213[4] = 4;
  __pyx_t_213[5] = 5;
  __pyx_t_213[6] = 11;
  __pyx_t_213[7] = 3;
  __pyx_t_213[8] = 4;
  __pyx_t_213[9] = 9;
  __pyx_t_213[10] = 4;
  __pyx_t_213[11] = 1;
  __pyx_t_213[12] = 3;
  __pyx_t_213[13] = 1;
  __pyx_t_213[14] = 4;
  __pyx_t_213[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1426
 *     [0, 1, 9, 8, 4, 10, 8, 10, 11, 10, 4, 5, -1, -1, -1, -1],
 *     [10, 11, 4, 10, 4, 5, 11, 3, 4, 9, 4, 1, 3, 1, 4, -1],
 *     [2, 5, 1, 2, 8, 5, 2, 11, 8, 4, 5, 8, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 4, 11, 0, 11, 3, 4, 5, 11, 2, 11, 1, 5, 1, 11, -1],
 *     [0, 2, 5, 0, 5, 9, 2, 11, 5, 4, 5, 8, 11, 8, 5, -1],
 */
  __pyx_t_214[0] = 2;
  __pyx_t_214[1] = 5;
  __pyx_t_214[2] = 1;
  __pyx_t_214[3] = 2;
  __pyx_t_214[4] = 8;
  __pyx_t_214[5] = 5;
  __pyx_t_214[6] = 2;
  __pyx_t_214[7] = 11;
  __pyx_t_214[8] = 8;
  __pyx_t_214[9] = 4;
  __pyx_t_214[10] = 5;
  __pyx_t_214[11] = 8;
  __pyx_t_214[12] = -1;
  __pyx_t_214[13] = -1;
  __pyx_t_214[14] = -1;
  __pyx_t_214[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1427
 *     [10, 11, 4, 10, 4, 5, 11, 3, 4, 9, 4, 1, 3, 1, 4, -1],
 *     [2, 5, 1, 2, 8, 5, 2, 11, 8, 4, 5, 8, -1, -1, -1, -1],
 *     [0, 4, 11, 0, 11, 3, 4, 5, 11, 2, 11, 1, 5, 1, 11, -1],             # <<<<<<<<<<<<<<
 *     [0, 2, 5, 0, 5, 9, 2, 11, 5, 4, 5, 8, 11, 8, 5, -1],
 *     [9, 4, 5, 2, 11, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_215[0] = 0;
  __pyx_t_215[1] = 4;
  __pyx_t_215[2] = 11;
  __pyx_t_215[3] = 0;
  __pyx_t_215[4] = 11;
  __pyx_t_215[5] = 3;
  __pyx_t_215[6] = 4;
  __pyx_t_215[7] = 5;
  __pyx_t_215[8] = 11;
  __pyx_t_215[9] = 2;
  __pyx_t_215[10] = 11;
  __pyx_t_215[11] = 1;
  __pyx_t_215[12] = 5;
  __pyx_t_215[13] = 1;
  __pyx_t_215[14] = 11;
  __pyx_t_215[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1428
 *     [2, 5, 1, 2, 8, 5, 2, 11, 8, 4, 5, 8, -1, -1, -1, -1],
 *     [0, 4, 11, 0, 11, 3, 4, 5, 11, 2, 11, 1, 5, 1, 11, -1],
 *     [0, 2, 5, 0, 5, 9, 2, 11, 5, 4, 5, 8, 11, 8, 5, -1],             # <<<<<<<<<<<<<<
 *     [9, 4, 5, 2, 11, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 5, 10, 3, 5, 2, 3, 4, 5, 3, 8, 4, -1, -1, -1, -1],
 */
  __pyx_t_216[0] = 0;
  __pyx_t_216[1] = 2;
  __pyx_t_216[2] = 5;
  __pyx_t_216[3] = 0;
  __pyx_t_216[4] = 5;
  __pyx_t_216[5] = 9;
  __pyx_t_216[6] = 2;
  __pyx_t_216[7] = 11;
  __pyx_t_216[8] = 5;
  __pyx_t_216[9] = 4;
  __pyx_t_216[10] = 5;
  __pyx_t_216[11] = 8;
  __pyx_t_216[12] = 11;
  __pyx_t_216[13] = 8;
  __pyx_t_216[14] = 5;
  __pyx_t_216[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1429
 *     [0, 4, 11, 0, 11, 3, 4, 5, 11, 2, 11, 1, 5, 1, 11, -1],
 *     [0, 2, 5, 0, 5, 9, 2, 11, 5, 4, 5, 8, 11, 8, 5, -1],
 *     [9, 4, 5, 2, 11, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [2, 5, 10, 3, 5, 2, 3, 4, 5, 3, 8, 4, -1, -1, -1, -1],
 *     [5, 10, 2, 5, 2, 4, 4, 2, 0, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_217[0] = 9;
  __pyx_t_217[1] = 4;
  __pyx_t_217[2] = 5;
  __pyx_t_217[3] = 2;
  __pyx_t_217[4] = 11;
  __pyx_t_217[5] = 3;
  __pyx_t_217[6] = -1;
  __pyx_t_217[7] = -1;
  __pyx_t_217[8] = -1;
  __pyx_t_217[9] = -1;
  __pyx_t_217[10] = -1;
  __pyx_t_217[11] = -1;
  __pyx_t_217[12] = -1;
  __pyx_t_217[13] = -1;
  __pyx_t_217[14] = -1;
  __pyx_t_217[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1430
 *     [0, 2, 5, 0, 5, 9, 2, 11, 5, 4, 5, 8, 11, 8, 5, -1],
 *     [9, 4, 5, 2, 11, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 5, 10, 3, 5, 2, 3, 4, 5, 3, 8, 4, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [5, 10, 2, 5, 2, 4, 4, 2, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 10, 2, 3, 5, 10, 3, 8, 5, 4, 5, 8, 0, 1, 9, -1],
 */
  __pyx_t_218[0] = 2;
  __pyx_t_218[1] = 5;
  __pyx_t_218[2] = 10;
  __pyx_t_218[3] = 3;
  __pyx_t_218[4] = 5;
  __pyx_t_218[5] = 2;
  __pyx_t_218[6] = 3;
  __pyx_t_218[7] = 4;
  __pyx_t_218[8] = 5;
  __pyx_t_218[9] = 3;
  __pyx_t_218[10] = 8;
  __pyx_t_218[11] = 4;
  __pyx_t_218[12] = -1;
  __pyx_t_218[13] = -1;
  __pyx_t_218[14] = -1;
  __pyx_t_218[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1431
 *     [9, 4, 5, 2, 11, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 5, 10, 3, 5, 2, 3, 4, 5, 3, 8, 4, -1, -1, -1, -1],
 *     [5, 10, 2, 5, 2, 4, 4, 2, 0, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 10, 2, 3, 5, 10, 3, 8, 5, 4, 5, 8, 0, 1, 9, -1],
 *     [5, 10, 2, 5, 2, 4, 1, 9, 2, 9, 4, 2, -1, -1, -1, -1],
 */
  __pyx_t_219[0] = 5;
  __pyx_t_219[1] = 10;
  __pyx_t_219[2] = 2;
  __pyx_t_219[3] = 5;
  __pyx_t_219[4] = 2;
  __pyx_t_219[5] = 4;
  __pyx_t_219[6] = 4;
  __pyx_t_219[7] = 2;
  __pyx_t_219[8] = 0;
  __pyx_t_219[9] = -1;
  __pyx_t_219[10] = -1;
  __pyx_t_219[11] = -1;
  __pyx_t_219[12] = -1;
  __pyx_t_219[13] = -1;
  __pyx_t_219[14] = -1;
  __pyx_t_219[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1432
 *     [2, 5, 10, 3, 5, 2, 3, 4, 5, 3, 8, 4, -1, -1, -1, -1],
 *     [5, 10, 2, 5, 2, 4, 4, 2, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 10, 2, 3, 5, 10, 3, 8, 5, 4, 5, 8, 0, 1, 9, -1],             # <<<<<<<<<<<<<<
 *     [5, 10, 2, 5, 2, 4, 1, 9, 2, 9, 4, 2, -1, -1, -1, -1],
 *     [8, 4, 5, 8, 5, 3, 3, 5, 1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_220[0] = 3;
  __pyx_t_220[1] = 10;
  __pyx_t_220[2] = 2;
  __pyx_t_220[3] = 3;
  __pyx_t_220[4] = 5;
  __pyx_t_220[5] = 10;
  __pyx_t_220[6] = 3;
  __pyx_t_220[7] = 8;
  __pyx_t_220[8] = 5;
  __pyx_t_220[9] = 4;
  __pyx_t_220[10] = 5;
  __pyx_t_220[11] = 8;
  __pyx_t_220[12] = 0;
  __pyx_t_220[13] = 1;
  __pyx_t_220[14] = 9;
  __pyx_t_220[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1433
 *     [5, 10, 2, 5, 2, 4, 4, 2, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 10, 2, 3, 5, 10, 3, 8, 5, 4, 5, 8, 0, 1, 9, -1],
 *     [5, 10, 2, 5, 2, 4, 1, 9, 2, 9, 4, 2, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [8, 4, 5, 8, 5, 3, 3, 5, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 4, 5, 1, 0, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_221[0] = 5;
  __pyx_t_221[1] = 10;
  __pyx_t_221[2] = 2;
  __pyx_t_221[3] = 5;
  __pyx_t_221[4] = 2;
  __pyx_t_221[5] = 4;
  __pyx_t_221[6] = 1;
  __pyx_t_221[7] = 9;
  __pyx_t_221[8] = 2;
  __pyx_t_221[9] = 9;
  __pyx_t_221[10] = 4;
  __pyx_t_221[11] = 2;
  __pyx_t_221[12] = -1;
  __pyx_t_221[13] = -1;
  __pyx_t_221[14] = -1;
  __pyx_t_221[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1434
 *     [3, 10, 2, 3, 5, 10, 3, 8, 5, 4, 5, 8, 0, 1, 9, -1],
 *     [5, 10, 2, 5, 2, 4, 1, 9, 2, 9, 4, 2, -1, -1, -1, -1],
 *     [8, 4, 5, 8, 5, 3, 3, 5, 1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 4, 5, 1, 0, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 4, 5, 8, 5, 3, 9, 0, 5, 0, 3, 5, -1, -1, -1, -1],
 */
  __pyx_t_222[0] = 8;
  __pyx_t_222[1] = 4;
  __pyx_t_222[2] = 5;
  __pyx_t_222[3] = 8;
  __pyx_t_222[4] = 5;
  __pyx_t_222[5] = 3;
  __pyx_t_222[6] = 3;
  __pyx_t_222[7] = 5;
  __pyx_t_222[8] = 1;
  __pyx_t_222[9] = -1;
  __pyx_t_222[10] = -1;
  __pyx_t_222[11] = -1;
  __pyx_t_222[12] = -1;
  __pyx_t_222[13] = -1;
  __pyx_t_222[14] = -1;
  __pyx_t_222[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1435
 *     [5, 10, 2, 5, 2, 4, 1, 9, 2, 9, 4, 2, -1, -1, -1, -1],
 *     [8, 4, 5, 8, 5, 3, 3, 5, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 4, 5, 1, 0, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [8, 4, 5, 8, 5, 3, 9, 0, 5, 0, 3, 5, -1, -1, -1, -1],
 *     [9, 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_223[0] = 0;
  __pyx_t_223[1] = 4;
  __pyx_t_223[2] = 5;
  __pyx_t_223[3] = 1;
  __pyx_t_223[4] = 0;
  __pyx_t_223[5] = 5;
  __pyx_t_223[6] = -1;
  __pyx_t_223[7] = -1;
  __pyx_t_223[8] = -1;
  __pyx_t_223[9] = -1;
  __pyx_t_223[10] = -1;
  __pyx_t_223[11] = -1;
  __pyx_t_223[12] = -1;
  __pyx_t_223[13] = -1;
  __pyx_t_223[14] = -1;
  __pyx_t_223[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1436
 *     [8, 4, 5, 8, 5, 3, 3, 5, 1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 4, 5, 1, 0, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 4, 5, 8, 5, 3, 9, 0, 5, 0, 3, 5, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 11, 7, 4, 9, 11, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_224[0] = 8;
  __pyx_t_224[1] = 4;
  __pyx_t_224[2] = 5;
  __pyx_t_224[3] = 8;
  __pyx_t_224[4] = 5;
  __pyx_t_224[5] = 3;
  __pyx_t_224[6] = 9;
  __pyx_t_224[7] = 0;
  __pyx_t_224[8] = 5;
  __pyx_t_224[9] = 0;
  __pyx_t_224[10] = 3;
  __pyx_t_224[11] = 5;
  __pyx_t_224[12] = -1;
  __pyx_t_224[13] = -1;
  __pyx_t_224[14] = -1;
  __pyx_t_224[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1437
 *     [0, 4, 5, 1, 0, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [8, 4, 5, 8, 5, 3, 9, 0, 5, 0, 3, 5, -1, -1, -1, -1],
 *     [9, 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 11, 7, 4, 9, 11, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, 4, 9, 7, 9, 11, 7, 9, 10, 11, -1, -1, -1, -1],
 */
  __pyx_t_225[0] = 9;
  __pyx_t_225[1] = 4;
  __pyx_t_225[2] = 5;
  __pyx_t_225[3] = -1;
  __pyx_t_225[4] = -1;
  __pyx_t_225[5] = -1;
  __pyx_t_225[6] = -1;
  __pyx_t_225[7] = -1;
  __pyx_t_225[8] = -1;
  __pyx_t_225[9] = -1;
  __pyx_t_225[10] = -1;
  __pyx_t_225[11] = -1;
  __pyx_t_225[12] = -1;
  __pyx_t_225[13] = -1;
  __pyx_t_225[14] = -1;
  __pyx_t_225[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1438
 *     [8, 4, 5, 8, 5, 3, 9, 0, 5, 0, 3, 5, -1, -1, -1, -1],
 *     [9, 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 11, 7, 4, 9, 11, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 8, 3, 4, 9, 7, 9, 11, 7, 9, 10, 11, -1, -1, -1, -1],
 *     [1, 10, 11, 1, 11, 4, 1, 4, 0, 7, 4, 11, -1, -1, -1, -1],
 */
  __pyx_t_226[0] = 4;
  __pyx_t_226[1] = 11;
  __pyx_t_226[2] = 7;
  __pyx_t_226[3] = 4;
  __pyx_t_226[4] = 9;
  __pyx_t_226[5] = 11;
  __pyx_t_226[6] = 9;
  __pyx_t_226[7] = 10;
  __pyx_t_226[8] = 11;
  __pyx_t_226[9] = -1;
  __pyx_t_226[10] = -1;
  __pyx_t_226[11] = -1;
  __pyx_t_226[12] = -1;
  __pyx_t_226[13] = -1;
  __pyx_t_226[14] = -1;
  __pyx_t_226[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1439
 *     [9, 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 11, 7, 4, 9, 11, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, 4, 9, 7, 9, 11, 7, 9, 10, 11, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 10, 11, 1, 11, 4, 1, 4, 0, 7, 4, 11, -1, -1, -1, -1],
 *     [3, 1, 4, 3, 4, 8, 1, 10, 4, 7, 4, 11, 10, 11, 4, -1],
 */
  __pyx_t_227[0] = 0;
  __pyx_t_227[1] = 8;
  __pyx_t_227[2] = 3;
  __pyx_t_227[3] = 4;
  __pyx_t_227[4] = 9;
  __pyx_t_227[5] = 7;
  __pyx_t_227[6] = 9;
  __pyx_t_227[7] = 11;
  __pyx_t_227[8] = 7;
  __pyx_t_227[9] = 9;
  __pyx_t_227[10] = 10;
  __pyx_t_227[11] = 11;
  __pyx_t_227[12] = -1;
  __pyx_t_227[13] = -1;
  __pyx_t_227[14] = -1;
  __pyx_t_227[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1440
 *     [4, 11, 7, 4, 9, 11, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 8, 3, 4, 9, 7, 9, 11, 7, 9, 10, 11, -1, -1, -1, -1],
 *     [1, 10, 11, 1, 11, 4, 1, 4, 0, 7, 4, 11, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 1, 4, 3, 4, 8, 1, 10, 4, 7, 4, 11, 10, 11, 4, -1],
 *     [4, 11, 7, 9, 11, 4, 9, 2, 11, 9, 1, 2, -1, -1, -1, -1],
 */
  __pyx_t_228[0] = 1;
  __pyx_t_228[1] = 10;
  __pyx_t_228[2] = 11;
  __pyx_t_228[3] = 1;
  __pyx_t_228[4] = 11;
  __pyx_t_228[5] = 4;
  __pyx_t_228[6] = 1;
  __pyx_t_228[7] = 4;
  __pyx_t_228[8] = 0;
  __pyx_t_228[9] = 7;
  __pyx_t_228[10] = 4;
  __pyx_t_228[11] = 11;
  __pyx_t_228[12] = -1;
  __pyx_t_228[13] = -1;
  __pyx_t_228[14] = -1;
  __pyx_t_228[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1441
 *     [0, 8, 3, 4, 9, 7, 9, 11, 7, 9, 10, 11, -1, -1, -1, -1],
 *     [1, 10, 11, 1, 11, 4, 1, 4, 0, 7, 4, 11, -1, -1, -1, -1],
 *     [3, 1, 4, 3, 4, 8, 1, 10, 4, 7, 4, 11, 10, 11, 4, -1],             # <<<<<<<<<<<<<<
 *     [4, 11, 7, 9, 11, 4, 9, 2, 11, 9, 1, 2, -1, -1, -1, -1],
 *     [9, 7, 4, 9, 11, 7, 9, 1, 11, 2, 11, 1, 0, 8, 3, -1],
 */
  __pyx_t_229[0] = 3;
  __pyx_t_229[1] = 1;
  __pyx_t_229[2] = 4;
  __pyx_t_229[3] = 3;
  __pyx_t_229[4] = 4;
  __pyx_t_229[5] = 8;
  __pyx_t_229[6] = 1;
  __pyx_t_229[7] = 10;
  __pyx_t_229[8] = 4;
  __pyx_t_229[9] = 7;
  __pyx_t_229[10] = 4;
  __pyx_t_229[11] = 11;
  __pyx_t_229[12] = 10;
  __pyx_t_229[13] = 11;
  __pyx_t_229[14] = 4;
  __pyx_t_229[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1442
 *     [1, 10, 11, 1, 11, 4, 1, 4, 0, 7, 4, 11, -1, -1, -1, -1],
 *     [3, 1, 4, 3, 4, 8, 1, 10, 4, 7, 4, 11, 10, 11, 4, -1],
 *     [4, 11, 7, 9, 11, 4, 9, 2, 11, 9, 1, 2, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 7, 4, 9, 11, 7, 9, 1, 11, 2, 11, 1, 0, 8, 3, -1],
 *     [11, 7, 4, 11, 4, 2, 2, 4, 0, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_230[0] = 4;
  __pyx_t_230[1] = 11;
  __pyx_t_230[2] = 7;
  __pyx_t_230[3] = 9;
  __pyx_t_230[4] = 11;
  __pyx_t_230[5] = 4;
  __pyx_t_230[6] = 9;
  __pyx_t_230[7] = 2;
  __pyx_t_230[8] = 11;
  __pyx_t_230[9] = 9;
  __pyx_t_230[10] = 1;
  __pyx_t_230[11] = 2;
  __pyx_t_230[12] = -1;
  __pyx_t_230[13] = -1;
  __pyx_t_230[14] = -1;
  __pyx_t_230[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1443
 *     [3, 1, 4, 3, 4, 8, 1, 10, 4, 7, 4, 11, 10, 11, 4, -1],
 *     [4, 11, 7, 9, 11, 4, 9, 2, 11, 9, 1, 2, -1, -1, -1, -1],
 *     [9, 7, 4, 9, 11, 7, 9, 1, 11, 2, 11, 1, 0, 8, 3, -1],             # <<<<<<<<<<<<<<
 *     [11, 7, 4, 11, 4, 2, 2, 4, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 7, 4, 11, 4, 2, 8, 3, 4, 3, 2, 4, -1, -1, -1, -1],
 */
  __pyx_t_231[0] = 9;
  __pyx_t_231[1] = 7;
  __pyx_t_231[2] = 4;
  __pyx_t_231[3] = 9;
  __pyx_t_231[4] = 11;
  __pyx_t_231[5] = 7;
  __pyx_t_231[6] = 9;
  __pyx_t_231[7] = 1;
  __pyx_t_231[8] = 11;
  __pyx_t_231[9] = 2;
  __pyx_t_231[10] = 11;
  __pyx_t_231[11] = 1;
  __pyx_t_231[12] = 0;
  __pyx_t_231[13] = 8;
  __pyx_t_231[14] = 3;
  __pyx_t_231[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1444
 *     [4, 11, 7, 9, 11, 4, 9, 2, 11, 9, 1, 2, -1, -1, -1, -1],
 *     [9, 7, 4, 9, 11, 7, 9, 1, 11, 2, 11, 1, 0, 8, 3, -1],
 *     [11, 7, 4, 11, 4, 2, 2, 4, 0, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [11, 7, 4, 11, 4, 2, 8, 3, 4, 3, 2, 4, -1, -1, -1, -1],
 *     [2, 9, 10, 2, 7, 9, 2, 3, 7, 7, 4, 9, -1, -1, -1, -1],
 */
  __pyx_t_232[0] = 11;
  __pyx_t_232[1] = 7;
  __pyx_t_232[2] = 4;
  __pyx_t_232[3] = 11;
  __pyx_t_232[4] = 4;
  __pyx_t_232[5] = 2;
  __pyx_t_232[6] = 2;
  __pyx_t_232[7] = 4;
  __pyx_t_232[8] = 0;
  __pyx_t_232[9] = -1;
  __pyx_t_232[10] = -1;
  __pyx_t_232[11] = -1;
  __pyx_t_232[12] = -1;
  __pyx_t_232[13] = -1;
  __pyx_t_232[14] = -1;
  __pyx_t_232[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1445
 *     [9, 7, 4, 9, 11, 7, 9, 1, 11, 2, 11, 1, 0, 8, 3, -1],
 *     [11, 7, 4, 11, 4, 2, 2, 4, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 7, 4, 11, 4, 2, 8, 3, 4, 3, 2, 4, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [2, 9, 10, 2, 7, 9, 2, 3, 7, 7, 4, 9, -1, -1, -1, -1],
 *     [9, 10, 7, 9, 7, 4, 10, 2, 7, 8, 7, 0, 2, 0, 7, -1],
 */
  __pyx_t_233[0] = 11;
  __pyx_t_233[1] = 7;
  __pyx_t_233[2] = 4;
  __pyx_t_233[3] = 11;
  __pyx_t_233[4] = 4;
  __pyx_t_233[5] = 2;
  __pyx_t_233[6] = 8;
  __pyx_t_233[7] = 3;
  __pyx_t_233[8] = 4;
  __pyx_t_233[9] = 3;
  __pyx_t_233[10] = 2;
  __pyx_t_233[11] = 4;
  __pyx_t_233[12] = -1;
  __pyx_t_233[13] = -1;
  __pyx_t_233[14] = -1;
  __pyx_t_233[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1446
 *     [11, 7, 4, 11, 4, 2, 2, 4, 0, -1, -1, -1, -1, -1, -1, -1],
 *     [11, 7, 4, 11, 4, 2, 8, 3, 4, 3, 2, 4, -1, -1, -1, -1],
 *     [2, 9, 10, 2, 7, 9, 2, 3, 7, 7, 4, 9, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 10, 7, 9, 7, 4, 10, 2, 7, 8, 7, 0, 2, 0, 7, -1],
 *     [3, 7, 10, 3, 10, 2, 7, 4, 10, 1, 10, 0, 4, 0, 10, -1],
 */
  __pyx_t_234[0] = 2;
  __pyx_t_234[1] = 9;
  __pyx_t_234[2] = 10;
  __pyx_t_234[3] = 2;
  __pyx_t_234[4] = 7;
  __pyx_t_234[5] = 9;
  __pyx_t_234[6] = 2;
  __pyx_t_234[7] = 3;
  __pyx_t_234[8] = 7;
  __pyx_t_234[9] = 7;
  __pyx_t_234[10] = 4;
  __pyx_t_234[11] = 9;
  __pyx_t_234[12] = -1;
  __pyx_t_234[13] = -1;
  __pyx_t_234[14] = -1;
  __pyx_t_234[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1447
 *     [11, 7, 4, 11, 4, 2, 8, 3, 4, 3, 2, 4, -1, -1, -1, -1],
 *     [2, 9, 10, 2, 7, 9, 2, 3, 7, 7, 4, 9, -1, -1, -1, -1],
 *     [9, 10, 7, 9, 7, 4, 10, 2, 7, 8, 7, 0, 2, 0, 7, -1],             # <<<<<<<<<<<<<<
 *     [3, 7, 10, 3, 10, 2, 7, 4, 10, 1, 10, 0, 4, 0, 10, -1],
 *     [1, 10, 2, 8, 7, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_235[0] = 9;
  __pyx_t_235[1] = 10;
  __pyx_t_235[2] = 7;
  __pyx_t_235[3] = 9;
  __pyx_t_235[4] = 7;
  __pyx_t_235[5] = 4;
  __pyx_t_235[6] = 10;
  __pyx_t_235[7] = 2;
  __pyx_t_235[8] = 7;
  __pyx_t_235[9] = 8;
  __pyx_t_235[10] = 7;
  __pyx_t_235[11] = 0;
  __pyx_t_235[12] = 2;
  __pyx_t_235[13] = 0;
  __pyx_t_235[14] = 7;
  __pyx_t_235[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1448
 *     [2, 9, 10, 2, 7, 9, 2, 3, 7, 7, 4, 9, -1, -1, -1, -1],
 *     [9, 10, 7, 9, 7, 4, 10, 2, 7, 8, 7, 0, 2, 0, 7, -1],
 *     [3, 7, 10, 3, 10, 2, 7, 4, 10, 1, 10, 0, 4, 0, 10, -1],             # <<<<<<<<<<<<<<
 *     [1, 10, 2, 8, 7, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 9, 1, 4, 1, 7, 7, 1, 3, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_236[0] = 3;
  __pyx_t_236[1] = 7;
  __pyx_t_236[2] = 10;
  __pyx_t_236[3] = 3;
  __pyx_t_236[4] = 10;
  __pyx_t_236[5] = 2;
  __pyx_t_236[6] = 7;
  __pyx_t_236[7] = 4;
  __pyx_t_236[8] = 10;
  __pyx_t_236[9] = 1;
  __pyx_t_236[10] = 10;
  __pyx_t_236[11] = 0;
  __pyx_t_236[12] = 4;
  __pyx_t_236[13] = 0;
  __pyx_t_236[14] = 10;
  __pyx_t_236[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1449
 *     [9, 10, 7, 9, 7, 4, 10, 2, 7, 8, 7, 0, 2, 0, 7, -1],
 *     [3, 7, 10, 3, 10, 2, 7, 4, 10, 1, 10, 0, 4, 0, 10, -1],
 *     [1, 10, 2, 8, 7, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 9, 1, 4, 1, 7, 7, 1, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 9, 1, 4, 1, 7, 0, 8, 1, 8, 7, 1, -1, -1, -1, -1],
 */
  __pyx_t_237[0] = 1;
  __pyx_t_237[1] = 10;
  __pyx_t_237[2] = 2;
  __pyx_t_237[3] = 8;
  __pyx_t_237[4] = 7;
  __pyx_t_237[5] = 4;
  __pyx_t_237[6] = -1;
  __pyx_t_237[7] = -1;
  __pyx_t_237[8] = -1;
  __pyx_t_237[9] = -1;
  __pyx_t_237[10] = -1;
  __pyx_t_237[11] = -1;
  __pyx_t_237[12] = -1;
  __pyx_t_237[13] = -1;
  __pyx_t_237[14] = -1;
  __pyx_t_237[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1450
 *     [3, 7, 10, 3, 10, 2, 7, 4, 10, 1, 10, 0, 4, 0, 10, -1],
 *     [1, 10, 2, 8, 7, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 9, 1, 4, 1, 7, 7, 1, 3, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 9, 1, 4, 1, 7, 0, 8, 1, 8, 7, 1, -1, -1, -1, -1],
 *     [4, 0, 3, 7, 4, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_238[0] = 4;
  __pyx_t_238[1] = 9;
  __pyx_t_238[2] = 1;
  __pyx_t_238[3] = 4;
  __pyx_t_238[4] = 1;
  __pyx_t_238[5] = 7;
  __pyx_t_238[6] = 7;
  __pyx_t_238[7] = 1;
  __pyx_t_238[8] = 3;
  __pyx_t_238[9] = -1;
  __pyx_t_238[10] = -1;
  __pyx_t_238[11] = -1;
  __pyx_t_238[12] = -1;
  __pyx_t_238[13] = -1;
  __pyx_t_238[14] = -1;
  __pyx_t_238[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1451
 *     [1, 10, 2, 8, 7, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 9, 1, 4, 1, 7, 7, 1, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 9, 1, 4, 1, 7, 0, 8, 1, 8, 7, 1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 0, 3, 7, 4, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 8, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_239[0] = 4;
  __pyx_t_239[1] = 9;
  __pyx_t_239[2] = 1;
  __pyx_t_239[3] = 4;
  __pyx_t_239[4] = 1;
  __pyx_t_239[5] = 7;
  __pyx_t_239[6] = 0;
  __pyx_t_239[7] = 8;
  __pyx_t_239[8] = 1;
  __pyx_t_239[9] = 8;
  __pyx_t_239[10] = 7;
  __pyx_t_239[11] = 1;
  __pyx_t_239[12] = -1;
  __pyx_t_239[13] = -1;
  __pyx_t_239[14] = -1;
  __pyx_t_239[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1452
 *     [4, 9, 1, 4, 1, 7, 7, 1, 3, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 9, 1, 4, 1, 7, 0, 8, 1, 8, 7, 1, -1, -1, -1, -1],
 *     [4, 0, 3, 7, 4, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [4, 8, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_240[0] = 4;
  __pyx_t_240[1] = 0;
  __pyx_t_240[2] = 3;
  __pyx_t_240[3] = 7;
  __pyx_t_240[4] = 4;
  __pyx_t_240[5] = 3;
  __pyx_t_240[6] = -1;
  __pyx_t_240[7] = -1;
  __pyx_t_240[8] = -1;
  __pyx_t_240[9] = -1;
  __pyx_t_240[10] = -1;
  __pyx_t_240[11] = -1;
  __pyx_t_240[12] = -1;
  __pyx_t_240[13] = -1;
  __pyx_t_240[14] = -1;
  __pyx_t_240[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1453
 *     [4, 9, 1, 4, 1, 7, 0, 8, 1, 8, 7, 1, -1, -1, -1, -1],
 *     [4, 0, 3, 7, 4, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 8, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 0, 9, 3, 9, 11, 11, 9, 10, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_241[0] = 4;
  __pyx_t_241[1] = 8;
  __pyx_t_241[2] = 7;
  __pyx_t_241[3] = -1;
  __pyx_t_241[4] = -1;
  __pyx_t_241[5] = -1;
  __pyx_t_241[6] = -1;
  __pyx_t_241[7] = -1;
  __pyx_t_241[8] = -1;
  __pyx_t_241[9] = -1;
  __pyx_t_241[10] = -1;
  __pyx_t_241[11] = -1;
  __pyx_t_241[12] = -1;
  __pyx_t_241[13] = -1;
  __pyx_t_241[14] = -1;
  __pyx_t_241[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1454
 *     [4, 0, 3, 7, 4, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [4, 8, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 0, 9, 3, 9, 11, 11, 9, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 1, 10, 0, 10, 8, 8, 10, 11, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_242[0] = 9;
  __pyx_t_242[1] = 10;
  __pyx_t_242[2] = 8;
  __pyx_t_242[3] = 10;
  __pyx_t_242[4] = 11;
  __pyx_t_242[5] = 8;
  __pyx_t_242[6] = -1;
  __pyx_t_242[7] = -1;
  __pyx_t_242[8] = -1;
  __pyx_t_242[9] = -1;
  __pyx_t_242[10] = -1;
  __pyx_t_242[11] = -1;
  __pyx_t_242[12] = -1;
  __pyx_t_242[13] = -1;
  __pyx_t_242[14] = -1;
  __pyx_t_242[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1455
 *     [4, 8, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 0, 9, 3, 9, 11, 11, 9, 10, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 1, 10, 0, 10, 8, 8, 10, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 1, 10, 11, 3, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_243[0] = 3;
  __pyx_t_243[1] = 0;
  __pyx_t_243[2] = 9;
  __pyx_t_243[3] = 3;
  __pyx_t_243[4] = 9;
  __pyx_t_243[5] = 11;
  __pyx_t_243[6] = 11;
  __pyx_t_243[7] = 9;
  __pyx_t_243[8] = 10;
  __pyx_t_243[9] = -1;
  __pyx_t_243[10] = -1;
  __pyx_t_243[11] = -1;
  __pyx_t_243[12] = -1;
  __pyx_t_243[13] = -1;
  __pyx_t_243[14] = -1;
  __pyx_t_243[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1456
 *     [9, 10, 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 0, 9, 3, 9, 11, 11, 9, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 1, 10, 0, 10, 8, 8, 10, 11, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 1, 10, 11, 3, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 11, 1, 11, 9, 9, 11, 8, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_244[0] = 0;
  __pyx_t_244[1] = 1;
  __pyx_t_244[2] = 10;
  __pyx_t_244[3] = 0;
  __pyx_t_244[4] = 10;
  __pyx_t_244[5] = 8;
  __pyx_t_244[6] = 8;
  __pyx_t_244[7] = 10;
  __pyx_t_244[8] = 11;
  __pyx_t_244[9] = -1;
  __pyx_t_244[10] = -1;
  __pyx_t_244[11] = -1;
  __pyx_t_244[12] = -1;
  __pyx_t_244[13] = -1;
  __pyx_t_244[14] = -1;
  __pyx_t_244[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1457
 *     [3, 0, 9, 3, 9, 11, 11, 9, 10, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 1, 10, 0, 10, 8, 8, 10, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 1, 10, 11, 3, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 2, 11, 1, 11, 9, 9, 11, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 0, 9, 3, 9, 11, 1, 2, 9, 2, 11, 9, -1, -1, -1, -1],
 */
  __pyx_t_245[0] = 3;
  __pyx_t_245[1] = 1;
  __pyx_t_245[2] = 10;
  __pyx_t_245[3] = 11;
  __pyx_t_245[4] = 3;
  __pyx_t_245[5] = 10;
  __pyx_t_245[6] = -1;
  __pyx_t_245[7] = -1;
  __pyx_t_245[8] = -1;
  __pyx_t_245[9] = -1;
  __pyx_t_245[10] = -1;
  __pyx_t_245[11] = -1;
  __pyx_t_245[12] = -1;
  __pyx_t_245[13] = -1;
  __pyx_t_245[14] = -1;
  __pyx_t_245[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1458
 *     [0, 1, 10, 0, 10, 8, 8, 10, 11, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 1, 10, 11, 3, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 11, 1, 11, 9, 9, 11, 8, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 0, 9, 3, 9, 11, 1, 2, 9, 2, 11, 9, -1, -1, -1, -1],
 *     [0, 2, 11, 8, 0, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_246[0] = 1;
  __pyx_t_246[1] = 2;
  __pyx_t_246[2] = 11;
  __pyx_t_246[3] = 1;
  __pyx_t_246[4] = 11;
  __pyx_t_246[5] = 9;
  __pyx_t_246[6] = 9;
  __pyx_t_246[7] = 11;
  __pyx_t_246[8] = 8;
  __pyx_t_246[9] = -1;
  __pyx_t_246[10] = -1;
  __pyx_t_246[11] = -1;
  __pyx_t_246[12] = -1;
  __pyx_t_246[13] = -1;
  __pyx_t_246[14] = -1;
  __pyx_t_246[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1459
 *     [3, 1, 10, 11, 3, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 2, 11, 1, 11, 9, 9, 11, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 0, 9, 3, 9, 11, 1, 2, 9, 2, 11, 9, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 2, 11, 8, 0, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 2, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_247[0] = 3;
  __pyx_t_247[1] = 0;
  __pyx_t_247[2] = 9;
  __pyx_t_247[3] = 3;
  __pyx_t_247[4] = 9;
  __pyx_t_247[5] = 11;
  __pyx_t_247[6] = 1;
  __pyx_t_247[7] = 2;
  __pyx_t_247[8] = 9;
  __pyx_t_247[9] = 2;
  __pyx_t_247[10] = 11;
  __pyx_t_247[11] = 9;
  __pyx_t_247[12] = -1;
  __pyx_t_247[13] = -1;
  __pyx_t_247[14] = -1;
  __pyx_t_247[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1460
 *     [1, 2, 11, 1, 11, 9, 9, 11, 8, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 0, 9, 3, 9, 11, 1, 2, 9, 2, 11, 9, -1, -1, -1, -1],
 *     [0, 2, 11, 8, 0, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [3, 2, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 3, 8, 2, 8, 10, 10, 8, 9, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_248[0] = 0;
  __pyx_t_248[1] = 2;
  __pyx_t_248[2] = 11;
  __pyx_t_248[3] = 8;
  __pyx_t_248[4] = 0;
  __pyx_t_248[5] = 11;
  __pyx_t_248[6] = -1;
  __pyx_t_248[7] = -1;
  __pyx_t_248[8] = -1;
  __pyx_t_248[9] = -1;
  __pyx_t_248[10] = -1;
  __pyx_t_248[11] = -1;
  __pyx_t_248[12] = -1;
  __pyx_t_248[13] = -1;
  __pyx_t_248[14] = -1;
  __pyx_t_248[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1461
 *     [3, 0, 9, 3, 9, 11, 1, 2, 9, 2, 11, 9, -1, -1, -1, -1],
 *     [0, 2, 11, 8, 0, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 2, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [2, 3, 8, 2, 8, 10, 10, 8, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 10, 2, 0, 9, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_249[0] = 3;
  __pyx_t_249[1] = 2;
  __pyx_t_249[2] = 11;
  __pyx_t_249[3] = -1;
  __pyx_t_249[4] = -1;
  __pyx_t_249[5] = -1;
  __pyx_t_249[6] = -1;
  __pyx_t_249[7] = -1;
  __pyx_t_249[8] = -1;
  __pyx_t_249[9] = -1;
  __pyx_t_249[10] = -1;
  __pyx_t_249[11] = -1;
  __pyx_t_249[12] = -1;
  __pyx_t_249[13] = -1;
  __pyx_t_249[14] = -1;
  __pyx_t_249[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1462
 *     [0, 2, 11, 8, 0, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [3, 2, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 3, 8, 2, 8, 10, 10, 8, 9, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [9, 10, 2, 0, 9, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 3, 8, 2, 8, 10, 0, 1, 8, 1, 10, 8, -1, -1, -1, -1],
 */
  __pyx_t_250[0] = 2;
  __pyx_t_250[1] = 3;
  __pyx_t_250[2] = 8;
  __pyx_t_250[3] = 2;
  __pyx_t_250[4] = 8;
  __pyx_t_250[5] = 10;
  __pyx_t_250[6] = 10;
  __pyx_t_250[7] = 8;
  __pyx_t_250[8] = 9;
  __pyx_t_250[9] = -1;
  __pyx_t_250[10] = -1;
  __pyx_t_250[11] = -1;
  __pyx_t_250[12] = -1;
  __pyx_t_250[13] = -1;
  __pyx_t_250[14] = -1;
  __pyx_t_250[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1463
 *     [3, 2, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 3, 8, 2, 8, 10, 10, 8, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 10, 2, 0, 9, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [2, 3, 8, 2, 8, 10, 0, 1, 8, 1, 10, 8, -1, -1, -1, -1],
 *     [1, 10, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_251[0] = 9;
  __pyx_t_251[1] = 10;
  __pyx_t_251[2] = 2;
  __pyx_t_251[3] = 0;
  __pyx_t_251[4] = 9;
  __pyx_t_251[5] = 2;
  __pyx_t_251[6] = -1;
  __pyx_t_251[7] = -1;
  __pyx_t_251[8] = -1;
  __pyx_t_251[9] = -1;
  __pyx_t_251[10] = -1;
  __pyx_t_251[11] = -1;
  __pyx_t_251[12] = -1;
  __pyx_t_251[13] = -1;
  __pyx_t_251[14] = -1;
  __pyx_t_251[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1464
 *     [2, 3, 8, 2, 8, 10, 10, 8, 9, -1, -1, -1, -1, -1, -1, -1],
 *     [9, 10, 2, 0, 9, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 3, 8, 2, 8, 10, 0, 1, 8, 1, 10, 8, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 10, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 3, 8, 9, 1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_252[0] = 2;
  __pyx_t_252[1] = 3;
  __pyx_t_252[2] = 8;
  __pyx_t_252[3] = 2;
  __pyx_t_252[4] = 8;
  __pyx_t_252[5] = 10;
  __pyx_t_252[6] = 0;
  __pyx_t_252[7] = 1;
  __pyx_t_252[8] = 8;
  __pyx_t_252[9] = 1;
  __pyx_t_252[10] = 10;
  __pyx_t_252[11] = 8;
  __pyx_t_252[12] = -1;
  __pyx_t_252[13] = -1;
  __pyx_t_252[14] = -1;
  __pyx_t_252[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1465
 *     [9, 10, 2, 0, 9, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [2, 3, 8, 2, 8, 10, 0, 1, 8, 1, 10, 8, -1, -1, -1, -1],
 *     [1, 10, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [1, 3, 8, 9, 1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 9, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_253[0] = 1;
  __pyx_t_253[1] = 10;
  __pyx_t_253[2] = 2;
  __pyx_t_253[3] = -1;
  __pyx_t_253[4] = -1;
  __pyx_t_253[5] = -1;
  __pyx_t_253[6] = -1;
  __pyx_t_253[7] = -1;
  __pyx_t_253[8] = -1;
  __pyx_t_253[9] = -1;
  __pyx_t_253[10] = -1;
  __pyx_t_253[11] = -1;
  __pyx_t_253[12] = -1;
  __pyx_t_253[13] = -1;
  __pyx_t_253[14] = -1;
  __pyx_t_253[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1466
 *     [2, 3, 8, 2, 8, 10, 0, 1, 8, 1, 10, 8, -1, -1, -1, -1],
 *     [1, 10, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 3, 8, 9, 1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 9, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 3, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 */
  __pyx_t_254[0] = 1;
  __pyx_t_254[1] = 3;
  __pyx_t_254[2] = 8;
  __pyx_t_254[3] = 9;
  __pyx_t_254[4] = 1;
  __pyx_t_254[5] = 8;
  __pyx_t_254[6] = -1;
  __pyx_t_254[7] = -1;
  __pyx_t_254[8] = -1;
  __pyx_t_254[9] = -1;
  __pyx_t_254[10] = -1;
  __pyx_t_254[11] = -1;
  __pyx_t_254[12] = -1;
  __pyx_t_254[13] = -1;
  __pyx_t_254[14] = -1;
  __pyx_t_254[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1467
 *     [1, 10, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [1, 3, 8, 9, 1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 9, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [0, 3, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]]
 */
  __pyx_t_255[0] = 0;
  __pyx_t_255[1] = 9;
  __pyx_t_255[2] = 1;
  __pyx_t_255[3] = -1;
  __pyx_t_255[4] = -1;
  __pyx_t_255[5] = -1;
  __pyx_t_255[6] = -1;
  __pyx_t_255[7] = -1;
  __pyx_t_255[8] = -1;
  __pyx_t_255[9] = -1;
  __pyx_t_255[10] = -1;
  __pyx_t_255[11] = -1;
  __pyx_t_255[12] = -1;
  __pyx_t_255[13] = -1;
  __pyx_t_255[14] = -1;
  __pyx_t_255[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1468
 *     [1, 3, 8, 9, 1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 9, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 3, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],             # <<<<<<<<<<<<<<
 *     [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]]
 *     cdef np.float64_t vertlist[12][3]
 */
  __pyx_t_256[0] = 0;
  __pyx_t_256[1] = 3;
  __pyx_t_256[2] = 8;
  __pyx_t_256[3] = -1;
  __pyx_t_256[4] = -1;
  __pyx_t_256[5] = -1;
  __pyx_t_256[6] = -1;
  __pyx_t_256[7] = -1;
  __pyx_t_256[8] = -1;
  __pyx_t_256[9] = -1;
  __pyx_t_256[10] = -1;
  __pyx_t_256[11] = -1;
  __pyx_t_256[12] = -1;
  __pyx_t_256[13] = -1;
  __pyx_t_256[14] = -1;
  __pyx_t_256[15] = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1469
 *     [0, 9, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [0, 3, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],
 *     [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]]             # <<<<<<<<<<<<<<
 *     cdef np.float64_t vertlist[12][3]
 *     cdef int cubeindex = 0
 */
  __pyx_t_257[0] = -1;
  __pyx_t_257[1] = -1;
  __pyx_t_257[2] = -1;
  __pyx_t_257[3] = -1;
  __pyx_t_257[4] = -1;
  __pyx_t_257[5] = -1;
  __pyx_t_257[6] = -1;
  __pyx_t_257[7] = -1;
  __pyx_t_257[8] = -1;
  __pyx_t_257[9] = -1;
  __pyx_t_257[10] = -1;
  __pyx_t_257[11] = -1;
  __pyx_t_257[12] = -1;
  __pyx_t_257[13] = -1;
  __pyx_t_257[14] = -1;
  __pyx_t_257[15] = -1;
  __pyx_t_258[0] = __pyx_t_2;
  __pyx_t_258[1] = __pyx_t_3;
  __pyx_t_258[2] = __pyx_t_4;
  __pyx_t_258[3] = __pyx_t_5;
  __pyx_t_258[4] = __pyx_t_6;
  __pyx_t_258[5] = __pyx_t_7;
  __pyx_t_258[6] = __pyx_t_8;
  __pyx_t_258[7] = __pyx_t_9;
  __pyx_t_258[8] = __pyx_t_10;
  __pyx_t_258[9] = __pyx_t_11;
  __pyx_t_258[10] = __pyx_t_12;
  __pyx_t_258[11] = __pyx_t_13;
  __pyx_t_258[12] = __pyx_t_14;
  __pyx_t_258[13] = __pyx_t_15;
  __pyx_t_258[14] = __pyx_t_16;
  __pyx_t_258[15] = __pyx_t_17;
  __pyx_t_258[16] = __pyx_t_18;
  __pyx_t_258[17] = __pyx_t_19;
  __pyx_t_258[18] = __pyx_t_20;
  __pyx_t_258[19] = __pyx_t_21;
  __pyx_t_258[20] = __pyx_t_22;
  __pyx_t_258[21] = __pyx_t_23;
  __pyx_t_258[22] = __pyx_t_24;
  __pyx_t_258[23] = __pyx_t_25;
  __pyx_t_258[24] = __pyx_t_26;
  __pyx_t_258[25] = __pyx_t_27;
  __pyx_t_258[26] = __pyx_t_28;
  __pyx_t_258[27] = __pyx_t_29;
  __pyx_t_258[28] = __pyx_t_30;
  __pyx_t_258[29] = __pyx_t_31;
  __pyx_t_258[30] = __pyx_t_32;
  __pyx_t_258[31] = __pyx_t_33;
  __pyx_t_258[32] = __pyx_t_34;
  __pyx_t_258[33] = __pyx_t_35;
  __pyx_t_258[34] = __pyx_t_36;
  __pyx_t_258[35] = __pyx_t_37;
  __pyx_t_258[36] = __pyx_t_38;
  __pyx_t_258[37] = __pyx_t_39;
  __pyx_t_258[38] = __pyx_t_40;
  __pyx_t_258[39] = __pyx_t_41;
  __pyx_t_258[40] = __pyx_t_42;
  __pyx_t_258[41] = __pyx_t_43;
  __pyx_t_258[42] = __pyx_t_44;
  __pyx_t_258[43] = __pyx_t_45;
  __pyx_t_258[44] = __pyx_t_46;
  __pyx_t_258[45] = __pyx_t_47;
  __pyx_t_258[46] = __pyx_t_48;
  __pyx_t_258[47] = __pyx_t_49;
  __pyx_t_258[48] = __pyx_t_50;
  __pyx_t_258[49] = __pyx_t_51;
  __pyx_t_258[50] = __pyx_t_52;
  __pyx_t_258[51] = __pyx_t_53;
  __pyx_t_258[52] = __pyx_t_54;
  __pyx_t_258[53] = __pyx_t_55;
  __pyx_t_258[54] = __pyx_t_56;
  __pyx_t_258[55] = __pyx_t_57;
  __pyx_t_258[56] = __pyx_t_58;
  __pyx_t_258[57] = __pyx_t_59;
  __pyx_t_258[58] = __pyx_t_60;
  __pyx_t_258[59] = __pyx_t_61;
  __pyx_t_258[60] = __pyx_t_62;
  __pyx_t_258[61] = __pyx_t_63;
  __pyx_t_258[62] = __pyx_t_64;
  __pyx_t_258[63] = __pyx_t_65;
  __pyx_t_258[64] = __pyx_t_66;
  __pyx_t_258[65] = __pyx_t_67;
  __pyx_t_258[66] = __pyx_t_68;
  __pyx_t_258[67] = __pyx_t_69;
  __pyx_t_258[68] = __pyx_t_70;
  __pyx_t_258[69] = __pyx_t_71;
  __pyx_t_258[70] = __pyx_t_72;
  __pyx_t_258[71] = __pyx_t_73;
  __pyx_t_258[72] = __pyx_t_74;
  __pyx_t_258[73] = __pyx_t_75;
  __pyx_t_258[74] = __pyx_t_76;
  __pyx_t_258[75] = __pyx_t_77;
  __pyx_t_258[76] = __pyx_t_78;
  __pyx_t_258[77] = __pyx_t_79;
  __pyx_t_258[78] = __pyx_t_80;
  __pyx_t_258[79] = __pyx_t_81;
  __pyx_t_258[80] = __pyx_t_82;
  __pyx_t_258[81] = __pyx_t_83;
  __pyx_t_258[82] = __pyx_t_84;
  __pyx_t_258[83] = __pyx_t_85;
  __pyx_t_258[84] = __pyx_t_86;
  __pyx_t_258[85] = __pyx_t_87;
  __pyx_t_258[86] = __pyx_t_88;
  __pyx_t_258[87] = __pyx_t_89;
  __pyx_t_258[88] = __pyx_t_90;
  __pyx_t_258[89] = __pyx_t_91;
  __pyx_t_258[90] = __pyx_t_92;
  __pyx_t_258[91] = __pyx_t_93;
  __pyx_t_258[92] = __pyx_t_94;
  __pyx_t_258[93] = __pyx_t_95;
  __pyx_t_258[94] = __pyx_t_96;
  __pyx_t_258[95] = __pyx_t_97;
  __pyx_t_258[96] = __pyx_t_98;
  __pyx_t_258[97] = __pyx_t_99;
  __pyx_t_258[98] = __pyx_t_100;
  __pyx_t_258[99] = __pyx_t_101;
  __pyx_t_258[100] = __pyx_t_102;
  __pyx_t_258[101] = __pyx_t_103;
  __pyx_t_258[102] = __pyx_t_104;
  __pyx_t_258[103] = __pyx_t_105;
  __pyx_t_258[104] = __pyx_t_106;
  __pyx_t_258[105] = __pyx_t_107;
  __pyx_t_258[106] = __pyx_t_108;
  __pyx_t_258[107] = __pyx_t_109;
  __pyx_t_258[108] = __pyx_t_110;
  __pyx_t_258[109] = __pyx_t_111;
  __pyx_t_258[110] = __pyx_t_112;
  __pyx_t_258[111] = __pyx_t_113;
  __pyx_t_258[112] = __pyx_t_114;
  __pyx_t_258[113] = __pyx_t_115;
  __pyx_t_258[114] = __pyx_t_116;
  __pyx_t_258[115] = __pyx_t_117;
  __pyx_t_258[116] = __pyx_t_118;
  __pyx_t_258[117] = __pyx_t_119;
  __pyx_t_258[118] = __pyx_t_120;
  __pyx_t_258[119] = __pyx_t_121;
  __pyx_t_258[120] = __pyx_t_122;
  __pyx_t_258[121] = __pyx_t_123;
  __pyx_t_258[122] = __pyx_t_124;
  __pyx_t_258[123] = __pyx_t_125;
  __pyx_t_258[124] = __pyx_t_126;
  __pyx_t_258[125] = __pyx_t_127;
  __pyx_t_258[126] = __pyx_t_128;
  __pyx_t_258[127] = __pyx_t_129;
  __pyx_t_258[128] = __pyx_t_130;
  __pyx_t_258[129] = __pyx_t_131;
  __pyx_t_258[130] = __pyx_t_132;
  __pyx_t_258[131] = __pyx_t_133;
  __pyx_t_258[132] = __pyx_t_134;
  __pyx_t_258[133] = __pyx_t_135;
  __pyx_t_258[134] = __pyx_t_136;
  __pyx_t_258[135] = __pyx_t_137;
  __pyx_t_258[136] = __pyx_t_138;
  __pyx_t_258[137] = __pyx_t_139;
  __pyx_t_258[138] = __pyx_t_140;
  __pyx_t_258[139] = __pyx_t_141;
  __pyx_t_258[140] = __pyx_t_142;
  __pyx_t_258[141] = __pyx_t_143;
  __pyx_t_258[142] = __pyx_t_144;
  __pyx_t_258[143] = __pyx_t_145;
  __pyx_t_258[144] = __pyx_t_146;
  __pyx_t_258[145] = __pyx_t_147;
  __pyx_t_258[146] = __pyx_t_148;
  __pyx_t_258[147] = __pyx_t_149;
  __pyx_t_258[148] = __pyx_t_150;
  __pyx_t_258[149] = __pyx_t_151;
  __pyx_t_258[150] = __pyx_t_152;
  __pyx_t_258[151] = __pyx_t_153;
  __pyx_t_258[152] = __pyx_t_154;
  __pyx_t_258[153] = __pyx_t_155;
  __pyx_t_258[154] = __pyx_t_156;
  __pyx_t_258[155] = __pyx_t_157;
  __pyx_t_258[156] = __pyx_t_158;
  __pyx_t_258[157] = __pyx_t_159;
  __pyx_t_258[158] = __pyx_t_160;
  __pyx_t_258[159] = __pyx_t_161;
  __pyx_t_258[160] = __pyx_t_162;
  __pyx_t_258[161] = __pyx_t_163;
  __pyx_t_258[162] = __pyx_t_164;
  __pyx_t_258[163] = __pyx_t_165;
  __pyx_t_258[164] = __pyx_t_166;
  __pyx_t_258[165] = __pyx_t_167;
  __pyx_t_258[166] = __pyx_t_168;
  __pyx_t_258[167] = __pyx_t_169;
  __pyx_t_258[168] = __pyx_t_170;
  __pyx_t_258[169] = __pyx_t_171;
  __pyx_t_258[170] = __pyx_t_172;
  __pyx_t_258[171] = __pyx_t_173;
  __pyx_t_258[172] = __pyx_t_174;
  __pyx_t_258[173] = __pyx_t_175;
  __pyx_t_258[174] = __pyx_t_176;
  __pyx_t_258[175] = __pyx_t_177;
  __pyx_t_258[176] = __pyx_t_178;
  __pyx_t_258[177] = __pyx_t_179;
  __pyx_t_258[178] = __pyx_t_180;
  __pyx_t_258[179] = __pyx_t_181;
  __pyx_t_258[180] = __pyx_t_182;
  __pyx_t_258[181] = __pyx_t_183;
  __pyx_t_258[182] = __pyx_t_184;
  __pyx_t_258[183] = __pyx_t_185;
  __pyx_t_258[184] = __pyx_t_186;
  __pyx_t_258[185] = __pyx_t_187;
  __pyx_t_258[186] = __pyx_t_188;
  __pyx_t_258[187] = __pyx_t_189;
  __pyx_t_258[188] = __pyx_t_190;
  __pyx_t_258[189] = __pyx_t_191;
  __pyx_t_258[190] = __pyx_t_192;
  __pyx_t_258[191] = __pyx_t_193;
  __pyx_t_258[192] = __pyx_t_194;
  __pyx_t_258[193] = __pyx_t_195;
  __pyx_t_258[194] = __pyx_t_196;
  __pyx_t_258[195] = __pyx_t_197;
  __pyx_t_258[196] = __pyx_t_198;
  __pyx_t_258[197] = __pyx_t_199;
  __pyx_t_258[198] = __pyx_t_200;
  __pyx_t_258[199] = __pyx_t_201;
  __pyx_t_258[200] = __pyx_t_202;
  __pyx_t_258[201] = __pyx_t_203;
  __pyx_t_258[202] = __pyx_t_204;
  __pyx_t_258[203] = __pyx_t_205;
  __pyx_t_258[204] = __pyx_t_206;
  __pyx_t_258[205] = __pyx_t_207;
  __pyx_t_258[206] = __pyx_t_208;
  __pyx_t_258[207] = __pyx_t_209;
  __pyx_t_258[208] = __pyx_t_210;
  __pyx_t_258[209] = __pyx_t_211;
  __pyx_t_258[210] = __pyx_t_212;
  __pyx_t_258[211] = __pyx_t_213;
  __pyx_t_258[212] = __pyx_t_214;
  __pyx_t_258[213] = __pyx_t_215;
  __pyx_t_258[214] = __pyx_t_216;
  __pyx_t_258[215] = __pyx_t_217;
  __pyx_t_258[216] = __pyx_t_218;
  __pyx_t_258[217] = __pyx_t_219;
  __pyx_t_258[218] = __pyx_t_220;
  __pyx_t_258[219] = __pyx_t_221;
  __pyx_t_258[220] = __pyx_t_222;
  __pyx_t_258[221] = __pyx_t_223;
  __pyx_t_258[222] = __pyx_t_224;
  __pyx_t_258[223] = __pyx_t_225;
  __pyx_t_258[224] = __pyx_t_226;
  __pyx_t_258[225] = __pyx_t_227;
  __pyx_t_258[226] = __pyx_t_228;
  __pyx_t_258[227] = __pyx_t_229;
  __pyx_t_258[228] = __pyx_t_230;
  __pyx_t_258[229] = __pyx_t_231;
  __pyx_t_258[230] = __pyx_t_232;
  __pyx_t_258[231] = __pyx_t_233;
  __pyx_t_258[232] = __pyx_t_234;
  __pyx_t_258[233] = __pyx_t_235;
  __pyx_t_258[234] = __pyx_t_236;
  __pyx_t_258[235] = __pyx_t_237;
  __pyx_t_258[236] = __pyx_t_238;
  __pyx_t_258[237] = __pyx_t_239;
  __pyx_t_258[238] = __pyx_t_240;
  __pyx_t_258[239] = __pyx_t_241;
  __pyx_t_258[240] = __pyx_t_242;
  __pyx_t_258[241] = __pyx_t_243;
  __pyx_t_258[242] = __pyx_t_244;
  __pyx_t_258[243] = __pyx_t_245;
  __pyx_t_258[244] = __pyx_t_246;
  __pyx_t_258[245] = __pyx_t_247;
  __pyx_t_258[246] = __pyx_t_248;
  __pyx_t_258[247] = __pyx_t_249;
  __pyx_t_258[248] = __pyx_t_250;
  __pyx_t_258[249] = __pyx_t_251;
  __pyx_t_258[250] = __pyx_t_252;
  __pyx_t_258[251] = __pyx_t_253;
  __pyx_t_258[252] = __pyx_t_254;
  __pyx_t_258[253] = __pyx_t_255;
  __pyx_t_258[254] = __pyx_t_256;
  __pyx_t_258[255] = __pyx_t_257;
  __pyx_v_tri_table = __pyx_t_258;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1471
 *     [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]]
 *     cdef np.float64_t vertlist[12][3]
 *     cdef int cubeindex = 0             # <<<<<<<<<<<<<<
 *     cdef int n
 *     cdef int nt = 0
 */
  __pyx_v_cubeindex = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1473
 *     cdef int cubeindex = 0
 *     cdef int n
 *     cdef int nt = 0             # <<<<<<<<<<<<<<
 *     for n in range(8):
 *         if gv[n] < isovalue:
 */
  __pyx_v_nt = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1474
 *     cdef int n
 *     cdef int nt = 0
 *     for n in range(8):             # <<<<<<<<<<<<<<
 *         if gv[n] < isovalue:
 *             cubeindex |= (1 << n)
 */
  for (__pyx_t_259 = 0; __pyx_t_259 < 8; __pyx_t_259+=1) {
    __pyx_v_n = __pyx_t_259;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1475
 *     cdef int nt = 0
 *     for n in range(8):
 *         if gv[n] < isovalue:             # <<<<<<<<<<<<<<
 *             cubeindex |= (1 << n)
 *     if edge_table[cubeindex] == 0:
 */
    __pyx_t_260 = ((__pyx_v_gv[__pyx_v_n]) < __pyx_v_isovalue);
    if (__pyx_t_260) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1476
 *     for n in range(8):
 *         if gv[n] < isovalue:
 *             cubeindex |= (1 << n)             # <<<<<<<<<<<<<<
 *     if edge_table[cubeindex] == 0:
 *         return 0
 */
      __pyx_v_cubeindex = (__pyx_v_cubeindex | (1 << __pyx_v_n));
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1477
 *         if gv[n] < isovalue:
 *             cubeindex |= (1 << n)
 *     if edge_table[cubeindex] == 0:             # <<<<<<<<<<<<<<
 *         return 0
 *     if (edge_table[cubeindex] & 1): # 0,0,0 with 1,0,0
 */
  __pyx_t_260 = ((__pyx_v_edge_table[__pyx_v_cubeindex]) == 0);
  if (__pyx_t_260) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1478
 *             cubeindex |= (1 << n)
 *     if edge_table[cubeindex] == 0:
 *         return 0             # <<<<<<<<<<<<<<
 *     if (edge_table[cubeindex] & 1): # 0,0,0 with 1,0,0
 *         vertex_interp(gv[0], gv[1], isovalue, vertlist[0],
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1479
 *     if edge_table[cubeindex] == 0:
 *         return 0
 *     if (edge_table[cubeindex] & 1): # 0,0,0 with 1,0,0             # <<<<<<<<<<<<<<
 *         vertex_interp(gv[0], gv[1], isovalue, vertlist[0],
 *                       dds, x, y, z, 0, 1)
 */
  __pyx_t_261 = ((__pyx_v_edge_table[__pyx_v_cubeindex]) & 1);
  if (__pyx_t_261) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1481
 *     if (edge_table[cubeindex] & 1): # 0,0,0 with 1,0,0
 *         vertex_interp(gv[0], gv[1], isovalue, vertlist[0],
 *                       dds, x, y, z, 0, 1)             # <<<<<<<<<<<<<<
 *     if (edge_table[cubeindex] & 2): # 1,0,0 with 1,1,0
 *         vertex_interp(gv[1], gv[2], isovalue, vertlist[1],
 */
    vertex_interp((__pyx_v_gv[0]), (__pyx_v_gv[1]), __pyx_v_isovalue, (__pyx_v_vertlist[0]), __pyx_v_dds, __pyx_v_x, __pyx_v_y, __pyx_v_z, 0, 1);
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1482
 *         vertex_interp(gv[0], gv[1], isovalue, vertlist[0],
 *                       dds, x, y, z, 0, 1)
 *     if (edge_table[cubeindex] & 2): # 1,0,0 with 1,1,0             # <<<<<<<<<<<<<<
 *         vertex_interp(gv[1], gv[2], isovalue, vertlist[1],
 *                       dds, x, y, z, 1, 2)
 */
  __pyx_t_261 = ((__pyx_v_edge_table[__pyx_v_cubeindex]) & 2);
  if (__pyx_t_261) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1484
 *     if (edge_table[cubeindex] & 2): # 1,0,0 with 1,1,0
 *         vertex_interp(gv[1], gv[2], isovalue, vertlist[1],
 *                       dds, x, y, z, 1, 2)             # <<<<<<<<<<<<<<
 *     if (edge_table[cubeindex] & 4): # 1,1,0 with 0,1,0
 *         vertex_interp(gv[2], gv[3], isovalue, vertlist[2],
 */
    vertex_interp((__pyx_v_gv[1]), (__pyx_v_gv[2]), __pyx_v_isovalue, (__pyx_v_vertlist[1]), __pyx_v_dds, __pyx_v_x, __pyx_v_y, __pyx_v_z, 1, 2);
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1485
 *         vertex_interp(gv[1], gv[2], isovalue, vertlist[1],
 *                       dds, x, y, z, 1, 2)
 *     if (edge_table[cubeindex] & 4): # 1,1,0 with 0,1,0             # <<<<<<<<<<<<<<
 *         vertex_interp(gv[2], gv[3], isovalue, vertlist[2],
 *                       dds, x, y, z, 2, 3)
 */
  __pyx_t_261 = ((__pyx_v_edge_table[__pyx_v_cubeindex]) & 4);
  if (__pyx_t_261) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1487
 *     if (edge_table[cubeindex] & 4): # 1,1,0 with 0,1,0
 *         vertex_interp(gv[2], gv[3], isovalue, vertlist[2],
 *                       dds, x, y, z, 2, 3)             # <<<<<<<<<<<<<<
 *     if (edge_table[cubeindex] & 8): # 0,1,0 with 0,0,0
 *         vertex_interp(gv[3], gv[0], isovalue, vertlist[3],
 */
    vertex_interp((__pyx_v_gv[2]), (__pyx_v_gv[3]), __pyx_v_isovalue, (__pyx_v_vertlist[2]), __pyx_v_dds, __pyx_v_x, __pyx_v_y, __pyx_v_z, 2, 3);
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1488
 *         vertex_interp(gv[2], gv[3], isovalue, vertlist[2],
 *                       dds, x, y, z, 2, 3)
 *     if (edge_table[cubeindex] & 8): # 0,1,0 with 0,0,0             # <<<<<<<<<<<<<<
 *         vertex_interp(gv[3], gv[0], isovalue, vertlist[3],
 *                       dds, x, y, z, 3, 0)
 */
  __pyx_t_261 = ((__pyx_v_edge_table[__pyx_v_cubeindex]) & 8);
  if (__pyx_t_261) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1490
 *     if (edge_table[cubeindex] & 8): # 0,1,0 with 0,0,0
 *         vertex_interp(gv[3], gv[0], isovalue, vertlist[3],
 *                       dds, x, y, z, 3, 0)             # <<<<<<<<<<<<<<
 *     if (edge_table[cubeindex] & 16): # 0,0,1 with 1,0,1
 *         vertex_interp(gv[4], gv[5], isovalue, vertlist[4],
 */
    vertex_interp((__pyx_v_gv[3]), (__pyx_v_gv[0]), __pyx_v_isovalue, (__pyx_v_vertlist[3]), __pyx_v_dds, __pyx_v_x, __pyx_v_y, __pyx_v_z, 3, 0);
    goto __pyx_L10;
  }
  __pyx_L10:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1491
 *         vertex_interp(gv[3], gv[0], isovalue, vertlist[3],
 *                       dds, x, y, z, 3, 0)
 *     if (edge_table[cubeindex] & 16): # 0,0,1 with 1,0,1             # <<<<<<<<<<<<<<
 *         vertex_interp(gv[4], gv[5], isovalue, vertlist[4],
 *                       dds, x, y, z, 4, 5)
 */
  __pyx_t_261 = ((__pyx_v_edge_table[__pyx_v_cubeindex]) & 16);
  if (__pyx_t_261) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1493
 *     if (edge_table[cubeindex] & 16): # 0,0,1 with 1,0,1
 *         vertex_interp(gv[4], gv[5], isovalue, vertlist[4],
 *                       dds, x, y, z, 4, 5)             # <<<<<<<<<<<<<<
 *     if (edge_table[cubeindex] & 32): # 1,0,1 with 1,1,1
 *         vertex_interp(gv[5], gv[6], isovalue, vertlist[5],
 */
    vertex_interp((__pyx_v_gv[4]), (__pyx_v_gv[5]), __pyx_v_isovalue, (__pyx_v_vertlist[4]), __pyx_v_dds, __pyx_v_x, __pyx_v_y, __pyx_v_z, 4, 5);
    goto __pyx_L11;
  }
  __pyx_L11:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1494
 *         vertex_interp(gv[4], gv[5], isovalue, vertlist[4],
 *                       dds, x, y, z, 4, 5)
 *     if (edge_table[cubeindex] & 32): # 1,0,1 with 1,1,1             # <<<<<<<<<<<<<<
 *         vertex_interp(gv[5], gv[6], isovalue, vertlist[5],
 *                       dds, x, y, z, 5, 6)
 */
  __pyx_t_261 = ((__pyx_v_edge_table[__pyx_v_cubeindex]) & 32);
  if (__pyx_t_261) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1496
 *     if (edge_table[cubeindex] & 32): # 1,0,1 with 1,1,1
 *         vertex_interp(gv[5], gv[6], isovalue, vertlist[5],
 *                       dds, x, y, z, 5, 6)             # <<<<<<<<<<<<<<
 *     if (edge_table[cubeindex] & 64): # 1,1,1 with 0,1,1
 *         vertex_interp(gv[6], gv[7], isovalue, vertlist[6],
 */
    vertex_interp((__pyx_v_gv[5]), (__pyx_v_gv[6]), __pyx_v_isovalue, (__pyx_v_vertlist[5]), __pyx_v_dds, __pyx_v_x, __pyx_v_y, __pyx_v_z, 5, 6);
    goto __pyx_L12;
  }
  __pyx_L12:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1497
 *         vertex_interp(gv[5], gv[6], isovalue, vertlist[5],
 *                       dds, x, y, z, 5, 6)
 *     if (edge_table[cubeindex] & 64): # 1,1,1 with 0,1,1             # <<<<<<<<<<<<<<
 *         vertex_interp(gv[6], gv[7], isovalue, vertlist[6],
 *                       dds, x, y, z, 6, 7)
 */
  __pyx_t_261 = ((__pyx_v_edge_table[__pyx_v_cubeindex]) & 64);
  if (__pyx_t_261) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1499
 *     if (edge_table[cubeindex] & 64): # 1,1,1 with 0,1,1
 *         vertex_interp(gv[6], gv[7], isovalue, vertlist[6],
 *                       dds, x, y, z, 6, 7)             # <<<<<<<<<<<<<<
 *     if (edge_table[cubeindex] & 128): # 0,1,1 with 0,0,1
 *         vertex_interp(gv[7], gv[4], isovalue, vertlist[7],
 */
    vertex_interp((__pyx_v_gv[6]), (__pyx_v_gv[7]), __pyx_v_isovalue, (__pyx_v_vertlist[6]), __pyx_v_dds, __pyx_v_x, __pyx_v_y, __pyx_v_z, 6, 7);
    goto __pyx_L13;
  }
  __pyx_L13:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1500
 *         vertex_interp(gv[6], gv[7], isovalue, vertlist[6],
 *                       dds, x, y, z, 6, 7)
 *     if (edge_table[cubeindex] & 128): # 0,1,1 with 0,0,1             # <<<<<<<<<<<<<<
 *         vertex_interp(gv[7], gv[4], isovalue, vertlist[7],
 *                       dds, x, y, z, 7, 4)
 */
  __pyx_t_261 = ((__pyx_v_edge_table[__pyx_v_cubeindex]) & 128);
  if (__pyx_t_261) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1502
 *     if (edge_table[cubeindex] & 128): # 0,1,1 with 0,0,1
 *         vertex_interp(gv[7], gv[4], isovalue, vertlist[7],
 *                       dds, x, y, z, 7, 4)             # <<<<<<<<<<<<<<
 *     if (edge_table[cubeindex] & 256): # 0,0,0 with 0,0,1
 *         vertex_interp(gv[0], gv[4], isovalue, vertlist[8],
 */
    vertex_interp((__pyx_v_gv[7]), (__pyx_v_gv[4]), __pyx_v_isovalue, (__pyx_v_vertlist[7]), __pyx_v_dds, __pyx_v_x, __pyx_v_y, __pyx_v_z, 7, 4);
    goto __pyx_L14;
  }
  __pyx_L14:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1503
 *         vertex_interp(gv[7], gv[4], isovalue, vertlist[7],
 *                       dds, x, y, z, 7, 4)
 *     if (edge_table[cubeindex] & 256): # 0,0,0 with 0,0,1             # <<<<<<<<<<<<<<
 *         vertex_interp(gv[0], gv[4], isovalue, vertlist[8],
 *                       dds, x, y, z, 0, 4)
 */
  __pyx_t_261 = ((__pyx_v_edge_table[__pyx_v_cubeindex]) & 256);
  if (__pyx_t_261) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1505
 *     if (edge_table[cubeindex] & 256): # 0,0,0 with 0,0,1
 *         vertex_interp(gv[0], gv[4], isovalue, vertlist[8],
 *                       dds, x, y, z, 0, 4)             # <<<<<<<<<<<<<<
 *     if (edge_table[cubeindex] & 512): # 1,0,0 with 1,0,1
 *         vertex_interp(gv[1], gv[5], isovalue, vertlist[9],
 */
    vertex_interp((__pyx_v_gv[0]), (__pyx_v_gv[4]), __pyx_v_isovalue, (__pyx_v_vertlist[8]), __pyx_v_dds, __pyx_v_x, __pyx_v_y, __pyx_v_z, 0, 4);
    goto __pyx_L15;
  }
  __pyx_L15:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1506
 *         vertex_interp(gv[0], gv[4], isovalue, vertlist[8],
 *                       dds, x, y, z, 0, 4)
 *     if (edge_table[cubeindex] & 512): # 1,0,0 with 1,0,1             # <<<<<<<<<<<<<<
 *         vertex_interp(gv[1], gv[5], isovalue, vertlist[9],
 *                       dds, x, y, z, 1, 5)
 */
  __pyx_t_261 = ((__pyx_v_edge_table[__pyx_v_cubeindex]) & 512);
  if (__pyx_t_261) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1508
 *     if (edge_table[cubeindex] & 512): # 1,0,0 with 1,0,1
 *         vertex_interp(gv[1], gv[5], isovalue, vertlist[9],
 *                       dds, x, y, z, 1, 5)             # <<<<<<<<<<<<<<
 *     if (edge_table[cubeindex] & 1024): # 1,1,0 with 1,1,1
 *         vertex_interp(gv[2], gv[6], isovalue, vertlist[10],
 */
    vertex_interp((__pyx_v_gv[1]), (__pyx_v_gv[5]), __pyx_v_isovalue, (__pyx_v_vertlist[9]), __pyx_v_dds, __pyx_v_x, __pyx_v_y, __pyx_v_z, 1, 5);
    goto __pyx_L16;
  }
  __pyx_L16:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1509
 *         vertex_interp(gv[1], gv[5], isovalue, vertlist[9],
 *                       dds, x, y, z, 1, 5)
 *     if (edge_table[cubeindex] & 1024): # 1,1,0 with 1,1,1             # <<<<<<<<<<<<<<
 *         vertex_interp(gv[2], gv[6], isovalue, vertlist[10],
 *                       dds, x, y, z, 2, 6)
 */
  __pyx_t_261 = ((__pyx_v_edge_table[__pyx_v_cubeindex]) & 1024);
  if (__pyx_t_261) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1511
 *     if (edge_table[cubeindex] & 1024): # 1,1,0 with 1,1,1
 *         vertex_interp(gv[2], gv[6], isovalue, vertlist[10],
 *                       dds, x, y, z, 2, 6)             # <<<<<<<<<<<<<<
 *     if (edge_table[cubeindex] & 2048): # 0,1,0 with 0,1,1
 *         vertex_interp(gv[3], gv[7], isovalue, vertlist[11],
 */
    vertex_interp((__pyx_v_gv[2]), (__pyx_v_gv[6]), __pyx_v_isovalue, (__pyx_v_vertlist[10]), __pyx_v_dds, __pyx_v_x, __pyx_v_y, __pyx_v_z, 2, 6);
    goto __pyx_L17;
  }
  __pyx_L17:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1512
 *         vertex_interp(gv[2], gv[6], isovalue, vertlist[10],
 *                       dds, x, y, z, 2, 6)
 *     if (edge_table[cubeindex] & 2048): # 0,1,0 with 0,1,1             # <<<<<<<<<<<<<<
 *         vertex_interp(gv[3], gv[7], isovalue, vertlist[11],
 *                       dds, x, y, z, 3, 7)
 */
  __pyx_t_261 = ((__pyx_v_edge_table[__pyx_v_cubeindex]) & 2048);
  if (__pyx_t_261) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1514
 *     if (edge_table[cubeindex] & 2048): # 0,1,0 with 0,1,1
 *         vertex_interp(gv[3], gv[7], isovalue, vertlist[11],
 *                       dds, x, y, z, 3, 7)             # <<<<<<<<<<<<<<
 *     n = 0
 *     while 1:
 */
    vertex_interp((__pyx_v_gv[3]), (__pyx_v_gv[7]), __pyx_v_isovalue, (__pyx_v_vertlist[11]), __pyx_v_dds, __pyx_v_x, __pyx_v_y, __pyx_v_z, 3, 7);
    goto __pyx_L18;
  }
  __pyx_L18:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1515
 *         vertex_interp(gv[3], gv[7], isovalue, vertlist[11],
 *                       dds, x, y, z, 3, 7)
 *     n = 0             # <<<<<<<<<<<<<<
 *     while 1:
 *         triangles.current = AddTriangle(triangles.current,
 */
  __pyx_v_n = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1516
 *                       dds, x, y, z, 3, 7)
 *     n = 0
 *     while 1:             # <<<<<<<<<<<<<<
 *         triangles.current = AddTriangle(triangles.current,
 *                     vertlist[tri_table[cubeindex][n  ]],
 */
  while (1) {
    if (!1) break;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1517
 *     n = 0
 *     while 1:
 *         triangles.current = AddTriangle(triangles.current,             # <<<<<<<<<<<<<<
 *                     vertlist[tri_table[cubeindex][n  ]],
 *                     vertlist[tri_table[cubeindex][n+1]],
 */
    __pyx_v_triangles->current = __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_AddTriangle(__pyx_v_triangles->current, (__pyx_v_vertlist[((__pyx_v_tri_table[__pyx_v_cubeindex])[__pyx_v_n])]), (__pyx_v_vertlist[((__pyx_v_tri_table[__pyx_v_cubeindex])[(__pyx_v_n + 1)])]), (__pyx_v_vertlist[((__pyx_v_tri_table[__pyx_v_cubeindex])[(__pyx_v_n + 2)])]));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1521
 *                     vertlist[tri_table[cubeindex][n+1]],
 *                     vertlist[tri_table[cubeindex][n+2]])
 *         triangles.count += 1             # <<<<<<<<<<<<<<
 *         nt += 1
 *         if triangles.first == NULL:
 */
    __pyx_v_triangles->count = (__pyx_v_triangles->count + 1);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1522
 *                     vertlist[tri_table[cubeindex][n+2]])
 *         triangles.count += 1
 *         nt += 1             # <<<<<<<<<<<<<<
 *         if triangles.first == NULL:
 *             triangles.first = triangles.current
 */
    __pyx_v_nt = (__pyx_v_nt + 1);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1523
 *         triangles.count += 1
 *         nt += 1
 *         if triangles.first == NULL:             # <<<<<<<<<<<<<<
 *             triangles.first = triangles.current
 *         n += 3
 */
    __pyx_t_260 = (__pyx_v_triangles->first == NULL);
    if (__pyx_t_260) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1524
 *         nt += 1
 *         if triangles.first == NULL:
 *             triangles.first = triangles.current             # <<<<<<<<<<<<<<
 *         n += 3
 *         if tri_table[cubeindex][n] == -1: break
 */
      __pyx_v_triangles->first = __pyx_v_triangles->current;
      goto __pyx_L21;
    }
    __pyx_L21:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1525
 *         if triangles.first == NULL:
 *             triangles.first = triangles.current
 *         n += 3             # <<<<<<<<<<<<<<
 *         if tri_table[cubeindex][n] == -1: break
 *     return nt
 */
    __pyx_v_n = (__pyx_v_n + 3);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1526
 *             triangles.first = triangles.current
 *         n += 3
 *         if tri_table[cubeindex][n] == -1: break             # <<<<<<<<<<<<<<
 *     return nt
 * 
 */
    __pyx_t_260 = (((__pyx_v_tri_table[__pyx_v_cubeindex])[__pyx_v_n]) == -1);
    if (__pyx_t_260) {
      goto __pyx_L20_break;
      goto __pyx_L22;
    }
    __pyx_L22:;
  }
  __pyx_L20_break:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1527
 *         n += 3
 *         if tri_table[cubeindex][n] == -1: break
 *     return nt             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_nt;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_grid = 0;
  int __pyx_v_direction;
  int __pyx_v_left;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__grid,&__pyx_n_s__direction,&__pyx_n_s__left,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__grid)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__direction)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_grid = values[0];
    __pyx_v_direction = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_direction == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_left = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_left == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.GridFace.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace___init__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *)__pyx_v_self), __pyx_v_grid, __pyx_v_direction, __pyx_v_left);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1538
 *     @cython.boundscheck(False)
 *     @cython.wraparound(False)
 *     def __init__(self, grid, int direction, int left):             # <<<<<<<<<<<<<<
 *         self.direction = direction
 *         if left == 1:
 */

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace___init__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *__pyx_v_self, PyObject *__pyx_v_grid, int __pyx_v_direction, int __pyx_v_left) {
  int __pyx_v_i;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_5numpy_float64_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1539
 *     @cython.wraparound(False)
 *     def __init__(self, grid, int direction, int left):
 *         self.direction = direction             # <<<<<<<<<<<<<<
 *         if left == 1:
 *             self.coord = grid.LeftEdge[direction]
 */
  __pyx_v_self->direction = __pyx_v_direction;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1540
 *     def __init__(self, grid, int direction, int left):
 *         self.direction = direction
 *         if left == 1:             # <<<<<<<<<<<<<<
 *             self.coord = grid.LeftEdge[direction]
 *         else:
 */
  __pyx_t_1 = (__pyx_v_left == 1);
  if (__pyx_t_1) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1541
 *         self.direction = direction
 *         if left == 1:
 *             self.coord = grid.LeftEdge[direction]             # <<<<<<<<<<<<<<
 *         else:
 *             self.coord = grid.RightEdge[direction]
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_grid, __pyx_n_s__LeftEdge); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_direction, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_self->coord = __pyx_t_4;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1543
 *             self.coord = grid.LeftEdge[direction]
 *         else:
 *             self.coord = grid.RightEdge[direction]             # <<<<<<<<<<<<<<
 *         cdef int i
 *         for i in range(3):
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_grid, __pyx_n_s__RightEdge); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_direction, sizeof(int), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_self->coord = __pyx_t_4;
  }
  __pyx_L3:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1545
 *             self.coord = grid.RightEdge[direction]
 *         cdef int i
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             self.left_edge[i] = grid.LeftEdge[i]
 *             self.right_edge[i] = grid.RightEdge[i]
 */
  for (__pyx_t_5 = 0; __pyx_t_5 < 3; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1546
 *         cdef int i
 *         for i in range(3):
 *             self.left_edge[i] = grid.LeftEdge[i]             # <<<<<<<<<<<<<<
 *             self.right_edge[i] = grid.RightEdge[i]
 *         self.left_edge[direction] = self.right_edge[direction] = self.coord
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_grid, __pyx_n_s__LeftEdge); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_self->left_edge[__pyx_v_i]) = __pyx_t_4;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1547
 *         for i in range(3):
 *             self.left_edge[i] = grid.LeftEdge[i]
 *             self.right_edge[i] = grid.RightEdge[i]             # <<<<<<<<<<<<<<
 *         self.left_edge[direction] = self.right_edge[direction] = self.coord
 * 
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_grid, __pyx_n_s__RightEdge); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    (__pyx_v_self->right_edge[__pyx_v_i]) = __pyx_t_4;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1548
 *             self.left_edge[i] = grid.LeftEdge[i]
 *             self.right_edge[i] = grid.RightEdge[i]
 *         self.left_edge[direction] = self.right_edge[direction] = self.coord             # <<<<<<<<<<<<<<
 * 
 *     @cython.boundscheck(False)
 */
  (__pyx_v_self->left_edge[__pyx_v_direction]) = __pyx_v_self->coord;
  (__pyx_v_self->right_edge[__pyx_v_direction]) = __pyx_v_self->coord;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.GridFace.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1552
 *     @cython.boundscheck(False)
 *     @cython.wraparound(False)
 *     cdef int proj_overlap(self, np.float64_t *left_edge, np.float64_t *right_edge):             # <<<<<<<<<<<<<<
 *         cdef int xax, yax
 *         xax = (self.direction + 1) % 3
 */

static int __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_proj_overlap(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *__pyx_v_self, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_right_edge) {
  int __pyx_v_xax;
  int __pyx_v_yax;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("proj_overlap", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1554
 *     cdef int proj_overlap(self, np.float64_t *left_edge, np.float64_t *right_edge):
 *         cdef int xax, yax
 *         xax = (self.direction + 1) % 3             # <<<<<<<<<<<<<<
 *         yax = (self.direction + 2) % 3
 *         if left_edge[xax] >= self.right_edge[xax]: return 0
 */
  __pyx_v_xax = __Pyx_mod_long((__pyx_v_self->direction + 1), 3);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1555
 *         cdef int xax, yax
 *         xax = (self.direction + 1) % 3
 *         yax = (self.direction + 2) % 3             # <<<<<<<<<<<<<<
 *         if left_edge[xax] >= self.right_edge[xax]: return 0
 *         if right_edge[xax] <= self.left_edge[xax]: return 0
 */
  __pyx_v_yax = __Pyx_mod_long((__pyx_v_self->direction + 2), 3);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1556
 *         xax = (self.direction + 1) % 3
 *         yax = (self.direction + 2) % 3
 *         if left_edge[xax] >= self.right_edge[xax]: return 0             # <<<<<<<<<<<<<<
 *         if right_edge[xax] <= self.left_edge[xax]: return 0
 *         if left_edge[yax] >= self.right_edge[yax]: return 0
 */
  __pyx_t_1 = ((__pyx_v_left_edge[__pyx_v_xax]) >= (__pyx_v_self->right_edge[__pyx_v_xax]));
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1557
 *         yax = (self.direction + 2) % 3
 *         if left_edge[xax] >= self.right_edge[xax]: return 0
 *         if right_edge[xax] <= self.left_edge[xax]: return 0             # <<<<<<<<<<<<<<
 *         if left_edge[yax] >= self.right_edge[yax]: return 0
 *         if right_edge[yax] <= self.left_edge[yax]: return 0
 */
  __pyx_t_1 = ((__pyx_v_right_edge[__pyx_v_xax]) <= (__pyx_v_self->left_edge[__pyx_v_xax]));
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1558
 *         if left_edge[xax] >= self.right_edge[xax]: return 0
 *         if right_edge[xax] <= self.left_edge[xax]: return 0
 *         if left_edge[yax] >= self.right_edge[yax]: return 0             # <<<<<<<<<<<<<<
 *         if right_edge[yax] <= self.left_edge[yax]: return 0
 *         return 1
 */
  __pyx_t_1 = ((__pyx_v_left_edge[__pyx_v_yax]) >= (__pyx_v_self->right_edge[__pyx_v_yax]));
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1559
 *         if right_edge[xax] <= self.left_edge[xax]: return 0
 *         if left_edge[yax] >= self.right_edge[yax]: return 0
 *         if right_edge[yax] <= self.left_edge[yax]: return 0             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  __pyx_t_1 = ((__pyx_v_right_edge[__pyx_v_yax]) <= (__pyx_v_self->left_edge[__pyx_v_yax]));
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1560
 *         if left_edge[yax] >= self.right_edge[yax]: return 0
 *         if right_edge[yax] <= self.left_edge[yax]: return 0
 *         return 1             # <<<<<<<<<<<<<<
 * 
 * cdef class ProtoPrism:
 */
  __pyx_r = 1;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_5coord_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_5coord_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_5coord___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1532
 * cdef class GridFace:
 *     cdef int direction
 *     cdef public np.float64_t coord             # <<<<<<<<<<<<<<
 *     cdef np.float64_t left_edge[3]
 *     cdef np.float64_t right_edge[3]
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_5coord___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->coord); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.GridFace.coord.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_5coord_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_5coord_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_5coord_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_5coord_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __pyx_t_5numpy_float64_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->coord = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.GridFace.coord.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_parent_grid_id;
  PyArrayObject *__pyx_v_left_edge = 0;
  PyArrayObject *__pyx_v_right_edge = 0;
  PyObject *__pyx_v_subgrid_faces = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__parent_grid_id,&__pyx_n_s__left_edge,&__pyx_n_s__right_edge,&__pyx_n_s__subgrid_faces,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parent_grid_id)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left_edge)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right_edge)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__subgrid_faces)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_parent_grid_id = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_parent_grid_id == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_left_edge = ((PyArrayObject *)values[1]);
    __pyx_v_right_edge = ((PyArrayObject *)values[2]);
    __pyx_v_subgrid_faces = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.ProtoPrism.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left_edge), __pyx_ptype_5numpy_ndarray, 1, "left_edge", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1570; __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 = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism___cinit__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_v_self), __pyx_v_parent_grid_id, __pyx_v_left_edge, __pyx_v_right_edge, __pyx_v_subgrid_faces);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1569
 *     cdef public object subgrid_faces
 *     cdef public int parent_grid_id
 *     def __cinit__(self, int parent_grid_id,             # <<<<<<<<<<<<<<
 *                   np.ndarray[np.float64_t, ndim=1] left_edge,
 *                   np.ndarray[np.float64_t, ndim=1] right_edge,
 */

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism___cinit__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self, int __pyx_v_parent_grid_id, PyArrayObject *__pyx_v_left_edge, PyArrayObject *__pyx_v_right_edge, PyObject *__pyx_v_subgrid_faces) {
  int __pyx_v_i;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left_edge;
  __Pyx_Buffer __pyx_pybuffer_left_edge;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right_edge;
  __Pyx_Buffer __pyx_pybuffer_right_edge;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __pyx_pybuffer_left_edge.pybuffer.buf = NULL;
  __pyx_pybuffer_left_edge.refcount = 0;
  __pyx_pybuffernd_left_edge.data = NULL;
  __pyx_pybuffernd_left_edge.rcbuffer = &__pyx_pybuffer_left_edge;
  __pyx_pybuffer_right_edge.pybuffer.buf = NULL;
  __pyx_pybuffer_right_edge.refcount = 0;
  __pyx_pybuffernd_right_edge.data = NULL;
  __pyx_pybuffernd_right_edge.rcbuffer = &__pyx_pybuffer_right_edge;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_edge.rcbuffer->pybuffer, (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 = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left_edge.diminfo[0].strides = __pyx_pybuffernd_left_edge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_edge.diminfo[0].shape = __pyx_pybuffernd_left_edge.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_edge.rcbuffer->pybuffer, (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 = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right_edge.diminfo[0].strides = __pyx_pybuffernd_right_edge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_edge.diminfo[0].shape = __pyx_pybuffernd_right_edge.rcbuffer->pybuffer.shape[0];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1573
 *                   np.ndarray[np.float64_t, ndim=1] right_edge,
 *                   subgrid_faces):
 *         self.parent_grid_id = parent_grid_id             # <<<<<<<<<<<<<<
 *         cdef int i
 *         self.LeftEdge = left_edge
 */
  __pyx_v_self->parent_grid_id = __pyx_v_parent_grid_id;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1575
 *         self.parent_grid_id = parent_grid_id
 *         cdef int i
 *         self.LeftEdge = left_edge             # <<<<<<<<<<<<<<
 *         self.RightEdge = right_edge
 *         for i in range(3):
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_left_edge));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left_edge));
  __Pyx_GOTREF(__pyx_v_self->LeftEdge);
  __Pyx_DECREF(__pyx_v_self->LeftEdge);
  __pyx_v_self->LeftEdge = ((PyObject *)__pyx_v_left_edge);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1576
 *         cdef int i
 *         self.LeftEdge = left_edge
 *         self.RightEdge = right_edge             # <<<<<<<<<<<<<<
 *         for i in range(3):
 *             self.left_edge[i] = left_edge[i]
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_right_edge));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_right_edge));
  __Pyx_GOTREF(__pyx_v_self->RightEdge);
  __Pyx_DECREF(__pyx_v_self->RightEdge);
  __pyx_v_self->RightEdge = ((PyObject *)__pyx_v_right_edge);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1577
 *         self.LeftEdge = left_edge
 *         self.RightEdge = right_edge
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             self.left_edge[i] = left_edge[i]
 *             self.right_edge[i] = right_edge[i]
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1578
 *         self.RightEdge = right_edge
 *         for i in range(3):
 *             self.left_edge[i] = left_edge[i]             # <<<<<<<<<<<<<<
 *             self.right_edge[i] = right_edge[i]
 *         self.subgrid_faces = subgrid_faces
 */
    __pyx_t_2 = __pyx_v_i;
    __pyx_t_3 = -1;
    if (__pyx_t_2 < 0) {
      __pyx_t_2 += __pyx_pybuffernd_left_edge.diminfo[0].shape;
      if (unlikely(__pyx_t_2 < 0)) __pyx_t_3 = 0;
    } else if (unlikely(__pyx_t_2 >= __pyx_pybuffernd_left_edge.diminfo[0].shape)) __pyx_t_3 = 0;
    if (unlikely(__pyx_t_3 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_3);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    (__pyx_v_self->left_edge[__pyx_v_i]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left_edge.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_left_edge.diminfo[0].strides));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1579
 *         for i in range(3):
 *             self.left_edge[i] = left_edge[i]
 *             self.right_edge[i] = right_edge[i]             # <<<<<<<<<<<<<<
 *         self.subgrid_faces = subgrid_faces
 * 
 */
    __pyx_t_3 = __pyx_v_i;
    __pyx_t_4 = -1;
    if (__pyx_t_3 < 0) {
      __pyx_t_3 += __pyx_pybuffernd_right_edge.diminfo[0].shape;
      if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
    } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_right_edge.diminfo[0].shape)) __pyx_t_4 = 0;
    if (unlikely(__pyx_t_4 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_4);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    (__pyx_v_self->right_edge[__pyx_v_i]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right_edge.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_right_edge.diminfo[0].strides));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1580
 *             self.left_edge[i] = left_edge[i]
 *             self.right_edge[i] = right_edge[i]
 *         self.subgrid_faces = subgrid_faces             # <<<<<<<<<<<<<<
 * 
 *     @cython.boundscheck(False)
 */
  __Pyx_INCREF(__pyx_v_subgrid_faces);
  __Pyx_GIVEREF(__pyx_v_subgrid_faces);
  __Pyx_GOTREF(__pyx_v_self->subgrid_faces);
  __Pyx_DECREF(__pyx_v_self->subgrid_faces);
  __pyx_v_self->subgrid_faces = __pyx_v_subgrid_faces;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_edge.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_edge.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.ProtoPrism.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_edge.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_edge.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_3sweep(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_3sweep(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_direction;
  int __pyx_v_stack;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sweep (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__direction,&__pyx_n_s__stack,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__direction);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stack);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sweep") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1584; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_direction = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_direction == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1584; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_direction = ((int)0);
    }
    if (values[1]) {
      __pyx_v_stack = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_stack == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1584; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_stack = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sweep", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1584; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.ProtoPrism.sweep", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_2sweep(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_v_self), __pyx_v_direction, __pyx_v_stack);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1584
 *     @cython.boundscheck(False)
 *     @cython.wraparound(False)
 *     def sweep(self, int direction = 0, int stack = 0):             # <<<<<<<<<<<<<<
 *         cdef int i
 *         cdef GridFace face
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_2sweep(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self, int __pyx_v_direction, int __pyx_v_stack) {
  int __pyx_v_i;
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *__pyx_v_face = 0;
  __pyx_t_5numpy_float64_t __pyx_v_proto_split[3];
  PyObject *__pyx_v_left = NULL;
  PyObject *__pyx_v_right = NULL;
  PyObject *__pyx_v_LC = NULL;
  PyObject *__pyx_v_RC = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sweep", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1588
 *         cdef GridFace face
 *         cdef np.float64_t proto_split[3]
 *         for i in range(3): proto_split[i] = self.right_edge[i]             # <<<<<<<<<<<<<<
 *         for face in self.subgrid_faces[direction]:
 *             proto_split[direction] = face.coord
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;
    (__pyx_v_proto_split[__pyx_v_i]) = (__pyx_v_self->right_edge[__pyx_v_i]);
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1589
 *         cdef np.float64_t proto_split[3]
 *         for i in range(3): proto_split[i] = self.right_edge[i]
 *         for face in self.subgrid_faces[direction]:             # <<<<<<<<<<<<<<
 *             proto_split[direction] = face.coord
 *             if proto_split[direction] <= self.left_edge[direction]:
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_self->subgrid_faces, __pyx_v_direction, sizeof(int), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #else
      __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_GridFace))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_face));
    __pyx_v_face = ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1590
 *         for i in range(3): proto_split[i] = self.right_edge[i]
 *         for face in self.subgrid_faces[direction]:
 *             proto_split[direction] = face.coord             # <<<<<<<<<<<<<<
 *             if proto_split[direction] <= self.left_edge[direction]:
 *                 continue
 */
    (__pyx_v_proto_split[__pyx_v_direction]) = __pyx_v_face->coord;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1591
 *         for face in self.subgrid_faces[direction]:
 *             proto_split[direction] = face.coord
 *             if proto_split[direction] <= self.left_edge[direction]:             # <<<<<<<<<<<<<<
 *                 continue
 *             if proto_split[direction] == self.right_edge[direction]:
 */
    __pyx_t_6 = ((__pyx_v_proto_split[__pyx_v_direction]) <= (__pyx_v_self->left_edge[__pyx_v_direction]));
    if (__pyx_t_6) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1592
 *             proto_split[direction] = face.coord
 *             if proto_split[direction] <= self.left_edge[direction]:
 *                 continue             # <<<<<<<<<<<<<<
 *             if proto_split[direction] == self.right_edge[direction]:
 *                 if stack == 2: return [self]
 */
      goto __pyx_L5_continue;
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1593
 *             if proto_split[direction] <= self.left_edge[direction]:
 *                 continue
 *             if proto_split[direction] == self.right_edge[direction]:             # <<<<<<<<<<<<<<
 *                 if stack == 2: return [self]
 *                 return self.sweep((direction + 1) % 3, stack + 1)
 */
    __pyx_t_6 = ((__pyx_v_proto_split[__pyx_v_direction]) == (__pyx_v_self->right_edge[__pyx_v_direction]));
    if (__pyx_t_6) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1594
 *                 continue
 *             if proto_split[direction] == self.right_edge[direction]:
 *                 if stack == 2: return [self]             # <<<<<<<<<<<<<<
 *                 return self.sweep((direction + 1) % 3, stack + 1)
 *             if face.proj_overlap(self.left_edge, proto_split) == 1:
 */
      __pyx_t_6 = (__pyx_v_stack == 2);
      if (__pyx_t_6) {
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(((PyObject *)__pyx_v_self));
        PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
        __pyx_r = ((PyObject *)__pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L0;
        goto __pyx_L9;
      }
      __pyx_L9:;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1595
 *             if proto_split[direction] == self.right_edge[direction]:
 *                 if stack == 2: return [self]
 *                 return self.sweep((direction + 1) % 3, stack + 1)             # <<<<<<<<<<<<<<
 *             if face.proj_overlap(self.left_edge, proto_split) == 1:
 *                 left, right = self.split(proto_split, direction)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__sweep); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = PyInt_FromLong(__Pyx_mod_long((__pyx_v_direction + 1), 3)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = PyInt_FromLong((__pyx_v_stack + 1)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_8);
      __pyx_t_7 = 0;
      __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1596
 *                 if stack == 2: return [self]
 *                 return self.sweep((direction + 1) % 3, stack + 1)
 *             if face.proj_overlap(self.left_edge, proto_split) == 1:             # <<<<<<<<<<<<<<
 *                 left, right = self.split(proto_split, direction)
 *                 LC = left.sweep((direction + 1) % 3)
 */
    __pyx_t_6 = (((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *)__pyx_v_face->__pyx_vtab)->proj_overlap(__pyx_v_face, __pyx_v_self->left_edge, __pyx_v_proto_split) == 1);
    if (__pyx_t_6) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1597
 *                 return self.sweep((direction + 1) % 3, stack + 1)
 *             if face.proj_overlap(self.left_edge, proto_split) == 1:
 *                 left, right = self.split(proto_split, direction)             # <<<<<<<<<<<<<<
 *                 LC = left.sweep((direction + 1) % 3)
 *                 RC = right.sweep(direction)
 */
      __pyx_t_8 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_v_self->__pyx_vtab)->split(__pyx_v_self, __pyx_v_proto_split, __pyx_v_direction); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
        PyObject* sequence = __pyx_t_8;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_2);
        #else
        __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #endif
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else
      {
        Py_ssize_t index = -1;
        __pyx_t_7 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_10 = Py_TYPE(__pyx_t_7)->tp_iternext;
        index = 0; __pyx_t_9 = __pyx_t_10(__pyx_t_7); if (unlikely(!__pyx_t_9)) goto __pyx_L11_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        index = 1; __pyx_t_2 = __pyx_t_10(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L11_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_10 = NULL;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L12_unpacking_done;
        __pyx_L11_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_10 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L12_unpacking_done:;
      }
      __pyx_v_left = __pyx_t_9;
      __pyx_t_9 = 0;
      __pyx_v_right = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1598
 *             if face.proj_overlap(self.left_edge, proto_split) == 1:
 *                 left, right = self.split(proto_split, direction)
 *                 LC = left.sweep((direction + 1) % 3)             # <<<<<<<<<<<<<<
 *                 RC = right.sweep(direction)
 *                 return LC + RC
 */
      __pyx_t_8 = PyObject_GetAttr(__pyx_v_left, __pyx_n_s__sweep); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_2 = PyInt_FromLong(__Pyx_mod_long((__pyx_v_direction + 1), 3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
      __pyx_v_LC = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1599
 *                 left, right = self.split(proto_split, direction)
 *                 LC = left.sweep((direction + 1) % 3)
 *                 RC = right.sweep(direction)             # <<<<<<<<<<<<<<
 *                 return LC + RC
 *         raise RuntimeError
 */
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_right, __pyx_n_s__sweep); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = PyInt_FromLong(__pyx_v_direction); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_9 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
      __pyx_v_RC = __pyx_t_9;
      __pyx_t_9 = 0;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1600
 *                 LC = left.sweep((direction + 1) % 3)
 *                 RC = right.sweep(direction)
 *                 return LC + RC             # <<<<<<<<<<<<<<
 *         raise RuntimeError
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_9 = PyNumber_Add(__pyx_v_LC, __pyx_v_RC); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_r = __pyx_t_9;
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L10;
    }
    __pyx_L10:;
    __pyx_L5_continue:;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1601
 *                 RC = right.sweep(direction)
 *                 return LC + RC
 *         raise RuntimeError             # <<<<<<<<<<<<<<
 * 
 *     @cython.boundscheck(False)
 */
  __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.ProtoPrism.sweep", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_face);
  __Pyx_XDECREF(__pyx_v_left);
  __Pyx_XDECREF(__pyx_v_right);
  __Pyx_XDECREF(__pyx_v_LC);
  __Pyx_XDECREF(__pyx_v_RC);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1605
 *     @cython.boundscheck(False)
 *     @cython.wraparound(False)
 *     cdef object split(self, np.float64_t *sp, int direction):             # <<<<<<<<<<<<<<
 *         cdef int i
 *         cdef np.ndarray split_left = self.LeftEdge.copy()
 */

static PyObject *__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_split(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self, __pyx_t_5numpy_float64_t *__pyx_v_sp, int __pyx_v_direction) {
  int __pyx_v_i;
  PyArrayObject *__pyx_v_split_left = 0;
  PyArrayObject *__pyx_v_split_right = 0;
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_left = NULL;
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_right = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("split", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1607
 *     cdef object split(self, np.float64_t *sp, int direction):
 *         cdef int i
 *         cdef np.ndarray split_left = self.LeftEdge.copy()             # <<<<<<<<<<<<<<
 *         cdef np.ndarray split_right = self.RightEdge.copy()
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->LeftEdge, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_split_left = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1608
 *         cdef int i
 *         cdef np.ndarray split_left = self.LeftEdge.copy()
 *         cdef np.ndarray split_right = self.RightEdge.copy()             # <<<<<<<<<<<<<<
 * 
 *         for i in range(3): split_left[i] = self.right_edge[i]
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->RightEdge, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_split_right = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1610
 *         cdef np.ndarray split_right = self.RightEdge.copy()
 * 
 *         for i in range(3): split_left[i] = self.right_edge[i]             # <<<<<<<<<<<<<<
 *         split_left[direction] = sp[direction]
 *         left = ProtoPrism(self.parent_grid_id, self.LeftEdge, split_left,
 */
  for (__pyx_t_3 = 0; __pyx_t_3 < 3; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;
    __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->right_edge[__pyx_v_i])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_left), __pyx_v_i, __pyx_t_1, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1611
 * 
 *         for i in range(3): split_left[i] = self.right_edge[i]
 *         split_left[direction] = sp[direction]             # <<<<<<<<<<<<<<
 *         left = ProtoPrism(self.parent_grid_id, self.LeftEdge, split_left,
 *                           self.subgrid_faces)
 */
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_sp[__pyx_v_direction])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_left), __pyx_v_direction, __pyx_t_1, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1612
 *         for i in range(3): split_left[i] = self.right_edge[i]
 *         split_left[direction] = sp[direction]
 *         left = ProtoPrism(self.parent_grid_id, self.LeftEdge, split_left,             # <<<<<<<<<<<<<<
 *                           self.subgrid_faces)
 * 
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->parent_grid_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1613
 *         split_left[direction] = sp[direction]
 *         left = ProtoPrism(self.parent_grid_id, self.LeftEdge, split_left,
 *                           self.subgrid_faces)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(3): split_right[i] = self.left_edge[i]
 */
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_self->LeftEdge);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->LeftEdge);
  __Pyx_GIVEREF(__pyx_v_self->LeftEdge);
  __Pyx_INCREF(((PyObject *)__pyx_v_split_left));
  PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_split_left));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_split_left));
  __Pyx_INCREF(__pyx_v_self->subgrid_faces);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_self->subgrid_faces);
  __Pyx_GIVEREF(__pyx_v_self->subgrid_faces);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_left = ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1615
 *                           self.subgrid_faces)
 * 
 *         for i in range(3): split_right[i] = self.left_edge[i]             # <<<<<<<<<<<<<<
 *         split_right[direction] = sp[direction]
 *         right = ProtoPrism(self.parent_grid_id, split_right, self.RightEdge,
 */
  for (__pyx_t_3 = 0; __pyx_t_3 < 3; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;
    __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->left_edge[__pyx_v_i])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_right), __pyx_v_i, __pyx_t_1, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1616
 * 
 *         for i in range(3): split_right[i] = self.left_edge[i]
 *         split_right[direction] = sp[direction]             # <<<<<<<<<<<<<<
 *         right = ProtoPrism(self.parent_grid_id, split_right, self.RightEdge,
 *                            self.subgrid_faces)
 */
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_sp[__pyx_v_direction])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_right), __pyx_v_direction, __pyx_t_1, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1617
 *         for i in range(3): split_right[i] = self.left_edge[i]
 *         split_right[direction] = sp[direction]
 *         right = ProtoPrism(self.parent_grid_id, split_right, self.RightEdge,             # <<<<<<<<<<<<<<
 *                            self.subgrid_faces)
 * 
 */
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->parent_grid_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1618
 *         split_right[direction] = sp[direction]
 *         right = ProtoPrism(self.parent_grid_id, split_right, self.RightEdge,
 *                            self.subgrid_faces)             # <<<<<<<<<<<<<<
 * 
 *         return (left, right)
 */
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_split_right));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_split_right));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_split_right));
  __Pyx_INCREF(__pyx_v_self->RightEdge);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->RightEdge);
  __Pyx_GIVEREF(__pyx_v_self->RightEdge);
  __Pyx_INCREF(__pyx_v_self->subgrid_faces);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_self->subgrid_faces);
  __Pyx_GIVEREF(__pyx_v_self->subgrid_faces);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_right = ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1620
 *                            self.subgrid_faces)
 * 
 *         return (left, right)             # <<<<<<<<<<<<<<
 * 
 *     @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_left));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_left));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left));
  __Pyx_INCREF(((PyObject *)__pyx_v_right));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_right));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_right));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.ProtoPrism.split", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_split_left);
  __Pyx_XDECREF((PyObject *)__pyx_v_split_right);
  __Pyx_XDECREF((PyObject *)__pyx_v_left);
  __Pyx_XDECREF((PyObject *)__pyx_v_right);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_5get_brick(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_5get_brick(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_grid_left_edge = 0;
  PyArrayObject *__pyx_v_grid_dds = 0;
  PyObject *__pyx_v_child_mask = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_brick (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__grid_left_edge,&__pyx_n_s__grid_dds,&__pyx_n_s__child_mask,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__grid_left_edge)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__grid_dds)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_brick", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__child_mask)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_brick", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_brick") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_grid_left_edge = ((PyArrayObject *)values[0]);
    __pyx_v_grid_dds = ((PyArrayObject *)values[1]);
    __pyx_v_child_mask = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_brick", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.ProtoPrism.get_brick", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grid_left_edge), __pyx_ptype_5numpy_ndarray, 1, "grid_left_edge", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_grid_dds), __pyx_ptype_5numpy_ndarray, 1, "grid_dds", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_4get_brick(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_v_self), __pyx_v_grid_left_edge, __pyx_v_grid_dds, __pyx_v_child_mask);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1624
 *     @cython.boundscheck(False)
 *     @cython.wraparound(False)
 *     def get_brick(self, np.ndarray[np.float64_t, ndim=1] grid_left_edge,             # <<<<<<<<<<<<<<
 *                         np.ndarray[np.float64_t, ndim=1] grid_dds,
 *                         child_mask):
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_4get_brick(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self, PyArrayObject *__pyx_v_grid_left_edge, PyArrayObject *__pyx_v_grid_dds, PyObject *__pyx_v_child_mask) {
  int __pyx_v_li[3];
  int __pyx_v_ri[3];
  int __pyx_v_idims[3];
  int __pyx_v_i;
  PyArrayObject *__pyx_v_dims = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_dims;
  __Pyx_Buffer __pyx_pybuffer_dims;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_grid_dds;
  __Pyx_Buffer __pyx_pybuffer_grid_dds;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_grid_left_edge;
  __Pyx_Buffer __pyx_pybuffer_grid_left_edge;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __pyx_t_5numpy_float64_t __pyx_t_3;
  int __pyx_t_4;
  __pyx_t_5numpy_float64_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyArrayObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_brick", 0);
  __pyx_pybuffer_dims.pybuffer.buf = NULL;
  __pyx_pybuffer_dims.refcount = 0;
  __pyx_pybuffernd_dims.data = NULL;
  __pyx_pybuffernd_dims.rcbuffer = &__pyx_pybuffer_dims;
  __pyx_pybuffer_grid_left_edge.pybuffer.buf = NULL;
  __pyx_pybuffer_grid_left_edge.refcount = 0;
  __pyx_pybuffernd_grid_left_edge.data = NULL;
  __pyx_pybuffernd_grid_left_edge.rcbuffer = &__pyx_pybuffer_grid_left_edge;
  __pyx_pybuffer_grid_dds.pybuffer.buf = NULL;
  __pyx_pybuffer_grid_dds.refcount = 0;
  __pyx_pybuffernd_grid_dds.data = NULL;
  __pyx_pybuffernd_grid_dds.rcbuffer = &__pyx_pybuffer_grid_dds;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_grid_left_edge.rcbuffer->pybuffer, (PyObject*)__pyx_v_grid_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 = 1624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_grid_left_edge.diminfo[0].strides = __pyx_pybuffernd_grid_left_edge.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_grid_left_edge.diminfo[0].shape = __pyx_pybuffernd_grid_left_edge.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_grid_dds.rcbuffer->pybuffer, (PyObject*)__pyx_v_grid_dds, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_grid_dds.diminfo[0].strides = __pyx_pybuffernd_grid_dds.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_grid_dds.diminfo[0].shape = __pyx_pybuffernd_grid_dds.rcbuffer->pybuffer.shape[0];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1631
 *         cdef PartitionedGrid PG
 *         cdef int li[3], ri[3], idims[3], i
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             li[i] = lrint((self.left_edge[i] - grid_left_edge[i])/grid_dds[i])
 *             ri[i] = lrint((self.right_edge[i] - grid_left_edge[i])/grid_dds[i])
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1632
 *         cdef int li[3], ri[3], idims[3], i
 *         for i in range(3):
 *             li[i] = lrint((self.left_edge[i] - grid_left_edge[i])/grid_dds[i])             # <<<<<<<<<<<<<<
 *             ri[i] = lrint((self.right_edge[i] - grid_left_edge[i])/grid_dds[i])
 *             idims[i] = ri[i] - li[i]
 */
    __pyx_t_2 = __pyx_v_i;
    __pyx_t_3 = ((__pyx_v_self->left_edge[__pyx_v_i]) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_grid_left_edge.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_grid_left_edge.diminfo[0].strides)));
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_grid_dds.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_grid_dds.diminfo[0].strides));
    if (unlikely(__pyx_t_5 == 0)) {
      PyErr_Format(PyExc_ZeroDivisionError, "float division");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    (__pyx_v_li[__pyx_v_i]) = lrint((__pyx_t_3 / __pyx_t_5));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1633
 *         for i in range(3):
 *             li[i] = lrint((self.left_edge[i] - grid_left_edge[i])/grid_dds[i])
 *             ri[i] = lrint((self.right_edge[i] - grid_left_edge[i])/grid_dds[i])             # <<<<<<<<<<<<<<
 *             idims[i] = ri[i] - li[i]
 *         if child_mask[li[0], li[1], li[2]] == 0: return []
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_5 = ((__pyx_v_self->right_edge[__pyx_v_i]) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_grid_left_edge.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_grid_left_edge.diminfo[0].strides)));
    __pyx_t_7 = __pyx_v_i;
    __pyx_t_3 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_grid_dds.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_grid_dds.diminfo[0].strides));
    if (unlikely(__pyx_t_3 == 0)) {
      PyErr_Format(PyExc_ZeroDivisionError, "float division");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    (__pyx_v_ri[__pyx_v_i]) = lrint((__pyx_t_5 / __pyx_t_3));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1634
 *             li[i] = lrint((self.left_edge[i] - grid_left_edge[i])/grid_dds[i])
 *             ri[i] = lrint((self.right_edge[i] - grid_left_edge[i])/grid_dds[i])
 *             idims[i] = ri[i] - li[i]             # <<<<<<<<<<<<<<
 *         if child_mask[li[0], li[1], li[2]] == 0: return []
 *         cdef np.ndarray[np.int64_t, ndim=1] dims = np.empty(3, dtype='int64')
 */
    (__pyx_v_idims[__pyx_v_i]) = ((__pyx_v_ri[__pyx_v_i]) - (__pyx_v_li[__pyx_v_i]));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1635
 *             ri[i] = lrint((self.right_edge[i] - grid_left_edge[i])/grid_dds[i])
 *             idims[i] = ri[i] - li[i]
 *         if child_mask[li[0], li[1], li[2]] == 0: return []             # <<<<<<<<<<<<<<
 *         cdef np.ndarray[np.int64_t, ndim=1] dims = np.empty(3, dtype='int64')
 *         for i in range(3):
 */
  __pyx_t_8 = PyInt_FromLong((__pyx_v_li[0])); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = PyInt_FromLong((__pyx_v_li[1])); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyInt_FromLong((__pyx_v_li[2])); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_GetItem(__pyx_v_child_mask, ((PyObject *)__pyx_t_11)); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_RichCompare(__pyx_t_10, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__pyx_t_12) {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_r = ((PyObject *)__pyx_t_11);
    __pyx_t_11 = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1636
 *             idims[i] = ri[i] - li[i]
 *         if child_mask[li[0], li[1], li[2]] == 0: return []
 *         cdef np.ndarray[np.int64_t, ndim=1] dims = np.empty(3, dtype='int64')             # <<<<<<<<<<<<<<
 *         for i in range(3):
 *             dims[i] = idims[i]
 */
  __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_11));
  if (PyDict_SetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__int64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_4), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
  if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = ((PyArrayObject *)__pyx_t_9);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dims.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_dims = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_dims.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_dims.diminfo[0].strides = __pyx_pybuffernd_dims.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dims.diminfo[0].shape = __pyx_pybuffernd_dims.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_13 = 0;
  __pyx_v_dims = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1637
 *         if child_mask[li[0], li[1], li[2]] == 0: return []
 *         cdef np.ndarray[np.int64_t, ndim=1] dims = np.empty(3, dtype='int64')
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             dims[i] = idims[i]
 *         #cdef np.ndarray[np.float64_t, ndim=3] new_data
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1638
 *         cdef np.ndarray[np.int64_t, ndim=1] dims = np.empty(3, dtype='int64')
 *         for i in range(3):
 *             dims[i] = idims[i]             # <<<<<<<<<<<<<<
 *         #cdef np.ndarray[np.float64_t, ndim=3] new_data
 *         #new_data = data[li[0]:ri[0]+1,li[1]:ri[1]+1,li[2]:ri[2]+1].copy()
 */
    __pyx_t_14 = __pyx_v_i;
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_dims.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_dims.diminfo[0].strides) = (__pyx_v_idims[__pyx_v_i]);
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1643
 *         #PG = PartitionedGrid(self.parent_grid_id, new_data,
 *         #                     self.LeftEdge, self.RightEdge, dims)
 *         return ((li[0], ri[0]), (li[1], ri[1]), (li[2], ri[2]), dims)             # <<<<<<<<<<<<<<
 * 
 * cdef struct AdaptiveRayPacket:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_9 = PyInt_FromLong((__pyx_v_li[0])); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_11 = PyInt_FromLong((__pyx_v_ri[0])); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_9 = 0;
  __pyx_t_11 = 0;
  __pyx_t_11 = PyInt_FromLong((__pyx_v_li[1])); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_9 = PyInt_FromLong((__pyx_v_ri[1])); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_11 = 0;
  __pyx_t_9 = 0;
  __pyx_t_9 = PyInt_FromLong((__pyx_v_li[2])); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_11 = PyInt_FromLong((__pyx_v_ri[2])); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_15);
  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_9 = 0;
  __pyx_t_11 = 0;
  __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_10));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
  PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_t_8));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
  PyTuple_SET_ITEM(__pyx_t_11, 2, ((PyObject *)__pyx_t_15));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_15));
  __Pyx_INCREF(((PyObject *)__pyx_v_dims));
  PyTuple_SET_ITEM(__pyx_t_11, 3, ((PyObject *)__pyx_v_dims));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_dims));
  __pyx_t_10 = 0;
  __pyx_t_8 = 0;
  __pyx_t_15 = 0;
  __pyx_r = ((PyObject *)__pyx_t_11);
  __pyx_t_11 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_15);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dims.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_grid_dds.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_grid_left_edge.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.ProtoPrism.get_brick", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dims.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_grid_dds.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_grid_left_edge.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_dims);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1565
 *     cdef np.float64_t left_edge[3]
 *     cdef np.float64_t right_edge[3]
 *     cdef public object LeftEdge             # <<<<<<<<<<<<<<
 *     cdef public object RightEdge
 *     cdef public object subgrid_faces
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->LeftEdge);
  __pyx_r = __pyx_v_self->LeftEdge;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->LeftEdge);
  __Pyx_DECREF(__pyx_v_self->LeftEdge);
  __pyx_v_self->LeftEdge = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge_4__del__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->LeftEdge);
  __Pyx_DECREF(__pyx_v_self->LeftEdge);
  __pyx_v_self->LeftEdge = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1566
 *     cdef np.float64_t right_edge[3]
 *     cdef public object LeftEdge
 *     cdef public object RightEdge             # <<<<<<<<<<<<<<
 *     cdef public object subgrid_faces
 *     cdef public int parent_grid_id
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->RightEdge);
  __pyx_r = __pyx_v_self->RightEdge;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->RightEdge);
  __Pyx_DECREF(__pyx_v_self->RightEdge);
  __pyx_v_self->RightEdge = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge_4__del__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->RightEdge);
  __Pyx_DECREF(__pyx_v_self->RightEdge);
  __pyx_v_self->RightEdge = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1567
 *     cdef public object LeftEdge
 *     cdef public object RightEdge
 *     cdef public object subgrid_faces             # <<<<<<<<<<<<<<
 *     cdef public int parent_grid_id
 *     def __cinit__(self, int parent_grid_id,
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->subgrid_faces);
  __pyx_r = __pyx_v_self->subgrid_faces;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->subgrid_faces);
  __Pyx_DECREF(__pyx_v_self->subgrid_faces);
  __pyx_v_self->subgrid_faces = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces_4__del__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces_4__del__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__", 0);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->subgrid_faces);
  __Pyx_DECREF(__pyx_v_self->subgrid_faces);
  __pyx_v_self->subgrid_faces = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_14parent_grid_id_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_14parent_grid_id_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_14parent_grid_id___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1568
 *     cdef public object RightEdge
 *     cdef public object subgrid_faces
 *     cdef public int parent_grid_id             # <<<<<<<<<<<<<<
 *     def __cinit__(self, int parent_grid_id,
 *                   np.ndarray[np.float64_t, ndim=1] left_edge,
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_14parent_grid_id___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->parent_grid_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.ProtoPrism.parent_grid_id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_14parent_grid_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_14parent_grid_id_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_14parent_grid_id_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_14parent_grid_id_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->parent_grid_id = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.ProtoPrism.parent_grid_id.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_center = 0;
  PyObject *__pyx_v_rays_per_cell = 0;
  PyObject *__pyx_v_initial_nside = 0;
  __pyx_t_5numpy_float64_t __pyx_v_normalization;
  PyObject *__pyx_v_brick_list = 0;
  PyArrayObject *__pyx_v_ledges = 0;
  PyArrayObject *__pyx_v_redges = 0;
  int __pyx_v_max_nside;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__center,&__pyx_n_s__rays_per_cell,&__pyx_n_s__initial_nside,&__pyx_n_s__normalization,&__pyx_n_s__brick_list,&__pyx_n_s__ledges,&__pyx_n_s__redges,&__pyx_n_s__max_nside,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__center)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rays_per_cell)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 8, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__initial_nside)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 8, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__normalization)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 8, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__brick_list)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 8, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ledges)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 8, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__redges)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 8, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  7:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_nside);
          if (value) { values[7] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_center = values[0];
    __pyx_v_rays_per_cell = values[1];
    __pyx_v_initial_nside = values[2];
    __pyx_v_normalization = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_normalization == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1668; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_brick_list = values[4];
    __pyx_v_ledges = ((PyArrayObject *)values[5]);
    __pyx_v_redges = ((PyArrayObject *)values[6]);
    if (values[7]) {
      __pyx_v_max_nside = __Pyx_PyInt_AsInt(values[7]); if (unlikely((__pyx_v_max_nside == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_max_nside = ((int)8192);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ledges), __pyx_ptype_5numpy_ndarray, 1, "ledges", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_redges), __pyx_ptype_5numpy_ndarray, 1, "redges", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource___cinit__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self), __pyx_v_center, __pyx_v_rays_per_cell, __pyx_v_initial_nside, __pyx_v_normalization, __pyx_v_brick_list, __pyx_v_ledges, __pyx_v_redges, __pyx_v_max_nside);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1667
 *     cdef AdaptiveRayPacket **lpacket_pointers
 * 
 *     def __cinit__(self, center, rays_per_cell, initial_nside,             # <<<<<<<<<<<<<<
 *                   np.float64_t normalization, brick_list,
 *                   np.ndarray[np.float64_t, ndim=2] ledges,
 */

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource___cinit__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, PyObject *__pyx_v_center, PyObject *__pyx_v_rays_per_cell, PyObject *__pyx_v_initial_nside, __pyx_t_5numpy_float64_t __pyx_v_normalization, PyObject *__pyx_v_brick_list, PyArrayObject *__pyx_v_ledges, PyArrayObject *__pyx_v_redges, int __pyx_v_max_nside) {
  int __pyx_v_i;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *__pyx_v_ray;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *__pyx_v_last;
  double __pyx_v_v_dir[3];
  int __pyx_v_nbricks;
  int *__pyx_v_grid_neighbors;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ledges;
  __Pyx_Buffer __pyx_pybuffer_ledges;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_redges;
  __Pyx_Buffer __pyx_pybuffer_redges;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_5numpy_float64_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  long __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __pyx_pybuffer_ledges.pybuffer.buf = NULL;
  __pyx_pybuffer_ledges.refcount = 0;
  __pyx_pybuffernd_ledges.data = NULL;
  __pyx_pybuffernd_ledges.rcbuffer = &__pyx_pybuffer_ledges;
  __pyx_pybuffer_redges.pybuffer.buf = NULL;
  __pyx_pybuffer_redges.refcount = 0;
  __pyx_pybuffernd_redges.data = NULL;
  __pyx_pybuffernd_redges.rcbuffer = &__pyx_pybuffer_redges;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ledges.rcbuffer->pybuffer, (PyObject*)__pyx_v_ledges, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_ledges.diminfo[0].strides = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ledges.diminfo[0].shape = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ledges.diminfo[1].strides = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ledges.diminfo[1].shape = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_redges.rcbuffer->pybuffer, (PyObject*)__pyx_v_redges, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_redges.diminfo[0].strides = __pyx_pybuffernd_redges.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_redges.diminfo[0].shape = __pyx_pybuffernd_redges.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_redges.diminfo[1].strides = __pyx_pybuffernd_redges.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_redges.diminfo[1].shape = __pyx_pybuffernd_redges.rcbuffer->pybuffer.shape[1];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1673
 *                   int max_nside = 8192):
 *         cdef int i
 *         self.max_nside = max_nside             # <<<<<<<<<<<<<<
 *         self.center[0] = center[0]
 *         self.center[1] = center[1]
 */
  __pyx_v_self->max_nside = __pyx_v_max_nside;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1674
 *         cdef int i
 *         self.max_nside = max_nside
 *         self.center[0] = center[0]             # <<<<<<<<<<<<<<
 *         self.center[1] = center[1]
 *         self.center[2] = center[2]
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_center, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->center[0]) = __pyx_t_2;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1675
 *         self.max_nside = max_nside
 *         self.center[0] = center[0]
 *         self.center[1] = center[1]             # <<<<<<<<<<<<<<
 *         self.center[2] = center[2]
 *         self.rays_per_cell = rays_per_cell
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_center, 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->center[1]) = __pyx_t_2;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1676
 *         self.center[0] = center[0]
 *         self.center[1] = center[1]
 *         self.center[2] = center[2]             # <<<<<<<<<<<<<<
 *         self.rays_per_cell = rays_per_cell
 *         cdef AdaptiveRayPacket *ray
 */
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_center, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  (__pyx_v_self->center[2]) = __pyx_t_2;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1677
 *         self.center[1] = center[1]
 *         self.center[2] = center[2]
 *         self.rays_per_cell = rays_per_cell             # <<<<<<<<<<<<<<
 *         cdef AdaptiveRayPacket *ray
 *         cdef AdaptiveRayPacket *last = NULL
 */
  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_rays_per_cell); if (unlikely((__pyx_t_2 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->rays_per_cell = __pyx_t_2;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1679
 *         self.rays_per_cell = rays_per_cell
 *         cdef AdaptiveRayPacket *ray
 *         cdef AdaptiveRayPacket *last = NULL             # <<<<<<<<<<<<<<
 *         cdef PartitionedGrid pg
 *         cdef double v_dir[3]
 */
  __pyx_v_last = NULL;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1682
 *         cdef PartitionedGrid pg
 *         cdef double v_dir[3]
 *         cdef int nbricks = len(brick_list)             # <<<<<<<<<<<<<<
 *         # You see, killbots have a preset kill limit. Knowing their weakness, I
 *         # sent wave after wave of my own men at them until they reached their
 */
  __pyx_t_3 = PyObject_Length(__pyx_v_brick_list); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nbricks = __pyx_t_3;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1686
 *         # sent wave after wave of my own men at them until they reached their
 *         # limit and shut down.
 *         self.lpacket_pointers = <AdaptiveRayPacket **> \             # <<<<<<<<<<<<<<
 *             malloc(sizeof(AdaptiveRayPacket*)*nbricks)
 *         self.packet_pointers = <AdaptiveRayPacket **> \
 */
  __pyx_v_self->lpacket_pointers = ((struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket **)malloc(((sizeof(struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *)) * __pyx_v_nbricks)));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1688
 *         self.lpacket_pointers = <AdaptiveRayPacket **> \
 *             malloc(sizeof(AdaptiveRayPacket*)*nbricks)
 *         self.packet_pointers = <AdaptiveRayPacket **> \             # <<<<<<<<<<<<<<
 *             malloc(sizeof(AdaptiveRayPacket*)*nbricks)
 *         for i in range(nbricks):
 */
  __pyx_v_self->packet_pointers = ((struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket **)malloc(((sizeof(struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *)) * __pyx_v_nbricks)));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1690
 *         self.packet_pointers = <AdaptiveRayPacket **> \
 *             malloc(sizeof(AdaptiveRayPacket*)*nbricks)
 *         for i in range(nbricks):             # <<<<<<<<<<<<<<
 *             self.lpacket_pointers[i] = self.packet_pointers[i] = NULL
 *         self.normalization = normalization
 */
  __pyx_t_4 = __pyx_v_nbricks;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1691
 *             malloc(sizeof(AdaptiveRayPacket*)*nbricks)
 *         for i in range(nbricks):
 *             self.lpacket_pointers[i] = self.packet_pointers[i] = NULL             # <<<<<<<<<<<<<<
 *         self.normalization = normalization
 *         self.nrays = 12*initial_nside*initial_nside
 */
    (__pyx_v_self->lpacket_pointers[__pyx_v_i]) = NULL;
    (__pyx_v_self->packet_pointers[__pyx_v_i]) = NULL;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1692
 *         for i in range(nbricks):
 *             self.lpacket_pointers[i] = self.packet_pointers[i] = NULL
 *         self.normalization = normalization             # <<<<<<<<<<<<<<
 *         self.nrays = 12*initial_nside*initial_nside
 *         cdef int *grid_neighbors = <int*> malloc(sizeof(int) * (nbricks+1))
 */
  __pyx_v_self->normalization = __pyx_v_normalization;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1693
 *             self.lpacket_pointers[i] = self.packet_pointers[i] = NULL
 *         self.normalization = normalization
 *         self.nrays = 12*initial_nside*initial_nside             # <<<<<<<<<<<<<<
 *         cdef int *grid_neighbors = <int*> malloc(sizeof(int) * (nbricks+1))
 *         grid_neighbors[0] = nbricks
 */
  __pyx_t_1 = PyNumber_Multiply(__pyx_int_12, __pyx_v_initial_nside); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyNumber_Multiply(__pyx_t_1, __pyx_v_initial_nside); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_self->nrays = __pyx_t_4;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1694
 *         self.normalization = normalization
 *         self.nrays = 12*initial_nside*initial_nside
 *         cdef int *grid_neighbors = <int*> malloc(sizeof(int) * (nbricks+1))             # <<<<<<<<<<<<<<
 *         grid_neighbors[0] = nbricks
 *         for i in range(nbricks):
 */
  __pyx_v_grid_neighbors = ((int *)malloc(((sizeof(int)) * (__pyx_v_nbricks + 1))));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1695
 *         self.nrays = 12*initial_nside*initial_nside
 *         cdef int *grid_neighbors = <int*> malloc(sizeof(int) * (nbricks+1))
 *         grid_neighbors[0] = nbricks             # <<<<<<<<<<<<<<
 *         for i in range(nbricks):
 *             grid_neighbors[i+1] = i
 */
  (__pyx_v_grid_neighbors[0]) = __pyx_v_nbricks;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1696
 *         cdef int *grid_neighbors = <int*> malloc(sizeof(int) * (nbricks+1))
 *         grid_neighbors[0] = nbricks
 *         for i in range(nbricks):             # <<<<<<<<<<<<<<
 *             grid_neighbors[i+1] = i
 *         for i in range(self.nrays):
 */
  __pyx_t_4 = __pyx_v_nbricks;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1697
 *         grid_neighbors[0] = nbricks
 *         for i in range(nbricks):
 *             grid_neighbors[i+1] = i             # <<<<<<<<<<<<<<
 *         for i in range(self.nrays):
 *             # Initialize rays here
 */
    (__pyx_v_grid_neighbors[(__pyx_v_i + 1)]) = __pyx_v_i;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1698
 *         for i in range(nbricks):
 *             grid_neighbors[i+1] = i
 *         for i in range(self.nrays):             # <<<<<<<<<<<<<<
 *             # Initialize rays here
 *             ray = <AdaptiveRayPacket *> malloc(sizeof(AdaptiveRayPacket))
 */
  __pyx_t_4 = __pyx_v_self->nrays;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1700
 *         for i in range(self.nrays):
 *             # Initialize rays here
 *             ray = <AdaptiveRayPacket *> malloc(sizeof(AdaptiveRayPacket))             # <<<<<<<<<<<<<<
 *             ray.prev = last
 *             ray.ipix = i
 */
    __pyx_v_ray = ((struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *)malloc((sizeof(struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket))));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1701
 *             # Initialize rays here
 *             ray = <AdaptiveRayPacket *> malloc(sizeof(AdaptiveRayPacket))
 *             ray.prev = last             # <<<<<<<<<<<<<<
 *             ray.ipix = i
 *             ray.nside = initial_nside
 */
    __pyx_v_ray->prev = __pyx_v_last;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1702
 *             ray = <AdaptiveRayPacket *> malloc(sizeof(AdaptiveRayPacket))
 *             ray.prev = last
 *             ray.ipix = i             # <<<<<<<<<<<<<<
 *             ray.nside = initial_nside
 *             ray.t = 0.0 # We assume we are not on a brick boundary
 */
    __pyx_v_ray->ipix = __pyx_v_i;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1703
 *             ray.prev = last
 *             ray.ipix = i
 *             ray.nside = initial_nside             # <<<<<<<<<<<<<<
 *             ray.t = 0.0 # We assume we are not on a brick boundary
 *             healpix_interface.pix2vec_nest(initial_nside, i, v_dir)
 */
    __pyx_t_7 = __Pyx_PyInt_AsLong(__pyx_v_initial_nside); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_ray->nside = __pyx_t_7;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1704
 *             ray.ipix = i
 *             ray.nside = initial_nside
 *             ray.t = 0.0 # We assume we are not on a brick boundary             # <<<<<<<<<<<<<<
 *             healpix_interface.pix2vec_nest(initial_nside, i, v_dir)
 *             ray.v_dir[0] = v_dir[0] * normalization
 */
    __pyx_v_ray->t = 0.0;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1705
 *             ray.nside = initial_nside
 *             ray.t = 0.0 # We assume we are not on a brick boundary
 *             healpix_interface.pix2vec_nest(initial_nside, i, v_dir)             # <<<<<<<<<<<<<<
 *             ray.v_dir[0] = v_dir[0] * normalization
 *             ray.v_dir[1] = v_dir[1] * normalization
 */
    __pyx_t_7 = __Pyx_PyInt_AsLong(__pyx_v_initial_nside); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    pix2vec_nest(__pyx_t_7, __pyx_v_i, __pyx_v_v_dir);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1706
 *             ray.t = 0.0 # We assume we are not on a brick boundary
 *             healpix_interface.pix2vec_nest(initial_nside, i, v_dir)
 *             ray.v_dir[0] = v_dir[0] * normalization             # <<<<<<<<<<<<<<
 *             ray.v_dir[1] = v_dir[1] * normalization
 *             ray.v_dir[2] = v_dir[2] * normalization
 */
    (__pyx_v_ray->v_dir[0]) = ((__pyx_v_v_dir[0]) * __pyx_v_normalization);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1707
 *             healpix_interface.pix2vec_nest(initial_nside, i, v_dir)
 *             ray.v_dir[0] = v_dir[0] * normalization
 *             ray.v_dir[1] = v_dir[1] * normalization             # <<<<<<<<<<<<<<
 *             ray.v_dir[2] = v_dir[2] * normalization
 *             ray.value[0] = ray.value[1] = ray.value[2] = ray.value[3] = 0.0
 */
    (__pyx_v_ray->v_dir[1]) = ((__pyx_v_v_dir[1]) * __pyx_v_normalization);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1708
 *             ray.v_dir[0] = v_dir[0] * normalization
 *             ray.v_dir[1] = v_dir[1] * normalization
 *             ray.v_dir[2] = v_dir[2] * normalization             # <<<<<<<<<<<<<<
 *             ray.value[0] = ray.value[1] = ray.value[2] = ray.value[3] = 0.0
 *             ray.next = NULL
 */
    (__pyx_v_ray->v_dir[2]) = ((__pyx_v_v_dir[2]) * __pyx_v_normalization);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1709
 *             ray.v_dir[1] = v_dir[1] * normalization
 *             ray.v_dir[2] = v_dir[2] * normalization
 *             ray.value[0] = ray.value[1] = ray.value[2] = ray.value[3] = 0.0             # <<<<<<<<<<<<<<
 *             ray.next = NULL
 *             #ray.cgi = 0
 */
    (__pyx_v_ray->value[0]) = 0.0;
    (__pyx_v_ray->value[1]) = 0.0;
    (__pyx_v_ray->value[2]) = 0.0;
    (__pyx_v_ray->value[3]) = 0.0;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1710
 *             ray.v_dir[2] = v_dir[2] * normalization
 *             ray.value[0] = ray.value[1] = ray.value[2] = ray.value[3] = 0.0
 *             ray.next = NULL             # <<<<<<<<<<<<<<
 *             #ray.cgi = 0
 *             ray.pos[0] = self.center[0]
 */
    __pyx_v_ray->next = NULL;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1712
 *             ray.next = NULL
 *             #ray.cgi = 0
 *             ray.pos[0] = self.center[0]             # <<<<<<<<<<<<<<
 *             ray.pos[1] = self.center[1]
 *             ray.pos[2] = self.center[2]
 */
    (__pyx_v_ray->pos[0]) = (__pyx_v_self->center[0]);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1713
 *             #ray.cgi = 0
 *             ray.pos[0] = self.center[0]
 *             ray.pos[1] = self.center[1]             # <<<<<<<<<<<<<<
 *             ray.pos[2] = self.center[2]
 *             ray.brick_next = NULL
 */
    (__pyx_v_ray->pos[1]) = (__pyx_v_self->center[1]);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1714
 *             ray.pos[0] = self.center[0]
 *             ray.pos[1] = self.center[1]
 *             ray.pos[2] = self.center[2]             # <<<<<<<<<<<<<<
 *             ray.brick_next = NULL
 *             ray.pgi = -1
 */
    (__pyx_v_ray->pos[2]) = (__pyx_v_self->center[2]);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1715
 *             ray.pos[1] = self.center[1]
 *             ray.pos[2] = self.center[2]
 *             ray.brick_next = NULL             # <<<<<<<<<<<<<<
 *             ray.pgi = -1
 *             if last != NULL:
 */
    __pyx_v_ray->brick_next = NULL;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1716
 *             ray.pos[2] = self.center[2]
 *             ray.brick_next = NULL
 *             ray.pgi = -1             # <<<<<<<<<<<<<<
 *             if last != NULL:
 *                 last.next = ray
 */
    __pyx_v_ray->pgi = -1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1717
 *             ray.brick_next = NULL
 *             ray.pgi = -1
 *             if last != NULL:             # <<<<<<<<<<<<<<
 *                 last.next = ray
 *             else:
 */
    __pyx_t_8 = (__pyx_v_last != NULL);
    if (__pyx_t_8) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1718
 *             ray.pgi = -1
 *             if last != NULL:
 *                 last.next = ray             # <<<<<<<<<<<<<<
 *             else:
 *                 self.first = ray
 */
      __pyx_v_last->next = __pyx_v_ray;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1720
 *                 last.next = ray
 *             else:
 *                 self.first = ray             # <<<<<<<<<<<<<<
 *             self.send_ray_home(ray, ledges, redges, grid_neighbors, 0)
 *             last = ray
 */
      __pyx_v_self->first = __pyx_v_ray;
    }
    __pyx_L9:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1721
 *             else:
 *                 self.first = ray
 *             self.send_ray_home(ray, ledges, redges, grid_neighbors, 0)             # <<<<<<<<<<<<<<
 *             last = ray
 * 
 */
    __pyx_t_6 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self->__pyx_vtab)->send_ray_home(__pyx_v_self, __pyx_v_ray, ((PyArrayObject *)__pyx_v_ledges), ((PyArrayObject *)__pyx_v_redges), __pyx_v_grid_neighbors, 0.0, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1722
 *                 self.first = ray
 *             self.send_ray_home(ray, ledges, redges, grid_neighbors, 0)
 *             last = ray             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
    __pyx_v_last = __pyx_v_ray;
  }

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ledges.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_redges.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ledges.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_redges.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static void __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_2__dealloc__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1724
 *             last = ray
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         cdef AdaptiveRayPacket *next
 *         cdef AdaptiveRayPacket *ray = self.first
 */

static void __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_2__dealloc__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self) {
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *__pyx_v_next;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *__pyx_v_ray;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1726
 *     def __dealloc__(self):
 *         cdef AdaptiveRayPacket *next
 *         cdef AdaptiveRayPacket *ray = self.first             # <<<<<<<<<<<<<<
 *         while ray != NULL:
 *             next = ray.next
 */
  __pyx_v_ray = __pyx_v_self->first;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1727
 *         cdef AdaptiveRayPacket *next
 *         cdef AdaptiveRayPacket *ray = self.first
 *         while ray != NULL:             # <<<<<<<<<<<<<<
 *             next = ray.next
 *             free(ray)
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_ray != NULL);
    if (!__pyx_t_1) break;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1728
 *         cdef AdaptiveRayPacket *ray = self.first
 *         while ray != NULL:
 *             next = ray.next             # <<<<<<<<<<<<<<
 *             free(ray)
 *             ray = next
 */
    __pyx_v_next = __pyx_v_ray->next;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1729
 *         while ray != NULL:
 *             next = ray.next
 *             free(ray)             # <<<<<<<<<<<<<<
 *             ray = next
 *         free(self.packet_pointers)
 */
    free(__pyx_v_ray);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1730
 *             next = ray.next
 *             free(ray)
 *             ray = next             # <<<<<<<<<<<<<<
 *         free(self.packet_pointers)
 *         free(self.lpacket_pointers)
 */
    __pyx_v_ray = __pyx_v_next;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1731
 *             free(ray)
 *             ray = next
 *         free(self.packet_pointers)             # <<<<<<<<<<<<<<
 *         free(self.lpacket_pointers)
 * 
 */
  free(__pyx_v_self->packet_pointers);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1732
 *             ray = next
 *         free(self.packet_pointers)
 *         free(self.lpacket_pointers)             # <<<<<<<<<<<<<<
 * 
 *     def get_rays(self):
 */
  free(__pyx_v_self->lpacket_pointers);

  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_5get_rays(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_5get_rays(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_rays (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_4get_rays(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1734
 *         free(self.lpacket_pointers)
 * 
 *     def get_rays(self):             # <<<<<<<<<<<<<<
 *         cdef AdaptiveRayPacket *ray = self.first
 *         cdef int count = 0
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_4get_rays(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self) {
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *__pyx_v_ray;
  int __pyx_v_count;
  PyArrayObject *__pyx_v_info = 0;
  PyArrayObject *__pyx_v_values = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_info;
  __Pyx_Buffer __pyx_pybuffer_info;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  long __pyx_t_9;
  int __pyx_t_10;
  long __pyx_t_11;
  int __pyx_t_12;
  long __pyx_t_13;
  int __pyx_t_14;
  long __pyx_t_15;
  int __pyx_t_16;
  long __pyx_t_17;
  int __pyx_t_18;
  long __pyx_t_19;
  int __pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_rays", 0);
  __pyx_pybuffer_info.pybuffer.buf = NULL;
  __pyx_pybuffer_info.refcount = 0;
  __pyx_pybuffernd_info.data = NULL;
  __pyx_pybuffernd_info.rcbuffer = &__pyx_pybuffer_info;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1735
 * 
 *     def get_rays(self):
 *         cdef AdaptiveRayPacket *ray = self.first             # <<<<<<<<<<<<<<
 *         cdef int count = 0
 *         while ray != NULL:
 */
  __pyx_v_ray = __pyx_v_self->first;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1736
 *     def get_rays(self):
 *         cdef AdaptiveRayPacket *ray = self.first
 *         cdef int count = 0             # <<<<<<<<<<<<<<
 *         while ray != NULL:
 *             count += 1
 */
  __pyx_v_count = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1737
 *         cdef AdaptiveRayPacket *ray = self.first
 *         cdef int count = 0
 *         while ray != NULL:             # <<<<<<<<<<<<<<
 *             count += 1
 *             ray = ray.next
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_ray != NULL);
    if (!__pyx_t_1) break;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1738
 *         cdef int count = 0
 *         while ray != NULL:
 *             count += 1             # <<<<<<<<<<<<<<
 *             ray = ray.next
 *         cdef np.ndarray[np.int64_t, ndim=2] info = np.zeros((count, 2), dtype="int64")
 */
    __pyx_v_count = (__pyx_v_count + 1);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1739
 *         while ray != NULL:
 *             count += 1
 *             ray = ray.next             # <<<<<<<<<<<<<<
 *         cdef np.ndarray[np.int64_t, ndim=2] info = np.zeros((count, 2), dtype="int64")
 *         cdef np.ndarray[np.float64_t, ndim=2] values = np.zeros((count, 4), dtype="float64")
 */
    __pyx_v_ray = __pyx_v_ray->next;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1740
 *             count += 1
 *             ray = ray.next
 *         cdef np.ndarray[np.int64_t, ndim=2] info = np.zeros((count, 2), dtype="int64")             # <<<<<<<<<<<<<<
 *         cdef np.ndarray[np.float64_t, ndim=2] values = np.zeros((count, 4), dtype="float64")
 *         count = 0
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromLong(__pyx_v_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__int64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_info.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
      __pyx_v_info = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_info.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_info.diminfo[0].strides = __pyx_pybuffernd_info.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_info.diminfo[0].shape = __pyx_pybuffernd_info.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_info.diminfo[1].strides = __pyx_pybuffernd_info.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_info.diminfo[1].shape = __pyx_pybuffernd_info.rcbuffer->pybuffer.shape[1];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_info = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1741
 *             ray = ray.next
 *         cdef np.ndarray[np.int64_t, ndim=2] info = np.zeros((count, 2), dtype="int64")
 *         cdef np.ndarray[np.float64_t, ndim=2] values = np.zeros((count, 4), dtype="float64")             # <<<<<<<<<<<<<<
 *         count = 0
 *         ray = self.first
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__zeros); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyInt_FromLong(__pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_int_4);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_4);
  __Pyx_GIVEREF(__pyx_int_4);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
      __pyx_v_values = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_values.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_values = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1742
 *         cdef np.ndarray[np.int64_t, ndim=2] info = np.zeros((count, 2), dtype="int64")
 *         cdef np.ndarray[np.float64_t, ndim=2] values = np.zeros((count, 4), dtype="float64")
 *         count = 0             # <<<<<<<<<<<<<<
 *         ray = self.first
 *         while ray != NULL:
 */
  __pyx_v_count = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1743
 *         cdef np.ndarray[np.float64_t, ndim=2] values = np.zeros((count, 4), dtype="float64")
 *         count = 0
 *         ray = self.first             # <<<<<<<<<<<<<<
 *         while ray != NULL:
 *             info[count, 0] = ray.nside
 */
  __pyx_v_ray = __pyx_v_self->first;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1744
 *         count = 0
 *         ray = self.first
 *         while ray != NULL:             # <<<<<<<<<<<<<<
 *             info[count, 0] = ray.nside
 *             info[count, 1] = ray.ipix
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_ray != NULL);
    if (!__pyx_t_1) break;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1745
 *         ray = self.first
 *         while ray != NULL:
 *             info[count, 0] = ray.nside             # <<<<<<<<<<<<<<
 *             info[count, 1] = ray.ipix
 *             values[count, 0] = ray.value[0]
 */
    __pyx_t_8 = __pyx_v_count;
    __pyx_t_9 = 0;
    __pyx_t_10 = -1;
    if (__pyx_t_8 < 0) {
      __pyx_t_8 += __pyx_pybuffernd_info.diminfo[0].shape;
      if (unlikely(__pyx_t_8 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_info.diminfo[0].shape)) __pyx_t_10 = 0;
    if (__pyx_t_9 < 0) {
      __pyx_t_9 += __pyx_pybuffernd_info.diminfo[1].shape;
      if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 1;
    } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_info.diminfo[1].shape)) __pyx_t_10 = 1;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_info.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_info.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_info.diminfo[1].strides) = __pyx_v_ray->nside;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1746
 *         while ray != NULL:
 *             info[count, 0] = ray.nside
 *             info[count, 1] = ray.ipix             # <<<<<<<<<<<<<<
 *             values[count, 0] = ray.value[0]
 *             values[count, 1] = ray.value[1]
 */
    __pyx_t_10 = __pyx_v_count;
    __pyx_t_11 = 1;
    __pyx_t_12 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_pybuffernd_info.diminfo[0].shape;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_12 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_info.diminfo[0].shape)) __pyx_t_12 = 0;
    if (__pyx_t_11 < 0) {
      __pyx_t_11 += __pyx_pybuffernd_info.diminfo[1].shape;
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 1;
    } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_info.diminfo[1].shape)) __pyx_t_12 = 1;
    if (unlikely(__pyx_t_12 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_12);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_info.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_info.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_info.diminfo[1].strides) = __pyx_v_ray->ipix;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1747
 *             info[count, 0] = ray.nside
 *             info[count, 1] = ray.ipix
 *             values[count, 0] = ray.value[0]             # <<<<<<<<<<<<<<
 *             values[count, 1] = ray.value[1]
 *             values[count, 2] = ray.value[2]
 */
    __pyx_t_12 = __pyx_v_count;
    __pyx_t_13 = 0;
    __pyx_t_14 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_14 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_14 = 0;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_values.diminfo[1].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 1;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_14 = 1;
    if (unlikely(__pyx_t_14 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_14);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_values.diminfo[1].strides) = (__pyx_v_ray->value[0]);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1748
 *             info[count, 1] = ray.ipix
 *             values[count, 0] = ray.value[0]
 *             values[count, 1] = ray.value[1]             # <<<<<<<<<<<<<<
 *             values[count, 2] = ray.value[2]
 *             values[count, 3] = ray.value[3]
 */
    __pyx_t_14 = __pyx_v_count;
    __pyx_t_15 = 1;
    __pyx_t_16 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_16 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_16 = 0;
    if (__pyx_t_15 < 0) {
      __pyx_t_15 += __pyx_pybuffernd_values.diminfo[1].shape;
      if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 1;
    } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_16 = 1;
    if (unlikely(__pyx_t_16 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_16);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_values.diminfo[1].strides) = (__pyx_v_ray->value[1]);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1749
 *             values[count, 0] = ray.value[0]
 *             values[count, 1] = ray.value[1]
 *             values[count, 2] = ray.value[2]             # <<<<<<<<<<<<<<
 *             values[count, 3] = ray.value[3]
 *             if ray.t < 0.5:
 */
    __pyx_t_16 = __pyx_v_count;
    __pyx_t_17 = 2;
    __pyx_t_18 = -1;
    if (__pyx_t_16 < 0) {
      __pyx_t_16 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_16 < 0)) __pyx_t_18 = 0;
    } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_18 = 0;
    if (__pyx_t_17 < 0) {
      __pyx_t_17 += __pyx_pybuffernd_values.diminfo[1].shape;
      if (unlikely(__pyx_t_17 < 0)) __pyx_t_18 = 1;
    } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_18 = 1;
    if (unlikely(__pyx_t_18 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_18);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides) = (__pyx_v_ray->value[2]);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1750
 *             values[count, 1] = ray.value[1]
 *             values[count, 2] = ray.value[2]
 *             values[count, 3] = ray.value[3]             # <<<<<<<<<<<<<<
 *             if ray.t < 0.5:
 *                 print "PROBLEM",
 */
    __pyx_t_18 = __pyx_v_count;
    __pyx_t_19 = 3;
    __pyx_t_20 = -1;
    if (__pyx_t_18 < 0) {
      __pyx_t_18 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_18 < 0)) __pyx_t_20 = 0;
    } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_20 = 0;
    if (__pyx_t_19 < 0) {
      __pyx_t_19 += __pyx_pybuffernd_values.diminfo[1].shape;
      if (unlikely(__pyx_t_19 < 0)) __pyx_t_20 = 1;
    } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_20 = 1;
    if (unlikely(__pyx_t_20 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_20);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides) = (__pyx_v_ray->value[3]);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1751
 *             values[count, 2] = ray.value[2]
 *             values[count, 3] = ray.value[3]
 *             if ray.t < 0.5:             # <<<<<<<<<<<<<<
 *                 print "PROBLEM",
 *                 print count, ray.ipix, ray.nside, ray.t,
 */
    __pyx_t_1 = (__pyx_v_ray->t < 0.5);
    if (__pyx_t_1) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1752
 *             values[count, 3] = ray.value[3]
 *             if ray.t < 0.5:
 *                 print "PROBLEM",             # <<<<<<<<<<<<<<
 *                 print count, ray.ipix, ray.nside, ray.t,
 *                 print "vd", ray.v_dir[0], ray.v_dir[1], ray.v_dir[2],
 */
      if (__Pyx_Print(0, ((PyObject *)__pyx_k_tuple_5), 0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1753
 *             if ray.t < 0.5:
 *                 print "PROBLEM",
 *                 print count, ray.ipix, ray.nside, ray.t,             # <<<<<<<<<<<<<<
 *                 print "vd", ray.v_dir[0], ray.v_dir[1], ray.v_dir[2],
 *                 print "pos", ray.pos[0], ray.pos[1], ray.pos[2],
 */
      __pyx_t_3 = PyInt_FromLong(__pyx_v_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyInt_FromLong(__pyx_v_ray->ipix); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyInt_FromLong(__pyx_v_ray->nside); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyFloat_FromDouble(__pyx_v_ray->t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_21 = PyTuple_New(4); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_21);
      PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_21, 2, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_21, 3, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_2 = 0;
      __pyx_t_5 = 0;
      __pyx_t_4 = 0;
      if (__Pyx_Print(0, ((PyObject *)__pyx_t_21), 0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_21)); __pyx_t_21 = 0;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1754
 *                 print "PROBLEM",
 *                 print count, ray.ipix, ray.nside, ray.t,
 *                 print "vd", ray.v_dir[0], ray.v_dir[1], ray.v_dir[2],             # <<<<<<<<<<<<<<
 *                 print "pos", ray.pos[0], ray.pos[1], ray.pos[2],
 *                 print "pgi", ray.pgi
 */
      __pyx_t_21 = PyFloat_FromDouble((__pyx_v_ray->v_dir[0])); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_4 = PyFloat_FromDouble((__pyx_v_ray->v_dir[1])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyFloat_FromDouble((__pyx_v_ray->v_dir[2])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__vd));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__vd));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__vd));
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_21);
      __Pyx_GIVEREF(__pyx_t_21);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_t_21 = 0;
      __pyx_t_4 = 0;
      __pyx_t_5 = 0;
      if (__Pyx_Print(0, ((PyObject *)__pyx_t_2), 0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1755
 *                 print count, ray.ipix, ray.nside, ray.t,
 *                 print "vd", ray.v_dir[0], ray.v_dir[1], ray.v_dir[2],
 *                 print "pos", ray.pos[0], ray.pos[1], ray.pos[2],             # <<<<<<<<<<<<<<
 *                 print "pgi", ray.pgi
 *             count += 1
 */
      __pyx_t_2 = PyFloat_FromDouble((__pyx_v_ray->pos[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyFloat_FromDouble((__pyx_v_ray->pos[1])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyFloat_FromDouble((__pyx_v_ray->pos[2])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_21 = PyTuple_New(4); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_21);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__pos));
      PyTuple_SET_ITEM(__pyx_t_21, 0, ((PyObject *)__pyx_n_s__pos));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos));
      PyTuple_SET_ITEM(__pyx_t_21, 1, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_21, 2, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_21, 3, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_2 = 0;
      __pyx_t_5 = 0;
      __pyx_t_4 = 0;
      if (__Pyx_Print(0, ((PyObject *)__pyx_t_21), 0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_21)); __pyx_t_21 = 0;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1756
 *                 print "vd", ray.v_dir[0], ray.v_dir[1], ray.v_dir[2],
 *                 print "pos", ray.pos[0], ray.pos[1], ray.pos[2],
 *                 print "pgi", ray.pgi             # <<<<<<<<<<<<<<
 *             count += 1
 *             ray = ray.next
 */
      __pyx_t_21 = PyInt_FromLong(__pyx_v_ray->pgi); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_21);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__pgi));
      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_n_s__pgi));
      __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pgi));
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_21);
      __Pyx_GIVEREF(__pyx_t_21);
      __pyx_t_21 = 0;
      if (__Pyx_Print(0, ((PyObject *)__pyx_t_4), 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1757
 *                 print "pos", ray.pos[0], ray.pos[1], ray.pos[2],
 *                 print "pgi", ray.pgi
 *             count += 1             # <<<<<<<<<<<<<<
 *             ray = ray.next
 *         return info, values
 */
    __pyx_v_count = (__pyx_v_count + 1);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1758
 *                 print "pgi", ray.pgi
 *             count += 1
 *             ray = ray.next             # <<<<<<<<<<<<<<
 *         return info, values
 * 
 */
    __pyx_v_ray = __pyx_v_ray->next;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1759
 *             count += 1
 *             ray = ray.next
 *         return info, values             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_info));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_info));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_info));
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  __pyx_r = ((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_21);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_info.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.get_rays", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_info.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_info);
  __Pyx_XDECREF((PyObject *)__pyx_v_values);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1764
 *     @cython.boundscheck(False)
 *     @cython.wraparound(False)
 *     cdef np.float64_t integrate_ray(self, AdaptiveRayPacket *ray,             # <<<<<<<<<<<<<<
 *                       PartitionedGrid pg, TransferFunctionProxy tf):
 *         cdef np.float64_t self_center[3], ray_v_dir[3], ray_value[4]
 */

static __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_integrate_ray(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *__pyx_v_ray, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_pg, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_tf) {
  __pyx_t_5numpy_float64_t __pyx_v_self_center[3];
  __pyx_t_5numpy_float64_t __pyx_v_ray_v_dir[3];
  __pyx_t_5numpy_float64_t __pyx_v_ray_value[4];
  PyObject *__pyx_v_enter_t = NULL;
  PyObject *__pyx_v_hit = NULL;
  PyObject *__pyx_v_dt = NULL;
  long __pyx_v_i;
  __pyx_t_5numpy_float64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_integrate_ray __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  long __pyx_t_6;
  __pyx_t_5numpy_float64_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("integrate_ray", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1767
 *                       PartitionedGrid pg, TransferFunctionProxy tf):
 *         cdef np.float64_t self_center[3], ray_v_dir[3], ray_value[4]
 *         self_center[0] = self.center[0]             # <<<<<<<<<<<<<<
 *         self_center[1] = self.center[1]
 *         self_center[2] = self.center[2]
 */
  (__pyx_v_self_center[0]) = (__pyx_v_self->center[0]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1768
 *         cdef np.float64_t self_center[3], ray_v_dir[3], ray_value[4]
 *         self_center[0] = self.center[0]
 *         self_center[1] = self.center[1]             # <<<<<<<<<<<<<<
 *         self_center[2] = self.center[2]
 *         enter_t = ray.t
 */
  (__pyx_v_self_center[1]) = (__pyx_v_self->center[1]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1769
 *         self_center[0] = self.center[0]
 *         self_center[1] = self.center[1]
 *         self_center[2] = self.center[2]             # <<<<<<<<<<<<<<
 *         enter_t = ray.t
 *         ray_v_dir[0] = ray.v_dir[0]
 */
  (__pyx_v_self_center[2]) = (__pyx_v_self->center[2]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1770
 *         self_center[1] = self.center[1]
 *         self_center[2] = self.center[2]
 *         enter_t = ray.t             # <<<<<<<<<<<<<<
 *         ray_v_dir[0] = ray.v_dir[0]
 *         ray_v_dir[1] = ray.v_dir[1]
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_ray->t); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_enter_t = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1771
 *         self_center[2] = self.center[2]
 *         enter_t = ray.t
 *         ray_v_dir[0] = ray.v_dir[0]             # <<<<<<<<<<<<<<
 *         ray_v_dir[1] = ray.v_dir[1]
 *         ray_v_dir[2] = ray.v_dir[2]
 */
  (__pyx_v_ray_v_dir[0]) = (__pyx_v_ray->v_dir[0]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1772
 *         enter_t = ray.t
 *         ray_v_dir[0] = ray.v_dir[0]
 *         ray_v_dir[1] = ray.v_dir[1]             # <<<<<<<<<<<<<<
 *         ray_v_dir[2] = ray.v_dir[2]
 *         ray_value[0] = ray.value[0]
 */
  (__pyx_v_ray_v_dir[1]) = (__pyx_v_ray->v_dir[1]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1773
 *         ray_v_dir[0] = ray.v_dir[0]
 *         ray_v_dir[1] = ray.v_dir[1]
 *         ray_v_dir[2] = ray.v_dir[2]             # <<<<<<<<<<<<<<
 *         ray_value[0] = ray.value[0]
 *         ray_value[1] = ray.value[1]
 */
  (__pyx_v_ray_v_dir[2]) = (__pyx_v_ray->v_dir[2]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1774
 *         ray_v_dir[1] = ray.v_dir[1]
 *         ray_v_dir[2] = ray.v_dir[2]
 *         ray_value[0] = ray.value[0]             # <<<<<<<<<<<<<<
 *         ray_value[1] = ray.value[1]
 *         ray_value[2] = ray.value[2]
 */
  (__pyx_v_ray_value[0]) = (__pyx_v_ray->value[0]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1775
 *         ray_v_dir[2] = ray.v_dir[2]
 *         ray_value[0] = ray.value[0]
 *         ray_value[1] = ray.value[1]             # <<<<<<<<<<<<<<
 *         ray_value[2] = ray.value[2]
 *         ray_value[3] = ray.value[3]
 */
  (__pyx_v_ray_value[1]) = (__pyx_v_ray->value[1]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1776
 *         ray_value[0] = ray.value[0]
 *         ray_value[1] = ray.value[1]
 *         ray_value[2] = ray.value[2]             # <<<<<<<<<<<<<<
 *         ray_value[3] = ray.value[3]
 *         hit = pg.integrate_ray(self_center, ray_v_dir, ray_value, tf, &ray.t,
 */
  (__pyx_v_ray_value[2]) = (__pyx_v_ray->value[2]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1777
 *         ray_value[1] = ray.value[1]
 *         ray_value[2] = ray.value[2]
 *         ray_value[3] = ray.value[3]             # <<<<<<<<<<<<<<
 *         hit = pg.integrate_ray(self_center, ray_v_dir, ray_value, tf, &ray.t,
 *                                ray.t)
 */
  (__pyx_v_ray_value[3]) = (__pyx_v_ray->value[3]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1779
 *         ray_value[3] = ray.value[3]
 *         hit = pg.integrate_ray(self_center, ray_v_dir, ray_value, tf, &ray.t,
 *                                ray.t)             # <<<<<<<<<<<<<<
 *         ray.value[0] = ray_value[0]
 *         ray.value[1] = ray_value[1]
 */
  __pyx_t_3.__pyx_n = 2;
  __pyx_t_3.return_t = (&__pyx_v_ray->t);
  __pyx_t_3.enter_t = __pyx_v_ray->t;
  __pyx_t_2 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_v_pg->__pyx_vtab)->integrate_ray(__pyx_v_pg, __pyx_v_self_center, __pyx_v_ray_v_dir, __pyx_v_ray_value, __pyx_v_tf, &__pyx_t_3); 
  __pyx_t_1 = PyInt_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_hit = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1780
 *         hit = pg.integrate_ray(self_center, ray_v_dir, ray_value, tf, &ray.t,
 *                                ray.t)
 *         ray.value[0] = ray_value[0]             # <<<<<<<<<<<<<<
 *         ray.value[1] = ray_value[1]
 *         ray.value[2] = ray_value[2]
 */
  (__pyx_v_ray->value[0]) = (__pyx_v_ray_value[0]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1781
 *                                ray.t)
 *         ray.value[0] = ray_value[0]
 *         ray.value[1] = ray_value[1]             # <<<<<<<<<<<<<<
 *         ray.value[2] = ray_value[2]
 *         ray.value[3] = ray_value[3]
 */
  (__pyx_v_ray->value[1]) = (__pyx_v_ray_value[1]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1782
 *         ray.value[0] = ray_value[0]
 *         ray.value[1] = ray_value[1]
 *         ray.value[2] = ray_value[2]             # <<<<<<<<<<<<<<
 *         ray.value[3] = ray_value[3]
 *         if hit == 0: dt = 0.0
 */
  (__pyx_v_ray->value[2]) = (__pyx_v_ray_value[2]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1783
 *         ray.value[1] = ray_value[1]
 *         ray.value[2] = ray_value[2]
 *         ray.value[3] = ray_value[3]             # <<<<<<<<<<<<<<
 *         if hit == 0: dt = 0.0
 *         else: dt = (ray.t - enter_t)/hit
 */
  (__pyx_v_ray->value[3]) = (__pyx_v_ray_value[3]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1784
 *         ray.value[2] = ray_value[2]
 *         ray.value[3] = ray_value[3]
 *         if hit == 0: dt = 0.0             # <<<<<<<<<<<<<<
 *         else: dt = (ray.t - enter_t)/hit
 *         for i in range(3):
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_hit, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_4) {
    __pyx_t_1 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_dt = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1785
 *         ray.value[3] = ray_value[3]
 *         if hit == 0: dt = 0.0
 *         else: dt = (ray.t - enter_t)/hit             # <<<<<<<<<<<<<<
 *         for i in range(3):
 *             ray.pos[i] = ray.v_dir[i] * ray.t + self.center[i]
 */
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_ray->t); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyNumber_Subtract(__pyx_t_1, __pyx_v_enter_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_v_hit); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_dt = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1786
 *         if hit == 0: dt = 0.0
 *         else: dt = (ray.t - enter_t)/hit
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             ray.pos[i] = ray.v_dir[i] * ray.t + self.center[i]
 *         return dt
 */
  for (__pyx_t_6 = 0; __pyx_t_6 < 3; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1787
 *         else: dt = (ray.t - enter_t)/hit
 *         for i in range(3):
 *             ray.pos[i] = ray.v_dir[i] * ray.t + self.center[i]             # <<<<<<<<<<<<<<
 *         return dt
 * 
 */
    (__pyx_v_ray->pos[__pyx_v_i]) = (((__pyx_v_ray->v_dir[__pyx_v_i]) * __pyx_v_ray->t) + (__pyx_v_self->center[__pyx_v_i]));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1788
 *         for i in range(3):
 *             ray.pos[i] = ray.v_dir[i] * ray.t + self.center[i]
 *         return dt             # <<<<<<<<<<<<<<
 * 
 *     cdef send_ray_home(self, AdaptiveRayPacket *ray,
 */
  __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_v_dt); if (unlikely((__pyx_t_7 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.integrate_ray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_enter_t);
  __Pyx_XDECREF(__pyx_v_hit);
  __Pyx_XDECREF(__pyx_v_dt);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1790
 *         return dt
 * 
 *     cdef send_ray_home(self, AdaptiveRayPacket *ray,             # <<<<<<<<<<<<<<
 *                        np.ndarray[np.float64_t, ndim=2] ledges,
 *                        np.ndarray[np.float64_t, ndim=2] redges,
 */

static PyObject *__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_send_ray_home(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *__pyx_v_ray, PyArrayObject *__pyx_v_ledges, PyArrayObject *__pyx_v_redges, int *__pyx_v_grid_neighbors, __pyx_t_5numpy_float64_t __pyx_v_dt, struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_send_ray_home *__pyx_optional_args) {
  int __pyx_v_skip_append = ((int)0);
  int __pyx_v_found_a_home;
  int __pyx_v_i;
  int __pyx_v_j;
  CYTHON_UNUSED int __pyx_v_npgi;
  __pyx_t_5numpy_float64_t __pyx_v_offpos[3];
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ledges;
  __Pyx_Buffer __pyx_pybuffer_ledges;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_redges;
  __Pyx_Buffer __pyx_pybuffer_redges;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  long __pyx_t_7;
  int __pyx_t_8;
  long __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  long __pyx_t_12;
  int __pyx_t_13;
  long __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  long __pyx_t_17;
  int __pyx_t_18;
  int __pyx_t_19;
  int __pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  npy_intp __pyx_t_22;
  long __pyx_t_23;
  long __pyx_t_24;
  int __pyx_t_25;
  long __pyx_t_26;
  int __pyx_t_27;
  long __pyx_t_28;
  int __pyx_t_29;
  long __pyx_t_30;
  int __pyx_t_31;
  long __pyx_t_32;
  int __pyx_t_33;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("send_ray_home", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_skip_append = __pyx_optional_args->skip_append;
    }
  }
  __pyx_pybuffer_ledges.pybuffer.buf = NULL;
  __pyx_pybuffer_ledges.refcount = 0;
  __pyx_pybuffernd_ledges.data = NULL;
  __pyx_pybuffernd_ledges.rcbuffer = &__pyx_pybuffer_ledges;
  __pyx_pybuffer_redges.pybuffer.buf = NULL;
  __pyx_pybuffer_redges.refcount = 0;
  __pyx_pybuffernd_redges.data = NULL;
  __pyx_pybuffernd_redges.rcbuffer = &__pyx_pybuffer_redges;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ledges.rcbuffer->pybuffer, (PyObject*)__pyx_v_ledges, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_ledges.diminfo[0].strides = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ledges.diminfo[0].shape = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ledges.diminfo[1].strides = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ledges.diminfo[1].shape = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_redges.rcbuffer->pybuffer, (PyObject*)__pyx_v_redges, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_redges.diminfo[0].strides = __pyx_pybuffernd_redges.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_redges.diminfo[0].shape = __pyx_pybuffernd_redges.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_redges.diminfo[1].strides = __pyx_pybuffernd_redges.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_redges.diminfo[1].shape = __pyx_pybuffernd_redges.rcbuffer->pybuffer.shape[1];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1795
 *                        int *grid_neighbors, np.float64_t dt,
 *                        int skip_append = 0):
 *         cdef int found_a_home = 0             # <<<<<<<<<<<<<<
 *         cdef int i, j, npgi
 *         cdef np.float64_t offpos[3]
 */
  __pyx_v_found_a_home = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1798
 *         cdef int i, j, npgi
 *         cdef np.float64_t offpos[3]
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             offpos[i] = ray.pos[i] + ray.v_dir[i] * 1e-6*dt
 *         for j in range(grid_neighbors[0]):
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1799
 *         cdef np.float64_t offpos[3]
 *         for i in range(3):
 *             offpos[i] = ray.pos[i] + ray.v_dir[i] * 1e-6*dt             # <<<<<<<<<<<<<<
 *         for j in range(grid_neighbors[0]):
 *             i = grid_neighbors[j+1]
 */
    (__pyx_v_offpos[__pyx_v_i]) = ((__pyx_v_ray->pos[__pyx_v_i]) + (((__pyx_v_ray->v_dir[__pyx_v_i]) * 1e-6) * __pyx_v_dt));
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1800
 *         for i in range(3):
 *             offpos[i] = ray.pos[i] + ray.v_dir[i] * 1e-6*dt
 *         for j in range(grid_neighbors[0]):             # <<<<<<<<<<<<<<
 *             i = grid_neighbors[j+1]
 *             if ((ledges[i, 0] <= offpos[0] <= redges[i, 0]) and
 */
  __pyx_t_1 = (__pyx_v_grid_neighbors[0]);
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_j = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1801
 *             offpos[i] = ray.pos[i] + ray.v_dir[i] * 1e-6*dt
 *         for j in range(grid_neighbors[0]):
 *             i = grid_neighbors[j+1]             # <<<<<<<<<<<<<<
 *             if ((ledges[i, 0] <= offpos[0] <= redges[i, 0]) and
 *                 (ledges[i, 1] <= offpos[1] <= redges[i, 1]) and
 */
    __pyx_v_i = (__pyx_v_grid_neighbors[(__pyx_v_j + 1)]);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1802
 *         for j in range(grid_neighbors[0]):
 *             i = grid_neighbors[j+1]
 *             if ((ledges[i, 0] <= offpos[0] <= redges[i, 0]) and             # <<<<<<<<<<<<<<
 *                 (ledges[i, 1] <= offpos[1] <= redges[i, 1]) and
 *                 (ledges[i, 2] <= offpos[2] <= redges[i, 2]) and
 */
    __pyx_t_3 = __pyx_v_i;
    __pyx_t_4 = 0;
    __pyx_t_5 = -1;
    if (__pyx_t_3 < 0) {
      __pyx_t_3 += __pyx_pybuffernd_ledges.diminfo[0].shape;
      if (unlikely(__pyx_t_3 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_ledges.diminfo[0].shape)) __pyx_t_5 = 0;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_pybuffernd_ledges.diminfo[1].shape;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 1;
    } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_ledges.diminfo[1].shape)) __pyx_t_5 = 1;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_4, __pyx_pybuffernd_ledges.diminfo[1].strides)) <= (__pyx_v_offpos[0]));
    if (__pyx_t_6) {
      __pyx_t_5 = __pyx_v_i;
      __pyx_t_7 = 0;
      __pyx_t_8 = -1;
      if (__pyx_t_5 < 0) {
        __pyx_t_5 += __pyx_pybuffernd_redges.diminfo[0].shape;
        if (unlikely(__pyx_t_5 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_redges.diminfo[0].shape)) __pyx_t_8 = 0;
      if (__pyx_t_7 < 0) {
        __pyx_t_7 += __pyx_pybuffernd_redges.diminfo[1].shape;
        if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 1;
      } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_redges.diminfo[1].shape)) __pyx_t_8 = 1;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_6 = ((__pyx_v_offpos[0]) <= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_redges.diminfo[1].strides)));
    }
    if (__pyx_t_6) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1803
 *             i = grid_neighbors[j+1]
 *             if ((ledges[i, 0] <= offpos[0] <= redges[i, 0]) and
 *                 (ledges[i, 1] <= offpos[1] <= redges[i, 1]) and             # <<<<<<<<<<<<<<
 *                 (ledges[i, 2] <= offpos[2] <= redges[i, 2]) and
 *                 ray.pgi != i):
 */
      __pyx_t_8 = __pyx_v_i;
      __pyx_t_9 = 1;
      __pyx_t_10 = -1;
      if (__pyx_t_8 < 0) {
        __pyx_t_8 += __pyx_pybuffernd_ledges.diminfo[0].shape;
        if (unlikely(__pyx_t_8 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_ledges.diminfo[0].shape)) __pyx_t_10 = 0;
      if (__pyx_t_9 < 0) {
        __pyx_t_9 += __pyx_pybuffernd_ledges.diminfo[1].shape;
        if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 1;
      } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_ledges.diminfo[1].shape)) __pyx_t_10 = 1;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_11 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_ledges.diminfo[1].strides)) <= (__pyx_v_offpos[1]));
      if (__pyx_t_11) {
        __pyx_t_10 = __pyx_v_i;
        __pyx_t_12 = 1;
        __pyx_t_13 = -1;
        if (__pyx_t_10 < 0) {
          __pyx_t_10 += __pyx_pybuffernd_redges.diminfo[0].shape;
          if (unlikely(__pyx_t_10 < 0)) __pyx_t_13 = 0;
        } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_redges.diminfo[0].shape)) __pyx_t_13 = 0;
        if (__pyx_t_12 < 0) {
          __pyx_t_12 += __pyx_pybuffernd_redges.diminfo[1].shape;
          if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 1;
        } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_redges.diminfo[1].shape)) __pyx_t_13 = 1;
        if (unlikely(__pyx_t_13 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_13);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_11 = ((__pyx_v_offpos[1]) <= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_redges.diminfo[1].strides)));
      }
      if (__pyx_t_11) {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1804
 *             if ((ledges[i, 0] <= offpos[0] <= redges[i, 0]) and
 *                 (ledges[i, 1] <= offpos[1] <= redges[i, 1]) and
 *                 (ledges[i, 2] <= offpos[2] <= redges[i, 2]) and             # <<<<<<<<<<<<<<
 *                 ray.pgi != i):
 *                 if not skip_append: self.append_to_packets(i, ray)
 */
        __pyx_t_13 = __pyx_v_i;
        __pyx_t_14 = 2;
        __pyx_t_15 = -1;
        if (__pyx_t_13 < 0) {
          __pyx_t_13 += __pyx_pybuffernd_ledges.diminfo[0].shape;
          if (unlikely(__pyx_t_13 < 0)) __pyx_t_15 = 0;
        } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_ledges.diminfo[0].shape)) __pyx_t_15 = 0;
        if (__pyx_t_14 < 0) {
          __pyx_t_14 += __pyx_pybuffernd_ledges.diminfo[1].shape;
          if (unlikely(__pyx_t_14 < 0)) __pyx_t_15 = 1;
        } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_ledges.diminfo[1].shape)) __pyx_t_15 = 1;
        if (unlikely(__pyx_t_15 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_15);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_16 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_ledges.diminfo[1].strides)) <= (__pyx_v_offpos[2]));
        if (__pyx_t_16) {
          __pyx_t_15 = __pyx_v_i;
          __pyx_t_17 = 2;
          __pyx_t_18 = -1;
          if (__pyx_t_15 < 0) {
            __pyx_t_15 += __pyx_pybuffernd_redges.diminfo[0].shape;
            if (unlikely(__pyx_t_15 < 0)) __pyx_t_18 = 0;
          } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_redges.diminfo[0].shape)) __pyx_t_18 = 0;
          if (__pyx_t_17 < 0) {
            __pyx_t_17 += __pyx_pybuffernd_redges.diminfo[1].shape;
            if (unlikely(__pyx_t_17 < 0)) __pyx_t_18 = 1;
          } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_redges.diminfo[1].shape)) __pyx_t_18 = 1;
          if (unlikely(__pyx_t_18 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_18);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_16 = ((__pyx_v_offpos[2]) <= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_redges.diminfo[1].strides)));
        }
        if (__pyx_t_16) {

          /* "yt/utilities/lib/VolumeIntegrator.pyx":1805
 *                 (ledges[i, 1] <= offpos[1] <= redges[i, 1]) and
 *                 (ledges[i, 2] <= offpos[2] <= redges[i, 2]) and
 *                 ray.pgi != i):             # <<<<<<<<<<<<<<
 *                 if not skip_append: self.append_to_packets(i, ray)
 *                 ray.pgi = i
 */
          __pyx_t_19 = (__pyx_v_ray->pgi != __pyx_v_i);
          __pyx_t_20 = __pyx_t_19;
        } else {
          __pyx_t_20 = __pyx_t_16;
        }
        __pyx_t_16 = __pyx_t_20;
      } else {
        __pyx_t_16 = __pyx_t_11;
      }
      __pyx_t_11 = __pyx_t_16;
    } else {
      __pyx_t_11 = __pyx_t_6;
    }
    if (__pyx_t_11) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1806
 *                 (ledges[i, 2] <= offpos[2] <= redges[i, 2]) and
 *                 ray.pgi != i):
 *                 if not skip_append: self.append_to_packets(i, ray)             # <<<<<<<<<<<<<<
 *                 ray.pgi = i
 *                 npgi = i
 */
      __pyx_t_11 = (!__pyx_v_skip_append);
      if (__pyx_t_11) {
        __pyx_t_21 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self->__pyx_vtab)->append_to_packets(__pyx_v_self, __pyx_v_i, __pyx_v_ray); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_21);
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
        goto __pyx_L8;
      }
      __pyx_L8:;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1807
 *                 ray.pgi != i):
 *                 if not skip_append: self.append_to_packets(i, ray)
 *                 ray.pgi = i             # <<<<<<<<<<<<<<
 *                 npgi = i
 *                 found_a_home = 1
 */
      __pyx_v_ray->pgi = __pyx_v_i;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1808
 *                 if not skip_append: self.append_to_packets(i, ray)
 *                 ray.pgi = i
 *                 npgi = i             # <<<<<<<<<<<<<<
 *                 found_a_home = 1
 *                 break
 */
      __pyx_v_npgi = __pyx_v_i;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1809
 *                 ray.pgi = i
 *                 npgi = i
 *                 found_a_home = 1             # <<<<<<<<<<<<<<
 *                 break
 *         if found_a_home == 0:
 */
      __pyx_v_found_a_home = 1;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1810
 *                 npgi = i
 *                 found_a_home = 1
 *                 break             # <<<<<<<<<<<<<<
 *         if found_a_home == 0:
 *             #print "Non-neighboring area", ray.pgi, ray.ipix, ray.nside
 */
      goto __pyx_L6_break;
      goto __pyx_L7;
    }
    __pyx_L7:;
  }
  __pyx_L6_break:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1811
 *                 found_a_home = 1
 *                 break
 *         if found_a_home == 0:             # <<<<<<<<<<<<<<
 *             #print "Non-neighboring area", ray.pgi, ray.ipix, ray.nside
 *             for i in range(ledges.shape[0]):
 */
  __pyx_t_11 = (__pyx_v_found_a_home == 0);
  if (__pyx_t_11) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1813
 *         if found_a_home == 0:
 *             #print "Non-neighboring area", ray.pgi, ray.ipix, ray.nside
 *             for i in range(ledges.shape[0]):             # <<<<<<<<<<<<<<
 *                 if ((ledges[i, 0] <= offpos[0] <= redges[i, 0]) and
 *                     (ledges[i, 1] <= offpos[1] <= redges[i, 1]) and
 */
    __pyx_t_22 = (__pyx_v_ledges->dimensions[0]);
    for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_22; __pyx_t_1+=1) {
      __pyx_v_i = __pyx_t_1;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1814
 *             #print "Non-neighboring area", ray.pgi, ray.ipix, ray.nside
 *             for i in range(ledges.shape[0]):
 *                 if ((ledges[i, 0] <= offpos[0] <= redges[i, 0]) and             # <<<<<<<<<<<<<<
 *                     (ledges[i, 1] <= offpos[1] <= redges[i, 1]) and
 *                     (ledges[i, 2] <= offpos[2] <= redges[i, 2])):
 */
      __pyx_t_2 = __pyx_v_i;
      __pyx_t_23 = 0;
      __pyx_t_18 = -1;
      if (__pyx_t_2 < 0) {
        __pyx_t_2 += __pyx_pybuffernd_ledges.diminfo[0].shape;
        if (unlikely(__pyx_t_2 < 0)) __pyx_t_18 = 0;
      } else if (unlikely(__pyx_t_2 >= __pyx_pybuffernd_ledges.diminfo[0].shape)) __pyx_t_18 = 0;
      if (__pyx_t_23 < 0) {
        __pyx_t_23 += __pyx_pybuffernd_ledges.diminfo[1].shape;
        if (unlikely(__pyx_t_23 < 0)) __pyx_t_18 = 1;
      } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_ledges.diminfo[1].shape)) __pyx_t_18 = 1;
      if (unlikely(__pyx_t_18 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_18);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_11 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_ledges.diminfo[1].strides)) <= (__pyx_v_offpos[0]));
      if (__pyx_t_11) {
        __pyx_t_18 = __pyx_v_i;
        __pyx_t_24 = 0;
        __pyx_t_25 = -1;
        if (__pyx_t_18 < 0) {
          __pyx_t_18 += __pyx_pybuffernd_redges.diminfo[0].shape;
          if (unlikely(__pyx_t_18 < 0)) __pyx_t_25 = 0;
        } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_redges.diminfo[0].shape)) __pyx_t_25 = 0;
        if (__pyx_t_24 < 0) {
          __pyx_t_24 += __pyx_pybuffernd_redges.diminfo[1].shape;
          if (unlikely(__pyx_t_24 < 0)) __pyx_t_25 = 1;
        } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_redges.diminfo[1].shape)) __pyx_t_25 = 1;
        if (unlikely(__pyx_t_25 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_25);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_11 = ((__pyx_v_offpos[0]) <= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_redges.diminfo[1].strides)));
      }
      if (__pyx_t_11) {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1815
 *             for i in range(ledges.shape[0]):
 *                 if ((ledges[i, 0] <= offpos[0] <= redges[i, 0]) and
 *                     (ledges[i, 1] <= offpos[1] <= redges[i, 1]) and             # <<<<<<<<<<<<<<
 *                     (ledges[i, 2] <= offpos[2] <= redges[i, 2])):
 *                     #print "Found a home!", i, ray.ipix, ray.nside, ray.pgi
 */
        __pyx_t_25 = __pyx_v_i;
        __pyx_t_26 = 1;
        __pyx_t_27 = -1;
        if (__pyx_t_25 < 0) {
          __pyx_t_25 += __pyx_pybuffernd_ledges.diminfo[0].shape;
          if (unlikely(__pyx_t_25 < 0)) __pyx_t_27 = 0;
        } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_ledges.diminfo[0].shape)) __pyx_t_27 = 0;
        if (__pyx_t_26 < 0) {
          __pyx_t_26 += __pyx_pybuffernd_ledges.diminfo[1].shape;
          if (unlikely(__pyx_t_26 < 0)) __pyx_t_27 = 1;
        } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_ledges.diminfo[1].shape)) __pyx_t_27 = 1;
        if (unlikely(__pyx_t_27 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_27);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_6 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_ledges.diminfo[1].strides)) <= (__pyx_v_offpos[1]));
        if (__pyx_t_6) {
          __pyx_t_27 = __pyx_v_i;
          __pyx_t_28 = 1;
          __pyx_t_29 = -1;
          if (__pyx_t_27 < 0) {
            __pyx_t_27 += __pyx_pybuffernd_redges.diminfo[0].shape;
            if (unlikely(__pyx_t_27 < 0)) __pyx_t_29 = 0;
          } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_redges.diminfo[0].shape)) __pyx_t_29 = 0;
          if (__pyx_t_28 < 0) {
            __pyx_t_28 += __pyx_pybuffernd_redges.diminfo[1].shape;
            if (unlikely(__pyx_t_28 < 0)) __pyx_t_29 = 1;
          } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_redges.diminfo[1].shape)) __pyx_t_29 = 1;
          if (unlikely(__pyx_t_29 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_29);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_6 = ((__pyx_v_offpos[1]) <= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_redges.diminfo[1].strides)));
        }
        if (__pyx_t_6) {

          /* "yt/utilities/lib/VolumeIntegrator.pyx":1816
 *                 if ((ledges[i, 0] <= offpos[0] <= redges[i, 0]) and
 *                     (ledges[i, 1] <= offpos[1] <= redges[i, 1]) and
 *                     (ledges[i, 2] <= offpos[2] <= redges[i, 2])):             # <<<<<<<<<<<<<<
 *                     #print "Found a home!", i, ray.ipix, ray.nside, ray.pgi
 *                     if not skip_append: self.append_to_packets(i, ray)
 */
          __pyx_t_29 = __pyx_v_i;
          __pyx_t_30 = 2;
          __pyx_t_31 = -1;
          if (__pyx_t_29 < 0) {
            __pyx_t_29 += __pyx_pybuffernd_ledges.diminfo[0].shape;
            if (unlikely(__pyx_t_29 < 0)) __pyx_t_31 = 0;
          } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_ledges.diminfo[0].shape)) __pyx_t_31 = 0;
          if (__pyx_t_30 < 0) {
            __pyx_t_30 += __pyx_pybuffernd_ledges.diminfo[1].shape;
            if (unlikely(__pyx_t_30 < 0)) __pyx_t_31 = 1;
          } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_ledges.diminfo[1].shape)) __pyx_t_31 = 1;
          if (unlikely(__pyx_t_31 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_31);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_16 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_ledges.diminfo[1].strides)) <= (__pyx_v_offpos[2]));
          if (__pyx_t_16) {
            __pyx_t_31 = __pyx_v_i;
            __pyx_t_32 = 2;
            __pyx_t_33 = -1;
            if (__pyx_t_31 < 0) {
              __pyx_t_31 += __pyx_pybuffernd_redges.diminfo[0].shape;
              if (unlikely(__pyx_t_31 < 0)) __pyx_t_33 = 0;
            } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_redges.diminfo[0].shape)) __pyx_t_33 = 0;
            if (__pyx_t_32 < 0) {
              __pyx_t_32 += __pyx_pybuffernd_redges.diminfo[1].shape;
              if (unlikely(__pyx_t_32 < 0)) __pyx_t_33 = 1;
            } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_redges.diminfo[1].shape)) __pyx_t_33 = 1;
            if (unlikely(__pyx_t_33 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_33);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_16 = ((__pyx_v_offpos[2]) <= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_redges.diminfo[1].strides)));
          }
          __pyx_t_20 = __pyx_t_16;
        } else {
          __pyx_t_20 = __pyx_t_6;
        }
        __pyx_t_6 = __pyx_t_20;
      } else {
        __pyx_t_6 = __pyx_t_11;
      }
      if (__pyx_t_6) {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1818
 *                     (ledges[i, 2] <= offpos[2] <= redges[i, 2])):
 *                     #print "Found a home!", i, ray.ipix, ray.nside, ray.pgi
 *                     if not skip_append: self.append_to_packets(i, ray)             # <<<<<<<<<<<<<<
 *                     ray.pgi = i
 *                     npgi = i
 */
        __pyx_t_6 = (!__pyx_v_skip_append);
        if (__pyx_t_6) {
          __pyx_t_21 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self->__pyx_vtab)->append_to_packets(__pyx_v_self, __pyx_v_i, __pyx_v_ray); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_21);
          __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
          goto __pyx_L13;
        }
        __pyx_L13:;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1819
 *                     #print "Found a home!", i, ray.ipix, ray.nside, ray.pgi
 *                     if not skip_append: self.append_to_packets(i, ray)
 *                     ray.pgi = i             # <<<<<<<<<<<<<<
 *                     npgi = i
 *                     found_a_home = 1
 */
        __pyx_v_ray->pgi = __pyx_v_i;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1820
 *                     if not skip_append: self.append_to_packets(i, ray)
 *                     ray.pgi = i
 *                     npgi = i             # <<<<<<<<<<<<<<
 *                     found_a_home = 1
 *                     break
 */
        __pyx_v_npgi = __pyx_v_i;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1821
 *                     ray.pgi = i
 *                     npgi = i
 *                     found_a_home = 1             # <<<<<<<<<<<<<<
 *                     break
 *             if found_a_home == 0:
 */
        __pyx_v_found_a_home = 1;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1822
 *                     npgi = i
 *                     found_a_home = 1
 *                     break             # <<<<<<<<<<<<<<
 *             if found_a_home == 0:
 *                 raise RuntimeError
 */
        goto __pyx_L11_break;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    __pyx_L11_break:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1823
 *                     found_a_home = 1
 *                     break
 *             if found_a_home == 0:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError
 * 
 */
    __pyx_t_6 = (__pyx_v_found_a_home == 0);
    if (__pyx_t_6) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1824
 *                     break
 *             if found_a_home == 0:
 *                 raise RuntimeError             # <<<<<<<<<<<<<<
 * 
 *     cdef append_to_packets(self, int pgi, AdaptiveRayPacket *ray):
 */
      __Pyx_Raise(__pyx_builtin_RuntimeError, 0, 0, 0);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L14;
    }
    __pyx_L14:;
    goto __pyx_L9;
  }
  __pyx_L9:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_21);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ledges.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_redges.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.send_ray_home", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ledges.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_redges.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1826
 *                 raise RuntimeError
 * 
 *     cdef append_to_packets(self, int pgi, AdaptiveRayPacket *ray):             # <<<<<<<<<<<<<<
 *         # packet_pointers are pointers to the *first* packet in a given brick
 *         # lpacket_pointers point to the *final* packet in a given brick, for
 */

static PyObject *__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_append_to_packets(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, int __pyx_v_pgi, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *__pyx_v_ray) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("append_to_packets", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1830
 *         # lpacket_pointers point to the *final* packet in a given brick, for
 *         # easy appending.
 *         if self.lpacket_pointers[pgi] == NULL or \             # <<<<<<<<<<<<<<
 *            self.packet_pointers[pgi] == NULL:
 *             self.packet_pointers[pgi] = \
 */
  __pyx_t_1 = ((__pyx_v_self->lpacket_pointers[__pyx_v_pgi]) == NULL);
  if (!__pyx_t_1) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1831
 *         # easy appending.
 *         if self.lpacket_pointers[pgi] == NULL or \
 *            self.packet_pointers[pgi] == NULL:             # <<<<<<<<<<<<<<
 *             self.packet_pointers[pgi] = \
 *             self.lpacket_pointers[pgi] = ray
 */
    __pyx_t_2 = ((__pyx_v_self->packet_pointers[__pyx_v_pgi]) == NULL);
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1832
 *         if self.lpacket_pointers[pgi] == NULL or \
 *            self.packet_pointers[pgi] == NULL:
 *             self.packet_pointers[pgi] = \             # <<<<<<<<<<<<<<
 *             self.lpacket_pointers[pgi] = ray
 *             ray.brick_next = NULL
 */
    (__pyx_v_self->packet_pointers[__pyx_v_pgi]) = __pyx_v_ray;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1833
 *            self.packet_pointers[pgi] == NULL:
 *             self.packet_pointers[pgi] = \
 *             self.lpacket_pointers[pgi] = ray             # <<<<<<<<<<<<<<
 *             ray.brick_next = NULL
 *         else:
 */
    (__pyx_v_self->lpacket_pointers[__pyx_v_pgi]) = __pyx_v_ray;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1834
 *             self.packet_pointers[pgi] = \
 *             self.lpacket_pointers[pgi] = ray
 *             ray.brick_next = NULL             # <<<<<<<<<<<<<<
 *         else:
 *             self.lpacket_pointers[pgi].brick_next = ray
 */
    __pyx_v_ray->brick_next = NULL;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1836
 *             ray.brick_next = NULL
 *         else:
 *             self.lpacket_pointers[pgi].brick_next = ray             # <<<<<<<<<<<<<<
 *             self.lpacket_pointers[pgi] = ray
 *             ray.brick_next = NULL
 */
    (__pyx_v_self->lpacket_pointers[__pyx_v_pgi])->brick_next = __pyx_v_ray;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1837
 *         else:
 *             self.lpacket_pointers[pgi].brick_next = ray
 *             self.lpacket_pointers[pgi] = ray             # <<<<<<<<<<<<<<
 *             ray.brick_next = NULL
 * 
 */
    (__pyx_v_self->lpacket_pointers[__pyx_v_pgi]) = __pyx_v_ray;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1838
 *             self.lpacket_pointers[pgi].brick_next = ray
 *             self.lpacket_pointers[pgi] = ray
 *             ray.brick_next = NULL             # <<<<<<<<<<<<<<
 * 
 *     @cython.boundscheck(False)
 */
    __pyx_v_ray->brick_next = NULL;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_7integrate_brick(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_7integrate_brick(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_pg = 0;
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_tf = 0;
  int __pyx_v_pgi;
  PyArrayObject *__pyx_v_ledges = 0;
  PyArrayObject *__pyx_v_redges = 0;
  PyObject *__pyx_v_pgs = 0;
  CYTHON_UNUSED int __pyx_v_inside;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("integrate_brick (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__pg,&__pyx_n_s__tf,&__pyx_n_s__pgi,&__pyx_n_s__ledges,&__pyx_n_s__redges,&__pyx_n_s__pgs,&__pyx_n_s__inside,0};
    PyObject* values[7] = {0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pg)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tf)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("integrate_brick", 0, 6, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pgi)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("integrate_brick", 0, 6, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ledges)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("integrate_brick", 0, 6, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__redges)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("integrate_brick", 0, 6, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  5:
        if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pgs)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("integrate_brick", 0, 6, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__inside);
          if (value) { values[6] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "integrate_brick") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_pg = ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)values[0]);
    __pyx_v_tf = ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *)values[1]);
    __pyx_v_pgi = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_pgi == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_ledges = ((PyArrayObject *)values[3]);
    __pyx_v_redges = ((PyArrayObject *)values[4]);
    __pyx_v_pgs = values[5];
    if (values[6]) {
      __pyx_v_inside = __Pyx_PyInt_AsInt(values[6]); if (unlikely((__pyx_v_inside == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_inside = ((int)-1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("integrate_brick", 0, 6, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.integrate_brick", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pg), __pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid, 1, "pg", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tf), __pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy, 1, "tf", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ledges), __pyx_ptype_5numpy_ndarray, 1, "ledges", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_redges), __pyx_ptype_5numpy_ndarray, 1, "redges", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_6integrate_brick(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self), __pyx_v_pg, __pyx_v_tf, __pyx_v_pgi, __pyx_v_ledges, __pyx_v_redges, __pyx_v_pgs, __pyx_v_inside);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1842
 *     @cython.boundscheck(False)
 *     @cython.wraparound(False)
 *     def integrate_brick(self, PartitionedGrid pg, TransferFunctionProxy tf,             # <<<<<<<<<<<<<<
 *                         int pgi, np.ndarray[np.float64_t, ndim=2] ledges,
 *                                  np.ndarray[np.float64_t, ndim=2] redges,
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_6integrate_brick(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_pg, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *__pyx_v_tf, int __pyx_v_pgi, PyArrayObject *__pyx_v_ledges, PyArrayObject *__pyx_v_redges, PyObject *__pyx_v_pgs, CYTHON_UNUSED int __pyx_v_inside) {
  __pyx_t_5numpy_float64_t __pyx_v_domega;
  __pyx_t_5numpy_float64_t __pyx_v_dt;
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_pgn = 0;
  CYTHON_UNUSED int __pyx_v_i;
  int __pyx_v_refined;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *__pyx_v_ray2;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *__pyx_v_ray;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *__pyx_v_next;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket **__pyx_v_pray;
  int *__pyx_v_grid_neighbors;
  int *__pyx_v_grid2_neighbors;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ledges;
  __Pyx_Buffer __pyx_pybuffer_ledges;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_redges;
  __Pyx_Buffer __pyx_pybuffer_redges;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_send_ray_home __pyx_t_3;
  long __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("integrate_brick", 0);
  __pyx_pybuffer_ledges.pybuffer.buf = NULL;
  __pyx_pybuffer_ledges.refcount = 0;
  __pyx_pybuffernd_ledges.data = NULL;
  __pyx_pybuffernd_ledges.rcbuffer = &__pyx_pybuffer_ledges;
  __pyx_pybuffer_redges.pybuffer.buf = NULL;
  __pyx_pybuffer_redges.refcount = 0;
  __pyx_pybuffernd_redges.data = NULL;
  __pyx_pybuffernd_redges.rcbuffer = &__pyx_pybuffer_redges;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ledges.rcbuffer->pybuffer, (PyObject*)__pyx_v_ledges, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_ledges.diminfo[0].strides = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ledges.diminfo[0].shape = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ledges.diminfo[1].strides = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ledges.diminfo[1].shape = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_redges.rcbuffer->pybuffer, (PyObject*)__pyx_v_redges, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_redges.diminfo[0].strides = __pyx_pybuffernd_redges.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_redges.diminfo[0].shape = __pyx_pybuffernd_redges.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_redges.diminfo[1].strides = __pyx_pybuffernd_redges.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_redges.diminfo[1].shape = __pyx_pybuffernd_redges.rcbuffer->pybuffer.shape[1];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1851
 *         cdef intersects
 *         cdef int i, j, npgi, refined
 *         cdef AdaptiveRayPacket *ray2, *ray = self.packet_pointers[pgi]             # <<<<<<<<<<<<<<
 *         cdef AdaptiveRayPacket *next
 *         cdef AdaptiveRayPacket **pray
 */
  __pyx_v_ray = (__pyx_v_self->packet_pointers[__pyx_v_pgi]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1854
 *         cdef AdaptiveRayPacket *next
 *         cdef AdaptiveRayPacket **pray
 *         cdef int *grid_neighbors = self.find_neighbors(pgi, pg.dds[0], ledges, redges)             # <<<<<<<<<<<<<<
 *         cdef int *grid2_neighbors
 *         cdef np.float64_t enter_t, offpos[3]
 */
  __pyx_v_grid_neighbors = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self->__pyx_vtab)->find_neighbors(__pyx_v_self, __pyx_v_pgi, (__pyx_v_pg->dds[0]), ((PyArrayObject *)__pyx_v_ledges), ((PyArrayObject *)__pyx_v_redges));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1858
 *         cdef np.float64_t enter_t, offpos[3]
 *         cdef int found_a_home, hit
 *         while ray != NULL:             # <<<<<<<<<<<<<<
 *             #print "Integrating", pgi, ray.pgi, ray.ipix, ray.nside
 *             if pgi != ray.pgi:
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_ray != NULL);
    if (!__pyx_t_1) break;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1860
 *         while ray != NULL:
 *             #print "Integrating", pgi, ray.pgi, ray.ipix, ray.nside
 *             if pgi != ray.pgi:             # <<<<<<<<<<<<<<
 *                 self.send_ray_home(ray, ledges, redges, grid_neighbors, dt)
 *                 if ray.pgi != pgi:
 */
    __pyx_t_1 = (__pyx_v_pgi != __pyx_v_ray->pgi);
    if (__pyx_t_1) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1861
 *             #print "Integrating", pgi, ray.pgi, ray.ipix, ray.nside
 *             if pgi != ray.pgi:
 *                 self.send_ray_home(ray, ledges, redges, grid_neighbors, dt)             # <<<<<<<<<<<<<<
 *                 if ray.pgi != pgi:
 *                     ray = ray.brick_next
 */
      __pyx_t_2 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self->__pyx_vtab)->send_ray_home(__pyx_v_self, __pyx_v_ray, ((PyArrayObject *)__pyx_v_ledges), ((PyArrayObject *)__pyx_v_redges), __pyx_v_grid_neighbors, __pyx_v_dt, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1862
 *             if pgi != ray.pgi:
 *                 self.send_ray_home(ray, ledges, redges, grid_neighbors, dt)
 *                 if ray.pgi != pgi:             # <<<<<<<<<<<<<<
 *                     ray = ray.brick_next
 *                     continue
 */
      __pyx_t_1 = (__pyx_v_ray->pgi != __pyx_v_pgi);
      if (__pyx_t_1) {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1863
 *                 self.send_ray_home(ray, ledges, redges, grid_neighbors, dt)
 *                 if ray.pgi != pgi:
 *                     ray = ray.brick_next             # <<<<<<<<<<<<<<
 *                     continue
 *             # We start in this brick, and then we integrate to the edge
 */
        __pyx_v_ray = __pyx_v_ray->brick_next;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1864
 *                 if ray.pgi != pgi:
 *                     ray = ray.brick_next
 *                     continue             # <<<<<<<<<<<<<<
 *             # We start in this brick, and then we integrate to the edge
 *             self.packet_pointers[pgi] = next = ray.brick_next
 */
        goto __pyx_L3_continue;
        goto __pyx_L6;
      }
      __pyx_L6:;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1866
 *                     continue
 *             # We start in this brick, and then we integrate to the edge
 *             self.packet_pointers[pgi] = next = ray.brick_next             # <<<<<<<<<<<<<<
 *             if ray.t >= 1.0:
 *                 ray = next
 */
    (__pyx_v_self->packet_pointers[__pyx_v_pgi]) = __pyx_v_ray->brick_next;
    __pyx_v_next = __pyx_v_ray->brick_next;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1867
 *             # We start in this brick, and then we integrate to the edge
 *             self.packet_pointers[pgi] = next = ray.brick_next
 *             if ray.t >= 1.0:             # <<<<<<<<<<<<<<
 *                 ray = next
 *                 continue
 */
    __pyx_t_1 = (__pyx_v_ray->t >= 1.0);
    if (__pyx_t_1) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1868
 *             self.packet_pointers[pgi] = next = ray.brick_next
 *             if ray.t >= 1.0:
 *                 ray = next             # <<<<<<<<<<<<<<
 *                 continue
 *             dt = self.integrate_ray(ray, pg, tf)
 */
      __pyx_v_ray = __pyx_v_next;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1869
 *             if ray.t >= 1.0:
 *                 ray = next
 *                 continue             # <<<<<<<<<<<<<<
 *             dt = self.integrate_ray(ray, pg, tf)
 *             # Now the ray has moved, so we grab .brick_next first, then we
 */
      goto __pyx_L3_continue;
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1870
 *                 ray = next
 *                 continue
 *             dt = self.integrate_ray(ray, pg, tf)             # <<<<<<<<<<<<<<
 *             # Now the ray has moved, so we grab .brick_next first, then we
 *             # move it to its new home
 */
    __pyx_v_dt = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self->__pyx_vtab)->integrate_ray(__pyx_v_self, __pyx_v_ray, __pyx_v_pg, __pyx_v_tf);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1873
 *             # Now the ray has moved, so we grab .brick_next first, then we
 *             # move it to its new home
 *             self.send_ray_home(ray, ledges, redges, grid_neighbors, dt, 1)             # <<<<<<<<<<<<<<
 *             # We now are moving into a new PG, which we check for refinement
 *             pgn = pgs[ray.pgi]
 */
    __pyx_t_3.__pyx_n = 1;
    __pyx_t_3.skip_append = 1;
    __pyx_t_2 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self->__pyx_vtab)->send_ray_home(__pyx_v_self, __pyx_v_ray, ((PyArrayObject *)__pyx_v_ledges), ((PyArrayObject *)__pyx_v_redges), __pyx_v_grid_neighbors, __pyx_v_dt, &__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1873; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1875
 *             self.send_ray_home(ray, ledges, redges, grid_neighbors, dt, 1)
 *             # We now are moving into a new PG, which we check for refinement
 *             pgn = pgs[ray.pgi]             # <<<<<<<<<<<<<<
 *             domega = self.get_domega(pgn.left_edge, pgn.right_edge)
 *             pray = &ray
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pgs, __pyx_v_ray->pgi, sizeof(int), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_pgn));
    __pyx_v_pgn = ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1876
 *             # We now are moving into a new PG, which we check for refinement
 *             pgn = pgs[ray.pgi]
 *             domega = self.get_domega(pgn.left_edge, pgn.right_edge)             # <<<<<<<<<<<<<<
 *             pray = &ray
 *             refined = self.refine_ray(pray, domega, pgn.dds[0],
 */
    __pyx_v_domega = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self->__pyx_vtab)->get_domega(__pyx_v_self, __pyx_v_pgn->left_edge, __pyx_v_pgn->right_edge);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1877
 *             pgn = pgs[ray.pgi]
 *             domega = self.get_domega(pgn.left_edge, pgn.right_edge)
 *             pray = &ray             # <<<<<<<<<<<<<<
 *             refined = self.refine_ray(pray, domega, pgn.dds[0],
 *                                       pgn.left_edge, pgn.right_edge)
 */
    __pyx_v_pray = (&__pyx_v_ray);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1879
 *             pray = &ray
 *             refined = self.refine_ray(pray, domega, pgn.dds[0],
 *                                       pgn.left_edge, pgn.right_edge)             # <<<<<<<<<<<<<<
 *             if refined == 0: self.append_to_packets(ray.pgi, ray)
 *             # At this point we can no longer access ray, as it is no longer
 */
    __pyx_v_refined = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self->__pyx_vtab)->refine_ray(__pyx_v_self, __pyx_v_pray, __pyx_v_domega, (__pyx_v_pgn->dds[0]), __pyx_v_pgn->left_edge, __pyx_v_pgn->right_edge);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1880
 *             refined = self.refine_ray(pray, domega, pgn.dds[0],
 *                                       pgn.left_edge, pgn.right_edge)
 *             if refined == 0: self.append_to_packets(ray.pgi, ray)             # <<<<<<<<<<<<<<
 *             # At this point we can no longer access ray, as it is no longer
 *             # safe.
 */
    __pyx_t_1 = (__pyx_v_refined == 0);
    if (__pyx_t_1) {
      __pyx_t_2 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self->__pyx_vtab)->append_to_packets(__pyx_v_self, __pyx_v_ray->pgi, __pyx_v_ray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1883
 *             # At this point we can no longer access ray, as it is no longer
 *             # safe.
 *             ray2 = pray[0]             # <<<<<<<<<<<<<<
 *             for i in range(refined*4):
 *                 # If we have been refined, send the ray to its appropriate
 */
    __pyx_v_ray2 = (__pyx_v_pray[0]);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1884
 *             # safe.
 *             ray2 = pray[0]
 *             for i in range(refined*4):             # <<<<<<<<<<<<<<
 *                 # If we have been refined, send the ray to its appropriate
 *                 # location.
 */
    __pyx_t_4 = (__pyx_v_refined * 4);
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1887
 *                 # If we have been refined, send the ray to its appropriate
 *                 # location.
 *                 self.send_ray_home(ray2, ledges, redges, grid_neighbors, 0.0, 1)             # <<<<<<<<<<<<<<
 *                 # If it wants to go back in time that is fine but it needs to
 *                 # make sure it gets forward in time eventually
 */
      __pyx_t_3.__pyx_n = 1;
      __pyx_t_3.skip_append = 1;
      __pyx_t_2 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self->__pyx_vtab)->send_ray_home(__pyx_v_self, __pyx_v_ray2, ((PyArrayObject *)__pyx_v_ledges), ((PyArrayObject *)__pyx_v_redges), __pyx_v_grid_neighbors, 0.0, &__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1890
 *                 # If it wants to go back in time that is fine but it needs to
 *                 # make sure it gets forward in time eventually
 *                 while ray2.pgi <= pgi and ray2.t < 1.0:             # <<<<<<<<<<<<<<
 *                     #print "Recursing", ray2.pgi, pgi, ray2.t, ray2.nside, ray2.ipix, dt
 *                     # Now we grab a new set of neighbors and whatnot
 */
      while (1) {
        __pyx_t_1 = (__pyx_v_ray2->pgi <= __pyx_v_pgi);
        if (__pyx_t_1) {
          __pyx_t_6 = (__pyx_v_ray2->t < 1.0);
          __pyx_t_7 = __pyx_t_6;
        } else {
          __pyx_t_7 = __pyx_t_1;
        }
        if (!__pyx_t_7) break;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1893
 *                     #print "Recursing", ray2.pgi, pgi, ray2.t, ray2.nside, ray2.ipix, dt
 *                     # Now we grab a new set of neighbors and whatnot
 *                     pgn = pgs[ray2.pgi]             # <<<<<<<<<<<<<<
 *                     grid2_neighbors = self.find_neighbors(ray2.pgi, pgn.dds[0],
 *                                                           ledges, redges)
 */
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_pgs, __pyx_v_ray2->pgi, sizeof(int), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(((PyObject *)__pyx_v_pgn));
        __pyx_v_pgn = ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1895
 *                     pgn = pgs[ray2.pgi]
 *                     grid2_neighbors = self.find_neighbors(ray2.pgi, pgn.dds[0],
 *                                                           ledges, redges)             # <<<<<<<<<<<<<<
 *                     # We just integrate, we don't bother with the full brick
 *                     # integration.  This means no recursive refinement, and
 */
        __pyx_v_grid2_neighbors = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self->__pyx_vtab)->find_neighbors(__pyx_v_self, __pyx_v_ray2->pgi, (__pyx_v_pgn->dds[0]), ((PyArrayObject *)__pyx_v_ledges), ((PyArrayObject *)__pyx_v_redges));

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1899
 *                     # integration.  This means no recursive refinement, and
 *                     # potential undersampling
 *                     dt = self.integrate_ray(ray2, pgn, tf)             # <<<<<<<<<<<<<<
 *                     # Now we send this ray home.  Hopefully it'll once again be
 *                     # forward in time.
 */
        __pyx_v_dt = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self->__pyx_vtab)->integrate_ray(__pyx_v_self, __pyx_v_ray2, __pyx_v_pgn, __pyx_v_tf);

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1903
 *                     # forward in time.
 *                     self.send_ray_home(ray2, ledges, redges, grid2_neighbors,
 *                                        dt, 1)             # <<<<<<<<<<<<<<
 *                     free(grid2_neighbors)
 *                 # This tosses us to the next one in line, of the four..
 */
        __pyx_t_3.__pyx_n = 1;
        __pyx_t_3.skip_append = 1;
        __pyx_t_2 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self->__pyx_vtab)->send_ray_home(__pyx_v_self, __pyx_v_ray2, ((PyArrayObject *)__pyx_v_ledges), ((PyArrayObject *)__pyx_v_redges), __pyx_v_grid2_neighbors, __pyx_v_dt, &__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1904
 *                     self.send_ray_home(ray2, ledges, redges, grid2_neighbors,
 *                                        dt, 1)
 *                     free(grid2_neighbors)             # <<<<<<<<<<<<<<
 *                 # This tosses us to the next one in line, of the four..
 *                 self.append_to_packets(ray2.pgi, ray2)
 */
        free(__pyx_v_grid2_neighbors);
      }

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1906
 *                     free(grid2_neighbors)
 *                 # This tosses us to the next one in line, of the four..
 *                 self.append_to_packets(ray2.pgi, ray2)             # <<<<<<<<<<<<<<
 *                 ray2 = ray2.next
 *             # We use this because it's been set previously.
 */
      __pyx_t_2 = ((struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self->__pyx_vtab)->append_to_packets(__pyx_v_self, __pyx_v_ray2->pgi, __pyx_v_ray2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1907
 *                 # This tosses us to the next one in line, of the four..
 *                 self.append_to_packets(ray2.pgi, ray2)
 *                 ray2 = ray2.next             # <<<<<<<<<<<<<<
 *             # We use this because it's been set previously.
 *             ray = next
 */
      __pyx_v_ray2 = __pyx_v_ray2->next;
    }

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1909
 *                 ray2 = ray2.next
 *             # We use this because it's been set previously.
 *             ray = next             # <<<<<<<<<<<<<<
 *             # We check to see if anything has been *added* to the queue, via a
 *             # send_ray_home call, here.  Otherwise we might end up in the
 */
    __pyx_v_ray = __pyx_v_next;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1915
 *             # there are more rays to work on because they have been added via
 *             # refinement.
 *             if ray == NULL and self.packet_pointers[pgi] != NULL:             # <<<<<<<<<<<<<<
 *                 ray = self.packet_pointers[pgi]
 *                 #print "Packet pointers!", ray.ipix
 */
    __pyx_t_7 = (__pyx_v_ray == NULL);
    if (__pyx_t_7) {
      __pyx_t_1 = ((__pyx_v_self->packet_pointers[__pyx_v_pgi]) != NULL);
      __pyx_t_6 = __pyx_t_1;
    } else {
      __pyx_t_6 = __pyx_t_7;
    }
    if (__pyx_t_6) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1916
 *             # refinement.
 *             if ray == NULL and self.packet_pointers[pgi] != NULL:
 *                 ray = self.packet_pointers[pgi]             # <<<<<<<<<<<<<<
 *                 #print "Packet pointers!", ray.ipix
 *         free(grid_neighbors)
 */
      __pyx_v_ray = (__pyx_v_self->packet_pointers[__pyx_v_pgi]);
      goto __pyx_L13;
    }
    __pyx_L13:;
    __pyx_L3_continue:;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1918
 *                 ray = self.packet_pointers[pgi]
 *                 #print "Packet pointers!", ray.ipix
 *         free(grid_neighbors)             # <<<<<<<<<<<<<<
 * 
 *     @cython.boundscheck(False)
 */
  free(__pyx_v_grid_neighbors);

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ledges.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_redges.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.integrate_brick", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ledges.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_redges.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pgn);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1922
 *     @cython.boundscheck(False)
 *     @cython.wraparound(False)
 *     cdef int *find_neighbors(self, int this_grid, np.float64_t dds,             # <<<<<<<<<<<<<<
 *                              np.ndarray[np.float64_t, ndim=2] ledges,
 *                              np.ndarray[np.float64_t, ndim=2] redges):
 */

static int *__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_find_neighbors(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, int __pyx_v_this_grid, __pyx_t_5numpy_float64_t __pyx_v_dds, PyArrayObject *__pyx_v_ledges, PyArrayObject *__pyx_v_redges) {
  int __pyx_v_i;
  int __pyx_v_count;
  __pyx_t_5numpy_float64_t __pyx_v_gle[3];
  __pyx_t_5numpy_float64_t __pyx_v_gre[3];
  int *__pyx_v_tr;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ledges;
  __Pyx_Buffer __pyx_pybuffer_ledges;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_redges;
  __Pyx_Buffer __pyx_pybuffer_redges;
  int *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  long __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;
  int __pyx_t_5;
  long __pyx_t_6;
  int __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  long __pyx_t_10;
  int __pyx_t_11;
  long __pyx_t_12;
  npy_intp __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  long __pyx_t_17;
  int __pyx_t_18;
  long __pyx_t_19;
  int __pyx_t_20;
  int __pyx_t_21;
  int __pyx_t_22;
  long __pyx_t_23;
  int __pyx_t_24;
  long __pyx_t_25;
  int __pyx_t_26;
  int __pyx_t_27;
  long __pyx_t_28;
  int __pyx_t_29;
  long __pyx_t_30;
  int __pyx_t_31;
  int __pyx_t_32;
  long __pyx_t_33;
  int __pyx_t_34;
  long __pyx_t_35;
  int __pyx_t_36;
  long __pyx_t_37;
  int __pyx_t_38;
  long __pyx_t_39;
  int __pyx_t_40;
  long __pyx_t_41;
  int __pyx_t_42;
  long __pyx_t_43;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("find_neighbors", 0);
  __pyx_pybuffer_ledges.pybuffer.buf = NULL;
  __pyx_pybuffer_ledges.refcount = 0;
  __pyx_pybuffernd_ledges.data = NULL;
  __pyx_pybuffernd_ledges.rcbuffer = &__pyx_pybuffer_ledges;
  __pyx_pybuffer_redges.pybuffer.buf = NULL;
  __pyx_pybuffer_redges.refcount = 0;
  __pyx_pybuffernd_redges.data = NULL;
  __pyx_pybuffernd_redges.rcbuffer = &__pyx_pybuffer_redges;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ledges.rcbuffer->pybuffer, (PyObject*)__pyx_v_ledges, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_ledges.diminfo[0].strides = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ledges.diminfo[0].shape = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ledges.diminfo[1].strides = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ledges.diminfo[1].shape = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_redges.rcbuffer->pybuffer, (PyObject*)__pyx_v_redges, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_redges.diminfo[0].strides = __pyx_pybuffernd_redges.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_redges.diminfo[0].shape = __pyx_pybuffernd_redges.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_redges.diminfo[1].strides = __pyx_pybuffernd_redges.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_redges.diminfo[1].shape = __pyx_pybuffernd_redges.rcbuffer->pybuffer.shape[1];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1928
 *         # fill the array.  This could be better with a linked list, but I think
 *         # that the difference should not be substantial.
 *         cdef int i = 0             # <<<<<<<<<<<<<<
 *         cdef int count = 0
 *         # We grow our grids by dx in every direction, then look for overlap
 */
  __pyx_v_i = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1929
 *         # that the difference should not be substantial.
 *         cdef int i = 0
 *         cdef int count = 0             # <<<<<<<<<<<<<<
 *         # We grow our grids by dx in every direction, then look for overlap
 *         cdef np.float64_t gle[3], gre[3]
 */
  __pyx_v_count = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1932
 *         # We grow our grids by dx in every direction, then look for overlap
 *         cdef np.float64_t gle[3], gre[3]
 *         gle[0] = ledges[this_grid, 0] - dds             # <<<<<<<<<<<<<<
 *         gle[1] = ledges[this_grid, 1] - dds
 *         gle[2] = ledges[this_grid, 2] - dds
 */
  __pyx_t_1 = __pyx_v_this_grid;
  __pyx_t_2 = 0;
  (__pyx_v_gle[0]) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_2, __pyx_pybuffernd_ledges.diminfo[1].strides)) - __pyx_v_dds);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1933
 *         cdef np.float64_t gle[3], gre[3]
 *         gle[0] = ledges[this_grid, 0] - dds
 *         gle[1] = ledges[this_grid, 1] - dds             # <<<<<<<<<<<<<<
 *         gle[2] = ledges[this_grid, 2] - dds
 *         gre[0] = redges[this_grid, 0] + dds
 */
  __pyx_t_3 = __pyx_v_this_grid;
  __pyx_t_4 = 1;
  (__pyx_v_gle[1]) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_4, __pyx_pybuffernd_ledges.diminfo[1].strides)) - __pyx_v_dds);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1934
 *         gle[0] = ledges[this_grid, 0] - dds
 *         gle[1] = ledges[this_grid, 1] - dds
 *         gle[2] = ledges[this_grid, 2] - dds             # <<<<<<<<<<<<<<
 *         gre[0] = redges[this_grid, 0] + dds
 *         gre[1] = redges[this_grid, 1] + dds
 */
  __pyx_t_5 = __pyx_v_this_grid;
  __pyx_t_6 = 2;
  (__pyx_v_gle[2]) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_6, __pyx_pybuffernd_ledges.diminfo[1].strides)) - __pyx_v_dds);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1935
 *         gle[1] = ledges[this_grid, 1] - dds
 *         gle[2] = ledges[this_grid, 2] - dds
 *         gre[0] = redges[this_grid, 0] + dds             # <<<<<<<<<<<<<<
 *         gre[1] = redges[this_grid, 1] + dds
 *         gre[2] = redges[this_grid, 2] + dds
 */
  __pyx_t_7 = __pyx_v_this_grid;
  __pyx_t_8 = 0;
  (__pyx_v_gre[0]) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_8, __pyx_pybuffernd_redges.diminfo[1].strides)) + __pyx_v_dds);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1936
 *         gle[2] = ledges[this_grid, 2] - dds
 *         gre[0] = redges[this_grid, 0] + dds
 *         gre[1] = redges[this_grid, 1] + dds             # <<<<<<<<<<<<<<
 *         gre[2] = redges[this_grid, 2] + dds
 *         for i in range(ledges.shape[0]):
 */
  __pyx_t_9 = __pyx_v_this_grid;
  __pyx_t_10 = 1;
  (__pyx_v_gre[1]) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_redges.diminfo[1].strides)) + __pyx_v_dds);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1937
 *         gre[0] = redges[this_grid, 0] + dds
 *         gre[1] = redges[this_grid, 1] + dds
 *         gre[2] = redges[this_grid, 2] + dds             # <<<<<<<<<<<<<<
 *         for i in range(ledges.shape[0]):
 *             # Check for overlap
 */
  __pyx_t_11 = __pyx_v_this_grid;
  __pyx_t_12 = 2;
  (__pyx_v_gre[2]) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_redges.diminfo[1].strides)) + __pyx_v_dds);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1938
 *         gre[1] = redges[this_grid, 1] + dds
 *         gre[2] = redges[this_grid, 2] + dds
 *         for i in range(ledges.shape[0]):             # <<<<<<<<<<<<<<
 *             # Check for overlap
 *             if i == this_grid: continue
 */
  __pyx_t_13 = (__pyx_v_ledges->dimensions[0]);
  for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
    __pyx_v_i = __pyx_t_14;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1940
 *         for i in range(ledges.shape[0]):
 *             # Check for overlap
 *             if i == this_grid: continue             # <<<<<<<<<<<<<<
 *             if ((gle[0] <= redges[i, 0] and gre[0] >= ledges[i, 0]) and
 *                 (gle[1] <= redges[i, 1] and gre[1] >= ledges[i, 1]) and
 */
    __pyx_t_15 = (__pyx_v_i == __pyx_v_this_grid);
    if (__pyx_t_15) {
      goto __pyx_L3_continue;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1941
 *             # Check for overlap
 *             if i == this_grid: continue
 *             if ((gle[0] <= redges[i, 0] and gre[0] >= ledges[i, 0]) and             # <<<<<<<<<<<<<<
 *                 (gle[1] <= redges[i, 1] and gre[1] >= ledges[i, 1]) and
 *                 (gle[2] <= redges[i, 2] and gre[2] >= ledges[i, 2])):
 */
    __pyx_t_16 = __pyx_v_i;
    __pyx_t_17 = 0;
    __pyx_t_15 = ((__pyx_v_gle[0]) <= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_redges.diminfo[1].strides)));
    if (__pyx_t_15) {
      __pyx_t_18 = __pyx_v_i;
      __pyx_t_19 = 0;
      __pyx_t_20 = ((__pyx_v_gre[0]) >= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_ledges.diminfo[1].strides)));
      __pyx_t_21 = __pyx_t_20;
    } else {
      __pyx_t_21 = __pyx_t_15;
    }
    if (__pyx_t_21) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1942
 *             if i == this_grid: continue
 *             if ((gle[0] <= redges[i, 0] and gre[0] >= ledges[i, 0]) and
 *                 (gle[1] <= redges[i, 1] and gre[1] >= ledges[i, 1]) and             # <<<<<<<<<<<<<<
 *                 (gle[2] <= redges[i, 2] and gre[2] >= ledges[i, 2])):
 *                 count += 1
 */
      __pyx_t_22 = __pyx_v_i;
      __pyx_t_23 = 1;
      __pyx_t_15 = ((__pyx_v_gle[1]) <= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_redges.diminfo[1].strides)));
      if (__pyx_t_15) {
        __pyx_t_24 = __pyx_v_i;
        __pyx_t_25 = 1;
        __pyx_t_20 = ((__pyx_v_gre[1]) >= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_ledges.diminfo[1].strides)));
        __pyx_t_26 = __pyx_t_20;
      } else {
        __pyx_t_26 = __pyx_t_15;
      }
      if (__pyx_t_26) {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1943
 *             if ((gle[0] <= redges[i, 0] and gre[0] >= ledges[i, 0]) and
 *                 (gle[1] <= redges[i, 1] and gre[1] >= ledges[i, 1]) and
 *                 (gle[2] <= redges[i, 2] and gre[2] >= ledges[i, 2])):             # <<<<<<<<<<<<<<
 *                 count += 1
 *         cdef int *tr = <int *> malloc(sizeof(int) * (count + 1))
 */
        __pyx_t_27 = __pyx_v_i;
        __pyx_t_28 = 2;
        __pyx_t_15 = ((__pyx_v_gle[2]) <= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_redges.diminfo[1].strides)));
        if (__pyx_t_15) {
          __pyx_t_29 = __pyx_v_i;
          __pyx_t_30 = 2;
          __pyx_t_20 = ((__pyx_v_gre[2]) >= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_ledges.diminfo[1].strides)));
          __pyx_t_31 = __pyx_t_20;
        } else {
          __pyx_t_31 = __pyx_t_15;
        }
        __pyx_t_15 = __pyx_t_31;
      } else {
        __pyx_t_15 = __pyx_t_26;
      }
      __pyx_t_26 = __pyx_t_15;
    } else {
      __pyx_t_26 = __pyx_t_21;
    }
    if (__pyx_t_26) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1944
 *                 (gle[1] <= redges[i, 1] and gre[1] >= ledges[i, 1]) and
 *                 (gle[2] <= redges[i, 2] and gre[2] >= ledges[i, 2])):
 *                 count += 1             # <<<<<<<<<<<<<<
 *         cdef int *tr = <int *> malloc(sizeof(int) * (count + 1))
 *         tr[0] = count
 */
      __pyx_v_count = (__pyx_v_count + 1);
      goto __pyx_L6;
    }
    __pyx_L6:;
    __pyx_L3_continue:;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1945
 *                 (gle[2] <= redges[i, 2] and gre[2] >= ledges[i, 2])):
 *                 count += 1
 *         cdef int *tr = <int *> malloc(sizeof(int) * (count + 1))             # <<<<<<<<<<<<<<
 *         tr[0] = count
 *         count = 0
 */
  __pyx_v_tr = ((int *)malloc(((sizeof(int)) * (__pyx_v_count + 1))));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1946
 *                 count += 1
 *         cdef int *tr = <int *> malloc(sizeof(int) * (count + 1))
 *         tr[0] = count             # <<<<<<<<<<<<<<
 *         count = 0
 *         for i in range(ledges.shape[0]):
 */
  (__pyx_v_tr[0]) = __pyx_v_count;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1947
 *         cdef int *tr = <int *> malloc(sizeof(int) * (count + 1))
 *         tr[0] = count
 *         count = 0             # <<<<<<<<<<<<<<
 *         for i in range(ledges.shape[0]):
 *             # Check for overlap
 */
  __pyx_v_count = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1948
 *         tr[0] = count
 *         count = 0
 *         for i in range(ledges.shape[0]):             # <<<<<<<<<<<<<<
 *             # Check for overlap
 *             if i == this_grid: continue
 */
  __pyx_t_13 = (__pyx_v_ledges->dimensions[0]);
  for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
    __pyx_v_i = __pyx_t_14;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1950
 *         for i in range(ledges.shape[0]):
 *             # Check for overlap
 *             if i == this_grid: continue             # <<<<<<<<<<<<<<
 *             if ((gle[0] <= redges[i, 0] and gre[0] >= ledges[i, 0]) and
 *                 (gle[1] <= redges[i, 1] and gre[1] >= ledges[i, 1]) and
 */
    __pyx_t_26 = (__pyx_v_i == __pyx_v_this_grid);
    if (__pyx_t_26) {
      goto __pyx_L7_continue;
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1951
 *             # Check for overlap
 *             if i == this_grid: continue
 *             if ((gle[0] <= redges[i, 0] and gre[0] >= ledges[i, 0]) and             # <<<<<<<<<<<<<<
 *                 (gle[1] <= redges[i, 1] and gre[1] >= ledges[i, 1]) and
 *                 (gle[2] <= redges[i, 2] and gre[2] >= ledges[i, 2])):
 */
    __pyx_t_32 = __pyx_v_i;
    __pyx_t_33 = 0;
    __pyx_t_26 = ((__pyx_v_gle[0]) <= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_redges.diminfo[1].strides)));
    if (__pyx_t_26) {
      __pyx_t_34 = __pyx_v_i;
      __pyx_t_35 = 0;
      __pyx_t_21 = ((__pyx_v_gre[0]) >= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_ledges.diminfo[1].strides)));
      __pyx_t_15 = __pyx_t_21;
    } else {
      __pyx_t_15 = __pyx_t_26;
    }
    if (__pyx_t_15) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1952
 *             if i == this_grid: continue
 *             if ((gle[0] <= redges[i, 0] and gre[0] >= ledges[i, 0]) and
 *                 (gle[1] <= redges[i, 1] and gre[1] >= ledges[i, 1]) and             # <<<<<<<<<<<<<<
 *                 (gle[2] <= redges[i, 2] and gre[2] >= ledges[i, 2])):
 *                 tr[count + 1] = i
 */
      __pyx_t_36 = __pyx_v_i;
      __pyx_t_37 = 1;
      __pyx_t_26 = ((__pyx_v_gle[1]) <= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_redges.diminfo[1].strides)));
      if (__pyx_t_26) {
        __pyx_t_38 = __pyx_v_i;
        __pyx_t_39 = 1;
        __pyx_t_21 = ((__pyx_v_gre[1]) >= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_ledges.diminfo[1].strides)));
        __pyx_t_31 = __pyx_t_21;
      } else {
        __pyx_t_31 = __pyx_t_26;
      }
      if (__pyx_t_31) {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1953
 *             if ((gle[0] <= redges[i, 0] and gre[0] >= ledges[i, 0]) and
 *                 (gle[1] <= redges[i, 1] and gre[1] >= ledges[i, 1]) and
 *                 (gle[2] <= redges[i, 2] and gre[2] >= ledges[i, 2])):             # <<<<<<<<<<<<<<
 *                 tr[count + 1] = i
 *                 count += 1
 */
        __pyx_t_40 = __pyx_v_i;
        __pyx_t_41 = 2;
        __pyx_t_26 = ((__pyx_v_gle[2]) <= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_redges.diminfo[1].strides)));
        if (__pyx_t_26) {
          __pyx_t_42 = __pyx_v_i;
          __pyx_t_43 = 2;
          __pyx_t_21 = ((__pyx_v_gre[2]) >= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_ledges.diminfo[1].strides)));
          __pyx_t_20 = __pyx_t_21;
        } else {
          __pyx_t_20 = __pyx_t_26;
        }
        __pyx_t_26 = __pyx_t_20;
      } else {
        __pyx_t_26 = __pyx_t_31;
      }
      __pyx_t_31 = __pyx_t_26;
    } else {
      __pyx_t_31 = __pyx_t_15;
    }
    if (__pyx_t_31) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1954
 *                 (gle[1] <= redges[i, 1] and gre[1] >= ledges[i, 1]) and
 *                 (gle[2] <= redges[i, 2] and gre[2] >= ledges[i, 2])):
 *                 tr[count + 1] = i             # <<<<<<<<<<<<<<
 *                 count += 1
 *         return tr
 */
      (__pyx_v_tr[(__pyx_v_count + 1)]) = __pyx_v_i;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1955
 *                 (gle[2] <= redges[i, 2] and gre[2] >= ledges[i, 2])):
 *                 tr[count + 1] = i
 *                 count += 1             # <<<<<<<<<<<<<<
 *         return tr
 * 
 */
      __pyx_v_count = (__pyx_v_count + 1);
      goto __pyx_L10;
    }
    __pyx_L10:;
    __pyx_L7_continue:;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1956
 *                 tr[count + 1] = i
 *                 count += 1
 *         return tr             # <<<<<<<<<<<<<<
 * 
 *     cdef int intersects(self, AdaptiveRayPacket *ray, PartitionedGrid pg):
 */
  __pyx_r = __pyx_v_tr;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ledges.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_redges.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_WriteUnraisable("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.find_neighbors", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ledges.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_redges.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1958
 *         return tr
 * 
 *     cdef int intersects(self, AdaptiveRayPacket *ray, PartitionedGrid pg):             # <<<<<<<<<<<<<<
 *         cdef np.float64_t pos[3]
 *         cdef int i
 */

static int __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_intersects(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *__pyx_v_ray, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *__pyx_v_pg) {
  int __pyx_v_i;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("intersects", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1961
 *         cdef np.float64_t pos[3]
 *         cdef int i
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             # Is this correct, for the normalized v_dir?
 *             if ray.pos[i] < pg.left_edge[i]: return 0
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1963
 *         for i in range(3):
 *             # Is this correct, for the normalized v_dir?
 *             if ray.pos[i] < pg.left_edge[i]: return 0             # <<<<<<<<<<<<<<
 *             if ray.pos[i] > pg.right_edge[i]: return 0
 *         return 1
 */
    __pyx_t_2 = ((__pyx_v_ray->pos[__pyx_v_i]) < (__pyx_v_pg->left_edge[__pyx_v_i]));
    if (__pyx_t_2) {
      __pyx_r = 0;
      goto __pyx_L0;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1964
 *             # Is this correct, for the normalized v_dir?
 *             if ray.pos[i] < pg.left_edge[i]: return 0
 *             if ray.pos[i] > pg.right_edge[i]: return 0             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
    __pyx_t_2 = ((__pyx_v_ray->pos[__pyx_v_i]) > (__pyx_v_pg->right_edge[__pyx_v_i]));
    if (__pyx_t_2) {
      __pyx_r = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1965
 *             if ray.pos[i] < pg.left_edge[i]: return 0
 *             if ray.pos[i] > pg.right_edge[i]: return 0
 *         return 1             # <<<<<<<<<<<<<<
 * 
 *     cdef int find_owner(self, AdaptiveRayPacket *ray,
 */
  __pyx_r = 1;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1967
 *         return 1
 * 
 *     cdef int find_owner(self, AdaptiveRayPacket *ray,             # <<<<<<<<<<<<<<
 *                         int *neighbors,
 *                         np.ndarray[np.float64_t, ndim=2] ledges,
 */

static int __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_find_owner(CYTHON_UNUSED struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *__pyx_v_ray, CYTHON_UNUSED int *__pyx_v_neighbors, PyArrayObject *__pyx_v_ledges, PyArrayObject *__pyx_v_redges) {
  int __pyx_v_i;
  int __pyx_v_pgi;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ledges;
  __Pyx_Buffer __pyx_pybuffer_ledges;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_redges;
  __Pyx_Buffer __pyx_pybuffer_redges;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  npy_intp __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  long __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  long __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  long __pyx_t_11;
  int __pyx_t_12;
  long __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  long __pyx_t_16;
  int __pyx_t_17;
  long __pyx_t_18;
  int __pyx_t_19;
  int __pyx_t_20;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("find_owner", 0);
  __pyx_pybuffer_ledges.pybuffer.buf = NULL;
  __pyx_pybuffer_ledges.refcount = 0;
  __pyx_pybuffernd_ledges.data = NULL;
  __pyx_pybuffernd_ledges.rcbuffer = &__pyx_pybuffer_ledges;
  __pyx_pybuffer_redges.pybuffer.buf = NULL;
  __pyx_pybuffer_redges.refcount = 0;
  __pyx_pybuffernd_redges.data = NULL;
  __pyx_pybuffernd_redges.rcbuffer = &__pyx_pybuffer_redges;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ledges.rcbuffer->pybuffer, (PyObject*)__pyx_v_ledges, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_ledges.diminfo[0].strides = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ledges.diminfo[0].shape = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ledges.diminfo[1].strides = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ledges.diminfo[1].shape = __pyx_pybuffernd_ledges.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_redges.rcbuffer->pybuffer, (PyObject*)__pyx_v_redges, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_redges.diminfo[0].strides = __pyx_pybuffernd_redges.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_redges.diminfo[0].shape = __pyx_pybuffernd_redges.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_redges.diminfo[1].strides = __pyx_pybuffernd_redges.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_redges.diminfo[1].shape = __pyx_pybuffernd_redges.rcbuffer->pybuffer.shape[1];

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1971
 *                         np.ndarray[np.float64_t, ndim=2] ledges,
 *                         np.ndarray[np.float64_t, ndim=2] redges):
 *         cdef int i, pgi = -1             # <<<<<<<<<<<<<<
 *         for i in range(ledges.shape[0]):
 *             pgi = i
 */
  __pyx_v_pgi = -1;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1972
 *                         np.ndarray[np.float64_t, ndim=2] redges):
 *         cdef int i, pgi = -1
 *         for i in range(ledges.shape[0]):             # <<<<<<<<<<<<<<
 *             pgi = i
 *             if ((ray.pos[0] <= redges[i, 0] and ray.pos[0] >= ledges[i, 0]) and
 */
  __pyx_t_1 = (__pyx_v_ledges->dimensions[0]);
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1973
 *         cdef int i, pgi = -1
 *         for i in range(ledges.shape[0]):
 *             pgi = i             # <<<<<<<<<<<<<<
 *             if ((ray.pos[0] <= redges[i, 0] and ray.pos[0] >= ledges[i, 0]) and
 *                 (ray.pos[1] <= redges[i, 1] and ray.pos[1] >= ledges[i, 1]) and
 */
    __pyx_v_pgi = __pyx_v_i;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1974
 *         for i in range(ledges.shape[0]):
 *             pgi = i
 *             if ((ray.pos[0] <= redges[i, 0] and ray.pos[0] >= ledges[i, 0]) and             # <<<<<<<<<<<<<<
 *                 (ray.pos[1] <= redges[i, 1] and ray.pos[1] >= ledges[i, 1]) and
 *                 (ray.pos[2] <= redges[i, 2] and ray.pos[2] >= ledges[i, 2])):
 */
    __pyx_t_3 = __pyx_v_i;
    __pyx_t_4 = 0;
    __pyx_t_5 = -1;
    if (__pyx_t_3 < 0) {
      __pyx_t_3 += __pyx_pybuffernd_redges.diminfo[0].shape;
      if (unlikely(__pyx_t_3 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_redges.diminfo[0].shape)) __pyx_t_5 = 0;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_pybuffernd_redges.diminfo[1].shape;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 1;
    } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_redges.diminfo[1].shape)) __pyx_t_5 = 1;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = ((__pyx_v_ray->pos[0]) <= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_4, __pyx_pybuffernd_redges.diminfo[1].strides)));
    if (__pyx_t_6) {
      __pyx_t_5 = __pyx_v_i;
      __pyx_t_7 = 0;
      __pyx_t_8 = -1;
      if (__pyx_t_5 < 0) {
        __pyx_t_5 += __pyx_pybuffernd_ledges.diminfo[0].shape;
        if (unlikely(__pyx_t_5 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_ledges.diminfo[0].shape)) __pyx_t_8 = 0;
      if (__pyx_t_7 < 0) {
        __pyx_t_7 += __pyx_pybuffernd_ledges.diminfo[1].shape;
        if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 1;
      } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_ledges.diminfo[1].shape)) __pyx_t_8 = 1;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_9 = ((__pyx_v_ray->pos[0]) >= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_7, __pyx_pybuffernd_ledges.diminfo[1].strides)));
      __pyx_t_10 = __pyx_t_9;
    } else {
      __pyx_t_10 = __pyx_t_6;
    }
    if (__pyx_t_10) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1975
 *             pgi = i
 *             if ((ray.pos[0] <= redges[i, 0] and ray.pos[0] >= ledges[i, 0]) and
 *                 (ray.pos[1] <= redges[i, 1] and ray.pos[1] >= ledges[i, 1]) and             # <<<<<<<<<<<<<<
 *                 (ray.pos[2] <= redges[i, 2] and ray.pos[2] >= ledges[i, 2])):
 *                     return pgi
 */
      __pyx_t_8 = __pyx_v_i;
      __pyx_t_11 = 1;
      __pyx_t_12 = -1;
      if (__pyx_t_8 < 0) {
        __pyx_t_8 += __pyx_pybuffernd_redges.diminfo[0].shape;
        if (unlikely(__pyx_t_8 < 0)) __pyx_t_12 = 0;
      } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_redges.diminfo[0].shape)) __pyx_t_12 = 0;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_redges.diminfo[1].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 1;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_redges.diminfo[1].shape)) __pyx_t_12 = 1;
      if (unlikely(__pyx_t_12 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_12);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_6 = ((__pyx_v_ray->pos[1]) <= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_redges.diminfo[1].strides)));
      if (__pyx_t_6) {
        __pyx_t_12 = __pyx_v_i;
        __pyx_t_13 = 1;
        __pyx_t_14 = -1;
        if (__pyx_t_12 < 0) {
          __pyx_t_12 += __pyx_pybuffernd_ledges.diminfo[0].shape;
          if (unlikely(__pyx_t_12 < 0)) __pyx_t_14 = 0;
        } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_ledges.diminfo[0].shape)) __pyx_t_14 = 0;
        if (__pyx_t_13 < 0) {
          __pyx_t_13 += __pyx_pybuffernd_ledges.diminfo[1].shape;
          if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 1;
        } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_ledges.diminfo[1].shape)) __pyx_t_14 = 1;
        if (unlikely(__pyx_t_14 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_14);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_9 = ((__pyx_v_ray->pos[1]) >= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_ledges.diminfo[1].strides)));
        __pyx_t_15 = __pyx_t_9;
      } else {
        __pyx_t_15 = __pyx_t_6;
      }
      if (__pyx_t_15) {

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1976
 *             if ((ray.pos[0] <= redges[i, 0] and ray.pos[0] >= ledges[i, 0]) and
 *                 (ray.pos[1] <= redges[i, 1] and ray.pos[1] >= ledges[i, 1]) and
 *                 (ray.pos[2] <= redges[i, 2] and ray.pos[2] >= ledges[i, 2])):             # <<<<<<<<<<<<<<
 *                     return pgi
 *         return -1
 */
        __pyx_t_14 = __pyx_v_i;
        __pyx_t_16 = 2;
        __pyx_t_17 = -1;
        if (__pyx_t_14 < 0) {
          __pyx_t_14 += __pyx_pybuffernd_redges.diminfo[0].shape;
          if (unlikely(__pyx_t_14 < 0)) __pyx_t_17 = 0;
        } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_redges.diminfo[0].shape)) __pyx_t_17 = 0;
        if (__pyx_t_16 < 0) {
          __pyx_t_16 += __pyx_pybuffernd_redges.diminfo[1].shape;
          if (unlikely(__pyx_t_16 < 0)) __pyx_t_17 = 1;
        } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_redges.diminfo[1].shape)) __pyx_t_17 = 1;
        if (unlikely(__pyx_t_17 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_17);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_6 = ((__pyx_v_ray->pos[2]) <= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_redges.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_redges.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_redges.diminfo[1].strides)));
        if (__pyx_t_6) {
          __pyx_t_17 = __pyx_v_i;
          __pyx_t_18 = 2;
          __pyx_t_19 = -1;
          if (__pyx_t_17 < 0) {
            __pyx_t_17 += __pyx_pybuffernd_ledges.diminfo[0].shape;
            if (unlikely(__pyx_t_17 < 0)) __pyx_t_19 = 0;
          } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_ledges.diminfo[0].shape)) __pyx_t_19 = 0;
          if (__pyx_t_18 < 0) {
            __pyx_t_18 += __pyx_pybuffernd_ledges.diminfo[1].shape;
            if (unlikely(__pyx_t_18 < 0)) __pyx_t_19 = 1;
          } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_ledges.diminfo[1].shape)) __pyx_t_19 = 1;
          if (unlikely(__pyx_t_19 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_19);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_9 = ((__pyx_v_ray->pos[2]) >= (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ledges.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_ledges.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_ledges.diminfo[1].strides)));
          __pyx_t_20 = __pyx_t_9;
        } else {
          __pyx_t_20 = __pyx_t_6;
        }
        __pyx_t_6 = __pyx_t_20;
      } else {
        __pyx_t_6 = __pyx_t_15;
      }
      __pyx_t_15 = __pyx_t_6;
    } else {
      __pyx_t_15 = __pyx_t_10;
    }
    if (__pyx_t_15) {

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1977
 *                 (ray.pos[1] <= redges[i, 1] and ray.pos[1] >= ledges[i, 1]) and
 *                 (ray.pos[2] <= redges[i, 2] and ray.pos[2] >= ledges[i, 2])):
 *                     return pgi             # <<<<<<<<<<<<<<
 *         return -1
 * 
 */
      __pyx_r = __pyx_v_pgi;
      goto __pyx_L0;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1978
 *                 (ray.pos[2] <= redges[i, 2] and ray.pos[2] >= ledges[i, 2])):
 *                     return pgi
 *         return -1             # <<<<<<<<<<<<<<
 * 
 *     cdef np.float64_t get_domega(self, np.float64_t left_edge[3],
 */
  __pyx_r = -1;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ledges.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_redges.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_WriteUnraisable("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.find_owner", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ledges.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_redges.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1980
 *         return -1
 * 
 *     cdef np.float64_t get_domega(self, np.float64_t left_edge[3],             # <<<<<<<<<<<<<<
 *                                        np.float64_t right_edge[3]):
 *         # We should calculate the subtending angle at the maximum radius of the
 */

static __pyx_t_5numpy_float64_t __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_get_domega(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, __pyx_t_5numpy_float64_t *__pyx_v_left_edge, __pyx_t_5numpy_float64_t *__pyx_v_right_edge) {
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_k;
  __pyx_t_5numpy_float64_t __pyx_v_r2[3];
  __pyx_t_5numpy_float64_t __pyx_v_max_r2;
  __pyx_t_5numpy_float64_t __pyx_v_domega;
  __pyx_t_5numpy_float64_t *__pyx_v_edge[2];
  __pyx_t_5numpy_float64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("get_domega", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1987
 *         cdef np.float64_t r2[3], max_r2, domega, *edge[2]
 *         # We now figure out when the ray will leave the box, at worst.
 *         edge[0] = left_edge             # <<<<<<<<<<<<<<
 *         edge[1] = right_edge
 *         max_r2 = -1.0
 */
  (__pyx_v_edge[0]) = __pyx_v_left_edge;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1988
 *         # We now figure out when the ray will leave the box, at worst.
 *         edge[0] = left_edge
 *         edge[1] = right_edge             # <<<<<<<<<<<<<<
 *         max_r2 = -1.0
 *         for i in range(2):
 */
  (__pyx_v_edge[1]) = __pyx_v_right_edge;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1989
 *         edge[0] = left_edge
 *         edge[1] = right_edge
 *         max_r2 = -1.0             # <<<<<<<<<<<<<<
 *         for i in range(2):
 *             r2[0] = (edge[i][0] - self.center[0])**2.0
 */
  __pyx_v_max_r2 = -1.0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1990
 *         edge[1] = right_edge
 *         max_r2 = -1.0
 *         for i in range(2):             # <<<<<<<<<<<<<<
 *             r2[0] = (edge[i][0] - self.center[0])**2.0
 *             for j in range(2):
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 2; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1991
 *         max_r2 = -1.0
 *         for i in range(2):
 *             r2[0] = (edge[i][0] - self.center[0])**2.0             # <<<<<<<<<<<<<<
 *             for j in range(2):
 *                 r2[1] = r2[0] + (edge[j][1] - self.center[1])**2.0
 */
    (__pyx_v_r2[0]) = pow(((double)(((__pyx_v_edge[__pyx_v_i])[0]) - (__pyx_v_self->center[0]))), 2.0);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":1992
 *         for i in range(2):
 *             r2[0] = (edge[i][0] - self.center[0])**2.0
 *             for j in range(2):             # <<<<<<<<<<<<<<
 *                 r2[1] = r2[0] + (edge[j][1] - self.center[1])**2.0
 *                 for k in range(2):
 */
    for (__pyx_t_2 = 0; __pyx_t_2 < 2; __pyx_t_2+=1) {
      __pyx_v_j = __pyx_t_2;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1993
 *             r2[0] = (edge[i][0] - self.center[0])**2.0
 *             for j in range(2):
 *                 r2[1] = r2[0] + (edge[j][1] - self.center[1])**2.0             # <<<<<<<<<<<<<<
 *                 for k in range(2):
 *                     r2[2] = r2[1] + (edge[k][2] - self.center[2])**2.0
 */
      (__pyx_v_r2[1]) = ((__pyx_v_r2[0]) + pow(((double)(((__pyx_v_edge[__pyx_v_j])[1]) - (__pyx_v_self->center[1]))), 2.0));

      /* "yt/utilities/lib/VolumeIntegrator.pyx":1994
 *             for j in range(2):
 *                 r2[1] = r2[0] + (edge[j][1] - self.center[1])**2.0
 *                 for k in range(2):             # <<<<<<<<<<<<<<
 *                     r2[2] = r2[1] + (edge[k][2] - self.center[2])**2.0
 *                     max_r2 = fmax(max_r2, r2[2])
 */
      for (__pyx_t_3 = 0; __pyx_t_3 < 2; __pyx_t_3+=1) {
        __pyx_v_k = __pyx_t_3;

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1995
 *                 r2[1] = r2[0] + (edge[j][1] - self.center[1])**2.0
 *                 for k in range(2):
 *                     r2[2] = r2[1] + (edge[k][2] - self.center[2])**2.0             # <<<<<<<<<<<<<<
 *                     max_r2 = fmax(max_r2, r2[2])
 *         domega = 4.0 * 3.1415926 * max_r2 # Used to be / Nrays
 */
        (__pyx_v_r2[2]) = ((__pyx_v_r2[1]) + pow(((double)(((__pyx_v_edge[__pyx_v_k])[2]) - (__pyx_v_self->center[2]))), 2.0));

        /* "yt/utilities/lib/VolumeIntegrator.pyx":1996
 *                 for k in range(2):
 *                     r2[2] = r2[1] + (edge[k][2] - self.center[2])**2.0
 *                     max_r2 = fmax(max_r2, r2[2])             # <<<<<<<<<<<<<<
 *         domega = 4.0 * 3.1415926 * max_r2 # Used to be / Nrays
 *         return domega
 */
        __pyx_v_max_r2 = __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_fmax(__pyx_v_max_r2, (__pyx_v_r2[2]));
      }
    }
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1997
 *                     r2[2] = r2[1] + (edge[k][2] - self.center[2])**2.0
 *                     max_r2 = fmax(max_r2, r2[2])
 *         domega = 4.0 * 3.1415926 * max_r2 # Used to be / Nrays             # <<<<<<<<<<<<<<
 *         return domega
 * 
 */
  __pyx_v_domega = ((4.0 * 3.1415926) * __pyx_v_max_r2);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1998
 *                     max_r2 = fmax(max_r2, r2[2])
 *         domega = 4.0 * 3.1415926 * max_r2 # Used to be / Nrays
 *         return domega             # <<<<<<<<<<<<<<
 * 
 *     @cython.boundscheck(False)
 */
  __pyx_r = __pyx_v_domega;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":2003
 *     @cython.wraparound(False)
 *     @cython.cdivision(True)
 *     cdef int refine_ray(self, AdaptiveRayPacket **pray,             # <<<<<<<<<<<<<<
 *                         np.float64_t domega, np.float64_t dx,
 *                         np.float64_t left_edge[3],
 */

static int __pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_refine_ray(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket **__pyx_v_pray, __pyx_t_5numpy_float64_t __pyx_v_domega, __pyx_t_5numpy_float64_t __pyx_v_dx, CYTHON_UNUSED __pyx_t_5numpy_float64_t *__pyx_v_left_edge, CYTHON_UNUSED __pyx_t_5numpy_float64_t *__pyx_v_right_edge) {
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *__pyx_v_ray;
  struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *__pyx_v_new_rays[4];
  long __pyx_v_Nrays;
  int __pyx_v_i;
  int __pyx_v_j;
  double __pyx_v_v_dir[3];
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("refine_ray", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":2007
 *                         np.float64_t left_edge[3],
 *                         np.float64_t right_edge[3]):
 *         cdef AdaptiveRayPacket *ray = pray[0]             # <<<<<<<<<<<<<<
 *         cdef AdaptiveRayPacket *new_rays[4]
 *         cdef long Nrays = 12 * ray.nside * ray.nside
 */
  __pyx_v_ray = (__pyx_v_pray[0]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":2009
 *         cdef AdaptiveRayPacket *ray = pray[0]
 *         cdef AdaptiveRayPacket *new_rays[4]
 *         cdef long Nrays = 12 * ray.nside * ray.nside             # <<<<<<<<<<<<<<
 *         cdef int i, j
 *         if domega/Nrays < dx*dx/self.rays_per_cell:
 */
  __pyx_v_Nrays = ((12 * __pyx_v_ray->nside) * __pyx_v_ray->nside);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":2011
 *         cdef long Nrays = 12 * ray.nside * ray.nside
 *         cdef int i, j
 *         if domega/Nrays < dx*dx/self.rays_per_cell:             # <<<<<<<<<<<<<<
 *             return 0
 *         if ray.nside >= self.max_nside: return 0
 */
  __pyx_t_1 = ((__pyx_v_domega / __pyx_v_Nrays) < ((__pyx_v_dx * __pyx_v_dx) / __pyx_v_self->rays_per_cell));
  if (__pyx_t_1) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":2012
 *         cdef int i, j
 *         if domega/Nrays < dx*dx/self.rays_per_cell:
 *             return 0             # <<<<<<<<<<<<<<
 *         if ray.nside >= self.max_nside: return 0
 *         cdef double v_dir[3]
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":2013
 *         if domega/Nrays < dx*dx/self.rays_per_cell:
 *             return 0
 *         if ray.nside >= self.max_nside: return 0             # <<<<<<<<<<<<<<
 *         cdef double v_dir[3]
 *         # We need a record of the previous one because we're inserting into a
 */
  __pyx_t_1 = (__pyx_v_ray->nside >= __pyx_v_self->max_nside);
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":2017
 *         # We need a record of the previous one because we're inserting into a
 *         # linked list.
 *         for i in range(4):             # <<<<<<<<<<<<<<
 *             new_rays[i] = <AdaptiveRayPacket *> malloc(
 *                             sizeof(AdaptiveRayPacket))
 */
  for (__pyx_t_2 = 0; __pyx_t_2 < 4; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":2018
 *         # linked list.
 *         for i in range(4):
 *             new_rays[i] = <AdaptiveRayPacket *> malloc(             # <<<<<<<<<<<<<<
 *                             sizeof(AdaptiveRayPacket))
 *             new_rays[i].nside = ray.nside * 2
 */
    (__pyx_v_new_rays[__pyx_v_i]) = ((struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *)malloc((sizeof(struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket))));

    /* "yt/utilities/lib/VolumeIntegrator.pyx":2020
 *             new_rays[i] = <AdaptiveRayPacket *> malloc(
 *                             sizeof(AdaptiveRayPacket))
 *             new_rays[i].nside = ray.nside * 2             # <<<<<<<<<<<<<<
 *             new_rays[i].ipix = ray.ipix * 4 + i
 *             new_rays[i].t = ray.t
 */
    (__pyx_v_new_rays[__pyx_v_i])->nside = (__pyx_v_ray->nside * 2);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":2021
 *                             sizeof(AdaptiveRayPacket))
 *             new_rays[i].nside = ray.nside * 2
 *             new_rays[i].ipix = ray.ipix * 4 + i             # <<<<<<<<<<<<<<
 *             new_rays[i].t = ray.t
 *             healpix_interface.pix2vec_nest(
 */
    (__pyx_v_new_rays[__pyx_v_i])->ipix = ((__pyx_v_ray->ipix * 4) + __pyx_v_i);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":2022
 *             new_rays[i].nside = ray.nside * 2
 *             new_rays[i].ipix = ray.ipix * 4 + i
 *             new_rays[i].t = ray.t             # <<<<<<<<<<<<<<
 *             healpix_interface.pix2vec_nest(
 *                     new_rays[i].nside, new_rays[i].ipix, v_dir)
 */
    (__pyx_v_new_rays[__pyx_v_i])->t = __pyx_v_ray->t;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":2024
 *             new_rays[i].t = ray.t
 *             healpix_interface.pix2vec_nest(
 *                     new_rays[i].nside, new_rays[i].ipix, v_dir)             # <<<<<<<<<<<<<<
 *             for j in range(3):
 *                 new_rays[i].v_dir[j] = v_dir[j] * self.normalization
 */
    pix2vec_nest((__pyx_v_new_rays[__pyx_v_i])->nside, (__pyx_v_new_rays[__pyx_v_i])->ipix, __pyx_v_v_dir);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":2025
 *             healpix_interface.pix2vec_nest(
 *                     new_rays[i].nside, new_rays[i].ipix, v_dir)
 *             for j in range(3):             # <<<<<<<<<<<<<<
 *                 new_rays[i].v_dir[j] = v_dir[j] * self.normalization
 *                 new_rays[i].value[j] = ray.value[j]
 */
    for (__pyx_t_3 = 0; __pyx_t_3 < 3; __pyx_t_3+=1) {
      __pyx_v_j = __pyx_t_3;

      /* "yt/utilities/lib/VolumeIntegrator.pyx":2026
 *                     new_rays[i].nside, new_rays[i].ipix, v_dir)
 *             for j in range(3):
 *                 new_rays[i].v_dir[j] = v_dir[j] * self.normalization             # <<<<<<<<<<<<<<
 *                 new_rays[i].value[j] = ray.value[j]
 *                 new_rays[i].pos[j] = self.center[j] + ray.t * new_rays[i].v_dir[j]
 */
      ((__pyx_v_new_rays[__pyx_v_i])->v_dir[__pyx_v_j]) = ((__pyx_v_v_dir[__pyx_v_j]) * __pyx_v_self->normalization);

      /* "yt/utilities/lib/VolumeIntegrator.pyx":2027
 *             for j in range(3):
 *                 new_rays[i].v_dir[j] = v_dir[j] * self.normalization
 *                 new_rays[i].value[j] = ray.value[j]             # <<<<<<<<<<<<<<
 *                 new_rays[i].pos[j] = self.center[j] + ray.t * new_rays[i].v_dir[j]
 *             new_rays[i].value[3] = ray.value[3]
 */
      ((__pyx_v_new_rays[__pyx_v_i])->value[__pyx_v_j]) = (__pyx_v_ray->value[__pyx_v_j]);

      /* "yt/utilities/lib/VolumeIntegrator.pyx":2028
 *                 new_rays[i].v_dir[j] = v_dir[j] * self.normalization
 *                 new_rays[i].value[j] = ray.value[j]
 *                 new_rays[i].pos[j] = self.center[j] + ray.t * new_rays[i].v_dir[j]             # <<<<<<<<<<<<<<
 *             new_rays[i].value[3] = ray.value[3]
 *         # Insert into the external list
 */
      ((__pyx_v_new_rays[__pyx_v_i])->pos[__pyx_v_j]) = ((__pyx_v_self->center[__pyx_v_j]) + (__pyx_v_ray->t * ((__pyx_v_new_rays[__pyx_v_i])->v_dir[__pyx_v_j])));
    }

    /* "yt/utilities/lib/VolumeIntegrator.pyx":2029
 *                 new_rays[i].value[j] = ray.value[j]
 *                 new_rays[i].pos[j] = self.center[j] + ray.t * new_rays[i].v_dir[j]
 *             new_rays[i].value[3] = ray.value[3]             # <<<<<<<<<<<<<<
 *         # Insert into the external list
 *         if ray.prev != NULL:
 */
    ((__pyx_v_new_rays[__pyx_v_i])->value[3]) = (__pyx_v_ray->value[3]);
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":2031
 *             new_rays[i].value[3] = ray.value[3]
 *         # Insert into the external list
 *         if ray.prev != NULL:             # <<<<<<<<<<<<<<
 *             ray.prev.next = new_rays[0]
 *         new_rays[0].prev = ray.prev
 */
  __pyx_t_1 = (__pyx_v_ray->prev != NULL);
  if (__pyx_t_1) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":2032
 *         # Insert into the external list
 *         if ray.prev != NULL:
 *             ray.prev.next = new_rays[0]             # <<<<<<<<<<<<<<
 *         new_rays[0].prev = ray.prev
 *         new_rays[3].next = ray.next
 */
    __pyx_v_ray->prev->next = (__pyx_v_new_rays[0]);
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":2033
 *         if ray.prev != NULL:
 *             ray.prev.next = new_rays[0]
 *         new_rays[0].prev = ray.prev             # <<<<<<<<<<<<<<
 *         new_rays[3].next = ray.next
 *         if ray.next != NULL:
 */
  (__pyx_v_new_rays[0])->prev = __pyx_v_ray->prev;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":2034
 *             ray.prev.next = new_rays[0]
 *         new_rays[0].prev = ray.prev
 *         new_rays[3].next = ray.next             # <<<<<<<<<<<<<<
 *         if ray.next != NULL:
 *             ray.next.prev = new_rays[3]
 */
  (__pyx_v_new_rays[3])->next = __pyx_v_ray->next;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":2035
 *         new_rays[0].prev = ray.prev
 *         new_rays[3].next = ray.next
 *         if ray.next != NULL:             # <<<<<<<<<<<<<<
 *             ray.next.prev = new_rays[3]
 *         for i in range(3):
 */
  __pyx_t_1 = (__pyx_v_ray->next != NULL);
  if (__pyx_t_1) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":2036
 *         new_rays[3].next = ray.next
 *         if ray.next != NULL:
 *             ray.next.prev = new_rays[3]             # <<<<<<<<<<<<<<
 *         for i in range(3):
 *             # Connect backward and forward
 */
    __pyx_v_ray->next->prev = (__pyx_v_new_rays[3]);
    goto __pyx_L10;
  }
  __pyx_L10:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":2037
 *         if ray.next != NULL:
 *             ray.next.prev = new_rays[3]
 *         for i in range(3):             # <<<<<<<<<<<<<<
 *             # Connect backward and forward
 *             new_rays[i].next = new_rays[i+1]
 */
  for (__pyx_t_2 = 0; __pyx_t_2 < 3; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "yt/utilities/lib/VolumeIntegrator.pyx":2039
 *         for i in range(3):
 *             # Connect backward and forward
 *             new_rays[i].next = new_rays[i+1]             # <<<<<<<<<<<<<<
 *             new_rays[3-i].prev = new_rays[2-i]
 *         if self.first == ray:
 */
    (__pyx_v_new_rays[__pyx_v_i])->next = (__pyx_v_new_rays[(__pyx_v_i + 1)]);

    /* "yt/utilities/lib/VolumeIntegrator.pyx":2040
 *             # Connect backward and forward
 *             new_rays[i].next = new_rays[i+1]
 *             new_rays[3-i].prev = new_rays[2-i]             # <<<<<<<<<<<<<<
 *         if self.first == ray:
 *             self.first = new_rays[0]
 */
    (__pyx_v_new_rays[(3 - __pyx_v_i)])->prev = (__pyx_v_new_rays[(2 - __pyx_v_i)]);
  }

  /* "yt/utilities/lib/VolumeIntegrator.pyx":2041
 *             new_rays[i].next = new_rays[i+1]
 *             new_rays[3-i].prev = new_rays[2-i]
 *         if self.first == ray:             # <<<<<<<<<<<<<<
 *             self.first = new_rays[0]
 *         self.nrays += 3
 */
  __pyx_t_1 = (__pyx_v_self->first == __pyx_v_ray);
  if (__pyx_t_1) {

    /* "yt/utilities/lib/VolumeIntegrator.pyx":2042
 *             new_rays[3-i].prev = new_rays[2-i]
 *         if self.first == ray:
 *             self.first = new_rays[0]             # <<<<<<<<<<<<<<
 *         self.nrays += 3
 *         free(ray)
 */
    __pyx_v_self->first = (__pyx_v_new_rays[0]);
    goto __pyx_L13;
  }
  __pyx_L13:;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":2043
 *         if self.first == ray:
 *             self.first = new_rays[0]
 *         self.nrays += 3             # <<<<<<<<<<<<<<
 *         free(ray)
 *         pray[0] = new_rays[0]
 */
  __pyx_v_self->nrays = (__pyx_v_self->nrays + 3);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":2044
 *             self.first = new_rays[0]
 *         self.nrays += 3
 *         free(ray)             # <<<<<<<<<<<<<<
 *         pray[0] = new_rays[0]
 *         return 1
 */
  free(__pyx_v_ray);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":2045
 *         self.nrays += 3
 *         free(ray)
 *         pray[0] = new_rays[0]             # <<<<<<<<<<<<<<
 *         return 1
 * 
 */
  (__pyx_v_pray[0]) = (__pyx_v_new_rays[0]);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":2046
 *         free(ray)
 *         pray[0] = new_rays[0]
 *         return 1             # <<<<<<<<<<<<<<
 * 
 * # From Enzo:
 */
  __pyx_r = 1;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13rays_per_cell_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13rays_per_cell_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13rays_per_cell___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1659
 * cdef class AdaptiveRaySource:
 *     cdef np.float64_t center[3]
 *     cdef public np.float64_t rays_per_cell             # <<<<<<<<<<<<<<
 *     cdef AdaptiveRayPacket *first
 *     cdef public np.float64_t normalization
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13rays_per_cell___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->rays_per_cell); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.rays_per_cell.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13rays_per_cell_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13rays_per_cell_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13rays_per_cell_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13rays_per_cell_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __pyx_t_5numpy_float64_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->rays_per_cell = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.rays_per_cell.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13normalization_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13normalization_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13normalization___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1661
 *     cdef public np.float64_t rays_per_cell
 *     cdef AdaptiveRayPacket *first
 *     cdef public np.float64_t normalization             # <<<<<<<<<<<<<<
 *     cdef public int nrays
 *     cdef public int max_nside
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13normalization___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->normalization); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.normalization.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13normalization_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13normalization_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13normalization_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13normalization_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __pyx_t_5numpy_float64_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->normalization = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.normalization.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_5nrays_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_5nrays_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_5nrays___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1662
 *     cdef AdaptiveRayPacket *first
 *     cdef public np.float64_t normalization
 *     cdef public int nrays             # <<<<<<<<<<<<<<
 *     cdef public int max_nside
 *     cdef AdaptiveRayPacket **packet_pointers
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_5nrays___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->nrays); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.nrays.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_5nrays_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_5nrays_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_5nrays_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_5nrays_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->nrays = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.nrays.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_9max_nside_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_9max_nside_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_9max_nside___get__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "yt/utilities/lib/VolumeIntegrator.pyx":1663
 *     cdef public np.float64_t normalization
 *     cdef public int nrays
 *     cdef public int max_nside             # <<<<<<<<<<<<<<
 *     cdef AdaptiveRayPacket **packet_pointers
 *     cdef AdaptiveRayPacket **lpacket_pointers
 */

static PyObject *__pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_9max_nside___get__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_self->max_nside); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.max_nside.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_9max_nside_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_9max_nside_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_9max_nside_2__set__(((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_9max_nside_2__set__(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);
  __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->max_nside = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource.max_nside.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":194
 *         # experimental exception made for __getbuffer__ and __releasebuffer__
 *         # -- the details of this may change.
 *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fullfill the PEP.
 */

static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_v_copy_shape;
  int __pyx_v_i;
  int __pyx_v_ndim;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  int __pyx_v_t;
  char *__pyx_v_f;
  PyArray_Descr *__pyx_v_descr = 0;
  int __pyx_v_offset;
  int __pyx_v_hasfields;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  if (__pyx_v_info != NULL) {
    __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(__pyx_v_info->obj);
  }

  /* "numpy.pxd":200
 *             # of flags
 * 
 *             if info == NULL: return             # <<<<<<<<<<<<<<
 * 
 *             cdef int copy_shape, i, ndim
 */
  __pyx_t_1 = (__pyx_v_info == NULL);
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "numpy.pxd":203
 * 
 *             cdef int copy_shape, i, ndim
 *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 */
  __pyx_v_endian_detector = 1;

  /* "numpy.pxd":204
 *             cdef int copy_shape, i, ndim
 *             cdef int endian_detector = 1
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 * 
 *             ndim = PyArray_NDIM(self)
 */
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "numpy.pxd":206
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);

  /* "numpy.pxd":208
 *             ndim = PyArray_NDIM(self)
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 copy_shape = 1
 *             else:
 */
  __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
  if (__pyx_t_1) {

    /* "numpy.pxd":209
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 copy_shape = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 copy_shape = 0
 */
    __pyx_v_copy_shape = 1;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "numpy.pxd":211
 *                 copy_shape = 1
 *             else:
 *                 copy_shape = 0             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 */
    __pyx_v_copy_shape = 0;
  }
  __pyx_L4:;

  /* "numpy.pxd":213
 *                 copy_shape = 0
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS);
  if (__pyx_t_1) {

    /* "numpy.pxd":214
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 */
    __pyx_t_2 = (!PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS));
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "numpy.pxd":215
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "numpy.pxd":217
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  __pyx_t_3 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS);
  if (__pyx_t_3) {

    /* "numpy.pxd":218
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 */
    __pyx_t_1 = (!PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS));
    __pyx_t_2 = __pyx_t_1;
  } else {
    __pyx_t_2 = __pyx_t_3;
  }
  if (__pyx_t_2) {

    /* "numpy.pxd":219
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_9), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "numpy.pxd":221
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
 *             info.ndim = ndim
 *             if copy_shape:
 */
  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);

  /* "numpy.pxd":222
 * 
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim             # <<<<<<<<<<<<<<
 *             if copy_shape:
 *                 # Allocate new buffer for strides and shape info.
 */
  __pyx_v_info->ndim = __pyx_v_ndim;

  /* "numpy.pxd":223
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim
 *             if copy_shape:             # <<<<<<<<<<<<<<
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 */
  if (__pyx_v_copy_shape) {

    /* "numpy.pxd":226
 *                 # 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) * <size_t>ndim * 2)             # <<<<<<<<<<<<<<
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 */
    __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2)));

    /* "numpy.pxd":227
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
 *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 */
    __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);

    /* "numpy.pxd":228
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):             # <<<<<<<<<<<<<<
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 */
    __pyx_t_5 = __pyx_v_ndim;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "numpy.pxd":229
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 */
      (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);

      /* "numpy.pxd":230
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 */
      (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "numpy.pxd":232
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 */
    __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));

    /* "numpy.pxd":233
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 */
    __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
  }
  __pyx_L7:;

  /* "numpy.pxd":234
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 */
  __pyx_v_info->suboffsets = NULL;

  /* "numpy.pxd":235
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 * 
 */
  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);

  /* "numpy.pxd":236
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
 * 
 *             cdef int t
 */
  __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(__pyx_v_self));

  /* "numpy.pxd":239
 * 
 *             cdef int t
 *             cdef char* f = NULL             # <<<<<<<<<<<<<<
 *             cdef dtype descr = self.descr
 *             cdef list stack
 */
  __pyx_v_f = NULL;

  /* "numpy.pxd":240
 *             cdef int t
 *             cdef char* f = NULL
 *             cdef dtype descr = self.descr             # <<<<<<<<<<<<<<
 *             cdef list stack
 *             cdef int offset
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self->descr));
  __pyx_v_descr = __pyx_v_self->descr;

  /* "numpy.pxd":244
 *             cdef int offset
 * 
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)             # <<<<<<<<<<<<<<
 * 
 *             if not hasfields and not copy_shape:
 */
  __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);

  /* "numpy.pxd":246
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
 * 
 *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
 *                 # do not call releasebuffer
 *                 info.obj = None
 */
  __pyx_t_2 = (!__pyx_v_hasfields);
  if (__pyx_t_2) {
    __pyx_t_3 = (!__pyx_v_copy_shape);
    __pyx_t_1 = __pyx_t_3;
  } else {
    __pyx_t_1 = __pyx_t_2;
  }
  if (__pyx_t_1) {

    /* "numpy.pxd":248
 *             if not hasfields and not copy_shape:
 *                 # do not call releasebuffer
 *                 info.obj = None             # <<<<<<<<<<<<<<
 *             else:
 *                 # need to call releasebuffer
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj);
    __pyx_v_info->obj = Py_None;
    goto __pyx_L10;
  }
  /*else*/ {

    /* "numpy.pxd":251
 *             else:
 *                 # need to call releasebuffer
 *                 info.obj = self             # <<<<<<<<<<<<<<
 * 
 *             if not hasfields:
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj);
    __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
  }
  __pyx_L10:;

  /* "numpy.pxd":253
 *                 info.obj = self
 * 
 *             if not hasfields:             # <<<<<<<<<<<<<<
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 */
  __pyx_t_1 = (!__pyx_v_hasfields);
  if (__pyx_t_1) {

    /* "numpy.pxd":254
 * 
 *             if not hasfields:
 *                 t = descr.type_num             # <<<<<<<<<<<<<<
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 */
    __pyx_v_t = __pyx_v_descr->type_num;

    /* "numpy.pxd":255
 *             if not hasfields:
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    __pyx_t_1 = (__pyx_v_descr->byteorder == '>');
    if (__pyx_t_1) {
      __pyx_t_2 = __pyx_v_little_endian;
    } else {
      __pyx_t_2 = __pyx_t_1;
    }
    if (!__pyx_t_2) {

      /* "numpy.pxd":256
 *                 t = descr.type_num
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 */
      __pyx_t_1 = (__pyx_v_descr->byteorder == '<');
      if (__pyx_t_1) {
        __pyx_t_3 = (!__pyx_v_little_endian);
        __pyx_t_7 = __pyx_t_3;
      } else {
        __pyx_t_7 = __pyx_t_1;
      }
      __pyx_t_1 = __pyx_t_7;
    } else {
      __pyx_t_1 = __pyx_t_2;
    }
    if (__pyx_t_1) {

      /* "numpy.pxd":257
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L12;
    }
    __pyx_L12:;

    /* "numpy.pxd":258
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_BYTE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__b;
      goto __pyx_L13;
    }

    /* "numpy.pxd":259
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_UBYTE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__B;
      goto __pyx_L13;
    }

    /* "numpy.pxd":260
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_SHORT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__h;
      goto __pyx_L13;
    }

    /* "numpy.pxd":261
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_USHORT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__H;
      goto __pyx_L13;
    }

    /* "numpy.pxd":262
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_INT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__i;
      goto __pyx_L13;
    }

    /* "numpy.pxd":263
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_UINT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__I;
      goto __pyx_L13;
    }

    /* "numpy.pxd":264
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_LONG);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__l;
      goto __pyx_L13;
    }

    /* "numpy.pxd":265
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_ULONG);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__L;
      goto __pyx_L13;
    }

    /* "numpy.pxd":266
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_LONGLONG);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__q;
      goto __pyx_L13;
    }

    /* "numpy.pxd":267
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_ULONGLONG);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__Q;
      goto __pyx_L13;
    }

    /* "numpy.pxd":268
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_FLOAT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__f;
      goto __pyx_L13;
    }

    /* "numpy.pxd":269
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_DOUBLE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__d;
      goto __pyx_L13;
    }

    /* "numpy.pxd":270
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_LONGDOUBLE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__g;
      goto __pyx_L13;
    }

    /* "numpy.pxd":271
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_CFLOAT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__Zf;
      goto __pyx_L13;
    }

    /* "numpy.pxd":272
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_CDOUBLE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__Zd;
      goto __pyx_L13;
    }

    /* "numpy.pxd":273
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 */
    __pyx_t_1 = (__pyx_v_t == NPY_CLONGDOUBLE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__Zg;
      goto __pyx_L13;
    }

    /* "numpy.pxd":274
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
    __pyx_t_1 = (__pyx_v_t == NPY_OBJECT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__O;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "numpy.pxd":276
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *                 info.format = f
 *                 return
 */
      __pyx_t_4 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_12), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_8));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
      __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L13:;

    /* "numpy.pxd":277
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f             # <<<<<<<<<<<<<<
 *                 return
 *             else:
 */
    __pyx_v_info->format = __pyx_v_f;

    /* "numpy.pxd":278
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f
 *                 return             # <<<<<<<<<<<<<<
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L11;
  }
  /*else*/ {

    /* "numpy.pxd":280
 *                 return
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0
 */
    __pyx_v_info->format = ((char *)malloc(255));

    /* "numpy.pxd":281
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
 *                 info.format[0] = c'^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
 *                 offset = 0
 *                 f = _util_dtypestring(descr, info.format + 1,
 */
    (__pyx_v_info->format[0]) = '^';

    /* "numpy.pxd":282
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
 *                 info.format[0] = c'^' # Native data types, manual alignment
 *                 offset = 0             # <<<<<<<<<<<<<<
 *                 f = _util_dtypestring(descr, info.format + 1,
 *                                       info.format + _buffer_format_string_len,
 */
    __pyx_v_offset = 0;

    /* "numpy.pxd":285
 *                 f = _util_dtypestring(descr, info.format + 1,
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)             # <<<<<<<<<<<<<<
 *                 f[0] = c'\0' # Terminate format string
 * 
 */
    __pyx_t_9 = __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_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_f = __pyx_t_9;

    /* "numpy.pxd":286
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)
 *                 f[0] = c'\0' # Terminate format string             # <<<<<<<<<<<<<<
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 */
    (__pyx_v_f[0]) = '\x00';
  }
  __pyx_L11:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(Py_None);
    __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
  }
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_descr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
static void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
  __Pyx_RefNannyFinishContext();
}

/* "numpy.pxd":288
 *                 f[0] = c'\0' # Terminate format string
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)
 */

static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);

  /* "numpy.pxd":289
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_t_1 = PyArray_HASFIELDS(__pyx_v_self);
  if (__pyx_t_1) {

    /* "numpy.pxd":290
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)             # <<<<<<<<<<<<<<
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 stdlib.free(info.strides)
 */
    free(__pyx_v_info->format);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "numpy.pxd":291
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 stdlib.free(info.strides)
 *                 # info.shape was stored after info.strides in the same block
 */
  __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
  if (__pyx_t_1) {

    /* "numpy.pxd":292
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 stdlib.free(info.strides)             # <<<<<<<<<<<<<<
 *                 # info.shape was stored after info.strides in the same block
 * 
 */
    free(__pyx_v_info->strides);
    goto __pyx_L4;
  }
  __pyx_L4:;

  __Pyx_RefNannyFinishContext();
}

/* "numpy.pxd":768
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);

  /* "numpy.pxd":769
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":771
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);

  /* "numpy.pxd":772
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":774
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);

  /* "numpy.pxd":775
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":777
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);

  /* "numpy.pxd":778
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":780
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);

  /* "numpy.pxd":781
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":783
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
 *     # Recursive utility function used in __getbuffer__ to get format
 *     # string. The new location in the format string is returned.
 */

static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
  PyArray_Descr *__pyx_v_child = 0;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_childname = NULL;
  PyObject *__pyx_v_new_offset = NULL;
  PyObject *__pyx_v_t = NULL;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  long __pyx_t_11;
  char *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_util_dtypestring", 0);

  /* "numpy.pxd":790
 *     cdef int delta_offset
 *     cdef tuple i
 *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 *     cdef tuple fields
 */
  __pyx_v_endian_detector = 1;

  /* "numpy.pxd":791
 *     cdef tuple i
 *     cdef int endian_detector = 1
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 *     cdef tuple fields
 * 
 */
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "numpy.pxd":794
 *     cdef tuple fields
 * 
 *     for childname in descr.names:             # <<<<<<<<<<<<<<
 *         fields = descr.fields[childname]
 *         child, new_offset = fields
 */
  if (unlikely(((PyObject *)__pyx_v_descr->names) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
    #if CYTHON_COMPILING_IN_CPYTHON
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    #endif
    __Pyx_XDECREF(__pyx_v_childname);
    __pyx_v_childname = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "numpy.pxd":795
 * 
 *     for childname in descr.names:
 *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
 *         child, new_offset = fields
 * 
 */
    __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_fields));
    __pyx_v_fields = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "numpy.pxd":796
 *     for childname in descr.names:
 *         fields = descr.fields[childname]
 *         child, new_offset = fields             # <<<<<<<<<<<<<<
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:
 */
    if (likely(PyTuple_CheckExact(((PyObject *)__pyx_v_fields)))) {
      PyObject* sequence = ((PyObject *)__pyx_v_fields);
      #if CYTHON_COMPILING_IN_CPYTHON
      Py_ssize_t size = Py_SIZE(sequence);
      #else
      Py_ssize_t size = PySequence_Size(sequence);
      #endif
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      #if CYTHON_COMPILING_IN_CPYTHON
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      #endif
    } else if (1) {
      __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else
    {
      Py_ssize_t index = -1;
      __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_fields)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
      index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = NULL;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L6_unpacking_done:;
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_child));
    __pyx_v_child = ((PyArray_Descr *)__pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_v_new_offset);
    __pyx_v_new_offset = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "numpy.pxd":798
 *         child, new_offset = fields
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 */
    __pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_7) {

      /* "numpy.pxd":799
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 */
      __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "numpy.pxd":801
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 *         if ((child.byteorder == c'>' and little_endian) or             # <<<<<<<<<<<<<<
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")
 */
    __pyx_t_7 = (__pyx_v_child->byteorder == '>');
    if (__pyx_t_7) {
      __pyx_t_8 = __pyx_v_little_endian;
    } else {
      __pyx_t_8 = __pyx_t_7;
    }
    if (!__pyx_t_8) {

      /* "numpy.pxd":802
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):             # <<<<<<<<<<<<<<
 *             raise ValueError(u"Non-native byte order not supported")
 *             # One could encode it in the format string and have Cython
 */
      __pyx_t_7 = (__pyx_v_child->byteorder == '<');
      if (__pyx_t_7) {
        __pyx_t_9 = (!__pyx_v_little_endian);
        __pyx_t_10 = __pyx_t_9;
      } else {
        __pyx_t_10 = __pyx_t_7;
      }
      __pyx_t_7 = __pyx_t_10;
    } else {
      __pyx_t_7 = __pyx_t_8;
    }
    if (__pyx_t_7) {

      /* "numpy.pxd":803
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "numpy.pxd":813
 * 
 *         # Output padding bytes
 *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 */
    while (1) {
      __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!__pyx_t_7) break;

      /* "numpy.pxd":814
 *         # Output padding bytes
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
 *             f += 1
 *             offset[0] += 1
 */
      (__pyx_v_f[0]) = 120;

      /* "numpy.pxd":815
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte
 *             f += 1             # <<<<<<<<<<<<<<
 *             offset[0] += 1
 * 
 */
      __pyx_v_f = (__pyx_v_f + 1);

      /* "numpy.pxd":816
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 *             offset[0] += 1             # <<<<<<<<<<<<<<
 * 
 *         offset[0] += child.itemsize
 */
      __pyx_t_11 = 0;
      (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + 1);
    }

    /* "numpy.pxd":818
 *             offset[0] += 1
 * 
 *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not PyDataType_HASFIELDS(child):
 */
    __pyx_t_11 = 0;
    (__pyx_v_offset[__pyx_t_11]) = ((__pyx_v_offset[__pyx_t_11]) + __pyx_v_child->elsize);

    /* "numpy.pxd":820
 *         offset[0] += child.itemsize
 * 
 *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
 *             t = child.type_num
 *             if end - f < 5:
 */
    __pyx_t_7 = (!PyDataType_HASFIELDS(__pyx_v_child));
    if (__pyx_t_7) {

      /* "numpy.pxd":821
 * 
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num             # <<<<<<<<<<<<<<
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")
 */
      __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_v_t);
      __pyx_v_t = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "numpy.pxd":822
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num
 *             if end - f < 5:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(u"Format string allocated too short.")
 * 
 */
      __pyx_t_7 = ((__pyx_v_end - __pyx_v_f) < 5);
      if (__pyx_t_7) {

        /* "numpy.pxd":823
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
        __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_17), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L12;
      }
      __pyx_L12:;

      /* "numpy.pxd":826
 * 
 *             # 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"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 98;
        goto __pyx_L13;
      }

      /* "numpy.pxd":827
 *             # 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"             # <<<<<<<<<<<<<<
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 66;
        goto __pyx_L13;
      }

      /* "numpy.pxd":828
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 104;
        goto __pyx_L13;
      }

      /* "numpy.pxd":829
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 72;
        goto __pyx_L13;
      }

      /* "numpy.pxd":830
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 105;
        goto __pyx_L13;
      }

      /* "numpy.pxd":831
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 73;
        goto __pyx_L13;
      }

      /* "numpy.pxd":832
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 108;
        goto __pyx_L13;
      }

      /* "numpy.pxd":833
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 76;
        goto __pyx_L13;
      }

      /* "numpy.pxd":834
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 113;
        goto __pyx_L13;
      }

      /* "numpy.pxd":835
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 81;
        goto __pyx_L13;
      }

      /* "numpy.pxd":836
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 102;
        goto __pyx_L13;
      }

      /* "numpy.pxd":837
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             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
 */
      __pyx_t_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 100;
        goto __pyx_L13;
      }

      /* "numpy.pxd":838
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             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
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 */
      __pyx_t_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 103;
        goto __pyx_L13;
      }

      /* "numpy.pxd":839
 *             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             # <<<<<<<<<<<<<<
 *             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
 */
      __pyx_t_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 102;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L13;
      }

      /* "numpy.pxd":840
 *             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             # <<<<<<<<<<<<<<
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 100;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L13;
      }

      /* "numpy.pxd":841
 *             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             # <<<<<<<<<<<<<<
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 */
      __pyx_t_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 103;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L13;
      }

      /* "numpy.pxd":842
 *             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"             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
      __pyx_t_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_7) {
        (__pyx_v_f[0]) = 79;
        goto __pyx_L13;
      }
      /*else*/ {

        /* "numpy.pxd":844
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *             f += 1
 *         else:
 */
        __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_12), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
        __pyx_t_5 = 0;
        __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L13:;

      /* "numpy.pxd":845
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *             f += 1             # <<<<<<<<<<<<<<
 *         else:
 *             # Cython ignores struct boundary information ("T{...}"),
 */
      __pyx_v_f = (__pyx_v_f + 1);
      goto __pyx_L11;
    }
    /*else*/ {

      /* "numpy.pxd":849
 *             # Cython ignores struct boundary information ("T{...}"),
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
 *     return f
 * 
 */
      __pyx_t_12 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_f = __pyx_t_12;
    }
    __pyx_L11:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "numpy.pxd":850
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)
 *     return f             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_f;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_child);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_childname);
  __Pyx_XDECREF(__pyx_v_new_offset);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":965
 * 
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *      cdef PyObject* baseptr
 *      if base is None:
 */

static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
  PyObject *__pyx_v_baseptr;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("set_array_base", 0);

  /* "numpy.pxd":967
 * cdef inline void set_array_base(ndarray arr, object base):
 *      cdef PyObject* baseptr
 *      if base is None:             # <<<<<<<<<<<<<<
 *          baseptr = NULL
 *      else:
 */
  __pyx_t_1 = (__pyx_v_base == Py_None);
  if (__pyx_t_1) {

    /* "numpy.pxd":968
 *      cdef PyObject* baseptr
 *      if base is None:
 *          baseptr = NULL             # <<<<<<<<<<<<<<
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!
 */
    __pyx_v_baseptr = NULL;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "numpy.pxd":970
 *          baseptr = NULL
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!             # <<<<<<<<<<<<<<
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)
 */
    Py_INCREF(__pyx_v_base);

    /* "numpy.pxd":971
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!
 *          baseptr = <PyObject*>base             # <<<<<<<<<<<<<<
 *      Py_XDECREF(arr.base)
 *      arr.base = baseptr
 */
    __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
  }
  __pyx_L3:;

  /* "numpy.pxd":972
 *          Py_INCREF(base) # important to do this before decref below!
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)             # <<<<<<<<<<<<<<
 *      arr.base = baseptr
 * 
 */
  Py_XDECREF(__pyx_v_arr->base);

  /* "numpy.pxd":973
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)
 *      arr.base = baseptr             # <<<<<<<<<<<<<<
 * 
 * cdef inline object get_array_base(ndarray arr):
 */
  __pyx_v_arr->base = __pyx_v_baseptr;

  __Pyx_RefNannyFinishContext();
}

/* "numpy.pxd":975
 *      arr.base = baseptr
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     if arr.base is NULL:
 *         return None
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("get_array_base", 0);

  /* "numpy.pxd":976
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     else:
 */
  __pyx_t_1 = (__pyx_v_arr->base == NULL);
  if (__pyx_t_1) {

    /* "numpy.pxd":977
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     else:
 *         return <object>arr.base
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "numpy.pxd":979
 *         return None
 *     else:
 *         return <object>arr.base             # <<<<<<<<<<<<<<
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
    __pyx_r = ((PyObject *)__pyx_v_arr->base);
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  return o;
}

static void __pyx_tp_dealloc_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container(PyObject *o) {
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_sigma(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5sigma_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_sigma(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5sigma_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_coeff(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5coeff_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_coeff(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_5coeff_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container[] = {
  {__Pyx_NAMESTR("add_points"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_3add_points, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container[] = {
  {(char *)"sigma", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_sigma, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_sigma, 0, 0},
  {(char *)"coeff", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_coeff, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_coeff, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_star_kdtree_container = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_star_kdtree_container = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_star_kdtree_container = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_star_kdtree_container = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("yt.utilities.lib.VolumeIntegrator.star_kdtree_container"), /*tp_name*/
  sizeof(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_star_kdtree_container, /*tp_as_number*/
  &__pyx_tp_as_sequence_star_kdtree_container, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_star_kdtree_container, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_star_kdtree_container, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21star_kdtree_container_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane;

static PyObject *__pyx_tp_new_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)o);
  p->__pyx_vtab = __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane;
  p->avp_pos = Py_None; Py_INCREF(Py_None);
  p->avp_dir = Py_None; Py_INCREF(Py_None);
  p->acenter = Py_None; Py_INCREF(Py_None);
  p->aimage = Py_None; Py_INCREF(Py_None);
  p->ax_vec = Py_None; Py_INCREF(Py_None);
  p->ay_vec = Py_None; Py_INCREF(Py_None);
  if (__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_1__cinit__(o, a, k) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane(PyObject *o) {
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *p = (struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)o;
  Py_CLEAR(p->avp_pos);
  Py_CLEAR(p->avp_dir);
  Py_CLEAR(p->acenter);
  Py_CLEAR(p->aimage);
  Py_CLEAR(p->ax_vec);
  Py_CLEAR(p->ay_vec);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *p = (struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)o;
  if (p->avp_pos) {
    e = (*v)(p->avp_pos, a); if (e) return e;
  }
  if (p->avp_dir) {
    e = (*v)(p->avp_dir, a); if (e) return e;
  }
  if (p->acenter) {
    e = (*v)(p->acenter, a); if (e) return e;
  }
  if (p->aimage) {
    e = (*v)(p->aimage, a); if (e) return e;
  }
  if (p->ax_vec) {
    e = (*v)(p->ax_vec, a); if (e) return e;
  }
  if (p->ay_vec) {
    e = (*v)(p->ay_vec, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane(PyObject *o) {
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *p = (struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->avp_pos);
  p->avp_pos = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->avp_dir);
  p->avp_dir = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->acenter);
  p->acenter = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->aimage);
  p->aimage = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->ax_vec);
  p->ax_vec = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->ay_vec);
  p->ay_vec = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_avp_pos(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_avp_pos(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos_3__set__(o, v);
  }
  else {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_pos_5__del__(o);
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_avp_dir(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_avp_dir(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir_3__set__(o, v);
  }
  else {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7avp_dir_5__del__(o);
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_acenter(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_acenter(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter_3__set__(o, v);
  }
  else {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_7acenter_5__del__(o);
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_aimage(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_aimage(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage_3__set__(o, v);
  }
  else {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6aimage_5__del__(o);
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_ax_vec(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_ax_vec(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec_3__set__(o, v);
  }
  else {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ax_vec_5__del__(o);
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_ay_vec(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_ay_vec(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec_3__set__(o, v);
  }
  else {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_6ay_vec_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane[] = {
  {(char *)"avp_pos", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_avp_pos, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_avp_pos, 0, 0},
  {(char *)"avp_dir", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_avp_dir, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_avp_dir, 0, 0},
  {(char *)"acenter", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_acenter, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_acenter, 0, 0},
  {(char *)"aimage", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_aimage, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_aimage, 0, 0},
  {(char *)"ax_vec", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_ax_vec, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_ax_vec, 0, 0},
  {(char *)"ay_vec", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_ay_vec, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_ay_vec, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_VectorPlane = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_VectorPlane = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_VectorPlane = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_VectorPlane = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("yt.utilities.lib.VolumeIntegrator.VectorPlane"), /*tp_name*/
  sizeof(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_VectorPlane, /*tp_as_number*/
  &__pyx_tp_as_sequence_VectorPlane, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_VectorPlane, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_VectorPlane, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane, /*tp_traverse*/
  __pyx_tp_clear_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy;

static PyObject *__pyx_tp_new_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *)o);
  p->__pyx_vtab = __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy;
  p->tf_obj = Py_None; Py_INCREF(Py_None);
  p->my_field_tables = Py_None; Py_INCREF(Py_None);
  if (__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_1__cinit__(o, a, k) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy(PyObject *o) {
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *p = (struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *)o;
  Py_CLEAR(p->tf_obj);
  Py_CLEAR(p->my_field_tables);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *p = (struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *)o;
  if (p->tf_obj) {
    e = (*v)(p->tf_obj, a); if (e) return e;
  }
  if (p->my_field_tables) {
    e = (*v)(p->my_field_tables, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy(PyObject *o) {
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *p = (struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->tf_obj);
  p->tf_obj = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->my_field_tables);
  p->my_field_tables = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_ns(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_2ns_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_ns(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_2ns_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_tf_obj(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_tf_obj(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj_3__set__(o, v);
  }
  else {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_6tf_obj_5__del__(o);
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_my_field_tables(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_my_field_tables(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables_3__set__(o, v);
  }
  else {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_15my_field_tables_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy[] = {
  {(char *)"ns", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_ns, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_ns, 0, 0},
  {(char *)"tf_obj", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_tf_obj, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_tf_obj, 0, 0},
  {(char *)"my_field_tables", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_my_field_tables, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_my_field_tables, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_TransferFunctionProxy = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_TransferFunctionProxy = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_TransferFunctionProxy = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_TransferFunctionProxy = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("yt.utilities.lib.VolumeIntegrator.TransferFunctionProxy"), /*tp_name*/
  sizeof(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_TransferFunctionProxy, /*tp_as_number*/
  &__pyx_tp_as_sequence_TransferFunctionProxy, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_TransferFunctionProxy, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_TransferFunctionProxy, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy, /*tp_traverse*/
  __pyx_tp_clear_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid;

static PyObject *__pyx_tp_new_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)o);
  p->__pyx_vtab = __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid;
  p->my_data = Py_None; Py_INCREF(Py_None);
  p->LeftEdge = Py_None; Py_INCREF(Py_None);
  p->RightEdge = Py_None; Py_INCREF(Py_None);
  if (__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_1__cinit__(o, a, k) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid(PyObject *o) {
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *p = (struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)o;
  Py_CLEAR(p->my_data);
  Py_CLEAR(p->LeftEdge);
  Py_CLEAR(p->RightEdge);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *p = (struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)o;
  if (p->my_data) {
    e = (*v)(p->my_data, a); if (e) return e;
  }
  if (p->LeftEdge) {
    e = (*v)(p->LeftEdge, a); if (e) return e;
  }
  if (p->RightEdge) {
    e = (*v)(p->RightEdge, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid(PyObject *o) {
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *p = (struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->my_data);
  p->my_data = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->LeftEdge);
  p->LeftEdge = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->RightEdge);
  p->RightEdge = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_my_data(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_my_data(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data_3__set__(o, v);
  }
  else {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7my_data_5__del__(o);
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_LeftEdge(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_LeftEdge(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge_3__set__(o, v);
  }
  else {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8LeftEdge_5__del__(o);
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_RightEdge(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_RightEdge(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge_3__set__(o, v);
  }
  else {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9RightEdge_5__del__(o);
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_parent_grid_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_14parent_grid_id_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_parent_grid_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_14parent_grid_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_n_fields(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8n_fields_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_n_fields(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_8n_fields_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid[] = {
  {__Pyx_NAMESTR("set_star_tree"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_3set_star_tree, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("cast_plane"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_5cast_plane, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("integrate_streamline"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_7integrate_streamline, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_isocontour_triangles"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_9get_isocontour_triangles, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid[] = {
  {(char *)"my_data", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_my_data, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_my_data, 0, 0},
  {(char *)"LeftEdge", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_LeftEdge, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_LeftEdge, 0, 0},
  {(char *)"RightEdge", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_RightEdge, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_RightEdge, 0, 0},
  {(char *)"parent_grid_id", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_parent_grid_id, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_parent_grid_id, 0, 0},
  {(char *)"n_fields", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_n_fields, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_n_fields, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_PartitionedGrid = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_PartitionedGrid = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_PartitionedGrid = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_PartitionedGrid = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("yt.utilities.lib.VolumeIntegrator.PartitionedGrid"), /*tp_name*/
  sizeof(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_PartitionedGrid, /*tp_as_number*/
  &__pyx_tp_as_sequence_PartitionedGrid, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_PartitionedGrid, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_PartitionedGrid, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid, /*tp_traverse*/
  __pyx_tp_clear_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_GridFace __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_GridFace;

static PyObject *__pyx_tp_new_2yt_9utilities_3lib_16VolumeIntegrator_GridFace(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *)o);
  p->__pyx_vtab = __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_GridFace;
  return o;
}

static void __pyx_tp_dealloc_2yt_9utilities_3lib_16VolumeIntegrator_GridFace(PyObject *o) {
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_coord(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_5coord_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_coord(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_5coord_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_2yt_9utilities_3lib_16VolumeIntegrator_GridFace[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_2yt_9utilities_3lib_16VolumeIntegrator_GridFace[] = {
  {(char *)"coord", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_coord, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_coord, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_GridFace = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_GridFace = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_GridFace = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_GridFace = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_GridFace = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("yt.utilities.lib.VolumeIntegrator.GridFace"), /*tp_name*/
  sizeof(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_2yt_9utilities_3lib_16VolumeIntegrator_GridFace, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_GridFace, /*tp_as_number*/
  &__pyx_tp_as_sequence_GridFace, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_GridFace, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_GridFace, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_2yt_9utilities_3lib_16VolumeIntegrator_GridFace, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_2yt_9utilities_3lib_16VolumeIntegrator_GridFace, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_2yt_9utilities_3lib_16VolumeIntegrator_GridFace, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism;

static PyObject *__pyx_tp_new_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)o);
  p->__pyx_vtab = __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism;
  p->LeftEdge = Py_None; Py_INCREF(Py_None);
  p->RightEdge = Py_None; Py_INCREF(Py_None);
  p->subgrid_faces = Py_None; Py_INCREF(Py_None);
  if (__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_1__cinit__(o, a, k) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism(PyObject *o) {
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *p = (struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)o;
  Py_CLEAR(p->LeftEdge);
  Py_CLEAR(p->RightEdge);
  Py_CLEAR(p->subgrid_faces);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *p = (struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)o;
  if (p->LeftEdge) {
    e = (*v)(p->LeftEdge, a); if (e) return e;
  }
  if (p->RightEdge) {
    e = (*v)(p->RightEdge, a); if (e) return e;
  }
  if (p->subgrid_faces) {
    e = (*v)(p->subgrid_faces, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism(PyObject *o) {
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *p = (struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->LeftEdge);
  p->LeftEdge = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->RightEdge);
  p->RightEdge = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->subgrid_faces);
  p->subgrid_faces = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_LeftEdge(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_LeftEdge(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge_3__set__(o, v);
  }
  else {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_8LeftEdge_5__del__(o);
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_RightEdge(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_RightEdge(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge_3__set__(o, v);
  }
  else {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_9RightEdge_5__del__(o);
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_subgrid_faces(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_subgrid_faces(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces_3__set__(o, v);
  }
  else {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_13subgrid_faces_5__del__(o);
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_parent_grid_id(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_14parent_grid_id_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_parent_grid_id(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_14parent_grid_id_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism[] = {
  {__Pyx_NAMESTR("sweep"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_3sweep, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_brick"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_5get_brick, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism[] = {
  {(char *)"LeftEdge", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_LeftEdge, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_LeftEdge, 0, 0},
  {(char *)"RightEdge", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_RightEdge, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_RightEdge, 0, 0},
  {(char *)"subgrid_faces", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_subgrid_faces, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_subgrid_faces, 0, 0},
  {(char *)"parent_grid_id", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_parent_grid_id, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_parent_grid_id, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_ProtoPrism = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_ProtoPrism = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_ProtoPrism = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_ProtoPrism = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("yt.utilities.lib.VolumeIntegrator.ProtoPrism"), /*tp_name*/
  sizeof(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_ProtoPrism, /*tp_as_number*/
  &__pyx_tp_as_sequence_ProtoPrism, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_ProtoPrism, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_ProtoPrism, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism, /*tp_traverse*/
  __pyx_tp_clear_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource;

static PyObject *__pyx_tp_new_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *)o);
  p->__pyx_vtab = __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource;
  if (__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_1__cinit__(o, a, k) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource(PyObject *o) {
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_3__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_rays_per_cell(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13rays_per_cell_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_rays_per_cell(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13rays_per_cell_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_normalization(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13normalization_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_normalization(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_13normalization_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_nrays(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_5nrays_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_nrays(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_5nrays_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_max_nside(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_9max_nside_1__get__(o);
}

static int __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_max_nside(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_9max_nside_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource[] = {
  {__Pyx_NAMESTR("get_rays"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_5get_rays, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("integrate_brick"), (PyCFunction)__pyx_pw_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_7integrate_brick, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource[] = {
  {(char *)"rays_per_cell", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_rays_per_cell, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_rays_per_cell, 0, 0},
  {(char *)"normalization", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_normalization, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_normalization, 0, 0},
  {(char *)"nrays", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_nrays, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_nrays, 0, 0},
  {(char *)"max_nside", __pyx_getprop_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_max_nside, __pyx_setprop_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_max_nside, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_AdaptiveRaySource = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_AdaptiveRaySource = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_AdaptiveRaySource = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_AdaptiveRaySource = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("yt.utilities.lib.VolumeIntegrator.AdaptiveRaySource"), /*tp_name*/
  sizeof(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_AdaptiveRaySource, /*tp_as_number*/
  &__pyx_tp_as_sequence_AdaptiveRaySource, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_AdaptiveRaySource, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_AdaptiveRaySource, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    __Pyx_NAMESTR("VolumeIntegrator"),
    __Pyx_DOCSTR(__pyx_k_18), /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_u_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 1, 0, 0},
  {&__pyx_kp_u_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 1, 0, 0},
  {&__pyx_kp_u_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 1, 0, 0},
  {&__pyx_kp_u_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 1, 0, 0},
  {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0},
  {&__pyx_n_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 1},
  {&__pyx_n_s_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 0, 1, 1},
  {&__pyx_kp_u_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 1, 0, 0},
  {&__pyx_kp_u_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 1, 0, 0},
  {&__pyx_n_s__LeftEdge, __pyx_k__LeftEdge, sizeof(__pyx_k__LeftEdge), 0, 0, 1, 1},
  {&__pyx_n_s__PROBLEM, __pyx_k__PROBLEM, sizeof(__pyx_k__PROBLEM), 0, 0, 1, 1},
  {&__pyx_n_s__RightEdge, __pyx_k__RightEdge, sizeof(__pyx_k__RightEdge), 0, 0, 1, 1},
  {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
  {&__pyx_n_s__aipix, __pyx_k__aipix, sizeof(__pyx_k__aipix), 0, 0, 1, 1},
  {&__pyx_n_s__aipnest, __pyx_k__aipnest, sizeof(__pyx_k__aipnest), 0, 0, 1, 1},
  {&__pyx_n_s__aphi, __pyx_k__aphi, sizeof(__pyx_k__aphi), 0, 0, 1, 1},
  {&__pyx_n_s__area, __pyx_k__area, sizeof(__pyx_k__area), 0, 0, 1, 1},
  {&__pyx_n_s__arr_ang2pix_nest, __pyx_k__arr_ang2pix_nest, sizeof(__pyx_k__arr_ang2pix_nest), 0, 0, 1, 1},
  {&__pyx_n_s__arr_fisheye_vectors, __pyx_k__arr_fisheye_vectors, sizeof(__pyx_k__arr_fisheye_vectors), 0, 0, 1, 1},
  {&__pyx_n_s__arr_pix2ang_nest, __pyx_k__arr_pix2ang_nest, sizeof(__pyx_k__arr_pix2ang_nest), 0, 0, 1, 1},
  {&__pyx_n_s__arr_pix2vec_nest, __pyx_k__arr_pix2vec_nest, sizeof(__pyx_k__arr_pix2vec_nest), 0, 0, 1, 1},
  {&__pyx_n_s__arr_vec2pix_nest, __pyx_k__arr_vec2pix_nest, sizeof(__pyx_k__arr_vec2pix_nest), 0, 0, 1, 1},
  {&__pyx_n_s__atheta, __pyx_k__atheta, sizeof(__pyx_k__atheta), 0, 0, 1, 1},
  {&__pyx_n_s__bounds, __pyx_k__bounds, sizeof(__pyx_k__bounds), 0, 0, 1, 1},
  {&__pyx_n_s__brick_list, __pyx_k__brick_list, sizeof(__pyx_k__brick_list), 0, 0, 1, 1},
  {&__pyx_n_s__cell_pos, __pyx_k__cell_pos, sizeof(__pyx_k__cell_pos), 0, 0, 1, 1},
  {&__pyx_n_s__center, __pyx_k__center, sizeof(__pyx_k__center), 0, 0, 1, 1},
  {&__pyx_n_s__child_mask, __pyx_k__child_mask, sizeof(__pyx_k__child_mask), 0, 0, 1, 1},
  {&__pyx_n_s__copy, __pyx_k__copy, sizeof(__pyx_k__copy), 0, 0, 1, 1},
  {&__pyx_n_s__current, __pyx_k__current, sizeof(__pyx_k__current), 0, 0, 1, 1},
  {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1},
  {&__pyx_n_s__dds, __pyx_k__dds, sizeof(__pyx_k__dds), 0, 0, 1, 1},
  {&__pyx_n_s__dims, __pyx_k__dims, sizeof(__pyx_k__dims), 0, 0, 1, 1},
  {&__pyx_n_s__direction, __pyx_k__direction, sizeof(__pyx_k__direction), 0, 0, 1, 1},
  {&__pyx_n_s__do_sample, __pyx_k__do_sample, sizeof(__pyx_k__do_sample), 0, 0, 1, 1},
  {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1},
  {&__pyx_n_s__dxs, __pyx_k__dxs, sizeof(__pyx_k__dxs), 0, 0, 1, 1},
  {&__pyx_n_s__empty, __pyx_k__empty, sizeof(__pyx_k__empty), 0, 0, 1, 1},
  {&__pyx_n_s__fdata, __pyx_k__fdata, sizeof(__pyx_k__fdata), 0, 0, 1, 1},
  {&__pyx_n_s__field_id, __pyx_k__field_id, sizeof(__pyx_k__field_id), 0, 0, 1, 1},
  {&__pyx_n_s__field_ids, __pyx_k__field_ids, sizeof(__pyx_k__field_ids), 0, 0, 1, 1},
  {&__pyx_n_s__field_table_ids, __pyx_k__field_table_ids, sizeof(__pyx_k__field_table_ids), 0, 0, 1, 1},
  {&__pyx_n_s__float64, __pyx_k__float64, sizeof(__pyx_k__float64), 0, 0, 1, 1},
  {&__pyx_n_s__flux, __pyx_k__flux, sizeof(__pyx_k__flux), 0, 0, 1, 1},
  {&__pyx_n_s__flux_field, __pyx_k__flux_field, sizeof(__pyx_k__flux_field), 0, 0, 1, 1},
  {&__pyx_n_s__fov, __pyx_k__fov, sizeof(__pyx_k__fov), 0, 0, 1, 1},
  {&__pyx_n_s__fov_rad, __pyx_k__fov_rad, sizeof(__pyx_k__fov_rad), 0, 0, 1, 1},
  {&__pyx_n_s__fv, __pyx_k__fv, sizeof(__pyx_k__fv), 0, 0, 1, 1},
  {&__pyx_n_s__grid, __pyx_k__grid, sizeof(__pyx_k__grid), 0, 0, 1, 1},
  {&__pyx_n_s__grid_dds, __pyx_k__grid_dds, sizeof(__pyx_k__grid_dds), 0, 0, 1, 1},
  {&__pyx_n_s__grid_left_edge, __pyx_k__grid_left_edge, sizeof(__pyx_k__grid_left_edge), 0, 0, 1, 1},
  {&__pyx_n_s__gv, __pyx_k__gv, sizeof(__pyx_k__gv), 0, 0, 1, 1},
  {&__pyx_n_s__h, __pyx_k__h, sizeof(__pyx_k__h), 0, 0, 1, 1},
  {&__pyx_n_s__hp_ang2pix_nest, __pyx_k__hp_ang2pix_nest, sizeof(__pyx_k__hp_ang2pix_nest), 0, 0, 1, 1},
  {&__pyx_n_s__hp_pix2ang_nest, __pyx_k__hp_pix2ang_nest, sizeof(__pyx_k__hp_pix2ang_nest), 0, 0, 1, 1},
  {&__pyx_n_s__hp_pix2vec_nest, __pyx_k__hp_pix2vec_nest, sizeof(__pyx_k__hp_pix2vec_nest), 0, 0, 1, 1},
  {&__pyx_n_s__hp_vec2pix_nest, __pyx_k__hp_vec2pix_nest, sizeof(__pyx_k__hp_vec2pix_nest), 0, 0, 1, 1},
  {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1},
  {&__pyx_n_s__idds, __pyx_k__idds, sizeof(__pyx_k__idds), 0, 0, 1, 1},
  {&__pyx_n_s__image, __pyx_k__image, sizeof(__pyx_k__image), 0, 0, 1, 1},
  {&__pyx_n_s__initial_nside, __pyx_k__initial_nside, sizeof(__pyx_k__initial_nside), 0, 0, 1, 1},
  {&__pyx_n_s__inside, __pyx_k__inside, sizeof(__pyx_k__inside), 0, 0, 1, 1},
  {&__pyx_n_s__int64, __pyx_k__int64, sizeof(__pyx_k__int64), 0, 0, 1, 1},
  {&__pyx_n_s__intdata, __pyx_k__intdata, sizeof(__pyx_k__intdata), 0, 0, 1, 1},
  {&__pyx_n_s__ipix, __pyx_k__ipix, sizeof(__pyx_k__ipix), 0, 0, 1, 1},
  {&__pyx_n_s__ipnest, __pyx_k__ipnest, sizeof(__pyx_k__ipnest), 0, 0, 1, 1},
  {&__pyx_n_s__isovalue, __pyx_k__isovalue, sizeof(__pyx_k__isovalue), 0, 0, 1, 1},
  {&__pyx_n_s__j, __pyx_k__j, sizeof(__pyx_k__j), 0, 0, 1, 1},
  {&__pyx_n_s__k, __pyx_k__k, sizeof(__pyx_k__k), 0, 0, 1, 1},
  {&__pyx_n_s__last, __pyx_k__last, sizeof(__pyx_k__last), 0, 0, 1, 1},
  {&__pyx_n_s__ledges, __pyx_k__ledges, sizeof(__pyx_k__ledges), 0, 0, 1, 1},
  {&__pyx_n_s__left, __pyx_k__left, sizeof(__pyx_k__left), 0, 0, 1, 1},
  {&__pyx_n_s__left_edge, __pyx_k__left_edge, sizeof(__pyx_k__left_edge), 0, 0, 1, 1},
  {&__pyx_n_s__m, __pyx_k__m, sizeof(__pyx_k__m), 0, 0, 1, 1},
  {&__pyx_n_s__mag, __pyx_k__mag, sizeof(__pyx_k__mag), 0, 0, 1, 1},
  {&__pyx_n_s__march_cubes_grid, __pyx_k__march_cubes_grid, sizeof(__pyx_k__march_cubes_grid), 0, 0, 1, 1},
  {&__pyx_n_s__mask, __pyx_k__mask, sizeof(__pyx_k__mask), 0, 0, 1, 1},
  {&__pyx_n_s__max_nside, __pyx_k__max_nside, sizeof(__pyx_k__max_nside), 0, 0, 1, 1},
  {&__pyx_n_s__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1},
  {&__pyx_n_s__n_field_tables, __pyx_k__n_field_tables, sizeof(__pyx_k__n_field_tables), 0, 0, 1, 1},
  {&__pyx_n_s__n_fields, __pyx_k__n_fields, sizeof(__pyx_k__n_fields), 0, 0, 1, 1},
  {&__pyx_n_s__nimi, __pyx_k__nimi, sizeof(__pyx_k__nimi), 0, 0, 1, 1},
  {&__pyx_n_s__nimj, __pyx_k__nimj, sizeof(__pyx_k__nimj), 0, 0, 1, 1},
  {&__pyx_n_s__nimx, __pyx_k__nimx, sizeof(__pyx_k__nimx), 0, 0, 1, 1},
  {&__pyx_n_s__nimy, __pyx_k__nimy, sizeof(__pyx_k__nimy), 0, 0, 1, 1},
  {&__pyx_n_s__normal, __pyx_k__normal, sizeof(__pyx_k__normal), 0, 0, 1, 1},
  {&__pyx_n_s__normalization, __pyx_k__normalization, sizeof(__pyx_k__normalization), 0, 0, 1, 1},
  {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1},
  {&__pyx_n_s__nside, __pyx_k__nside, sizeof(__pyx_k__nside), 0, 0, 1, 1},
  {&__pyx_n_s__nt, __pyx_k__nt, sizeof(__pyx_k__nt), 0, 0, 1, 1},
  {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1},
  {&__pyx_n_s__nx, __pyx_k__nx, sizeof(__pyx_k__nx), 0, 0, 1, 1},
  {&__pyx_n_s__ny, __pyx_k__ny, sizeof(__pyx_k__ny), 0, 0, 1, 1},
  {&__pyx_n_s__obj_sample, __pyx_k__obj_sample, sizeof(__pyx_k__obj_sample), 0, 0, 1, 1},
  {&__pyx_n_s__off_phi, __pyx_k__off_phi, sizeof(__pyx_k__off_phi), 0, 0, 1, 1},
  {&__pyx_n_s__off_theta, __pyx_k__off_theta, sizeof(__pyx_k__off_theta), 0, 0, 1, 1},
  {&__pyx_n_s__offset, __pyx_k__offset, sizeof(__pyx_k__offset), 0, 0, 1, 1},
  {&__pyx_n_s__parent_grid_id, __pyx_k__parent_grid_id, sizeof(__pyx_k__parent_grid_id), 0, 0, 1, 1},
  {&__pyx_n_s__pass_through, __pyx_k__pass_through, sizeof(__pyx_k__pass_through), 0, 0, 1, 1},
  {&__pyx_n_s__pg, __pyx_k__pg, sizeof(__pyx_k__pg), 0, 0, 1, 1},
  {&__pyx_n_s__pgi, __pyx_k__pgi, sizeof(__pyx_k__pgi), 0, 0, 1, 1},
  {&__pyx_n_s__pgs, __pyx_k__pgs, sizeof(__pyx_k__pgs), 0, 0, 1, 1},
  {&__pyx_n_s__phi, __pyx_k__phi, sizeof(__pyx_k__phi), 0, 0, 1, 1},
  {&__pyx_n_s__pi, __pyx_k__pi, sizeof(__pyx_k__pi), 0, 0, 1, 1},
  {&__pyx_n_s__point, __pyx_k__point, sizeof(__pyx_k__point), 0, 0, 1, 1},
  {&__pyx_n_s__pos, __pyx_k__pos, sizeof(__pyx_k__pos), 0, 0, 1, 1},
  {&__pyx_n_s__pos_x, __pyx_k__pos_x, sizeof(__pyx_k__pos_x), 0, 0, 1, 1},
  {&__pyx_n_s__pos_y, __pyx_k__pos_y, sizeof(__pyx_k__pos_y), 0, 0, 1, 1},
  {&__pyx_n_s__pos_z, __pyx_k__pos_z, sizeof(__pyx_k__pos_z), 0, 0, 1, 1},
  {&__pyx_n_s__px, __pyx_k__px, sizeof(__pyx_k__px), 0, 0, 1, 1},
  {&__pyx_n_s__py, __pyx_k__py, sizeof(__pyx_k__py), 0, 0, 1, 1},
  {&__pyx_n_s__r, __pyx_k__r, sizeof(__pyx_k__r), 0, 0, 1, 1},
  {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
  {&__pyx_n_s__rays_per_cell, __pyx_k__rays_per_cell, sizeof(__pyx_k__rays_per_cell), 0, 0, 1, 1},
  {&__pyx_n_s__redges, __pyx_k__redges, sizeof(__pyx_k__redges), 0, 0, 1, 1},
  {&__pyx_n_s__resolution, __pyx_k__resolution, sizeof(__pyx_k__resolution), 0, 0, 1, 1},
  {&__pyx_n_s__right_edge, __pyx_k__right_edge, sizeof(__pyx_k__right_edge), 0, 0, 1, 1},
  {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1},
  {&__pyx_n_s__sample, __pyx_k__sample, sizeof(__pyx_k__sample), 0, 0, 1, 1},
  {&__pyx_n_s__sampled, __pyx_k__sampled, sizeof(__pyx_k__sampled), 0, 0, 1, 1},
  {&__pyx_n_s__sdata, __pyx_k__sdata, sizeof(__pyx_k__sdata), 0, 0, 1, 1},
  {&__pyx_n_s__set_star_tree, __pyx_k__set_star_tree, sizeof(__pyx_k__set_star_tree), 0, 0, 1, 1},
  {&__pyx_n_s__sqrt, __pyx_k__sqrt, sizeof(__pyx_k__sqrt), 0, 0, 1, 1},
  {&__pyx_n_s__stack, __pyx_k__stack, sizeof(__pyx_k__stack), 0, 0, 1, 1},
  {&__pyx_n_s__star_colors, __pyx_k__star_colors, sizeof(__pyx_k__star_colors), 0, 0, 1, 1},
  {&__pyx_n_s__star_tree, __pyx_k__star_tree, sizeof(__pyx_k__star_tree), 0, 0, 1, 1},
  {&__pyx_n_s__subgrid_faces, __pyx_k__subgrid_faces, sizeof(__pyx_k__subgrid_faces), 0, 0, 1, 1},
  {&__pyx_n_s__sweep, __pyx_k__sweep, sizeof(__pyx_k__sweep), 0, 0, 1, 1},
  {&__pyx_n_s__tables, __pyx_k__tables, sizeof(__pyx_k__tables), 0, 0, 1, 1},
  {&__pyx_n_s__temp, __pyx_k__temp, sizeof(__pyx_k__temp), 0, 0, 1, 1},
  {&__pyx_n_s__tf, __pyx_k__tf, sizeof(__pyx_k__tf), 0, 0, 1, 1},
  {&__pyx_n_s__tf_obj, __pyx_k__tf_obj, sizeof(__pyx_k__tf_obj), 0, 0, 1, 1},
  {&__pyx_n_s__theta, __pyx_k__theta, sizeof(__pyx_k__theta), 0, 0, 1, 1},
  {&__pyx_n_s__tr, __pyx_k__tr, sizeof(__pyx_k__tr), 0, 0, 1, 1},
  {&__pyx_n_s__triangles, __pyx_k__triangles, sizeof(__pyx_k__triangles), 0, 0, 1, 1},
  {&__pyx_n_s__v, __pyx_k__v, sizeof(__pyx_k__v), 0, 0, 1, 1},
  {&__pyx_n_s__v1, __pyx_k__v1, sizeof(__pyx_k__v1), 0, 0, 1, 1},
  {&__pyx_n_s__v1data, __pyx_k__v1data, sizeof(__pyx_k__v1data), 0, 0, 1, 1},
  {&__pyx_n_s__v2, __pyx_k__v2, sizeof(__pyx_k__v2), 0, 0, 1, 1},
  {&__pyx_n_s__v2data, __pyx_k__v2data, sizeof(__pyx_k__v2data), 0, 0, 1, 1},
  {&__pyx_n_s__v3, __pyx_k__v3, sizeof(__pyx_k__v3), 0, 0, 1, 1},
  {&__pyx_n_s__v3data, __pyx_k__v3data, sizeof(__pyx_k__v3data), 0, 0, 1, 1},
  {&__pyx_n_s__values, __pyx_k__values, sizeof(__pyx_k__values), 0, 0, 1, 1},
  {&__pyx_n_s__vd, __pyx_k__vd, sizeof(__pyx_k__vd), 0, 0, 1, 1},
  {&__pyx_n_s__vertices, __pyx_k__vertices, sizeof(__pyx_k__vertices), 0, 0, 1, 1},
  {&__pyx_n_s__vp, __pyx_k__vp, sizeof(__pyx_k__vp), 0, 0, 1, 1},
  {&__pyx_n_s__vp_dir, __pyx_k__vp_dir, sizeof(__pyx_k__vp_dir), 0, 0, 1, 1},
  {&__pyx_n_s__vp_pos, __pyx_k__vp_pos, sizeof(__pyx_k__vp_pos), 0, 0, 1, 1},
  {&__pyx_n_s__weight_field_ids, __pyx_k__weight_field_ids, sizeof(__pyx_k__weight_field_ids), 0, 0, 1, 1},
  {&__pyx_n_s__weight_table_ids, __pyx_k__weight_table_ids, sizeof(__pyx_k__weight_table_ids), 0, 0, 1, 1},
  {&__pyx_n_s__wval, __pyx_k__wval, sizeof(__pyx_k__wval), 0, 0, 1, 1},
  {&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1},
  {&__pyx_n_s__x_bounds, __pyx_k__x_bounds, sizeof(__pyx_k__x_bounds), 0, 0, 1, 1},
  {&__pyx_n_s__x_vec, __pyx_k__x_vec, sizeof(__pyx_k__x_vec), 0, 0, 1, 1},
  {&__pyx_n_s__y, __pyx_k__y, sizeof(__pyx_k__y), 0, 0, 1, 1},
  {&__pyx_n_s__y_vec, __pyx_k__y_vec, sizeof(__pyx_k__y_vec), 0, 0, 1, 1},
  {&__pyx_n_s__z, __pyx_k__z, sizeof(__pyx_k__z), 0, 0, 1, 1},
  {&__pyx_n_s__zeros, __pyx_k__zeros, sizeof(__pyx_k__zeros), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":160
 *     cdef double v[3]
 *     healpix_interface.pix2vec_nest(nside, ipix, v)
 *     cdef np.ndarray[np.float64_t, ndim=1] tr = np.empty((3,), dtype='float64')             # <<<<<<<<<<<<<<
 *     tr[0] = v[0]
 *     tr[1] = v[1]
 */
  __pyx_k_tuple_1 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_1);
  __Pyx_INCREF(__pyx_int_3);
  PyTuple_SET_ITEM(__pyx_k_tuple_1, 0, __pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_1));
  __pyx_k_tuple_2 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_2);
  __Pyx_INCREF(((PyObject *)__pyx_k_tuple_1));
  PyTuple_SET_ITEM(__pyx_k_tuple_2, 0, ((PyObject *)__pyx_k_tuple_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1636
 *             idims[i] = ri[i] - li[i]
 *         if child_mask[li[0], li[1], li[2]] == 0: return []
 *         cdef np.ndarray[np.int64_t, ndim=1] dims = np.empty(3, dtype='int64')             # <<<<<<<<<<<<<<
 *         for i in range(3):
 *             dims[i] = idims[i]
 */
  __pyx_k_tuple_4 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_4);
  __Pyx_INCREF(__pyx_int_3);
  PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, __pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1752
 *             values[count, 3] = ray.value[3]
 *             if ray.t < 0.5:
 *                 print "PROBLEM",             # <<<<<<<<<<<<<<
 *                 print count, ray.ipix, ray.nside, ray.t,
 *                 print "vd", ray.v_dir[0], ray.v_dir[1], ray.v_dir[2],
 */
  __pyx_k_tuple_5 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_5);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__PROBLEM));
  PyTuple_SET_ITEM(__pyx_k_tuple_5, 0, ((PyObject *)__pyx_n_s__PROBLEM));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PROBLEM));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5));

  /* "numpy.pxd":215
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
  __pyx_k_tuple_7 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_7);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_6));
  PyTuple_SET_ITEM(__pyx_k_tuple_7, 0, ((PyObject *)__pyx_kp_u_6));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_6));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7));

  /* "numpy.pxd":219
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
  __pyx_k_tuple_9 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_9);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_8));
  PyTuple_SET_ITEM(__pyx_k_tuple_9, 0, ((PyObject *)__pyx_kp_u_8));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_9));

  /* "numpy.pxd":257
 *                 if ((descr.byteorder == c'>' and little_endian) or
 *                     (descr.byteorder == c'<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
  __pyx_k_tuple_11 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_11);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_10));
  PyTuple_SET_ITEM(__pyx_k_tuple_11, 0, ((PyObject *)__pyx_kp_u_10));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_10));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11));

  /* "numpy.pxd":799
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == c'>' and little_endian) or
 */
  __pyx_k_tuple_14 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_14);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_13));
  PyTuple_SET_ITEM(__pyx_k_tuple_14, 0, ((PyObject *)__pyx_kp_u_13));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_13));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));

  /* "numpy.pxd":803
 *         if ((child.byteorder == c'>' and little_endian) or
 *             (child.byteorder == c'<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
  __pyx_k_tuple_15 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_15);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_10));
  PyTuple_SET_ITEM(__pyx_k_tuple_15, 0, ((PyObject *)__pyx_kp_u_10));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_10));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));

  /* "numpy.pxd":823
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
  __pyx_k_tuple_17 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_17);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_16));
  PyTuple_SET_ITEM(__pyx_k_tuple_17, 0, ((PyObject *)__pyx_kp_u_16));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_16));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_17));

  /* "yt/utilities/lib/VolumeIntegrator.pyx":157
 * #cdef extern int **tri_table
 * 
 * def hp_pix2vec_nest(long nside, long ipix):             # <<<<<<<<<<<<<<
 *     cdef double v[3]
 *     healpix_interface.pix2vec_nest(nside, ipix, v)
 */
  __pyx_k_tuple_19 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_19);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nside));
  PyTuple_SET_ITEM(__pyx_k_tuple_19, 0, ((PyObject *)__pyx_n_s__nside));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nside));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ipix));
  PyTuple_SET_ITEM(__pyx_k_tuple_19, 1, ((PyObject *)__pyx_n_s__ipix));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ipix));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
  PyTuple_SET_ITEM(__pyx_k_tuple_19, 2, ((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tr));
  PyTuple_SET_ITEM(__pyx_k_tuple_19, 3, ((PyObject *)__pyx_n_s__tr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tr));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19));
  __pyx_k_codeobj_20 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_21, __pyx_n_s__hp_pix2vec_nest, 157, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "yt/utilities/lib/VolumeIntegrator.pyx":166
 *     return tr
 * 
 * def arr_pix2vec_nest(long nside,             # <<<<<<<<<<<<<<
 *                      np.ndarray[np.int64_t, ndim=1] aipix):
 *     cdef int n = aipix.shape[0]
 */
  __pyx_k_tuple_23 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_23);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nside));
  PyTuple_SET_ITEM(__pyx_k_tuple_23, 0, ((PyObject *)__pyx_n_s__nside));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nside));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__aipix));
  PyTuple_SET_ITEM(__pyx_k_tuple_23, 1, ((PyObject *)__pyx_n_s__aipix));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__aipix));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_23, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_23, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
  PyTuple_SET_ITEM(__pyx_k_tuple_23, 4, ((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ipix));
  PyTuple_SET_ITEM(__pyx_k_tuple_23, 5, ((PyObject *)__pyx_n_s__ipix));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ipix));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tr));
  PyTuple_SET_ITEM(__pyx_k_tuple_23, 6, ((PyObject *)__pyx_n_s__tr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tr));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));
  __pyx_k_codeobj_24 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_21, __pyx_n_s__arr_pix2vec_nest, 166, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "yt/utilities/lib/VolumeIntegrator.pyx":181
 *     return tr
 * 
 * def hp_vec2pix_nest(long nside, double x, double y, double z):             # <<<<<<<<<<<<<<
 *     cdef double v[3]
 *     v[0] = x
 */
  __pyx_k_tuple_25 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_25);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nside));
  PyTuple_SET_ITEM(__pyx_k_tuple_25, 0, ((PyObject *)__pyx_n_s__nside));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nside));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_25, 1, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__y));
  PyTuple_SET_ITEM(__pyx_k_tuple_25, 2, ((PyObject *)__pyx_n_s__y));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__y));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__z));
  PyTuple_SET_ITEM(__pyx_k_tuple_25, 3, ((PyObject *)__pyx_n_s__z));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__z));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
  PyTuple_SET_ITEM(__pyx_k_tuple_25, 4, ((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ipix));
  PyTuple_SET_ITEM(__pyx_k_tuple_25, 5, ((PyObject *)__pyx_n_s__ipix));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ipix));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25));
  __pyx_k_codeobj_26 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_21, __pyx_n_s__hp_vec2pix_nest, 181, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "yt/utilities/lib/VolumeIntegrator.pyx":190
 *     return ipix
 * 
 * def arr_vec2pix_nest(long nside,             # <<<<<<<<<<<<<<
 *                      np.ndarray[np.float64_t, ndim=1] x,
 *                      np.ndarray[np.float64_t, ndim=1] y,
 */
  __pyx_k_tuple_27 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_27);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nside));
  PyTuple_SET_ITEM(__pyx_k_tuple_27, 0, ((PyObject *)__pyx_n_s__nside));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nside));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_27, 1, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__y));
  PyTuple_SET_ITEM(__pyx_k_tuple_27, 2, ((PyObject *)__pyx_n_s__y));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__y));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__z));
  PyTuple_SET_ITEM(__pyx_k_tuple_27, 3, ((PyObject *)__pyx_n_s__z));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__z));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_27, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_27, 5, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v));
  PyTuple_SET_ITEM(__pyx_k_tuple_27, 6, ((PyObject *)__pyx_n_s__v));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ipix));
  PyTuple_SET_ITEM(__pyx_k_tuple_27, 7, ((PyObject *)__pyx_n_s__ipix));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ipix));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tr));
  PyTuple_SET_ITEM(__pyx_k_tuple_27, 8, ((PyObject *)__pyx_n_s__tr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tr));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_27));
  __pyx_k_codeobj_28 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_21, __pyx_n_s__arr_vec2pix_nest, 190, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "yt/utilities/lib/VolumeIntegrator.pyx":207
 *     return tr
 * 
 * def hp_pix2ang_nest(long nside, long ipnest):             # <<<<<<<<<<<<<<
 *     cdef double theta, phi
 *     healpix_interface.pix2ang_nest(nside, ipnest, &theta, &phi)
 */
  __pyx_k_tuple_29 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_29);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nside));
  PyTuple_SET_ITEM(__pyx_k_tuple_29, 0, ((PyObject *)__pyx_n_s__nside));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nside));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ipnest));
  PyTuple_SET_ITEM(__pyx_k_tuple_29, 1, ((PyObject *)__pyx_n_s__ipnest));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ipnest));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__theta));
  PyTuple_SET_ITEM(__pyx_k_tuple_29, 2, ((PyObject *)__pyx_n_s__theta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__theta));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__phi));
  PyTuple_SET_ITEM(__pyx_k_tuple_29, 3, ((PyObject *)__pyx_n_s__phi));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__phi));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29));
  __pyx_k_codeobj_30 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_21, __pyx_n_s__hp_pix2ang_nest, 207, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "yt/utilities/lib/VolumeIntegrator.pyx":212
 *     return (theta, phi)
 * 
 * def arr_pix2ang_nest(long nside, np.ndarray[np.int64_t, ndim=1] aipnest):             # <<<<<<<<<<<<<<
 *     cdef int n = aipnest.shape[0]
 *     cdef int i
 */
  __pyx_k_tuple_31 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_31);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nside));
  PyTuple_SET_ITEM(__pyx_k_tuple_31, 0, ((PyObject *)__pyx_n_s__nside));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nside));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__aipnest));
  PyTuple_SET_ITEM(__pyx_k_tuple_31, 1, ((PyObject *)__pyx_n_s__aipnest));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__aipnest));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_31, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_31, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ipnest));
  PyTuple_SET_ITEM(__pyx_k_tuple_31, 4, ((PyObject *)__pyx_n_s__ipnest));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ipnest));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tr));
  PyTuple_SET_ITEM(__pyx_k_tuple_31, 5, ((PyObject *)__pyx_n_s__tr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__theta));
  PyTuple_SET_ITEM(__pyx_k_tuple_31, 6, ((PyObject *)__pyx_n_s__theta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__theta));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__phi));
  PyTuple_SET_ITEM(__pyx_k_tuple_31, 7, ((PyObject *)__pyx_n_s__phi));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__phi));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31));
  __pyx_k_codeobj_32 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_21, __pyx_n_s__arr_pix2ang_nest, 212, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "yt/utilities/lib/VolumeIntegrator.pyx":225
 *     return tr
 * 
 * def hp_ang2pix_nest(long nside, double theta, double phi):             # <<<<<<<<<<<<<<
 *     cdef long ipix
 *     healpix_interface.ang2pix_nest(nside, theta, phi, &ipix)
 */
  __pyx_k_tuple_33 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_33);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nside));
  PyTuple_SET_ITEM(__pyx_k_tuple_33, 0, ((PyObject *)__pyx_n_s__nside));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nside));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__theta));
  PyTuple_SET_ITEM(__pyx_k_tuple_33, 1, ((PyObject *)__pyx_n_s__theta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__theta));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__phi));
  PyTuple_SET_ITEM(__pyx_k_tuple_33, 2, ((PyObject *)__pyx_n_s__phi));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__phi));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ipix));
  PyTuple_SET_ITEM(__pyx_k_tuple_33, 3, ((PyObject *)__pyx_n_s__ipix));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ipix));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33));
  __pyx_k_codeobj_34 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_21, __pyx_n_s__hp_ang2pix_nest, 225, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "yt/utilities/lib/VolumeIntegrator.pyx":230
 *     return ipix
 * 
 * def arr_ang2pix_nest(long nside,             # <<<<<<<<<<<<<<
 *                      np.ndarray[np.float64_t, ndim=1] atheta,
 *                      np.ndarray[np.float64_t, ndim=1] aphi):
 */
  __pyx_k_tuple_35 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_35);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nside));
  PyTuple_SET_ITEM(__pyx_k_tuple_35, 0, ((PyObject *)__pyx_n_s__nside));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nside));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__atheta));
  PyTuple_SET_ITEM(__pyx_k_tuple_35, 1, ((PyObject *)__pyx_n_s__atheta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__atheta));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__aphi));
  PyTuple_SET_ITEM(__pyx_k_tuple_35, 2, ((PyObject *)__pyx_n_s__aphi));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__aphi));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_35, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_35, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ipnest));
  PyTuple_SET_ITEM(__pyx_k_tuple_35, 5, ((PyObject *)__pyx_n_s__ipnest));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ipnest));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tr));
  PyTuple_SET_ITEM(__pyx_k_tuple_35, 6, ((PyObject *)__pyx_n_s__tr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__theta));
  PyTuple_SET_ITEM(__pyx_k_tuple_35, 7, ((PyObject *)__pyx_n_s__theta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__theta));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__phi));
  PyTuple_SET_ITEM(__pyx_k_tuple_35, 8, ((PyObject *)__pyx_n_s__phi));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__phi));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35));
  __pyx_k_codeobj_36 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_21, __pyx_n_s__arr_ang2pix_nest, 230, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "yt/utilities/lib/VolumeIntegrator.pyx":245
 *     return tr
 * 
 * def arr_fisheye_vectors(int resolution, np.float64_t fov, int nimx=1, int             # <<<<<<<<<<<<<<
 *         nimy=1, int nimi=0, int nimj=0, np.float64_t off_theta=0.0, np.float64_t
 *         off_phi=0.0):
 */
  __pyx_k_tuple_37 = PyTuple_New(21); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_37);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__resolution));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 0, ((PyObject *)__pyx_n_s__resolution));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__resolution));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fov));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 1, ((PyObject *)__pyx_n_s__fov));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fov));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nimx));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 2, ((PyObject *)__pyx_n_s__nimx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nimx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nimy));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 3, ((PyObject *)__pyx_n_s__nimy));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nimy));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nimi));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 4, ((PyObject *)__pyx_n_s__nimi));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nimi));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nimj));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 5, ((PyObject *)__pyx_n_s__nimj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nimj));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__off_theta));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 6, ((PyObject *)__pyx_n_s__off_theta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__off_theta));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__off_phi));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 7, ((PyObject *)__pyx_n_s__off_phi));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__off_phi));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__vp));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 8, ((PyObject *)__pyx_n_s__vp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__vp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 9, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 10, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 11, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__r));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 12, ((PyObject *)__pyx_n_s__r));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__r));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__phi));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 13, ((PyObject *)__pyx_n_s__phi));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__phi));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__theta));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 14, ((PyObject *)__pyx_n_s__theta));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__theta));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__px));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 15, ((PyObject *)__pyx_n_s__px));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__px));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__py));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 16, ((PyObject *)__pyx_n_s__py));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__py));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pi));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 17, ((PyObject *)__pyx_n_s__pi));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pi));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fov_rad));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 18, ((PyObject *)__pyx_n_s__fov_rad));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fov_rad));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nx));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 19, ((PyObject *)__pyx_n_s__nx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ny));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 20, ((PyObject *)__pyx_n_s__ny));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ny));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37));
  __pyx_k_codeobj_38 = (PyObject*)__Pyx_PyCode_New(8, 0, 21, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_21, __pyx_n_s__arr_fisheye_vectors, 245, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "yt/utilities/lib/VolumeIntegrator.pyx":972
 * @cython.wraparound(False)
 * @cython.cdivision(True)
 * def march_cubes_grid(np.float64_t isovalue,             # <<<<<<<<<<<<<<
 *                      np.ndarray[np.float64_t, ndim=3] values,
 *                      np.ndarray[np.int32_t, ndim=3] mask,
 */
  __pyx_k_tuple_39 = PyTuple_New(32); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_39);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__isovalue));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 0, ((PyObject *)__pyx_n_s__isovalue));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__isovalue));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 1, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 2, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left_edge));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 3, ((PyObject *)__pyx_n_s__left_edge));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left_edge));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dxs));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 4, ((PyObject *)__pyx_n_s__dxs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dxs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj_sample));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 5, ((PyObject *)__pyx_n_s__obj_sample));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj_sample));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dims));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 6, ((PyObject *)__pyx_n_s__dims));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dims));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 7, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 8, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 9, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 10, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__m));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 11, ((PyObject *)__pyx_n_s__m));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__m));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nt));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 12, ((PyObject *)__pyx_n_s__nt));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nt));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__offset));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 13, ((PyObject *)__pyx_n_s__offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__offset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__gv));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 14, ((PyObject *)__pyx_n_s__gv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__gv));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pos));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 15, ((PyObject *)__pyx_n_s__pos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__point));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 16, ((PyObject *)__pyx_n_s__point));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__point));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idds));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 17, ((PyObject *)__pyx_n_s__idds));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idds));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__intdata));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 18, ((PyObject *)__pyx_n_s__intdata));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__intdata));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sdata));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 19, ((PyObject *)__pyx_n_s__sdata));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sdata));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 20, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__y));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 21, ((PyObject *)__pyx_n_s__y));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__y));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__z));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 22, ((PyObject *)__pyx_n_s__z));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__z));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__do_sample));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 23, ((PyObject *)__pyx_n_s__do_sample));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__do_sample));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sample));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 24, ((PyObject *)__pyx_n_s__sample));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sample));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sampled));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 25, ((PyObject *)__pyx_n_s__sampled));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sampled));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__triangles));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 26, ((PyObject *)__pyx_n_s__triangles));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__triangles));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__last));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 27, ((PyObject *)__pyx_n_s__last));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__last));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__current));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 28, ((PyObject *)__pyx_n_s__current));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__current));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 29, ((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dds));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 30, ((PyObject *)__pyx_n_s__dds));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dds));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__vertices));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 31, ((PyObject *)__pyx_n_s__vertices));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__vertices));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39));
  __pyx_k_codeobj_40 = (PyObject*)__Pyx_PyCode_New(6, 0, 32, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_21, __pyx_n_s__march_cubes_grid, 972, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1053
 * @cython.wraparound(False)
 * @cython.cdivision(True)
 * def march_cubes_grid_flux(             # <<<<<<<<<<<<<<
 *                      np.float64_t isovalue,
 *                      np.ndarray[np.float64_t, ndim=3] values,
 */
  __pyx_k_tuple_41 = PyTuple_New(38); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_41);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__isovalue));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 0, ((PyObject *)__pyx_n_s__isovalue));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__isovalue));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 1, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v1));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 2, ((PyObject *)__pyx_n_s__v1));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v1));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v2));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 3, ((PyObject *)__pyx_n_s__v2));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v2));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v3));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 4, ((PyObject *)__pyx_n_s__v3));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v3));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__flux_field));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 5, ((PyObject *)__pyx_n_s__flux_field));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__flux_field));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 6, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left_edge));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 7, ((PyObject *)__pyx_n_s__left_edge));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left_edge));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dxs));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 8, ((PyObject *)__pyx_n_s__dxs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dxs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dims));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 9, ((PyObject *)__pyx_n_s__dims));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dims));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 10, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 11, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 12, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 13, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__m));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 14, ((PyObject *)__pyx_n_s__m));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__m));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__offset));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 15, ((PyObject *)__pyx_n_s__offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__offset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__gv));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 16, ((PyObject *)__pyx_n_s__gv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__gv));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__intdata));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 17, ((PyObject *)__pyx_n_s__intdata));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__intdata));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__triangles));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 18, ((PyObject *)__pyx_n_s__triangles));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__triangles));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__current));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 19, ((PyObject *)__pyx_n_s__current));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__current));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__last));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 20, ((PyObject *)__pyx_n_s__last));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__last));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 21, ((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v1data));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 22, ((PyObject *)__pyx_n_s__v1data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v1data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v2data));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 23, ((PyObject *)__pyx_n_s__v2data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v2data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__v3data));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 24, ((PyObject *)__pyx_n_s__v3data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__v3data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fdata));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 25, ((PyObject *)__pyx_n_s__fdata));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fdata));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dds));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 26, ((PyObject *)__pyx_n_s__dds));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dds));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__flux));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 27, ((PyObject *)__pyx_n_s__flux));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__flux));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__center));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 28, ((PyObject *)__pyx_n_s__center));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__center));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__point));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 29, ((PyObject *)__pyx_n_s__point));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__point));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__wval));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 30, ((PyObject *)__pyx_n_s__wval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__wval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__temp));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 31, ((PyObject *)__pyx_n_s__temp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__temp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__area));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 32, ((PyObject *)__pyx_n_s__area));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__area));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 33, ((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cell_pos));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 34, ((PyObject *)__pyx_n_s__cell_pos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cell_pos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fv));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 35, ((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fv));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idds));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 36, ((PyObject *)__pyx_n_s__idds));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idds));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__normal));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 37, ((PyObject *)__pyx_n_s__normal));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__normal));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41));
  __pyx_k_codeobj_42 = (PyObject*)__Pyx_PyCode_New(9, 0, 38, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_21, __pyx_n_s_43, 1053, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__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_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __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_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) {__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;};
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initVolumeIntegrator(void); /*proto*/
PyMODINIT_FUNC initVolumeIntegrator(void)
#else
PyMODINIT_FUNC PyInit_VolumeIntegrator(void); /*proto*/
PyMODINIT_FUNC PyInit_VolumeIntegrator(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_VolumeIntegrator(void)", 0);
  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __Pyx_CyFunction_USED
  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("VolumeIntegrator"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_18), 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_module_is_main_yt__utilities__lib__VolumeIntegrator) {
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "star_kdtree_container", (PyObject *)&__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container = &__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_star_kdtree_container;
  __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane = &__pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane.get_start_stop = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *, __pyx_t_5numpy_float64_t *, int *))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_get_start_stop;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane.copy_into = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, int, int, int, int *))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_copy_into;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane.copy_back = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, int, int, int, int *))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_11VectorPlane_copy_back;
  if (PyType_Ready(&__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane.tp_dict, __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "VectorPlane", (PyObject *)&__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane = &__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane;
  __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy = &__pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy.eval_transfer = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_21TransferFunctionProxy_eval_transfer;
  if (PyType_Ready(&__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy.tp_dict, __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "TransferFunctionProxy", (PyObject *)&__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy = &__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy;
  __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid = &__pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid.calculate_extent = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_VectorPlane *, __pyx_t_5numpy_float64_t *))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_calculate_extent;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid.integrate_ray = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *, struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_integrate_ray *__pyx_optional_args))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_integrate_ray;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid.sample_values = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, int *, __pyx_t_5numpy_float64_t *, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_sample_values;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid.add_stars = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *, struct kdres *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_add_stars;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid.get_vector_field = (void (*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_15PartitionedGrid_get_vector_field;
  if (PyType_Ready(&__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid.tp_dict, __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "PartitionedGrid", (PyObject *)&__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid = &__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid;
  __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_GridFace = &__pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_GridFace;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_GridFace.proj_overlap = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_GridFace *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_8GridFace_proj_overlap;
  if (PyType_Ready(&__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_GridFace) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_GridFace.tp_dict, __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_GridFace) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "GridFace", (PyObject *)&__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_GridFace) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_GridFace = &__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_GridFace;
  __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism = &__pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism.split = (PyObject *(*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism *, __pyx_t_5numpy_float64_t *, int))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_10ProtoPrism_split;
  if (PyType_Ready(&__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism.tp_dict, __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "ProtoPrism", (PyObject *)&__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism = &__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_ProtoPrism;
  __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource = &__pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource.integrate_ray = (__pyx_t_5numpy_float64_t (*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_TransferFunctionProxy *))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_integrate_ray;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource.send_ray_home = (PyObject *(*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *, PyArrayObject *, PyArrayObject *, int *, __pyx_t_5numpy_float64_t, struct __pyx_opt_args_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_send_ray_home *__pyx_optional_args))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_send_ray_home;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource.append_to_packets = (PyObject *(*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *, int, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_append_to_packets;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource.find_neighbors = (int *(*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *, int, __pyx_t_5numpy_float64_t, PyArrayObject *, PyArrayObject *))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_find_neighbors;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource.intersects = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *, struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_PartitionedGrid *))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_intersects;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource.find_owner = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket *, int *, PyArrayObject *, PyArrayObject *))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_find_owner;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource.get_domega = (__pyx_t_5numpy_float64_t (*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_get_domega;
  __pyx_vtable_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource.refine_ray = (int (*)(struct __pyx_obj_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource *, struct __pyx_t_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRayPacket **, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *))__pyx_f_2yt_9utilities_3lib_16VolumeIntegrator_17AdaptiveRaySource_refine_ray;
  if (PyType_Ready(&__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource.tp_dict, __pyx_vtabptr_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "AdaptiveRaySource", (PyObject *)&__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource = &__pyx_type_2yt_9utilities_3lib_16VolumeIntegrator_AdaptiveRaySource;
  /*--- Type import code ---*/
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
  #if CYTHON_COMPILING_IN_PYPY
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "yt/utilities/lib/VolumeIntegrator.pyx":26
 * """
 * 
 * import numpy as np             # <<<<<<<<<<<<<<
 * cimport numpy as np
 * cimport cython
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":157
 * #cdef extern int **tri_table
 * 
 * def hp_pix2vec_nest(long nside, long ipix):             # <<<<<<<<<<<<<<
 *     cdef double v[3]
 *     healpix_interface.pix2vec_nest(nside, ipix, v)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_1hp_pix2vec_nest, NULL, __pyx_n_s_22); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__hp_pix2vec_nest, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":166
 *     return tr
 * 
 * def arr_pix2vec_nest(long nside,             # <<<<<<<<<<<<<<
 *                      np.ndarray[np.int64_t, ndim=1] aipix):
 *     cdef int n = aipix.shape[0]
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_3arr_pix2vec_nest, NULL, __pyx_n_s_22); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__arr_pix2vec_nest, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":181
 *     return tr
 * 
 * def hp_vec2pix_nest(long nside, double x, double y, double z):             # <<<<<<<<<<<<<<
 *     cdef double v[3]
 *     v[0] = x
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_5hp_vec2pix_nest, NULL, __pyx_n_s_22); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__hp_vec2pix_nest, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":190
 *     return ipix
 * 
 * def arr_vec2pix_nest(long nside,             # <<<<<<<<<<<<<<
 *                      np.ndarray[np.float64_t, ndim=1] x,
 *                      np.ndarray[np.float64_t, ndim=1] y,
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_7arr_vec2pix_nest, NULL, __pyx_n_s_22); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__arr_vec2pix_nest, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":207
 *     return tr
 * 
 * def hp_pix2ang_nest(long nside, long ipnest):             # <<<<<<<<<<<<<<
 *     cdef double theta, phi
 *     healpix_interface.pix2ang_nest(nside, ipnest, &theta, &phi)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_9hp_pix2ang_nest, NULL, __pyx_n_s_22); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__hp_pix2ang_nest, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":212
 *     return (theta, phi)
 * 
 * def arr_pix2ang_nest(long nside, np.ndarray[np.int64_t, ndim=1] aipnest):             # <<<<<<<<<<<<<<
 *     cdef int n = aipnest.shape[0]
 *     cdef int i
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_11arr_pix2ang_nest, NULL, __pyx_n_s_22); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__arr_pix2ang_nest, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":225
 *     return tr
 * 
 * def hp_ang2pix_nest(long nside, double theta, double phi):             # <<<<<<<<<<<<<<
 *     cdef long ipix
 *     healpix_interface.ang2pix_nest(nside, theta, phi, &ipix)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_13hp_ang2pix_nest, NULL, __pyx_n_s_22); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__hp_ang2pix_nest, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":230
 *     return ipix
 * 
 * def arr_ang2pix_nest(long nside,             # <<<<<<<<<<<<<<
 *                      np.ndarray[np.float64_t, ndim=1] atheta,
 *                      np.ndarray[np.float64_t, ndim=1] aphi):
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_15arr_ang2pix_nest, NULL, __pyx_n_s_22); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__arr_ang2pix_nest, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":245
 *     return tr
 * 
 * def arr_fisheye_vectors(int resolution, np.float64_t fov, int nimx=1, int             # <<<<<<<<<<<<<<
 *         nimy=1, int nimi=0, int nimj=0, np.float64_t off_theta=0.0, np.float64_t
 *         off_phi=0.0):
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_17arr_fisheye_vectors, NULL, __pyx_n_s_22); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__arr_fisheye_vectors, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":651
 *                                  TransferFunctionProxy tf,
 *                                  np.float64_t *return_t = NULL,
 *                                  np.float64_t enter_t = -1.0):             # <<<<<<<<<<<<<<
 *         cdef int cur_ind[3], step[3], x, y, i, n, flat_ind, hit, direction
 *         cdef np.float64_t intersect_t = 1.0
 */
  __pyx_k_3 = (-1.0);

  /* "yt/utilities/lib/VolumeIntegrator.pyx":972
 * @cython.wraparound(False)
 * @cython.cdivision(True)
 * def march_cubes_grid(np.float64_t isovalue,             # <<<<<<<<<<<<<<
 *                      np.ndarray[np.float64_t, ndim=3] values,
 *                      np.ndarray[np.int32_t, ndim=3] mask,
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_19march_cubes_grid, NULL, __pyx_n_s_22); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__march_cubes_grid, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1053
 * @cython.wraparound(False)
 * @cython.cdivision(True)
 * def march_cubes_grid_flux(             # <<<<<<<<<<<<<<
 *                      np.float64_t isovalue,
 *                      np.ndarray[np.float64_t, ndim=3] values,
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_2yt_9utilities_3lib_16VolumeIntegrator_21march_cubes_grid_flux, NULL, __pyx_n_s_22); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_43, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "yt/utilities/lib/VolumeIntegrator.pyx":1
 * """             # <<<<<<<<<<<<<<
 * Simple integrators for the radiative transfer equation
 * 
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

  /* "numpy.pxd":975
 *      arr.base = baseptr
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     if arr.base is NULL:
 *         return None
 */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  if (__pyx_m) {
    __Pyx_AddTraceback("init yt.utilities.lib.VolumeIntegrator", __pyx_clineno, __pyx_lineno, __pyx_filename);
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init yt.utilities.lib.VolumeIntegrator");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* Runtime support code */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result) {
        if (dict != __pyx_b) {
            PyErr_Clear();
            result = PyObject_GetAttr(__pyx_b, name);
        }
        if (!result) {
            PyErr_SetObject(PyExc_NameError, name);
        }
    }
    return result;
}

static CYTHON_INLINE int __Pyx_IsLittleEndian(void) {
  unsigned int n = 1;
  return *(unsigned char*)(&n) != 0;
}
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              __Pyx_TypeInfo* type) {
  stack[0].field = &ctx->root;
  stack[0].parent_offset = 0;
  ctx->root.type = type;
  ctx->root.name = "buffer dtype";
  ctx->root.offset = 0;
  ctx->head = stack;
  ctx->head->field = &ctx->root;
  ctx->fmt_offset = 0;
  ctx->head->parent_offset = 0;
  ctx->new_packmode = '@';
  ctx->enc_packmode = '@';
  ctx->new_count = 1;
  ctx->enc_count = 0;
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  ctx->is_valid_array = 0;
  ctx->struct_alignment = 0;
  while (type->typegroup == 'S') {
    ++ctx->head;
    ctx->head->field = type->fields;
    ctx->head->parent_offset = 0;
    type = type->fields->type;
  }
}
static int __Pyx_BufFmt_ParseNumber(const char** ts) {
    int count;
    const char* t = *ts;
    if (*t < '0' || *t > '9') {
      return -1;
    } else {
        count = *t++ - '0';
        while (*t >= '0' && *t < '9') {
            count *= 10;
            count += *t++ - '0';
        }
    }
    *ts = t;
    return count;
}
static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
    int number = __Pyx_BufFmt_ParseNumber(ts);
    if (number == -1) /* First char was not a digit */
        PyErr_Format(PyExc_ValueError,\
                     "Does not understand character buffer dtype format string ('%c')", **ts);
    return number;
}
static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
  PyErr_Format(PyExc_ValueError,
               "Unexpected format string character: '%c'", ch);
}
static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
  switch (ch) {
    case 'c': return "'char'";
    case 'b': return "'signed char'";
    case 'B': return "'unsigned char'";
    case 'h': return "'short'";
    case 'H': return "'unsigned short'";
    case 'i': return "'int'";
    case 'I': return "'unsigned int'";
    case 'l': return "'long'";
    case 'L': return "'unsigned long'";
    case 'q': return "'long long'";
    case 'Q': return "'unsigned long long'";
    case 'f': return (is_complex ? "'complex float'" : "'float'");
    case 'd': return (is_complex ? "'complex double'" : "'double'");
    case 'g': return (is_complex ? "'complex long double'" : "'long double'");
    case 'T': return "a struct";
    case 'O': return "Python object";
    case 'P': return "a pointer";
    case 's': case 'p': return "a string";
    case 0: return "end";
    default: return "unparseable format string";
  }
}
static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return 2;
    case 'i': case 'I': case 'l': case 'L': return 4;
    case 'q': case 'Q': return 8;
    case 'f': return (is_complex ? 8 : 4);
    case 'd': return (is_complex ? 16 : 8);
    case 'g': {
      PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
      return 0;
    }
    case 'O': case 'P': return sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
  switch (ch) {
    case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(short);
    case 'i': case 'I': return sizeof(int);
    case 'l': case 'L': return sizeof(long);
    #ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(PY_LONG_LONG);
    #endif
    case 'f': return sizeof(float) * (is_complex ? 2 : 1);
    case 'd': return sizeof(double) * (is_complex ? 2 : 1);
    case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
    case 'O': case 'P': return sizeof(void*);
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
typedef struct { char c; short x; } __Pyx_st_short;
typedef struct { char c; int x; } __Pyx_st_int;
typedef struct { char c; long x; } __Pyx_st_long;
typedef struct { char c; float x; } __Pyx_st_float;
typedef struct { char c; double x; } __Pyx_st_double;
typedef struct { char c; long double x; } __Pyx_st_longdouble;
typedef struct { char c; void *x; } __Pyx_st_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
/* These are for computing the padding at the end of the struct to align
   on the first member of the struct. This will probably the same as above,
   but we don't have any guarantees.
 */
typedef struct { short x; char c; } __Pyx_pad_short;
typedef struct { int x; char c; } __Pyx_pad_int;
typedef struct { long x; char c; } __Pyx_pad_long;
typedef struct { float x; char c; } __Pyx_pad_float;
typedef struct { double x; char c; } __Pyx_pad_double;
typedef struct { long double x; char c; } __Pyx_pad_longdouble;
typedef struct { void *x; char c; } __Pyx_pad_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
  switch (ch) {
    case 'c':
        return 'H';
    case 'b': case 'h': case 'i':
    case 'l': case 'q': case 's': case 'p':
        return 'I';
    case 'B': case 'H': case 'I': case 'L': case 'Q':
        return 'U';
    case 'f': case 'd': case 'g':
        return (is_complex ? 'C' : 'R');
    case 'O':
        return 'O';
    case 'P':
        return 'P';
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
  if (ctx->head == NULL || ctx->head->field == &ctx->root) {
    const char* expected;
    const char* quote;
    if (ctx->head == NULL) {
      expected = "end";
      quote = "";
    } else {
      expected = ctx->head->field->type->name;
      quote = "'";
    }
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected %s%s%s but got %s",
                 quote, expected, quote,
                 __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
  } else {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_StructField* parent = (ctx->head - 1)->field;
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
                 field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
                 parent->type->name, field->name);
  }
}
static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
  char group;
  size_t size, offset, arraysize = 1;
  if (ctx->enc_type == 0) return 0;
  if (ctx->head->field->type->arraysize[0]) {
    int i, ndim = 0;
    if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
        ctx->is_valid_array = ctx->head->field->type->ndim == 1;
        ndim = 1;
        if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
            PyErr_Format(PyExc_ValueError,
                         "Expected a dimension of size %zu, got %zu",
                         ctx->head->field->type->arraysize[0], ctx->enc_count);
            return -1;
        }
    }
    if (!ctx->is_valid_array) {
      PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
                   ctx->head->field->type->ndim, ndim);
      return -1;
    }
    for (i = 0; i < ctx->head->field->type->ndim; i++) {
      arraysize *= ctx->head->field->type->arraysize[i];
    }
    ctx->is_valid_array = 0;
    ctx->enc_count = 1;
  }
  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
  do {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_TypeInfo* type = field->type;
    if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
      size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
    } else {
      size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
    }
    if (ctx->enc_packmode == '@') {
      size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
      size_t align_mod_offset;
      if (align_at == 0) return -1;
      align_mod_offset = ctx->fmt_offset % align_at;
      if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
      if (ctx->struct_alignment == 0)
          ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
                                                                 ctx->is_complex);
    }
    if (type->size != size || type->typegroup != group) {
      if (type->typegroup == 'C' && type->fields != NULL) {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        ++ctx->head;
        ctx->head->field = type->fields;
        ctx->head->parent_offset = parent_offset;
        continue;
      }
      if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
      } else {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
      }
    }
    offset = ctx->head->parent_offset + field->offset;
    if (ctx->fmt_offset != offset) {
      PyErr_Format(PyExc_ValueError,
                   "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
                   (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
      return -1;
    }
    ctx->fmt_offset += size;
    if (arraysize)
      ctx->fmt_offset += (arraysize - 1) * size;
    --ctx->enc_count; /* Consume from buffer string */
    while (1) {
      if (field == &ctx->root) {
        ctx->head = NULL;
        if (ctx->enc_count != 0) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
        }
        break; /* breaks both loops as ctx->enc_count == 0 */
      }
      ctx->head->field = ++field;
      if (field->type == NULL) {
        --ctx->head;
        field = ctx->head->field;
        continue;
      } else if (field->type->typegroup == 'S') {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        if (field->type->fields->type == NULL) continue; /* empty struct */
        field = field->type->fields;
        ++ctx->head;
        ctx->head->field = field;
        ctx->head->parent_offset = parent_offset;
        break;
      } else {
        break;
      }
    }
  } while (ctx->enc_count);
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  return 0;
}
static CYTHON_INLINE PyObject *
__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
{
    const char *ts = *tsp;
    int i = 0, number;
    int ndim = ctx->head->field->type->ndim;
;
    ++ts;
    if (ctx->new_count != 1) {
        PyErr_SetString(PyExc_ValueError,
                        "Cannot handle repeated arrays in format string");
        return NULL;
    }
    if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
    while (*ts && *ts != ')') {
        if (isspace(*ts))
            continue;
        number = __Pyx_BufFmt_ExpectNumber(&ts);
        if (number == -1) return NULL;
        if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
            return PyErr_Format(PyExc_ValueError,
                        "Expected a dimension of size %zu, got %d",
                        ctx->head->field->type->arraysize[i], number);
        if (*ts != ',' && *ts != ')')
            return PyErr_Format(PyExc_ValueError,
                                "Expected a comma in format string, got '%c'", *ts);
        if (*ts == ',') ts++;
        i++;
    }
    if (i != ndim)
        return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
                            ctx->head->field->type->ndim, i);
    if (!*ts) {
        PyErr_SetString(PyExc_ValueError,
                        "Unexpected end of format string, expected ')'");
        return NULL;
    }
    ctx->is_valid_array = 1;
    ctx->new_count = 1;
    *tsp = ++ts;
    return Py_None;
}
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
  int got_Z = 0;
  while (1) {
    switch(*ts) {
      case 0:
        if (ctx->enc_type != 0 && ctx->head == NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        if (ctx->head != NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
                return ts;
      case ' ':
      case 10:
      case 13:
        ++ts;
        break;
      case '<':
        if (!__Pyx_IsLittleEndian()) {
          PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '>':
      case '!':
        if (__Pyx_IsLittleEndian()) {
          PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '=':
      case '@':
      case '^':
        ctx->new_packmode = *ts++;
        break;
      case 'T': /* substruct */
        {
          const char* ts_after_sub;
          size_t i, struct_count = ctx->new_count;
          size_t struct_alignment = ctx->struct_alignment;
          ctx->new_count = 1;
          ++ts;
          if (*ts != '{') {
            PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
            return NULL;
          }
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0; /* Erase processed last struct element */
          ctx->enc_count = 0;
          ctx->struct_alignment = 0;
          ++ts;
          ts_after_sub = ts;
          for (i = 0; i != struct_count; ++i) {
            ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
            if (!ts_after_sub) return NULL;
          }
          ts = ts_after_sub;
          if (struct_alignment) ctx->struct_alignment = struct_alignment;
        }
        break;
      case '}': /* end of substruct; either repeat or move on */
        {
          size_t alignment = ctx->struct_alignment;
          ++ts;
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0; /* Erase processed last struct element */
          if (alignment && ctx->fmt_offset % alignment) {
            ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
          }
        }
        return ts;
      case 'x':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->fmt_offset += ctx->new_count;
        ctx->new_count = 1;
        ctx->enc_count = 0;
        ctx->enc_type = 0;
        ctx->enc_packmode = ctx->new_packmode;
        ++ts;
        break;
      case 'Z':
        got_Z = 1;
        ++ts;
        if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
          __Pyx_BufFmt_RaiseUnexpectedChar('Z');
          return NULL;
        }        /* fall through */
      case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
      case 'l': case 'L': case 'q': case 'Q':
      case 'f': case 'd': case 'g':
      case 'O': case 's': case 'p':
        if (ctx->enc_type == *ts && got_Z == ctx->is_complex &&
            ctx->enc_packmode == ctx->new_packmode) {
          ctx->enc_count += ctx->new_count;
        } else {
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_count = ctx->new_count;
          ctx->enc_packmode = ctx->new_packmode;
          ctx->enc_type = *ts;
          ctx->is_complex = got_Z;
        }
        ++ts;
        ctx->new_count = 1;
        got_Z = 0;
        break;
      case ':':
        ++ts;
        while(*ts != ':') ++ts;
        ++ts;
        break;
      case '(':
        if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
        break;
      default:
        {
          int number = __Pyx_BufFmt_ExpectNumber(&ts);
          if (number == -1) return NULL;
          ctx->new_count = (size_t)number;
        }
    }
  }
}
static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) {
  buf->buf = NULL;
  buf->obj = NULL;
  buf->strides = __Pyx_zeros;
  buf->shape = __Pyx_zeros;
  buf->suboffsets = __Pyx_minusones;
}
static CYTHON_INLINE int __Pyx_GetBufferAndValidate(
        Py_buffer* buf, PyObject* obj,  __Pyx_TypeInfo* dtype, int flags,
        int nd, int cast, __Pyx_BufFmt_StackElem* stack)
{
  if (obj == Py_None || obj == NULL) {
    __Pyx_ZeroBuffer(buf);
    return 0;
  }
  buf->buf = NULL;
  if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail;
  if (buf->ndim != nd) {
    PyErr_Format(PyExc_ValueError,
                 "Buffer has wrong number of dimensions (expected %d, got %d)",
                 nd, buf->ndim);
    goto fail;
  }
  if (!cast) {
    __Pyx_BufFmt_Context ctx;
    __Pyx_BufFmt_Init(&ctx, stack, dtype);
    if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
  }
  if ((unsigned)buf->itemsize != dtype->size) {
    PyErr_Format(PyExc_ValueError,
      "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)",
      buf->itemsize, (buf->itemsize > 1) ? "s" : "",
      dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
    goto fail;
  }
  if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;
  return 0;
fail:;
  __Pyx_ZeroBuffer(buf);
  return -1;
}
static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
  if (info->buf == NULL) return;
  if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
  __Pyx_ReleaseBuffer(info);
}

static void __Pyx_RaiseBufferIndexError(int axis) {
  PyErr_Format(PyExc_IndexError,
     "Out of bounds on buffer access (axis %d)", axis);
}

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_Restore(type, value, tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(type, value, tb);
#endif
}

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(PyObject_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (!type) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (Py_TYPE(obj) == type) return 1;
    }
    else {
        if (PyObject_TypeCheck(obj, type)) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%s' has incorrect type (expected %s, got %s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

static CYTHON_INLINE int __Pyx_div_int(int a, int b) {
    int q = a / b;
    int r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

static void __Pyx_RaiseBufferFallbackError(void) {
  PyErr_Format(PyExc_ValueError,
     "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!");
}

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CPYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
    long q = a / b;
    long r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

static CYTHON_INLINE long __Pyx_mod_long(long a, long b) {
    long r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack",
                 index, (index == 1) ? "" : "s");
}

static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_COMPILING_IN_CPYTHON
    PyThreadState *tstate = PyThreadState_GET();
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    #if PY_VERSION_HEX < 0x02050000
    if (PyClass_Check(type)) {
    #else
    if (PyType_Check(type)) {
    #endif
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        #if PY_VERSION_HEX < 0x02050000
            if (PyInstance_Check(type)) {
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
                Py_INCREF(type);
            }
            else {
                type = 0;
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception must be an old-style class or instance");
                goto raise_error;
            }
        #else
            type = (PyObject*) Py_TYPE(type);
            Py_INCREF(type);
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception class must be a subclass of BaseException");
                goto raise_error;
            }
        #endif
    }
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else /* Python 3+ */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *args;
        if (!value)
            args = PyTuple_New(0);
        else if (PyTuple_Check(value)) {
            Py_INCREF(value);
            args = value;
        }
        else
            args = PyTuple_Pack(1, value);
        if (!args)
            goto bad;
        owned_instance = PyEval_CallObject(type, args);
        Py_DECREF(args);
        if (!owned_instance)
            goto bad;
        value = owned_instance;
        if (!PyExceptionInstance_Check(value)) {
            PyErr_Format(PyExc_TypeError,
                         "calling %R should have returned an instance of "
                         "BaseException, not %R",
                         type, Py_TYPE(value));
            goto bad;
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause && cause != Py_None) {
        PyObject *fixed_cause;
        if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        }
        else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        }
        else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

#if PY_MAJOR_VERSION < 3
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
    CYTHON_UNUSED PyObject *getbuffer_cobj;
  #if PY_VERSION_HEX >= 0x02060000
    if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
  #endif
        if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags);
  #if PY_VERSION_HEX < 0x02060000
    if (obj->ob_type->tp_dict &&
        (getbuffer_cobj = PyMapping_GetItemString(obj->ob_type->tp_dict,
                                             "__pyx_getbuffer"))) {
        getbufferproc func;
      #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 0)
        func = (getbufferproc) PyCapsule_GetPointer(getbuffer_cobj, "getbuffer(obj, view, flags)");
      #else
        func = (getbufferproc) PyCObject_AsVoidPtr(getbuffer_cobj);
      #endif
        Py_DECREF(getbuffer_cobj);
        if (!func)
            goto fail;
        return func(obj, view, flags);
    } else {
        PyErr_Clear();
    }
  #endif
    PyErr_Format(PyExc_TypeError, "'%100s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
#if PY_VERSION_HEX < 0x02060000
fail:
#endif
    return -1;
}
static void __Pyx_ReleaseBuffer(Py_buffer *view) {
    PyObject *obj = view->obj;
    CYTHON_UNUSED PyObject *releasebuffer_cobj;
    if (!obj) return;
  #if PY_VERSION_HEX >= 0x02060000
    if (PyObject_CheckBuffer(obj)) {
        PyBuffer_Release(view);
        return;
    }
  #endif
        if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) { __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); return; }
  #if PY_VERSION_HEX < 0x02060000
    if (obj->ob_type->tp_dict &&
        (releasebuffer_cobj = PyMapping_GetItemString(obj->ob_type->tp_dict,
                                                      "__pyx_releasebuffer"))) {
        releasebufferproc func;
      #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 0)
        func = (releasebufferproc) PyCapsule_GetPointer(releasebuffer_cobj, "releasebuffer(obj, view)");
      #else
        func = (releasebufferproc) PyCObject_AsVoidPtr(releasebuffer_cobj);
      #endif
        Py_DECREF(releasebuffer_cobj);
        if (!func)
            goto fail;
        func(obj, view);
        return;
    } else {
        PyErr_Clear();
    }
  #endif
    goto nofail;
#if PY_VERSION_HEX < 0x02060000
fail:
#endif
    PyErr_WriteUnraisable(obj);
nofail:
    Py_DECREF(obj);
    view->obj = NULL;
}
#endif /*  PY_MAJOR_VERSION < 3 */


    static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
    PyObject *py_import = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
    if (!py_import)
        goto bad;
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    #if PY_VERSION_HEX >= 0x02050000
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.')) {
                /* try package relative import first */
                PyObject *py_level = PyInt_FromLong(1);
                if (!py_level)
                    goto bad;
                module = PyObject_CallFunctionObjArgs(py_import,
                    name, global_dict, empty_dict, list, py_level, NULL);
                Py_DECREF(py_level);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0; /* try absolute import on failure */
        }
        #endif
        if (!module) {
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, NULL);
            Py_DECREF(py_level);
        }
    }
    #else
    if (level>0) {
        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
        goto bad;
    }
    module = PyObject_CallFunctionObjArgs(py_import,
        name, global_dict, empty_dict, list, NULL);
    #endif
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(py_import);
    Py_XDECREF(empty_dict);
    return module;
}

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_Py_intptr_t(Py_intptr_t val) {
    const Py_intptr_t neg_one = (Py_intptr_t)-1, const_zero = (Py_intptr_t)0;
    const int is_unsigned = const_zero < neg_one;
    if ((sizeof(Py_intptr_t) == sizeof(char))  ||
        (sizeof(Py_intptr_t) == sizeof(short))) {
        return PyInt_FromLong((long)val);
    } else if ((sizeof(Py_intptr_t) == sizeof(int)) ||
               (sizeof(Py_intptr_t) == sizeof(long))) {
        if (is_unsigned)
            return PyLong_FromUnsignedLong((unsigned long)val);
        else
            return PyInt_FromLong((long)val);
    } else if (sizeof(Py_intptr_t) == sizeof(PY_LONG_LONG)) {
        if (is_unsigned)
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
        else
            return PyLong_FromLongLong((PY_LONG_LONG)val);
    } else {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        return _PyLong_FromByteArray(bytes, sizeof(Py_intptr_t),
                                     little, !is_unsigned);
    }
}

#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
static PyObject *__Pyx_GetStdout(void) {
    PyObject *f = PySys_GetObject((char *)"stdout");
    if (!f) {
        PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
    }
    return f;
}
static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
    int i;
    if (!f) {
        if (!(f = __Pyx_GetStdout()))
            return -1;
    }
    Py_INCREF(f);
    for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
        PyObject* v;
        if (PyFile_SoftSpace(f, 1)) {
            if (PyFile_WriteString(" ", f) < 0)
                goto error;
        }
        v = PyTuple_GET_ITEM(arg_tuple, i);
        if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
            goto error;
        if (PyString_Check(v)) {
            char *s = PyString_AsString(v);
            Py_ssize_t len = PyString_Size(v);
            if (len > 0 &&
                isspace(Py_CHARMASK(s[len-1])) &&
                s[len-1] != ' ')
                    PyFile_SoftSpace(f, 0);
        }
    }
    if (newline) {
        if (PyFile_WriteString("\n", f) < 0)
            goto error;
        PyFile_SoftSpace(f, 0);
    }
    Py_DECREF(f);
    return 0;
error:
    Py_DECREF(f);
    return -1;
}
#else /* Python 3 has a print function */
static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
    PyObject* kwargs = 0;
    PyObject* result = 0;
    PyObject* end_string;
    if (unlikely(!__pyx_print)) {
        __pyx_print = __Pyx_GetAttrString(__pyx_b, "print");
        if (!__pyx_print)
            return -1;
    }
    if (stream) {
        kwargs = PyDict_New();
        if (unlikely(!kwargs))
            return -1;
        if (unlikely(PyDict_SetItemString(kwargs, "file", stream) < 0))
            goto bad;
        if (!newline) {
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                goto bad;
            if (PyDict_SetItemString(kwargs, "end", end_string) < 0) {
                Py_DECREF(end_string);
                goto bad;
            }
            Py_DECREF(end_string);
        }
    } else if (!newline) {
        if (unlikely(!__pyx_print_kwargs)) {
            __pyx_print_kwargs = PyDict_New();
            if (unlikely(!__pyx_print_kwargs))
                return -1;
            end_string = PyUnicode_FromStringAndSize(" ", 1);
            if (unlikely(!end_string))
                return -1;
            if (PyDict_SetItemString(__pyx_print_kwargs, "end", end_string) < 0) {
                Py_DECREF(end_string);
                return -1;
            }
            Py_DECREF(end_string);
        }
        kwargs = __pyx_print_kwargs;
    }
    result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
    if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
        Py_DECREF(kwargs);
    if (!result)
        return -1;
    Py_DECREF(result);
    return 0;
bad:
    if (kwargs != __pyx_print_kwargs)
        Py_XDECREF(kwargs);
    return -1;
}
#endif

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return ::std::complex< float >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return x + y*(__pyx_t_float_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      __pyx_t_float_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

#if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        float denom = b.real * b.real + b.imag * b.imag;
        z.real = (a.real * b.real + a.imag * b.imag) / denom;
        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrtf(z.real*z.real + z.imag*z.imag);
          #else
            return hypotf(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
            __pyx_t_float_complex z;
            float r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    float denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        z = __Pyx_c_prodf(a, a);
                        return __Pyx_c_prodf(a, a);
                    case 3:
                        z = __Pyx_c_prodf(a, a);
                        return __Pyx_c_prodf(z, a);
                    case 4:
                        z = __Pyx_c_prodf(a, a);
                        return __Pyx_c_prodf(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                }
                r = a.real;
                theta = 0;
            } else {
                r = __Pyx_c_absf(a);
                theta = atan2f(a.imag, a.real);
            }
            lnr = logf(r);
            z_r = expf(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cosf(z_theta);
            z.imag = z_r * sinf(z_theta);
            return z;
        }
    #endif
#endif

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return ::std::complex< double >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return x + y*(__pyx_t_double_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      __pyx_t_double_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

#if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        double denom = b.real * b.real + b.imag * b.imag;
        z.real = (a.real * b.real + a.imag * b.imag) / denom;
        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrt(z.real*z.real + z.imag*z.imag);
          #else
            return hypot(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex a, __pyx_t_double_complex b) {
            __pyx_t_double_complex z;
            double r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    double denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        z = __Pyx_c_prod(a, a);
                        return __Pyx_c_prod(a, a);
                    case 3:
                        z = __Pyx_c_prod(a, a);
                        return __Pyx_c_prod(z, a);
                    case 4:
                        z = __Pyx_c_prod(a, a);
                        return __Pyx_c_prod(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                }
                r = a.real;
                theta = 0;
            } else {
                r = __Pyx_c_abs(a);
                theta = atan2(a.imag, a.real);
            }
            lnr = log(r);
            z_r = exp(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cos(z_theta);
            z.imag = z_r * sin(z_theta);
            return z;
        }
    #endif
#endif

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned char" :
                    "value too large to convert to unsigned char");
            }
            return (unsigned char)-1;
        }
        return (unsigned char)val;
    }
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned short" :
                    "value too large to convert to unsigned short");
            }
            return (unsigned short)-1;
        }
        return (unsigned short)val;
    }
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned int" :
                    "value too large to convert to unsigned int");
            }
            return (unsigned int)-1;
        }
        return (unsigned int)val;
    }
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
    const char neg_one = (char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to char" :
                    "value too large to convert to char");
            }
            return (char)-1;
        }
        return (char)val;
    }
    return (char)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
    const short neg_one = (short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to short" :
                    "value too large to convert to short");
            }
            return (short)-1;
        }
        return (short)val;
    }
    return (short)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
    const signed char neg_one = (signed char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed char" :
                    "value too large to convert to signed char");
            }
            return (signed char)-1;
        }
        return (signed char)val;
    }
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
    const signed short neg_one = (signed short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed short" :
                    "value too large to convert to signed short");
            }
            return (signed short)-1;
        }
        return (signed short)val;
    }
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
    const signed int neg_one = (signed int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed int" :
                    "value too large to convert to signed int");
            }
            return (signed int)-1;
        }
        return (signed int)val;
    }
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned long");
            return (unsigned long)-1;
        }
        return (unsigned long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned long");
                return (unsigned long)-1;
            }
            return (unsigned long)PyLong_AsUnsignedLong(x);
        } else {
            return (unsigned long)PyLong_AsLong(x);
        }
    } else {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned long)-1;
        val = __Pyx_PyInt_AsUnsignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned PY_LONG_LONG");
            return (unsigned PY_LONG_LONG)-1;
        }
        return (unsigned PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned PY_LONG_LONG");
                return (unsigned PY_LONG_LONG)-1;
            }
            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
    const long neg_one = (long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to long");
            return (long)-1;
        }
        return (long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long)-1;
            }
            return (long)PyLong_AsUnsignedLong(x);
        } else {
            return (long)PyLong_AsLong(x);
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long)-1;
        val = __Pyx_PyInt_AsLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to PY_LONG_LONG");
            return (PY_LONG_LONG)-1;
        }
        return (PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to PY_LONG_LONG");
                return (PY_LONG_LONG)-1;
            }
            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
    const signed long neg_one = (signed long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed long");
            return (signed long)-1;
        }
        return (signed long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed long");
                return (signed long)-1;
            }
            return (signed long)PyLong_AsUnsignedLong(x);
        } else {
            return (signed long)PyLong_AsLong(x);
        }
    } else {
        signed long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed long)-1;
        val = __Pyx_PyInt_AsSignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed PY_LONG_LONG");
            return (signed PY_LONG_LONG)-1;
        }
        return (signed PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed PY_LONG_LONG");
                return (signed PY_LONG_LONG)-1;
            }
            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        signed PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsSignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
}

static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        #if PY_VERSION_HEX < 0x02050000
        return PyErr_Warn(NULL, message);
        #else
        return PyErr_WarnEx(NULL, message, 1);
        #endif
    }
    return 0;
}

static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

#ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;
    py_name = __Pyx_PyIdentifier_FromString(name);
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    size_t size, int strict)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;
    char warning[200];
    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    py_name = __Pyx_PyIdentifier_FromString(class_name);
    if (!py_name)
        goto bad;
    result = PyObject_GetAttr(py_module, py_name);
    Py_DECREF(py_name);
    py_name = 0;
    Py_DECREF(py_module);
    py_module = 0;
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%s.%s is not a type object",
            module_name, class_name);
        goto bad;
    }
    if (!strict && (size_t)((PyTypeObject *)result)->tp_basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility",
            module_name, class_name);
        #if PY_VERSION_HEX < 0x02050000
        if (PyErr_Warn(NULL, warning) < 0) goto bad;
        #else
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
        #endif
    }
    else if ((size_t)((PyTypeObject *)result)->tp_basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%s.%s has the wrong size, try recompiling",
            module_name, class_name);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return NULL;
}
#endif

static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = (start + end) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_code = __Pyx_PyCode_New(
        0,            /*int argcount,*/
        0,            /*int kwonlyargcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,      /*int firstlineno,*/
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_globals = 0;
    PyFrameObject *py_frame = 0;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else  /* Python 3+ has unicode identifiers */
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}


/* Type Conversion Functions */

static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}

static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return Py_INCREF(x), x;
  m = Py_TYPE(x)->tp_as_number;
#if PY_VERSION_HEX < 0x03000000
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_VERSION_HEX < 0x03000000
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%s__ returned non-%s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject* x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}

static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
#if PY_VERSION_HEX < 0x02050000
   if (ival <= LONG_MAX)
       return PyInt_FromLong((long)ival);
   else {
       unsigned char *bytes = (unsigned char *) &ival;
       int one = 1; int little = (int)*(unsigned char*)&one;
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
   }
#else
   return PyInt_FromSize_t(ival);
#endif
}

static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
       return (size_t)-1;
   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
       PyErr_SetString(PyExc_OverflowError,
                       "value too large to convert to size_t");
       return (size_t)-1;
   }
   return (size_t)val;
}


#endif /* Py_PYTHON_H */
