[Yt-svn] yt-commit r1804 - in trunk/yt: . _amr_utils
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Thu Jul 29 17:18:36 PDT 2010
Author: mturk
Date: Thu Jul 29 17:18:35 2010
New Revision: 1804
URL: http://yt.enzotools.org/changeset/1804
Log:
Fixed the bug in volume rendering where iv_dir[i] was always the inverse of
v_dir[0].
Modified:
trunk/yt/_amr_utils/VolumeIntegrator.pyx
trunk/yt/amr_utils.c
Modified: trunk/yt/_amr_utils/VolumeIntegrator.pyx
==============================================================================
--- trunk/yt/_amr_utils/VolumeIntegrator.pyx (original)
+++ trunk/yt/_amr_utils/VolumeIntegrator.pyx Thu Jul 29 17:18:35 2010
@@ -415,7 +415,7 @@
step[i] = 1
x = (i+1) % 3
y = (i+2) % 3
- iv_dir[i] = 1.0/v_dir[0]
+ 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])
Modified: trunk/yt/amr_utils.c
==============================================================================
--- trunk/yt/amr_utils.c (original)
+++ trunk/yt/amr_utils.c Thu Jul 29 17:18:35 2010
@@ -1,18 +1,39 @@
-/* Generated by Cython 0.12.1 on Thu Jun 24 08:38:56 2010 */
+/* Generated by Cython 0.13.beta0 on Thu Jul 29 17:18:11 2010 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
-#include "structmember.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#else
-#ifndef PY_LONG_LONG
- #define PY_LONG_LONG LONG_LONG
+#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
+
#if PY_VERSION_HEX < 0x02040000
#define METH_COEXIST 0
#define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
@@ -82,11 +103,35 @@
#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
-#else
+#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
+ #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
#if PY_MAJOR_VERSION >= 3
@@ -103,30 +148,18 @@
#define PyInt_AsSsize_t PyLong_AsSsize_t
#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+#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
#if PY_MAJOR_VERSION >= 3
- #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
-#endif
-
-#if !defined(WIN32) && !defined(MS_WINDOWS)
- #ifndef __stdcall
- #define __stdcall
- #endif
- #ifndef __cdecl
- #define __cdecl
- #endif
- #ifndef __fastcall
- #define __fastcall
- #endif
-#else
- #define _USE_MATH_DEFINES
+ #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif
#if PY_VERSION_HEX < 0x02050000
@@ -146,115 +179,66 @@
#define __Pyx_NAMESTR(n) (n)
#define __Pyx_DOCSTR(n) (n)
#endif
+
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+#define _USE_MATH_DEFINES
+#endif
#include <math.h>
#define __PYX_HAVE_API__yt__amr_utils
-#include "stdlib.h"
#include "stdio.h"
+#include "stdlib.h"
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
#include "math.h"
#include "FixedInterpolator.h"
#include "png.h"
+/* 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)
+# 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 */
-#if PY_MAJOR_VERSION < 3
-#define __Pyx_PyBytes_FromString PyString_FromString
-#define __Pyx_PyBytes_FromStringAndSize PyString_FromStringAndSize
-#define __Pyx_PyBytes_AsString PyString_AsString
-#else
-#define __Pyx_PyBytes_FromString PyBytes_FromString
-#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
-#define __Pyx_PyBytes_AsString PyBytes_AsString
-#endif
-
-#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s)
-#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) __Pyx_PyBytes_AsString(s))
+#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
+#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) PyBytes_AsString(s))
#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);
-#if !defined(T_PYSSIZET)
-#if PY_VERSION_HEX < 0x02050000
-#define T_PYSSIZET T_INT
-#elif !defined(T_LONGLONG)
-#define T_PYSSIZET \
- ((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
- ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1))
-#else
-#define T_PYSSIZET \
- ((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
- ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : \
- ((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))
-#endif
-#endif
-
-
-#if !defined(T_ULONGLONG)
-#define __Pyx_T_UNSIGNED_INT(x) \
- ((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \
- ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
- ((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \
- ((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : -1))))
-#else
-#define __Pyx_T_UNSIGNED_INT(x) \
- ((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \
- ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
- ((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \
- ((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : \
- ((sizeof(x) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))))
-#endif
-#if !defined(T_LONGLONG)
-#define __Pyx_T_SIGNED_INT(x) \
- ((sizeof(x) == sizeof(char)) ? T_BYTE : \
- ((sizeof(x) == sizeof(short)) ? T_SHORT : \
- ((sizeof(x) == sizeof(int)) ? T_INT : \
- ((sizeof(x) == sizeof(long)) ? T_LONG : -1))))
-#else
-#define __Pyx_T_SIGNED_INT(x) \
- ((sizeof(x) == sizeof(char)) ? T_BYTE : \
- ((sizeof(x) == sizeof(short)) ? T_SHORT : \
- ((sizeof(x) == sizeof(int)) ? T_INT : \
- ((sizeof(x) == sizeof(long)) ? T_LONG : \
- ((sizeof(x) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))))
-#endif
-
-#define __Pyx_T_FLOATING(x) \
- ((sizeof(x) == sizeof(float)) ? T_FLOAT : \
- ((sizeof(x) == sizeof(double)) ? T_DOUBLE : -1))
-
-#if !defined(T_SIZET)
-#if !defined(T_ULONGLONG)
-#define T_SIZET \
- ((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
- ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1))
-#else
-#define T_SIZET \
- ((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
- ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : \
- ((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))
-#endif
-#endif
-
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*);
@@ -264,7 +248,7 @@
#ifdef __GNUC__
/* Test for GCC > 2.95 */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 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 ... */
@@ -284,7 +268,6 @@
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;
-static const char **__pyx_f;
#if !defined(CYTHON_CCOMPLEX)
@@ -310,6 +293,21 @@
#define _Complex_I 1.0fj
#endif
+static const char *__pyx_f[] = {
+ "DepthFirstOctree.pyx",
+ "PointsInVolume.pyx",
+ "VolumeIntegrator.pyx",
+ "Interpolators.pyx",
+ "RayIntegrators.pyx",
+ "CICDeposit.pyx",
+ "ContourFinding.pyx",
+ "png_writer.pyx",
+ "fortran_reader.pyx",
+ "QuadTree.pyx",
+ "numpy.pxd",
+ "amr_utils.pyx",
+};
+
typedef npy_int8 __pyx_t_5numpy_int8_t;
typedef npy_int16 __pyx_t_5numpy_int16_t;
@@ -743,6 +741,8 @@
#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)
+static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
+
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*/
@@ -754,6 +754,9 @@
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /*proto*/
+static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
+ const char *name, int exact); /*proto*/
+
/* Run-time type information about structs used with buffers */
struct __Pyx_StructField_;
@@ -776,8 +779,8 @@
} __Pyx_BufFmt_StackElem;
+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 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_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
@@ -792,11 +795,11 @@
}
-#define __Pyx_GetItemInt_List(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
- __Pyx_GetItemInt_List_Fast(o, i, size <= sizeof(long)) : \
+#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, int fits_long) {
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
if (likely(o != Py_None)) {
if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
PyObject *r = PyList_GET_ITEM(o, i);
@@ -809,14 +812,14 @@
return r;
}
}
- return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}
-#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
- __Pyx_GetItemInt_Tuple_Fast(o, i, size <= sizeof(long)) : \
+#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, int fits_long) {
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
if (likely(o != Py_None)) {
if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
PyObject *r = PyTuple_GET_ITEM(o, i);
@@ -829,15 +832,15 @@
return r;
}
}
- return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}
-#define __Pyx_GetItemInt(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
- __Pyx_GetItemInt_Fast(o, i, size <= sizeof(long)) : \
+#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, int fits_long) {
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
PyObject *r;
if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
r = PyList_GET_ITEM(o, i);
@@ -851,7 +854,7 @@
r = PySequence_GetItem(o, i);
}
else {
- r = __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
+ r = __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}
return r;
}
@@ -865,6 +868,8 @@
#define __Pyx_BufPtrStrided3d(type, buf, i0, s0, i1, s1, i2, s2) (type)((char*)buf + i0 * s0 + i1 * s1 + i2 * s2)
static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/
+static CYTHON_INLINE long __Pyx_mod_long(long, long); /* proto */
+
static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
if (likely(PyList_CheckExact(L))) {
if (PyList_Append(L, x) < 0) return NULL;
@@ -881,15 +886,17 @@
}
}
+static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */
+
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
-static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void);
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
-static int __Pyx_EndUnpack(PyObject *); /*proto*/
+static int __Pyx_EndUnpack(PyObject *, Py_ssize_t expected); /*proto*/
-#define __Pyx_SetItemInt(o, i, v, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
- __Pyx_SetItemInt_Fast(o, i, v, size <= sizeof(long)) : \
+#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) {
@@ -900,7 +907,7 @@
return r;
}
-static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int fits_long) {
+static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v) {
if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
Py_INCREF(v);
Py_DECREF(PyList_GET_ITEM(o, i));
@@ -910,11 +917,51 @@
else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_ass_item && (likely(i >= 0)))
return PySequence_SetItem(o, i, v);
else {
- PyObject *j = fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i);
+ PyObject *j = PyInt_FromSsize_t(i);
return __Pyx_SetItemInt_Generic(o, j, v);
}
}
+static CYTHON_INLINE __pyx_t_5numpy_int64_t __Pyx_div___pyx_t_5numpy_int64_t(__pyx_t_5numpy_int64_t, __pyx_t_5numpy_int64_t); /* proto */
+
+#define UNARY_NEG_WOULD_OVERFLOW(x) (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
+
+static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
+
+static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/
+#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
+
+Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0};
+Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1};
+
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
+
+static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp);
+
+static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject *);
+
+static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32);
+
+static int __Pyx_Print(PyObject*, PyObject *, int); /*proto*/
+#if PY_MAJOR_VERSION >= 3
+static PyObject* __pyx_print = 0;
+static PyObject* __pyx_print_kwargs = 0;
+#endif
+
+static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject *);
+
+static int __Pyx_PrintOne(PyObject* stream, PyObject *o); /*proto*/
+
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+
+static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64);
+
#if PY_VERSION_HEX < 0x02050000
#ifndef PyAnySet_CheckExact
@@ -1003,47 +1050,6 @@
#endif /* < Py2.4 */
#endif /* < Py2.5 */
-static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
-
-static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/
-
-static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
- const char *name, int exact); /*proto*/
-#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
-
-Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0};
-Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1};
-
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
-
-static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp);
-
-static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject *);
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32);
-
-static int __Pyx_Print(PyObject *, int); /*proto*/
-#if PY_MAJOR_VERSION >= 3
-static PyObject* __pyx_print = 0;
-static PyObject* __pyx_print_kwargs = 0;
-#endif
-
-static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject *);
-
-static int __Pyx_PrintOne(PyObject *o); /*proto*/
-
-static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
-
-static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64);
-
static CYTHON_INLINE png_uint_32 __Pyx_PyInt_from_py_png_uint_32(PyObject *);
static CYTHON_INLINE long __Pyx_pow_long(long, long); /* proto */
@@ -1147,6 +1153,8 @@
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 *);
@@ -1170,13 +1178,15 @@
static void __Pyx_AddTraceback(const char *funcname); /*proto*/
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
-/* Module declarations from python_buffer */
+/* Module declarations from cpython.buffer */
-/* Module declarations from python_ref */
+/* Module declarations from cpython.ref */
-/* Module declarations from stdlib */
+/* Module declarations from libc.stdio */
-/* Module declarations from stdio */
+/* Module declarations from cpython.object */
+
+/* Module declarations from libc.stdlib */
/* Module declarations from numpy */
@@ -1197,6 +1207,10 @@
static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *); /*proto*/
/* Module declarations from cython */
+/* Module declarations from stdlib */
+
+/* Module declarations from stdio */
+
/* Module declarations from yt.amr_utils */
static PyTypeObject *__pyx_ptype_2yt_9amr_utils_position = 0;
@@ -1227,14 +1241,14 @@
static void __pyx_f_2yt_9amr_utils_QTN_refine(struct __pyx_t_2yt_9amr_utils_QuadTreeNode *); /*proto*/
static struct __pyx_t_2yt_9amr_utils_QuadTreeNode *__pyx_f_2yt_9amr_utils_QTN_initialize(__pyx_t_5numpy_int64_t *, int, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t, int); /*proto*/
static void __pyx_f_2yt_9amr_utils_QTN_free(struct __pyx_t_2yt_9amr_utils_QuadTreeNode *); /*proto*/
-static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "numpy.int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), 'I' };
-static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "numpy.float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), 'R' };
-static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int_t = { "numpy.int_t", NULL, sizeof(__pyx_t_5numpy_int_t), 'I' };
-static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t = { "numpy.int8_t", NULL, sizeof(__pyx_t_5numpy_int8_t), 'I' };
-static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float_t = { "numpy.float_t", NULL, sizeof(__pyx_t_5numpy_float_t), 'R' };
-static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t = { "numpy.int64_t", NULL, sizeof(__pyx_t_5numpy_int64_t), 'I' };
-static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t = { "numpy.float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), 'R' };
-static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t = { "numpy.uint8_t", NULL, sizeof(__pyx_t_5numpy_uint8_t), 'U' };
+static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), 'I' };
+static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), 'R' };
+static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int_t = { "int_t", NULL, sizeof(__pyx_t_5numpy_int_t), 'I' };
+static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t = { "int8_t", NULL, sizeof(__pyx_t_5numpy_int8_t), 'I' };
+static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float_t = { "float_t", NULL, sizeof(__pyx_t_5numpy_float_t), 'R' };
+static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t = { "int64_t", NULL, sizeof(__pyx_t_5numpy_int64_t), 'I' };
+static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), 'R' };
+static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t = { "uint8_t", NULL, sizeof(__pyx_t_5numpy_uint8_t), 'U' };
#define __Pyx_MODULE_NAME "yt.amr_utils"
int __pyx_module_is_main_yt__amr_utils = 0;
@@ -1745,9 +1759,100 @@
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
-static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_int_15;
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":31
+ *
+ * cdef class position:
+ * cdef public int output_pos, refined_pos # <<<<<<<<<<<<<<
+ * def __cinit__(self):
+ * self.output_pos = 0
+ */
+
+static PyObject *__pyx_pf_2yt_9amr_utils_8position_10output_pos___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_8position_10output_pos___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_2yt_9amr_utils_position *)__pyx_v_self)->output_pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __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.amr_utils.position.output_pos.__get__");
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_8position_10output_pos___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_8position_10output_pos___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("__set__");
+ __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 = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ ((struct __pyx_obj_2yt_9amr_utils_position *)__pyx_v_self)->output_pos = __pyx_t_1;
+
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("yt.amr_utils.position.output_pos.__set__");
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_2yt_9amr_utils_8position_11refined_pos___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_8position_11refined_pos___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_2yt_9amr_utils_position *)__pyx_v_self)->refined_pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __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.amr_utils.position.refined_pos.__get__");
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_8position_11refined_pos___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_8position_11refined_pos___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("__set__");
+ __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 = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ ((struct __pyx_obj_2yt_9amr_utils_position *)__pyx_v_self)->refined_pos = __pyx_t_1;
+
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("yt.amr_utils.position.refined_pos.__set__");
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":32
* cdef class position:
* cdef public int output_pos, refined_pos
@@ -1787,21 +1892,309 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":39
- * cdef public object child_indices, fields, left_edges, dimensions, dx
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":37
+ *
+ * cdef class OctreeGrid:
+ * cdef public object child_indices, fields, left_edges, dimensions, dx # <<<<<<<<<<<<<<
* cdef public int level
- * def __cinit__(self, # <<<<<<<<<<<<<<
- * np.ndarray[np.int32_t, ndim=3] child_indices,
- * np.ndarray[np.float64_t, ndim=4] fields,
+ * def __cinit__(self,
*/
-static int __pyx_pf_2yt_9amr_utils_10OctreeGrid___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pf_2yt_9amr_utils_10OctreeGrid___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
- PyArrayObject *__pyx_v_child_indices = 0;
- PyArrayObject *__pyx_v_fields = 0;
- PyArrayObject *__pyx_v_left_edges = 0;
- PyArrayObject *__pyx_v_dimensions = 0;
- PyArrayObject *__pyx_v_dx = 0;
+static PyObject *__pyx_pf_2yt_9amr_utils_10OctreeGrid_13child_indices___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_10OctreeGrid_13child_indices___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->child_indices);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->child_indices;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_13child_indices___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_13child_indices___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->child_indices);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->child_indices);
+ ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->child_indices = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_13child_indices___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_13child_indices___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->child_indices);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->child_indices);
+ ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->child_indices = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_2yt_9amr_utils_10OctreeGrid_6fields___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_10OctreeGrid_6fields___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->fields);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->fields;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_6fields___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_6fields___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->fields);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->fields);
+ ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->fields = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_6fields___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_6fields___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->fields);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->fields);
+ ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->fields = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_2yt_9amr_utils_10OctreeGrid_10left_edges___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_10OctreeGrid_10left_edges___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->left_edges);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->left_edges;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_10left_edges___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_10left_edges___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->left_edges);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->left_edges);
+ ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->left_edges = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_10left_edges___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_10left_edges___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->left_edges);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->left_edges);
+ ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->left_edges = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_2yt_9amr_utils_10OctreeGrid_10dimensions___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_10OctreeGrid_10dimensions___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dimensions);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dimensions;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_10dimensions___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_10dimensions___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dimensions);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dimensions);
+ ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dimensions = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_10dimensions___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_10dimensions___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dimensions);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dimensions);
+ ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dimensions = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_2yt_9amr_utils_10OctreeGrid_2dx___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_10OctreeGrid_2dx___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dx);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dx;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_2dx___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_2dx___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dx);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dx);
+ ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dx = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_2dx___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_2dx___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dx);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dx);
+ ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dx = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":38
+ * cdef class OctreeGrid:
+ * cdef public object child_indices, fields, left_edges, dimensions, dx
+ * cdef public int level # <<<<<<<<<<<<<<
+ * def __cinit__(self,
+ * np.ndarray[np.int32_t, ndim=3] child_indices,
+ */
+
+static PyObject *__pyx_pf_2yt_9amr_utils_10OctreeGrid_5level___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_10OctreeGrid_5level___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->level); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __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.amr_utils.OctreeGrid.level.__get__");
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_5level___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid_5level___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("__set__");
+ __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 = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->level = __pyx_t_1;
+
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("yt.amr_utils.OctreeGrid.level.__set__");
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":39
+ * cdef public object child_indices, fields, left_edges, dimensions, dx
+ * cdef public int level
+ * def __cinit__(self, # <<<<<<<<<<<<<<
+ * np.ndarray[np.int32_t, ndim=3] child_indices,
+ * np.ndarray[np.float64_t, ndim=4] fields,
+ */
+
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10OctreeGrid___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyArrayObject *__pyx_v_child_indices = 0;
+ PyArrayObject *__pyx_v_fields = 0;
+ PyArrayObject *__pyx_v_left_edges = 0;
+ PyArrayObject *__pyx_v_dimensions = 0;
+ PyArrayObject *__pyx_v_dx = 0;
int __pyx_v_level;
Py_buffer __pyx_bstruct_child_indices;
Py_ssize_t __pyx_bstride_0_child_indices = 0;
@@ -1904,6 +2297,7 @@
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.OctreeGrid.__cinit__");
+ __Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
__pyx_bstruct_child_indices.buf = NULL;
@@ -2046,6 +2440,60 @@
return __pyx_r;
}
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":54
+ *
+ * cdef class OctreeGridList:
+ * cdef public object grids # <<<<<<<<<<<<<<
+ * def __cinit__(self, grids):
+ * self.grids = grids
+ */
+
+static PyObject *__pyx_pf_2yt_9amr_utils_14OctreeGridList_5grids___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_14OctreeGridList_5grids___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGridList *)__pyx_v_self)->grids);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_OctreeGridList *)__pyx_v_self)->grids;
+ goto __pyx_L0;
+
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_14OctreeGridList_5grids___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_14OctreeGridList_5grids___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGridList *)__pyx_v_self)->grids);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGridList *)__pyx_v_self)->grids);
+ ((struct __pyx_obj_2yt_9amr_utils_OctreeGridList *)__pyx_v_self)->grids = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_14OctreeGridList_5grids___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_14OctreeGridList_5grids___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGridList *)__pyx_v_self)->grids);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGridList *)__pyx_v_self)->grids);
+ ((struct __pyx_obj_2yt_9amr_utils_OctreeGridList *)__pyx_v_self)->grids = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":55
* cdef class OctreeGridList:
* cdef public object grids
@@ -2088,6 +2536,7 @@
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.OctreeGridList.__cinit__");
+ __Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
@@ -2129,6 +2578,7 @@
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.OctreeGridList.__getitem__");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
@@ -2396,12 +2846,9 @@
__Pyx_RaiseArgtupleInvalid("RecurseOctreeDepthFirst", 1, 11, 11, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.RecurseOctreeDepthFirst");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_curpos);
- __Pyx_INCREF((PyObject *)__pyx_v_output);
- __Pyx_INCREF((PyObject *)__pyx_v_refined);
- __Pyx_INCREF((PyObject *)__pyx_v_grids);
__pyx_v_child_grid = ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)Py_None); __Pyx_INCREF(Py_None);
__pyx_v_child_leftedges = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
__pyx_v_s = Py_None; __Pyx_INCREF(Py_None);
@@ -2831,7 +3278,12 @@
*/
__pyx_t_29 = 0;
if (__pyx_t_29 < 0) __pyx_t_29 += __pyx_bshape_0_child_leftedges;
- __pyx_v_child_i = ((int)((__pyx_v_cx - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_29, __pyx_bstride_0_child_leftedges))) / __pyx_v_child_dx));
+ __pyx_t_7 = (__pyx_v_cx - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_29, __pyx_bstride_0_child_leftedges)));
+ if (unlikely(__pyx_v_child_dx == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_child_i = ((int)(__pyx_t_7 / __pyx_v_child_dx));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":103
* child_leftedges = child_grid.left_edges
@@ -2842,7 +3294,12 @@
*/
__pyx_t_35 = 1;
if (__pyx_t_35 < 0) __pyx_t_35 += __pyx_bshape_0_child_leftedges;
- __pyx_v_child_j = ((int)((__pyx_v_cy - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_35, __pyx_bstride_0_child_leftedges))) / __pyx_v_child_dx));
+ __pyx_t_7 = (__pyx_v_cy - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_35, __pyx_bstride_0_child_leftedges)));
+ if (unlikely(__pyx_v_child_dx == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_child_j = ((int)(__pyx_t_7 / __pyx_v_child_dx));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":104
* child_i = int((cx - child_leftedges[0])/child_dx)
@@ -2853,7 +3310,12 @@
*/
__pyx_t_36 = 2;
if (__pyx_t_36 < 0) __pyx_t_36 += __pyx_bshape_0_child_leftedges;
- __pyx_v_child_k = ((int)((__pyx_v_cz - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_36, __pyx_bstride_0_child_leftedges))) / __pyx_v_child_dx));
+ __pyx_t_7 = (__pyx_v_cz - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_36, __pyx_bstride_0_child_leftedges)));
+ if (unlikely(__pyx_v_child_dx == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_child_k = ((int)(__pyx_t_7 / __pyx_v_child_dx));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":105
* child_j = int((cy - child_leftedges[1])/child_dx)
@@ -2979,10 +3441,6 @@
__Pyx_XDECREF((PyObject *)__pyx_v_leftedges);
__Pyx_DECREF((PyObject *)__pyx_v_child_leftedges);
__Pyx_DECREF(__pyx_v_s);
- __Pyx_DECREF((PyObject *)__pyx_v_curpos);
- __Pyx_DECREF((PyObject *)__pyx_v_output);
- __Pyx_DECREF((PyObject *)__pyx_v_refined);
- __Pyx_DECREF((PyObject *)__pyx_v_grids);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -3264,13 +3722,9 @@
__Pyx_RaiseArgtupleInvalid("RecurseOctreeByLevels", 1, 12, 12, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.RecurseOctreeByLevels");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_curpos);
- __Pyx_INCREF((PyObject *)__pyx_v_output);
- __Pyx_INCREF((PyObject *)__pyx_v_genealogy);
- __Pyx_INCREF((PyObject *)__pyx_v_corners);
- __Pyx_INCREF((PyObject *)__pyx_v_grids);
__pyx_v_child_grid = ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)Py_None); __Pyx_INCREF(Py_None);
__pyx_v_child_leftedges = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
__pyx_v_s = Py_None; __Pyx_INCREF(Py_None);
@@ -3489,7 +3943,7 @@
__Pyx_GIVEREF(__pyx_t_11);
__pyx_t_2 = 0;
__pyx_t_11 = 0;
- if (__Pyx_Print(__pyx_t_12, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_Print(0, __pyx_t_12, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
goto __pyx_L8;
}
@@ -3748,7 +4202,12 @@
*/
__pyx_t_39 = 0;
if (__pyx_t_39 < 0) __pyx_t_39 += __pyx_bshape_0_child_leftedges;
- __pyx_v_child_i = ((int)((__pyx_v_cx - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_39, __pyx_bstride_0_child_leftedges))) / __pyx_v_child_dx));
+ __pyx_t_7 = (__pyx_v_cx - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_39, __pyx_bstride_0_child_leftedges)));
+ if (unlikely(__pyx_v_child_dx == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_child_i = ((int)(__pyx_t_7 / __pyx_v_child_dx));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":156
* child_leftedges = child_grid.left_edges
@@ -3759,7 +4218,12 @@
*/
__pyx_t_45 = 1;
if (__pyx_t_45 < 0) __pyx_t_45 += __pyx_bshape_0_child_leftedges;
- __pyx_v_child_j = ((int)((__pyx_v_cy - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_45, __pyx_bstride_0_child_leftedges))) / __pyx_v_child_dx));
+ __pyx_t_7 = (__pyx_v_cy - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_45, __pyx_bstride_0_child_leftedges)));
+ if (unlikely(__pyx_v_child_dx == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_child_j = ((int)(__pyx_t_7 / __pyx_v_child_dx));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":157
* child_i = int((cx-child_leftedges[0])/child_dx)
@@ -3770,7 +4234,12 @@
*/
__pyx_t_46 = 2;
if (__pyx_t_46 < 0) __pyx_t_46 += __pyx_bshape_0_child_leftedges;
- __pyx_v_child_k = ((int)((__pyx_v_cz - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_46, __pyx_bstride_0_child_leftedges))) / __pyx_v_child_dx));
+ __pyx_t_7 = (__pyx_v_cz - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_46, __pyx_bstride_0_child_leftedges)));
+ if (unlikely(__pyx_v_child_dx == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_child_k = ((int)(__pyx_t_7 / __pyx_v_child_dx));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":159
* child_k = int((cz-child_leftedges[2])/child_dx)
@@ -3970,11 +4439,6 @@
__Pyx_XDECREF((PyObject *)__pyx_v_leftedges);
__Pyx_DECREF((PyObject *)__pyx_v_child_leftedges);
__Pyx_DECREF(__pyx_v_s);
- __Pyx_DECREF((PyObject *)__pyx_v_curpos);
- __Pyx_DECREF((PyObject *)__pyx_v_output);
- __Pyx_DECREF((PyObject *)__pyx_v_genealogy);
- __Pyx_DECREF((PyObject *)__pyx_v_corners);
- __Pyx_DECREF((PyObject *)__pyx_v_grids);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -4023,21 +4487,22 @@
int __pyx_t_4;
long __pyx_t_5;
int __pyx_t_6;
- PyObject *__pyx_t_7 = NULL;
- int __pyx_t_8;
- PyObject *__pyx_t_9 = NULL;
- double __pyx_t_10;
- long __pyx_t_11;
- int __pyx_t_12;
- long __pyx_t_13;
- int __pyx_t_14;
- static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__table,&__pyx_n_s__x_vals,&__pyx_n_s__x_bins,&__pyx_n_s__x_is,&__pyx_n_s__output,0};
- __Pyx_RefNannySetupContext("UnilinearlyInterpolate");
- __pyx_self = __pyx_self;
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
- PyObject* values[5] = {0,0,0,0,0};
- switch (PyTuple_GET_SIZE(__pyx_args)) {
+ __pyx_t_5numpy_float64_t __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
+ double __pyx_t_11;
+ long __pyx_t_12;
+ int __pyx_t_13;
+ long __pyx_t_14;
+ int __pyx_t_15;
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__table,&__pyx_n_s__x_vals,&__pyx_n_s__x_bins,&__pyx_n_s__x_is,&__pyx_n_s__output,0};
+ __Pyx_RefNannySetupContext("UnilinearlyInterpolate");
+ __pyx_self = __pyx_self;
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+ PyObject* values[5] = {0,0,0,0,0};
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
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);
@@ -4098,13 +4563,9 @@
__Pyx_RaiseArgtupleInvalid("UnilinearlyInterpolate", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.UnilinearlyInterpolate");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_table);
- __Pyx_INCREF((PyObject *)__pyx_v_x_vals);
- __Pyx_INCREF((PyObject *)__pyx_v_x_bins);
- __Pyx_INCREF((PyObject *)__pyx_v_x_is);
- __Pyx_INCREF((PyObject *)__pyx_v_output);
__pyx_v_dx_inv = Py_None; __Pyx_INCREF(Py_None);
__pyx_bstruct_table.buf = NULL;
__pyx_bstruct_x_vals.buf = NULL;
@@ -4191,11 +4652,16 @@
if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_bshape_0_x_bins;
__pyx_t_6 = __pyx_v_x_i;
if (__pyx_t_6 < 0) __pyx_t_6 += __pyx_bshape_0_x_bins;
- __pyx_t_7 = PyFloat_FromDouble((1.0 / ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_5, __pyx_bstride_0_x_bins)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_6, __pyx_bstride_0_x_bins))))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_7 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_5, __pyx_bstride_0_x_bins)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_6, __pyx_bstride_0_x_bins)));
+ if (unlikely(__pyx_t_7 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_8 = PyFloat_FromDouble((1.0 / __pyx_t_7)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_v_dx_inv);
- __pyx_v_dx_inv = __pyx_t_7;
- __pyx_t_7 = 0;
+ __pyx_v_dx_inv = __pyx_t_8;
+ __pyx_t_8 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":42
* x = x_vals[i]
@@ -4204,16 +4670,16 @@
* xm = (x_bins[x_i+1] - x) * dx_inv
* output[i] = table[x_i ] * (xm) \
*/
- __pyx_t_8 = __pyx_v_x_i;
- if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_bshape_0_x_bins;
- __pyx_t_7 = PyFloat_FromDouble((__pyx_v_x - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_8, __pyx_bstride_0_x_bins)))); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_9 = PyNumber_Multiply(__pyx_t_7, __pyx_v_dx_inv); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_9); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_v_xp = __pyx_t_10;
+ __pyx_t_9 = __pyx_v_x_i;
+ if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_bshape_0_x_bins;
+ __pyx_t_8 = PyFloat_FromDouble((__pyx_v_x - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_9, __pyx_bstride_0_x_bins)))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = PyNumber_Multiply(__pyx_t_8, __pyx_v_dx_inv); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_10); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_v_xp = __pyx_t_11;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":43
* dx_inv = 1.0 / (x_bins[x_i+1] - x_bins[x_i])
@@ -4222,16 +4688,16 @@
* output[i] = table[x_i ] * (xm) \
* + table[x_i+1] * (xp)
*/
- __pyx_t_11 = (__pyx_v_x_i + 1);
- if (__pyx_t_11 < 0) __pyx_t_11 += __pyx_bshape_0_x_bins;
- __pyx_t_9 = PyFloat_FromDouble(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_11, __pyx_bstride_0_x_bins)) - __pyx_v_x)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_7 = PyNumber_Multiply(__pyx_t_9, __pyx_v_dx_inv); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_10 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_v_xm = __pyx_t_10;
+ __pyx_t_12 = (__pyx_v_x_i + 1);
+ if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_bshape_0_x_bins;
+ __pyx_t_10 = PyFloat_FromDouble(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_12, __pyx_bstride_0_x_bins)) - __pyx_v_x)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_8 = PyNumber_Multiply(__pyx_t_10, __pyx_v_dx_inv); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_11 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_v_xm = __pyx_t_11;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":44
* xp = (x - x_bins[x_i]) * dx_inv
@@ -4240,8 +4706,8 @@
* + table[x_i+1] * (xp)
*
*/
- __pyx_t_12 = __pyx_v_x_i;
- if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_bshape_0_table;
+ __pyx_t_13 = __pyx_v_x_i;
+ if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_bshape_0_table;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":45
* xm = (x_bins[x_i+1] - x) * dx_inv
@@ -4250,8 +4716,8 @@
*
* @cython.boundscheck(False)
*/
- __pyx_t_13 = (__pyx_v_x_i + 1);
- if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_bshape_0_table;
+ __pyx_t_14 = (__pyx_v_x_i + 1);
+ if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_bshape_0_table;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":44
* xp = (x - x_bins[x_i]) * dx_inv
@@ -4260,16 +4726,16 @@
* + table[x_i+1] * (xp)
*
*/
- __pyx_t_14 = __pyx_v_i;
- if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_bshape_0_output;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_output.buf, __pyx_t_14, __pyx_bstride_0_output) = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_12, __pyx_bstride_0_table)) * __pyx_v_xm) + ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_13, __pyx_bstride_0_table)) * __pyx_v_xp));
+ __pyx_t_15 = __pyx_v_i;
+ if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_bshape_0_output;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_output.buf, __pyx_t_15, __pyx_bstride_0_output) = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_13, __pyx_bstride_0_table)) * __pyx_v_xm) + ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_14, __pyx_bstride_0_table)) * __pyx_v_xp));
}
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_7);
- __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_10);
{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_x_is);
@@ -4289,11 +4755,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_x_bins);
__pyx_L2:;
__Pyx_DECREF(__pyx_v_dx_inv);
- __Pyx_DECREF((PyObject *)__pyx_v_table);
- __Pyx_DECREF((PyObject *)__pyx_v_x_vals);
- __Pyx_DECREF((PyObject *)__pyx_v_x_bins);
- __Pyx_DECREF((PyObject *)__pyx_v_x_is);
- __Pyx_DECREF((PyObject *)__pyx_v_output);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -4363,21 +4824,22 @@
int __pyx_t_6;
long __pyx_t_7;
int __pyx_t_8;
- long __pyx_t_9;
- int __pyx_t_10;
+ __pyx_t_5numpy_float64_t __pyx_t_9;
+ long __pyx_t_10;
int __pyx_t_11;
int __pyx_t_12;
- long __pyx_t_13;
+ int __pyx_t_13;
long __pyx_t_14;
- int __pyx_t_15;
+ long __pyx_t_15;
int __pyx_t_16;
- long __pyx_t_17;
- int __pyx_t_18;
+ int __pyx_t_17;
+ long __pyx_t_18;
int __pyx_t_19;
- long __pyx_t_20;
+ int __pyx_t_20;
long __pyx_t_21;
long __pyx_t_22;
- int __pyx_t_23;
+ long __pyx_t_23;
+ int __pyx_t_24;
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__table,&__pyx_n_s__x_vals,&__pyx_n_s__y_vals,&__pyx_n_s__x_bins,&__pyx_n_s__y_bins,&__pyx_n_s__x_is,&__pyx_n_s__y_is,&__pyx_n_s__output,0};
__Pyx_RefNannySetupContext("BilinearlyInterpolate");
__pyx_self = __pyx_self;
@@ -4472,16 +4934,9 @@
__Pyx_RaiseArgtupleInvalid("BilinearlyInterpolate", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.BilinearlyInterpolate");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_table);
- __Pyx_INCREF((PyObject *)__pyx_v_x_vals);
- __Pyx_INCREF((PyObject *)__pyx_v_y_vals);
- __Pyx_INCREF((PyObject *)__pyx_v_x_bins);
- __Pyx_INCREF((PyObject *)__pyx_v_y_bins);
- __Pyx_INCREF((PyObject *)__pyx_v_x_is);
- __Pyx_INCREF((PyObject *)__pyx_v_y_is);
- __Pyx_INCREF((PyObject *)__pyx_v_output);
__pyx_bstruct_table.buf = NULL;
__pyx_bstruct_x_vals.buf = NULL;
__pyx_bstruct_y_vals.buf = NULL;
@@ -4613,7 +5068,12 @@
if (__pyx_t_7 < 0) __pyx_t_7 += __pyx_bshape_0_x_bins;
__pyx_t_8 = __pyx_v_x_i;
if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_bshape_0_x_bins;
- __pyx_v_dx_inv = (1.0 / ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_7, __pyx_bstride_0_x_bins)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_8, __pyx_bstride_0_x_bins))));
+ __pyx_t_9 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_7, __pyx_bstride_0_x_bins)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_8, __pyx_bstride_0_x_bins)));
+ if (unlikely(__pyx_t_9 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_dx_inv = (1.0 / __pyx_t_9);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":66
* y = y_vals[i]
@@ -4622,11 +5082,16 @@
* xp = (x - x_bins[x_i]) * dx_inv
* yp = (y - y_bins[y_i]) * dy_inv
*/
- __pyx_t_9 = (__pyx_v_y_i + 1);
- if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_bshape_0_y_bins;
- __pyx_t_10 = __pyx_v_y_i;
+ __pyx_t_10 = (__pyx_v_y_i + 1);
if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_bshape_0_y_bins;
- __pyx_v_dy_inv = (1.0 / ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_bins.buf, __pyx_t_9, __pyx_bstride_0_y_bins)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_bins.buf, __pyx_t_10, __pyx_bstride_0_y_bins))));
+ __pyx_t_11 = __pyx_v_y_i;
+ if (__pyx_t_11 < 0) __pyx_t_11 += __pyx_bshape_0_y_bins;
+ __pyx_t_9 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_bins.buf, __pyx_t_10, __pyx_bstride_0_y_bins)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_bins.buf, __pyx_t_11, __pyx_bstride_0_y_bins)));
+ if (unlikely(__pyx_t_9 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_dy_inv = (1.0 / __pyx_t_9);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":67
* dx_inv = 1.0 / (x_bins[x_i+1] - x_bins[x_i])
@@ -4635,9 +5100,9 @@
* yp = (y - y_bins[y_i]) * dy_inv
* xm = (x_bins[x_i+1] - x) * dx_inv
*/
- __pyx_t_11 = __pyx_v_x_i;
- if (__pyx_t_11 < 0) __pyx_t_11 += __pyx_bshape_0_x_bins;
- __pyx_v_xp = ((__pyx_v_x - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_11, __pyx_bstride_0_x_bins))) * __pyx_v_dx_inv);
+ __pyx_t_12 = __pyx_v_x_i;
+ if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_bshape_0_x_bins;
+ __pyx_v_xp = ((__pyx_v_x - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_12, __pyx_bstride_0_x_bins))) * __pyx_v_dx_inv);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":68
* dy_inv = 1.0 / (y_bins[y_i+1] - y_bins[y_i])
@@ -4646,9 +5111,9 @@
* xm = (x_bins[x_i+1] - x) * dx_inv
* ym = (y_bins[y_i+1] - y) * dy_inv
*/
- __pyx_t_12 = __pyx_v_y_i;
- if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_bshape_0_y_bins;
- __pyx_v_yp = ((__pyx_v_y - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_bins.buf, __pyx_t_12, __pyx_bstride_0_y_bins))) * __pyx_v_dy_inv);
+ __pyx_t_13 = __pyx_v_y_i;
+ if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_bshape_0_y_bins;
+ __pyx_v_yp = ((__pyx_v_y - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_bins.buf, __pyx_t_13, __pyx_bstride_0_y_bins))) * __pyx_v_dy_inv);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":69
* xp = (x - x_bins[x_i]) * dx_inv
@@ -4657,9 +5122,9 @@
* ym = (y_bins[y_i+1] - y) * dy_inv
* output[i] = table[x_i , y_i ] * (xm*ym) \
*/
- __pyx_t_13 = (__pyx_v_x_i + 1);
- if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_bshape_0_x_bins;
- __pyx_v_xm = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_13, __pyx_bstride_0_x_bins)) - __pyx_v_x) * __pyx_v_dx_inv);
+ __pyx_t_14 = (__pyx_v_x_i + 1);
+ if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_bshape_0_x_bins;
+ __pyx_v_xm = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_14, __pyx_bstride_0_x_bins)) - __pyx_v_x) * __pyx_v_dx_inv);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":70
* yp = (y - y_bins[y_i]) * dy_inv
@@ -4668,9 +5133,9 @@
* output[i] = table[x_i , y_i ] * (xm*ym) \
* + table[x_i+1, y_i ] * (xp*ym) \
*/
- __pyx_t_14 = (__pyx_v_y_i + 1);
- if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_bshape_0_y_bins;
- __pyx_v_ym = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_bins.buf, __pyx_t_14, __pyx_bstride_0_y_bins)) - __pyx_v_y) * __pyx_v_dy_inv);
+ __pyx_t_15 = (__pyx_v_y_i + 1);
+ if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_bshape_0_y_bins;
+ __pyx_v_ym = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_bins.buf, __pyx_t_15, __pyx_bstride_0_y_bins)) - __pyx_v_y) * __pyx_v_dy_inv);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":71
* xm = (x_bins[x_i+1] - x) * dx_inv
@@ -4679,10 +5144,10 @@
* + table[x_i+1, y_i ] * (xp*ym) \
* + table[x_i , y_i+1] * (xm*yp) \
*/
- __pyx_t_15 = __pyx_v_x_i;
- __pyx_t_16 = __pyx_v_y_i;
- if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_bshape_0_table;
- if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_bshape_1_table;
+ __pyx_t_16 = __pyx_v_x_i;
+ __pyx_t_17 = __pyx_v_y_i;
+ if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_bshape_0_table;
+ if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_bshape_1_table;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":72
* ym = (y_bins[y_i+1] - y) * dy_inv
@@ -4691,10 +5156,10 @@
* + table[x_i , y_i+1] * (xm*yp) \
* + table[x_i+1, y_i+1] * (xp*yp)
*/
- __pyx_t_17 = (__pyx_v_x_i + 1);
- __pyx_t_18 = __pyx_v_y_i;
- if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_bshape_0_table;
- if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_bshape_1_table;
+ __pyx_t_18 = (__pyx_v_x_i + 1);
+ __pyx_t_19 = __pyx_v_y_i;
+ if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_bshape_0_table;
+ if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_bshape_1_table;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":73
* output[i] = table[x_i , y_i ] * (xm*ym) \
@@ -4703,10 +5168,10 @@
* + table[x_i+1, y_i+1] * (xp*yp)
*
*/
- __pyx_t_19 = __pyx_v_x_i;
- __pyx_t_20 = (__pyx_v_y_i + 1);
- if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_bshape_0_table;
- if (__pyx_t_20 < 0) __pyx_t_20 += __pyx_bshape_1_table;
+ __pyx_t_20 = __pyx_v_x_i;
+ __pyx_t_21 = (__pyx_v_y_i + 1);
+ if (__pyx_t_20 < 0) __pyx_t_20 += __pyx_bshape_0_table;
+ if (__pyx_t_21 < 0) __pyx_t_21 += __pyx_bshape_1_table;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":74
* + table[x_i+1, y_i ] * (xp*ym) \
@@ -4715,10 +5180,10 @@
*
* @cython.boundscheck(False)
*/
- __pyx_t_21 = (__pyx_v_x_i + 1);
- __pyx_t_22 = (__pyx_v_y_i + 1);
- if (__pyx_t_21 < 0) __pyx_t_21 += __pyx_bshape_0_table;
- if (__pyx_t_22 < 0) __pyx_t_22 += __pyx_bshape_1_table;
+ __pyx_t_22 = (__pyx_v_x_i + 1);
+ __pyx_t_23 = (__pyx_v_y_i + 1);
+ if (__pyx_t_22 < 0) __pyx_t_22 += __pyx_bshape_0_table;
+ if (__pyx_t_23 < 0) __pyx_t_23 += __pyx_bshape_1_table;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":71
* xm = (x_bins[x_i+1] - x) * dx_inv
@@ -4727,9 +5192,9 @@
* + table[x_i+1, y_i ] * (xp*ym) \
* + table[x_i , y_i+1] * (xm*yp) \
*/
- __pyx_t_23 = __pyx_v_i;
- if (__pyx_t_23 < 0) __pyx_t_23 += __pyx_bshape_0_output;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_output.buf, __pyx_t_23, __pyx_bstride_0_output) = (((((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_15, __pyx_bstride_0_table, __pyx_t_16, __pyx_bstride_1_table)) * (__pyx_v_xm * __pyx_v_ym)) + ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_17, __pyx_bstride_0_table, __pyx_t_18, __pyx_bstride_1_table)) * (__pyx_v_xp * __pyx_v_ym))) + ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_19, __pyx_bstride_0_table, __pyx_t_20, __pyx_bstride_1_table)) * (__pyx_v_xm * __pyx_v_yp))) + ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_21, __pyx_bstride_0_table, __pyx_t_22, __pyx_bstride_1_table)) * (__pyx_v_xp * __pyx_v_yp)));
+ __pyx_t_24 = __pyx_v_i;
+ if (__pyx_t_24 < 0) __pyx_t_24 += __pyx_bshape_0_output;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_output.buf, __pyx_t_24, __pyx_bstride_0_output) = (((((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_16, __pyx_bstride_0_table, __pyx_t_17, __pyx_bstride_1_table)) * (__pyx_v_xm * __pyx_v_ym)) + ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_18, __pyx_bstride_0_table, __pyx_t_19, __pyx_bstride_1_table)) * (__pyx_v_xp * __pyx_v_ym))) + ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_20, __pyx_bstride_0_table, __pyx_t_21, __pyx_bstride_1_table)) * (__pyx_v_xm * __pyx_v_yp))) + ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_22, __pyx_bstride_0_table, __pyx_t_23, __pyx_bstride_1_table)) * (__pyx_v_xp * __pyx_v_yp)));
}
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
@@ -4759,14 +5224,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_table);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_x_bins);
__pyx_L2:;
- __Pyx_DECREF((PyObject *)__pyx_v_table);
- __Pyx_DECREF((PyObject *)__pyx_v_x_vals);
- __Pyx_DECREF((PyObject *)__pyx_v_y_vals);
- __Pyx_DECREF((PyObject *)__pyx_v_x_bins);
- __Pyx_DECREF((PyObject *)__pyx_v_y_bins);
- __Pyx_DECREF((PyObject *)__pyx_v_x_is);
- __Pyx_DECREF((PyObject *)__pyx_v_y_is);
- __Pyx_DECREF((PyObject *)__pyx_v_output);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -4857,41 +5314,42 @@
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;
+ __pyx_t_5numpy_float64_t __pyx_t_11;
+ long __pyx_t_12;
+ int __pyx_t_13;
+ long __pyx_t_14;
int __pyx_t_15;
int __pyx_t_16;
int __pyx_t_17;
- long __pyx_t_18;
+ int __pyx_t_18;
long __pyx_t_19;
long __pyx_t_20;
- int __pyx_t_21;
+ long __pyx_t_21;
int __pyx_t_22;
int __pyx_t_23;
- long __pyx_t_24;
- int __pyx_t_25;
+ int __pyx_t_24;
+ long __pyx_t_25;
int __pyx_t_26;
int __pyx_t_27;
- long __pyx_t_28;
- int __pyx_t_29;
+ int __pyx_t_28;
+ long __pyx_t_29;
int __pyx_t_30;
int __pyx_t_31;
- long __pyx_t_32;
+ int __pyx_t_32;
long __pyx_t_33;
- int __pyx_t_34;
- long __pyx_t_35;
- int __pyx_t_36;
- long __pyx_t_37;
+ long __pyx_t_34;
+ int __pyx_t_35;
+ long __pyx_t_36;
+ int __pyx_t_37;
long __pyx_t_38;
long __pyx_t_39;
long __pyx_t_40;
- int __pyx_t_41;
- long __pyx_t_42;
+ long __pyx_t_41;
+ int __pyx_t_42;
long __pyx_t_43;
long __pyx_t_44;
- int __pyx_t_45;
+ long __pyx_t_45;
+ int __pyx_t_46;
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__table,&__pyx_n_s__x_vals,&__pyx_n_s__y_vals,&__pyx_n_s__z_vals,&__pyx_n_s__x_bins,&__pyx_n_s__y_bins,&__pyx_n_s__z_bins,&__pyx_n_s__x_is,&__pyx_n_s__y_is,&__pyx_n_s__z_is,&__pyx_n_s__output,0};
__Pyx_RefNannySetupContext("TrilinearlyInterpolate");
__pyx_self = __pyx_self;
@@ -5013,19 +5471,9 @@
__Pyx_RaiseArgtupleInvalid("TrilinearlyInterpolate", 1, 11, 11, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.TrilinearlyInterpolate");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_table);
- __Pyx_INCREF((PyObject *)__pyx_v_x_vals);
- __Pyx_INCREF((PyObject *)__pyx_v_y_vals);
- __Pyx_INCREF((PyObject *)__pyx_v_z_vals);
- __Pyx_INCREF((PyObject *)__pyx_v_x_bins);
- __Pyx_INCREF((PyObject *)__pyx_v_y_bins);
- __Pyx_INCREF((PyObject *)__pyx_v_z_bins);
- __Pyx_INCREF((PyObject *)__pyx_v_x_is);
- __Pyx_INCREF((PyObject *)__pyx_v_y_is);
- __Pyx_INCREF((PyObject *)__pyx_v_z_is);
- __Pyx_INCREF((PyObject *)__pyx_v_output);
__pyx_bstruct_table.buf = NULL;
__pyx_bstruct_x_vals.buf = NULL;
__pyx_bstruct_y_vals.buf = NULL;
@@ -5203,7 +5651,12 @@
if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_bshape_0_x_bins;
__pyx_t_10 = __pyx_v_x_i;
if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_bshape_0_x_bins;
- __pyx_v_dx_inv = (1.0 / ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_9, __pyx_bstride_0_x_bins)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_10, __pyx_bstride_0_x_bins))));
+ __pyx_t_11 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_9, __pyx_bstride_0_x_bins)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_10, __pyx_bstride_0_x_bins)));
+ if (unlikely(__pyx_t_11 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[3]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_dx_inv = (1.0 / __pyx_t_11);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":101
* z = z_vals[i]
@@ -5212,11 +5665,16 @@
* dz_inv = 1.0 / (z_bins[z_i+1] - z_bins[z_i])
* xp = (x - x_bins[x_i]) * dx_inv
*/
- __pyx_t_11 = (__pyx_v_y_i + 1);
- if (__pyx_t_11 < 0) __pyx_t_11 += __pyx_bshape_0_y_bins;
- __pyx_t_12 = __pyx_v_y_i;
+ __pyx_t_12 = (__pyx_v_y_i + 1);
if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_bshape_0_y_bins;
- __pyx_v_dy_inv = (1.0 / ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_bins.buf, __pyx_t_11, __pyx_bstride_0_y_bins)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_bins.buf, __pyx_t_12, __pyx_bstride_0_y_bins))));
+ __pyx_t_13 = __pyx_v_y_i;
+ if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_bshape_0_y_bins;
+ __pyx_t_11 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_bins.buf, __pyx_t_12, __pyx_bstride_0_y_bins)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_bins.buf, __pyx_t_13, __pyx_bstride_0_y_bins)));
+ if (unlikely(__pyx_t_11 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[3]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_dy_inv = (1.0 / __pyx_t_11);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":102
* dx_inv = 1.0 / (x_bins[x_i+1] - x_bins[x_i])
@@ -5225,11 +5683,16 @@
* xp = (x - x_bins[x_i]) * dx_inv
* yp = (y - y_bins[y_i]) * dy_inv
*/
- __pyx_t_13 = (__pyx_v_z_i + 1);
- if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_bshape_0_z_bins;
- __pyx_t_14 = __pyx_v_z_i;
+ __pyx_t_14 = (__pyx_v_z_i + 1);
if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_bshape_0_z_bins;
- __pyx_v_dz_inv = (1.0 / ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_z_bins.buf, __pyx_t_13, __pyx_bstride_0_z_bins)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_z_bins.buf, __pyx_t_14, __pyx_bstride_0_z_bins))));
+ __pyx_t_15 = __pyx_v_z_i;
+ if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_bshape_0_z_bins;
+ __pyx_t_11 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_z_bins.buf, __pyx_t_14, __pyx_bstride_0_z_bins)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_z_bins.buf, __pyx_t_15, __pyx_bstride_0_z_bins)));
+ if (unlikely(__pyx_t_11 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[3]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_dz_inv = (1.0 / __pyx_t_11);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":103
* dy_inv = 1.0 / (y_bins[y_i+1] - y_bins[y_i])
@@ -5238,9 +5701,9 @@
* yp = (y - y_bins[y_i]) * dy_inv
* zp = (z - z_bins[z_i]) * dz_inv
*/
- __pyx_t_15 = __pyx_v_x_i;
- if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_bshape_0_x_bins;
- __pyx_v_xp = ((__pyx_v_x - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_15, __pyx_bstride_0_x_bins))) * __pyx_v_dx_inv);
+ __pyx_t_16 = __pyx_v_x_i;
+ if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_bshape_0_x_bins;
+ __pyx_v_xp = ((__pyx_v_x - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_16, __pyx_bstride_0_x_bins))) * __pyx_v_dx_inv);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":104
* dz_inv = 1.0 / (z_bins[z_i+1] - z_bins[z_i])
@@ -5249,9 +5712,9 @@
* zp = (z - z_bins[z_i]) * dz_inv
* xm = (x_bins[x_i+1] - x) * dx_inv
*/
- __pyx_t_16 = __pyx_v_y_i;
- if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_bshape_0_y_bins;
- __pyx_v_yp = ((__pyx_v_y - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_bins.buf, __pyx_t_16, __pyx_bstride_0_y_bins))) * __pyx_v_dy_inv);
+ __pyx_t_17 = __pyx_v_y_i;
+ if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_bshape_0_y_bins;
+ __pyx_v_yp = ((__pyx_v_y - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_bins.buf, __pyx_t_17, __pyx_bstride_0_y_bins))) * __pyx_v_dy_inv);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":105
* xp = (x - x_bins[x_i]) * dx_inv
@@ -5260,9 +5723,9 @@
* xm = (x_bins[x_i+1] - x) * dx_inv
* ym = (y_bins[y_i+1] - y) * dy_inv
*/
- __pyx_t_17 = __pyx_v_z_i;
- if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_bshape_0_z_bins;
- __pyx_v_zp = ((__pyx_v_z - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_z_bins.buf, __pyx_t_17, __pyx_bstride_0_z_bins))) * __pyx_v_dz_inv);
+ __pyx_t_18 = __pyx_v_z_i;
+ if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_bshape_0_z_bins;
+ __pyx_v_zp = ((__pyx_v_z - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_z_bins.buf, __pyx_t_18, __pyx_bstride_0_z_bins))) * __pyx_v_dz_inv);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":106
* yp = (y - y_bins[y_i]) * dy_inv
@@ -5271,9 +5734,9 @@
* ym = (y_bins[y_i+1] - y) * dy_inv
* zm = (z_bins[z_i+1] - z) * dz_inv
*/
- __pyx_t_18 = (__pyx_v_x_i + 1);
- if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_bshape_0_x_bins;
- __pyx_v_xm = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_18, __pyx_bstride_0_x_bins)) - __pyx_v_x) * __pyx_v_dx_inv);
+ __pyx_t_19 = (__pyx_v_x_i + 1);
+ if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_bshape_0_x_bins;
+ __pyx_v_xm = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_bins.buf, __pyx_t_19, __pyx_bstride_0_x_bins)) - __pyx_v_x) * __pyx_v_dx_inv);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":107
* zp = (z - z_bins[z_i]) * dz_inv
@@ -5282,9 +5745,9 @@
* zm = (z_bins[z_i+1] - z) * dz_inv
* output[i] = table[x_i ,y_i ,z_i ] * (xm*ym*zm) \
*/
- __pyx_t_19 = (__pyx_v_y_i + 1);
- if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_bshape_0_y_bins;
- __pyx_v_ym = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_bins.buf, __pyx_t_19, __pyx_bstride_0_y_bins)) - __pyx_v_y) * __pyx_v_dy_inv);
+ __pyx_t_20 = (__pyx_v_y_i + 1);
+ if (__pyx_t_20 < 0) __pyx_t_20 += __pyx_bshape_0_y_bins;
+ __pyx_v_ym = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_bins.buf, __pyx_t_20, __pyx_bstride_0_y_bins)) - __pyx_v_y) * __pyx_v_dy_inv);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":108
* xm = (x_bins[x_i+1] - x) * dx_inv
@@ -5293,9 +5756,9 @@
* output[i] = table[x_i ,y_i ,z_i ] * (xm*ym*zm) \
* + table[x_i+1,y_i ,z_i ] * (xp*ym*zm) \
*/
- __pyx_t_20 = (__pyx_v_z_i + 1);
- if (__pyx_t_20 < 0) __pyx_t_20 += __pyx_bshape_0_z_bins;
- __pyx_v_zm = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_z_bins.buf, __pyx_t_20, __pyx_bstride_0_z_bins)) - __pyx_v_z) * __pyx_v_dz_inv);
+ __pyx_t_21 = (__pyx_v_z_i + 1);
+ if (__pyx_t_21 < 0) __pyx_t_21 += __pyx_bshape_0_z_bins;
+ __pyx_v_zm = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_z_bins.buf, __pyx_t_21, __pyx_bstride_0_z_bins)) - __pyx_v_z) * __pyx_v_dz_inv);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":109
* ym = (y_bins[y_i+1] - y) * dy_inv
@@ -5304,12 +5767,12 @@
* + table[x_i+1,y_i ,z_i ] * (xp*ym*zm) \
* + table[x_i ,y_i+1,z_i ] * (xm*yp*zm) \
*/
- __pyx_t_21 = __pyx_v_x_i;
- __pyx_t_22 = __pyx_v_y_i;
- __pyx_t_23 = __pyx_v_z_i;
- if (__pyx_t_21 < 0) __pyx_t_21 += __pyx_bshape_0_table;
- if (__pyx_t_22 < 0) __pyx_t_22 += __pyx_bshape_1_table;
- if (__pyx_t_23 < 0) __pyx_t_23 += __pyx_bshape_2_table;
+ __pyx_t_22 = __pyx_v_x_i;
+ __pyx_t_23 = __pyx_v_y_i;
+ __pyx_t_24 = __pyx_v_z_i;
+ if (__pyx_t_22 < 0) __pyx_t_22 += __pyx_bshape_0_table;
+ if (__pyx_t_23 < 0) __pyx_t_23 += __pyx_bshape_1_table;
+ if (__pyx_t_24 < 0) __pyx_t_24 += __pyx_bshape_2_table;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":110
* zm = (z_bins[z_i+1] - z) * dz_inv
@@ -5318,12 +5781,12 @@
* + table[x_i ,y_i+1,z_i ] * (xm*yp*zm) \
* + table[x_i ,y_i ,z_i+1] * (xm*ym*zp) \
*/
- __pyx_t_24 = (__pyx_v_x_i + 1);
- __pyx_t_25 = __pyx_v_y_i;
- __pyx_t_26 = __pyx_v_z_i;
- if (__pyx_t_24 < 0) __pyx_t_24 += __pyx_bshape_0_table;
- if (__pyx_t_25 < 0) __pyx_t_25 += __pyx_bshape_1_table;
- if (__pyx_t_26 < 0) __pyx_t_26 += __pyx_bshape_2_table;
+ __pyx_t_25 = (__pyx_v_x_i + 1);
+ __pyx_t_26 = __pyx_v_y_i;
+ __pyx_t_27 = __pyx_v_z_i;
+ if (__pyx_t_25 < 0) __pyx_t_25 += __pyx_bshape_0_table;
+ if (__pyx_t_26 < 0) __pyx_t_26 += __pyx_bshape_1_table;
+ if (__pyx_t_27 < 0) __pyx_t_27 += __pyx_bshape_2_table;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":111
* output[i] = table[x_i ,y_i ,z_i ] * (xm*ym*zm) \
@@ -5332,12 +5795,12 @@
* + table[x_i ,y_i ,z_i+1] * (xm*ym*zp) \
* + table[x_i+1,y_i ,z_i+1] * (xp*ym*zp) \
*/
- __pyx_t_27 = __pyx_v_x_i;
- __pyx_t_28 = (__pyx_v_y_i + 1);
- __pyx_t_29 = __pyx_v_z_i;
- if (__pyx_t_27 < 0) __pyx_t_27 += __pyx_bshape_0_table;
- if (__pyx_t_28 < 0) __pyx_t_28 += __pyx_bshape_1_table;
- if (__pyx_t_29 < 0) __pyx_t_29 += __pyx_bshape_2_table;
+ __pyx_t_28 = __pyx_v_x_i;
+ __pyx_t_29 = (__pyx_v_y_i + 1);
+ __pyx_t_30 = __pyx_v_z_i;
+ if (__pyx_t_28 < 0) __pyx_t_28 += __pyx_bshape_0_table;
+ if (__pyx_t_29 < 0) __pyx_t_29 += __pyx_bshape_1_table;
+ if (__pyx_t_30 < 0) __pyx_t_30 += __pyx_bshape_2_table;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":112
* + table[x_i+1,y_i ,z_i ] * (xp*ym*zm) \
@@ -5346,12 +5809,12 @@
* + table[x_i+1,y_i ,z_i+1] * (xp*ym*zp) \
* + table[x_i ,y_i+1,z_i+1] * (xm*yp*zp) \
*/
- __pyx_t_30 = __pyx_v_x_i;
- __pyx_t_31 = __pyx_v_y_i;
- __pyx_t_32 = (__pyx_v_z_i + 1);
- if (__pyx_t_30 < 0) __pyx_t_30 += __pyx_bshape_0_table;
- if (__pyx_t_31 < 0) __pyx_t_31 += __pyx_bshape_1_table;
- if (__pyx_t_32 < 0) __pyx_t_32 += __pyx_bshape_2_table;
+ __pyx_t_31 = __pyx_v_x_i;
+ __pyx_t_32 = __pyx_v_y_i;
+ __pyx_t_33 = (__pyx_v_z_i + 1);
+ if (__pyx_t_31 < 0) __pyx_t_31 += __pyx_bshape_0_table;
+ if (__pyx_t_32 < 0) __pyx_t_32 += __pyx_bshape_1_table;
+ if (__pyx_t_33 < 0) __pyx_t_33 += __pyx_bshape_2_table;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":113
* + table[x_i ,y_i+1,z_i ] * (xm*yp*zm) \
@@ -5360,12 +5823,12 @@
* + table[x_i ,y_i+1,z_i+1] * (xm*yp*zp) \
* + table[x_i+1,y_i+1,z_i ] * (xp*yp*zm) \
*/
- __pyx_t_33 = (__pyx_v_x_i + 1);
- __pyx_t_34 = __pyx_v_y_i;
- __pyx_t_35 = (__pyx_v_z_i + 1);
- if (__pyx_t_33 < 0) __pyx_t_33 += __pyx_bshape_0_table;
- if (__pyx_t_34 < 0) __pyx_t_34 += __pyx_bshape_1_table;
- if (__pyx_t_35 < 0) __pyx_t_35 += __pyx_bshape_2_table;
+ __pyx_t_34 = (__pyx_v_x_i + 1);
+ __pyx_t_35 = __pyx_v_y_i;
+ __pyx_t_36 = (__pyx_v_z_i + 1);
+ if (__pyx_t_34 < 0) __pyx_t_34 += __pyx_bshape_0_table;
+ if (__pyx_t_35 < 0) __pyx_t_35 += __pyx_bshape_1_table;
+ if (__pyx_t_36 < 0) __pyx_t_36 += __pyx_bshape_2_table;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":114
* + table[x_i ,y_i ,z_i+1] * (xm*ym*zp) \
@@ -5374,12 +5837,12 @@
* + table[x_i+1,y_i+1,z_i ] * (xp*yp*zm) \
* + table[x_i+1,y_i+1,z_i+1] * (xp*yp*zp)
*/
- __pyx_t_36 = __pyx_v_x_i;
- __pyx_t_37 = (__pyx_v_y_i + 1);
- __pyx_t_38 = (__pyx_v_z_i + 1);
- if (__pyx_t_36 < 0) __pyx_t_36 += __pyx_bshape_0_table;
- if (__pyx_t_37 < 0) __pyx_t_37 += __pyx_bshape_1_table;
- if (__pyx_t_38 < 0) __pyx_t_38 += __pyx_bshape_2_table;
+ __pyx_t_37 = __pyx_v_x_i;
+ __pyx_t_38 = (__pyx_v_y_i + 1);
+ __pyx_t_39 = (__pyx_v_z_i + 1);
+ if (__pyx_t_37 < 0) __pyx_t_37 += __pyx_bshape_0_table;
+ if (__pyx_t_38 < 0) __pyx_t_38 += __pyx_bshape_1_table;
+ if (__pyx_t_39 < 0) __pyx_t_39 += __pyx_bshape_2_table;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":115
* + table[x_i+1,y_i ,z_i+1] * (xp*ym*zp) \
@@ -5387,24 +5850,24 @@
* + table[x_i+1,y_i+1,z_i ] * (xp*yp*zm) \ # <<<<<<<<<<<<<<
* + table[x_i+1,y_i+1,z_i+1] * (xp*yp*zp)
*/
- __pyx_t_39 = (__pyx_v_x_i + 1);
- __pyx_t_40 = (__pyx_v_y_i + 1);
- __pyx_t_41 = __pyx_v_z_i;
- if (__pyx_t_39 < 0) __pyx_t_39 += __pyx_bshape_0_table;
- if (__pyx_t_40 < 0) __pyx_t_40 += __pyx_bshape_1_table;
- if (__pyx_t_41 < 0) __pyx_t_41 += __pyx_bshape_2_table;
+ __pyx_t_40 = (__pyx_v_x_i + 1);
+ __pyx_t_41 = (__pyx_v_y_i + 1);
+ __pyx_t_42 = __pyx_v_z_i;
+ if (__pyx_t_40 < 0) __pyx_t_40 += __pyx_bshape_0_table;
+ if (__pyx_t_41 < 0) __pyx_t_41 += __pyx_bshape_1_table;
+ if (__pyx_t_42 < 0) __pyx_t_42 += __pyx_bshape_2_table;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":116
* + table[x_i ,y_i+1,z_i+1] * (xm*yp*zp) \
* + table[x_i+1,y_i+1,z_i ] * (xp*yp*zm) \
* + table[x_i+1,y_i+1,z_i+1] * (xp*yp*zp) # <<<<<<<<<<<<<<
*/
- __pyx_t_42 = (__pyx_v_x_i + 1);
- __pyx_t_43 = (__pyx_v_y_i + 1);
- __pyx_t_44 = (__pyx_v_z_i + 1);
- if (__pyx_t_42 < 0) __pyx_t_42 += __pyx_bshape_0_table;
- if (__pyx_t_43 < 0) __pyx_t_43 += __pyx_bshape_1_table;
- if (__pyx_t_44 < 0) __pyx_t_44 += __pyx_bshape_2_table;
+ __pyx_t_43 = (__pyx_v_x_i + 1);
+ __pyx_t_44 = (__pyx_v_y_i + 1);
+ __pyx_t_45 = (__pyx_v_z_i + 1);
+ if (__pyx_t_43 < 0) __pyx_t_43 += __pyx_bshape_0_table;
+ if (__pyx_t_44 < 0) __pyx_t_44 += __pyx_bshape_1_table;
+ if (__pyx_t_45 < 0) __pyx_t_45 += __pyx_bshape_2_table;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":109
* ym = (y_bins[y_i+1] - y) * dy_inv
@@ -5413,9 +5876,9 @@
* + table[x_i+1,y_i ,z_i ] * (xp*ym*zm) \
* + table[x_i ,y_i+1,z_i ] * (xm*yp*zm) \
*/
- __pyx_t_45 = __pyx_v_i;
- if (__pyx_t_45 < 0) __pyx_t_45 += __pyx_bshape_0_output;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_output.buf, __pyx_t_45, __pyx_bstride_0_output) = (((((((((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_21, __pyx_bstride_0_table, __pyx_t_22, __pyx_bstride_1_table, __pyx_t_23, __pyx_bstride_2_table)) * ((__pyx_v_xm * __pyx_v_ym) * __pyx_v_zm)) + ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_24, __pyx_bstride_0_table, __pyx_t_25, __pyx_bstride_1_table, __pyx_t_26, __pyx_bstride_2_table)) * ((__pyx_v_xp * __pyx_v_ym) * __pyx_v_zm))) + ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_27, __pyx_bstride_0_table, __pyx_t_28, __pyx_bstride_1_table, __pyx_t_29, __pyx_bstride_2_table)) * ((__pyx_v_xm * __pyx_v_yp) * __pyx_v_zm))) + ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_30, __pyx_bstride_0_table, __pyx_t_31, __pyx_bstride_1_table, __pyx_t_32, __pyx_bstride_2_table)) * ((__pyx_v_xm * __pyx_v_ym) * __pyx_v_zp))) + ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_33, __pyx_bstride_0_table, __pyx_t_34, __pyx_bstride_1_table, __pyx_t_35, __pyx_bstride_2_table)) * ((__pyx_v_xp * __pyx_v_ym) * __pyx_v_zp))) + ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_36, __pyx_bstride_0_table, __pyx_t_37, __pyx_bstride_1_table, __pyx_t_38, __pyx_bstride_2_table)) * ((__pyx_v_xm * __pyx_v_yp) * __pyx_v_zp))) + ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_39, __pyx_bstride_0_table, __pyx_t_40, __pyx_bstride_1_table, __pyx_t_41, __pyx_bstride_2_table)) * ((__pyx_v_xp * __pyx_v_yp) * __pyx_v_zm))) + ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_42, __pyx_bstride_0_table, __pyx_t_43, __pyx_bstride_1_table, __pyx_t_44, __pyx_bstride_2_table)) * ((__pyx_v_xp * __pyx_v_yp) * __pyx_v_zp)));
+ __pyx_t_46 = __pyx_v_i;
+ if (__pyx_t_46 < 0) __pyx_t_46 += __pyx_bshape_0_output;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_output.buf, __pyx_t_46, __pyx_bstride_0_output) = (((((((((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_22, __pyx_bstride_0_table, __pyx_t_23, __pyx_bstride_1_table, __pyx_t_24, __pyx_bstride_2_table)) * ((__pyx_v_xm * __pyx_v_ym) * __pyx_v_zm)) + ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_25, __pyx_bstride_0_table, __pyx_t_26, __pyx_bstride_1_table, __pyx_t_27, __pyx_bstride_2_table)) * ((__pyx_v_xp * __pyx_v_ym) * __pyx_v_zm))) + ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_28, __pyx_bstride_0_table, __pyx_t_29, __pyx_bstride_1_table, __pyx_t_30, __pyx_bstride_2_table)) * ((__pyx_v_xm * __pyx_v_yp) * __pyx_v_zm))) + ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_31, __pyx_bstride_0_table, __pyx_t_32, __pyx_bstride_1_table, __pyx_t_33, __pyx_bstride_2_table)) * ((__pyx_v_xm * __pyx_v_ym) * __pyx_v_zp))) + ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_34, __pyx_bstride_0_table, __pyx_t_35, __pyx_bstride_1_table, __pyx_t_36, __pyx_bstride_2_table)) * ((__pyx_v_xp * __pyx_v_ym) * __pyx_v_zp))) + ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_37, __pyx_bstride_0_table, __pyx_t_38, __pyx_bstride_1_table, __pyx_t_39, __pyx_bstride_2_table)) * ((__pyx_v_xm * __pyx_v_yp) * __pyx_v_zp))) + ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_40, __pyx_bstride_0_table, __pyx_t_41, __pyx_bstride_1_table, __pyx_t_42, __pyx_bstride_2_table)) * ((__pyx_v_xp * __pyx_v_yp) * __pyx_v_zm))) + ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_table.buf, __pyx_t_43, __pyx_bstride_0_table, __pyx_t_44, __pyx_bstride_1_table, __pyx_t_45, __pyx_bstride_2_table)) * ((__pyx_v_xp * __pyx_v_yp) * __pyx_v_zp)));
}
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
@@ -5451,17 +5914,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_y_vals);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_z_vals);
__pyx_L2:;
- __Pyx_DECREF((PyObject *)__pyx_v_table);
- __Pyx_DECREF((PyObject *)__pyx_v_x_vals);
- __Pyx_DECREF((PyObject *)__pyx_v_y_vals);
- __Pyx_DECREF((PyObject *)__pyx_v_z_vals);
- __Pyx_DECREF((PyObject *)__pyx_v_x_bins);
- __Pyx_DECREF((PyObject *)__pyx_v_y_bins);
- __Pyx_DECREF((PyObject *)__pyx_v_z_bins);
- __Pyx_DECREF((PyObject *)__pyx_v_x_is);
- __Pyx_DECREF((PyObject *)__pyx_v_y_is);
- __Pyx_DECREF((PyObject *)__pyx_v_z_is);
- __Pyx_DECREF((PyObject *)__pyx_v_output);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -5624,13 +6076,9 @@
__Pyx_RaiseArgtupleInvalid("planar_points_in_volume", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.planar_points_in_volume");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_points);
- __Pyx_INCREF((PyObject *)__pyx_v_pmask);
- __Pyx_INCREF((PyObject *)__pyx_v_left_edge);
- __Pyx_INCREF((PyObject *)__pyx_v_right_edge);
- __Pyx_INCREF((PyObject *)__pyx_v_mask);
__pyx_bstruct_valid.buf = NULL;
__pyx_bstruct_result.buf = NULL;
__pyx_bstruct_points.buf = NULL;
@@ -5732,6 +6180,10 @@
* for i in xrange(points.shape[0]):
* if pmask[i] == 0:
*/
+ if (unlikely(__pyx_v_dx == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[1]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_v_dx_inv = (1.0 / __pyx_v_dx);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":51
@@ -6061,11 +6513,6 @@
__pyx_L2:;
__Pyx_XDECREF((PyObject *)__pyx_v_valid);
__Pyx_XDECREF((PyObject *)__pyx_v_result);
- __Pyx_DECREF((PyObject *)__pyx_v_points);
- __Pyx_DECREF((PyObject *)__pyx_v_pmask);
- __Pyx_DECREF((PyObject *)__pyx_v_left_edge);
- __Pyx_DECREF((PyObject *)__pyx_v_right_edge);
- __Pyx_DECREF((PyObject *)__pyx_v_mask);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -6279,15 +6726,9 @@
__Pyx_RaiseArgtupleInvalid("grid_points_in_volume", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.grid_points_in_volume");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_box_lengths);
- __Pyx_INCREF((PyObject *)__pyx_v_box_origin);
- __Pyx_INCREF((PyObject *)__pyx_v_rot_mat);
- __Pyx_INCREF((PyObject *)__pyx_v_grid_left_edge);
- __Pyx_INCREF((PyObject *)__pyx_v_grid_right_edge);
- __Pyx_INCREF((PyObject *)__pyx_v_dds);
- __Pyx_INCREF((PyObject *)__pyx_v_mask);
__pyx_bstruct_box_lengths.buf = NULL;
__pyx_bstruct_box_origin.buf = NULL;
__pyx_bstruct_rot_mat.buf = NULL;
@@ -6637,8 +7078,7 @@
* if mask[i,j,k]: return 1
* else:
*/
- __pyx_t_15 = __pyx_v_break_first;
- if (__pyx_t_15) {
+ if (__pyx_v_break_first) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":123
* if (cur_pos[2] < 0.0): continue
@@ -6752,13 +7192,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_box_origin);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_grid_left_edge);
__pyx_L2:;
- __Pyx_DECREF((PyObject *)__pyx_v_box_lengths);
- __Pyx_DECREF((PyObject *)__pyx_v_box_origin);
- __Pyx_DECREF((PyObject *)__pyx_v_rot_mat);
- __Pyx_DECREF((PyObject *)__pyx_v_grid_left_edge);
- __Pyx_DECREF((PyObject *)__pyx_v_grid_right_edge);
- __Pyx_DECREF((PyObject *)__pyx_v_dds);
- __Pyx_DECREF((PyObject *)__pyx_v_mask);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -7137,12 +7570,9 @@
__Pyx_RaiseArgtupleInvalid("find_grids_in_inclined_box", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.find_grids_in_inclined_box");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_box_vectors);
- __Pyx_INCREF((PyObject *)__pyx_v_box_center);
- __Pyx_INCREF((PyObject *)__pyx_v_grid_left_edges);
- __Pyx_INCREF((PyObject *)__pyx_v_grid_right_edges);
__pyx_v_grid_centers = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
__pyx_bstruct_good.buf = NULL;
__pyx_bstruct_grid_centers.buf = NULL;
@@ -7559,10 +7989,6 @@
__pyx_L2:;
__Pyx_XDECREF((PyObject *)__pyx_v_good);
__Pyx_DECREF((PyObject *)__pyx_v_grid_centers);
- __Pyx_DECREF((PyObject *)__pyx_v_box_vectors);
- __Pyx_DECREF((PyObject *)__pyx_v_box_center);
- __Pyx_DECREF((PyObject *)__pyx_v_grid_left_edges);
- __Pyx_DECREF((PyObject *)__pyx_v_grid_right_edges);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -7803,12 +8229,9 @@
__Pyx_RaiseArgtupleInvalid("Transfer3D", 1, 13, 13, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.Transfer3D");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_i_s);
- __Pyx_INCREF((PyObject *)__pyx_v_o_s);
- __Pyx_INCREF((PyObject *)__pyx_v_e);
- __Pyx_INCREF((PyObject *)__pyx_v_a);
__pyx_bstruct_i_s.buf = NULL;
__pyx_bstruct_o_s.buf = NULL;
__pyx_bstruct_e.buf = NULL;
@@ -8067,10 +8490,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_a);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_e);
__pyx_L2:;
- __Pyx_DECREF((PyObject *)__pyx_v_i_s);
- __Pyx_DECREF((PyObject *)__pyx_v_o_s);
- __Pyx_DECREF((PyObject *)__pyx_v_e);
- __Pyx_DECREF((PyObject *)__pyx_v_a);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -8209,11 +8628,9 @@
__Pyx_RaiseArgtupleInvalid("TransferShells", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.TransferShells");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_i_s);
- __Pyx_INCREF((PyObject *)__pyx_v_data);
- __Pyx_INCREF((PyObject *)__pyx_v_shells);
__pyx_bstruct_i_s.buf = NULL;
__pyx_bstruct_data.buf = NULL;
__pyx_bstruct_shells.buf = NULL;
@@ -8345,7 +8762,7 @@
* if dist < shells[n,1]:
* dist = exp(-dist/8.0)
*/
- __pyx_t_14 = (__pyx_v_dist < 0);
+ __pyx_t_14 = (__pyx_v_dist < 0.0);
if (__pyx_t_14) {
__pyx_v_dist *= (-1.0);
goto __pyx_L14;
@@ -8545,9 +8962,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_i_s);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_data);
__pyx_L2:;
- __Pyx_DECREF((PyObject *)__pyx_v_i_s);
- __Pyx_DECREF((PyObject *)__pyx_v_data);
- __Pyx_DECREF((PyObject *)__pyx_v_shells);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -8677,12 +9091,9 @@
__Pyx_RaiseArgtupleInvalid("Transfer1D", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.Transfer1D");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_o_s);
- __Pyx_INCREF((PyObject *)__pyx_v_e);
- __Pyx_INCREF((PyObject *)__pyx_v_a);
- __Pyx_INCREF((PyObject *)__pyx_v_dx);
__pyx_bstruct_o_s.buf = NULL;
__pyx_bstruct_e.buf = NULL;
__pyx_bstruct_a.buf = NULL;
@@ -8790,10 +9201,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_o_s);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_dx);
__pyx_L2:;
- __Pyx_DECREF((PyObject *)__pyx_v_o_s);
- __Pyx_DECREF((PyObject *)__pyx_v_e);
- __Pyx_DECREF((PyObject *)__pyx_v_a);
- __Pyx_DECREF((PyObject *)__pyx_v_dx);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -8899,14 +9306,14 @@
int __pyx_t_15;
int __pyx_t_16;
int __pyx_t_17;
- int __pyx_t_18;
+ __pyx_t_5numpy_float64_t __pyx_t_18;
int __pyx_t_19;
- int __pyx_t_20;
+ __pyx_t_5numpy_float64_t __pyx_t_20;
int __pyx_t_21;
int __pyx_t_22;
int __pyx_t_23;
int __pyx_t_24;
- __pyx_t_5numpy_float64_t __pyx_t_25;
+ int __pyx_t_25;
int __pyx_t_26;
int __pyx_t_27;
int __pyx_t_28;
@@ -8923,7 +9330,7 @@
int __pyx_t_39;
int __pyx_t_40;
int __pyx_t_41;
- long __pyx_t_42;
+ int __pyx_t_42;
long __pyx_t_43;
long __pyx_t_44;
long __pyx_t_45;
@@ -8932,15 +9339,15 @@
long __pyx_t_48;
long __pyx_t_49;
long __pyx_t_50;
- PyObject *__pyx_t_51 = NULL;
+ long __pyx_t_51;
PyObject *__pyx_t_52 = NULL;
PyObject *__pyx_t_53 = NULL;
- int __pyx_t_54;
+ PyObject *__pyx_t_54 = NULL;
int __pyx_t_55;
int __pyx_t_56;
int __pyx_t_57;
- __pyx_t_5numpy_int64_t __pyx_t_58;
- int __pyx_t_59;
+ int __pyx_t_58;
+ __pyx_t_5numpy_int64_t __pyx_t_59;
int __pyx_t_60;
int __pyx_t_61;
int __pyx_t_62;
@@ -8970,41 +9377,41 @@
int __pyx_t_86;
int __pyx_t_87;
int __pyx_t_88;
- long __pyx_t_89;
+ int __pyx_t_89;
long __pyx_t_90;
long __pyx_t_91;
long __pyx_t_92;
long __pyx_t_93;
long __pyx_t_94;
- __pyx_t_5numpy_int64_t __pyx_t_95;
+ long __pyx_t_95;
__pyx_t_5numpy_int64_t __pyx_t_96;
- long __pyx_t_97;
+ __pyx_t_5numpy_int64_t __pyx_t_97;
long __pyx_t_98;
long __pyx_t_99;
long __pyx_t_100;
long __pyx_t_101;
long __pyx_t_102;
- __pyx_t_5numpy_int64_t __pyx_t_103;
+ long __pyx_t_103;
__pyx_t_5numpy_int64_t __pyx_t_104;
__pyx_t_5numpy_int64_t __pyx_t_105;
- long __pyx_t_106;
+ __pyx_t_5numpy_int64_t __pyx_t_106;
long __pyx_t_107;
long __pyx_t_108;
long __pyx_t_109;
long __pyx_t_110;
long __pyx_t_111;
long __pyx_t_112;
- __pyx_t_5numpy_int64_t __pyx_t_113;
+ long __pyx_t_113;
__pyx_t_5numpy_int64_t __pyx_t_114;
__pyx_t_5numpy_int64_t __pyx_t_115;
- long __pyx_t_116;
+ __pyx_t_5numpy_int64_t __pyx_t_116;
long __pyx_t_117;
long __pyx_t_118;
long __pyx_t_119;
- __pyx_t_5numpy_int64_t __pyx_t_120;
+ long __pyx_t_120;
__pyx_t_5numpy_int64_t __pyx_t_121;
__pyx_t_5numpy_int64_t __pyx_t_122;
- long __pyx_t_123;
+ __pyx_t_5numpy_int64_t __pyx_t_123;
long __pyx_t_124;
long __pyx_t_125;
long __pyx_t_126;
@@ -9012,17 +9419,17 @@
long __pyx_t_128;
long __pyx_t_129;
long __pyx_t_130;
- __pyx_t_5numpy_int64_t __pyx_t_131;
+ long __pyx_t_131;
__pyx_t_5numpy_int64_t __pyx_t_132;
__pyx_t_5numpy_int64_t __pyx_t_133;
- long __pyx_t_134;
+ __pyx_t_5numpy_int64_t __pyx_t_134;
long __pyx_t_135;
long __pyx_t_136;
long __pyx_t_137;
- __pyx_t_5numpy_int64_t __pyx_t_138;
+ long __pyx_t_138;
__pyx_t_5numpy_int64_t __pyx_t_139;
__pyx_t_5numpy_int64_t __pyx_t_140;
- long __pyx_t_141;
+ __pyx_t_5numpy_int64_t __pyx_t_141;
long __pyx_t_142;
long __pyx_t_143;
long __pyx_t_144;
@@ -9032,17 +9439,17 @@
long __pyx_t_148;
long __pyx_t_149;
long __pyx_t_150;
- __pyx_t_5numpy_int64_t __pyx_t_151;
+ long __pyx_t_151;
__pyx_t_5numpy_int64_t __pyx_t_152;
__pyx_t_5numpy_int64_t __pyx_t_153;
- long __pyx_t_154;
+ __pyx_t_5numpy_int64_t __pyx_t_154;
long __pyx_t_155;
long __pyx_t_156;
long __pyx_t_157;
- __pyx_t_5numpy_int64_t __pyx_t_158;
+ long __pyx_t_158;
__pyx_t_5numpy_int64_t __pyx_t_159;
__pyx_t_5numpy_int64_t __pyx_t_160;
- long __pyx_t_161;
+ __pyx_t_5numpy_int64_t __pyx_t_161;
long __pyx_t_162;
long __pyx_t_163;
long __pyx_t_164;
@@ -9050,21 +9457,22 @@
long __pyx_t_166;
long __pyx_t_167;
long __pyx_t_168;
- __pyx_t_5numpy_int64_t __pyx_t_169;
+ long __pyx_t_169;
__pyx_t_5numpy_int64_t __pyx_t_170;
__pyx_t_5numpy_int64_t __pyx_t_171;
- long __pyx_t_172;
+ __pyx_t_5numpy_int64_t __pyx_t_172;
long __pyx_t_173;
long __pyx_t_174;
long __pyx_t_175;
- __pyx_t_5numpy_int64_t __pyx_t_176;
+ long __pyx_t_176;
__pyx_t_5numpy_int64_t __pyx_t_177;
__pyx_t_5numpy_int64_t __pyx_t_178;
- long __pyx_t_179;
+ __pyx_t_5numpy_int64_t __pyx_t_179;
long __pyx_t_180;
long __pyx_t_181;
long __pyx_t_182;
long __pyx_t_183;
+ long __pyx_t_184;
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__grid_mask,&__pyx_n_s__grid_t,&__pyx_n_s__grid_dt,&__pyx_n_s__left_edge,&__pyx_n_s__right_edge,&__pyx_n_s__dx,&__pyx_n_s__u,&__pyx_n_s__v,0};
__Pyx_RefNannySetupContext("VoxelTraversal");
__pyx_self = __pyx_self;
@@ -9159,16 +9567,9 @@
__Pyx_RaiseArgtupleInvalid("VoxelTraversal", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.VoxelTraversal");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_grid_mask);
- __Pyx_INCREF((PyObject *)__pyx_v_grid_t);
- __Pyx_INCREF((PyObject *)__pyx_v_grid_dt);
- __Pyx_INCREF((PyObject *)__pyx_v_left_edge);
- __Pyx_INCREF((PyObject *)__pyx_v_right_edge);
- __Pyx_INCREF((PyObject *)__pyx_v_dx);
- __Pyx_INCREF((PyObject *)__pyx_v_u);
- __Pyx_INCREF((PyObject *)__pyx_v_v);
__pyx_bstruct_step.buf = NULL;
__pyx_bstruct_cur_ind.buf = NULL;
__pyx_bstruct_tdelta.buf = NULL;
@@ -9501,7 +9902,7 @@
* dt_tolerance = 1e-6
* # recall p = v * t + u
*/
- __pyx_v_intersect_t = 1;
+ __pyx_v_intersect_t = 1.0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":147
* cdef np.ndarray[np.float64_t, ndim=1] intersect = np.empty((3,), dtype=np.float64)
@@ -9510,7 +9911,7 @@
* # recall p = v * t + u
* # where p is position, v is our vector, u is the start point
*/
- __pyx_v_dt_tolerance = 9.9999999999999995e-07;
+ __pyx_v_dt_tolerance = 1e-6;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":150
* # recall p = v * t + u
@@ -9530,7 +9931,7 @@
* x = (i+1)%3
*/
__pyx_t_12 = __pyx_v_i;
- __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_12, __pyx_bstride_0_v)) < 0);
+ __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_12, __pyx_bstride_0_v)) < 0.0);
if (__pyx_t_13) {
__pyx_t_14 = __pyx_v_i;
*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_14, __pyx_bstride_0_step) = -1;
@@ -9557,7 +9958,7 @@
* y = (i+2)%3
* tl = (left_edge[i] - u[i])/v[i]
*/
- __pyx_v_x = ((__pyx_v_i + 1) % 3);
+ __pyx_v_x = __Pyx_mod_long((__pyx_v_i + 1), 3);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":155
* else: step[i] = 1
@@ -9566,7 +9967,7 @@
* tl = (left_edge[i] - u[i])/v[i]
* tr = (right_edge[i] - u[i])/v[i]
*/
- __pyx_v_y = ((__pyx_v_i + 2) % 3);
+ __pyx_v_y = __Pyx_mod_long((__pyx_v_i + 2), 3);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":156
* x = (i+1)%3
@@ -9577,8 +9978,14 @@
*/
__pyx_t_16 = __pyx_v_i;
__pyx_t_17 = __pyx_v_i;
- __pyx_t_18 = __pyx_v_i;
- __pyx_v_tl = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_16, __pyx_bstride_0_left_edge)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_17, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_18, __pyx_bstride_0_v)));
+ __pyx_t_18 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_16, __pyx_bstride_0_left_edge)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_17, __pyx_bstride_0_u)));
+ __pyx_t_19 = __pyx_v_i;
+ __pyx_t_20 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_19, __pyx_bstride_0_v));
+ if (unlikely(__pyx_t_20 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_tl = (__pyx_t_18 / __pyx_t_20);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":157
* y = (i+2)%3
@@ -9587,10 +9994,16 @@
* if (left_edge[x] <= (u[x] + tl*v[x]) <= right_edge[x]) and \
* (left_edge[y] <= (u[y] + tl*v[y]) <= right_edge[y]) and \
*/
- __pyx_t_19 = __pyx_v_i;
- __pyx_t_20 = __pyx_v_i;
__pyx_t_21 = __pyx_v_i;
- __pyx_v_tr = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_19, __pyx_bstride_0_right_edge)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_20, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_21, __pyx_bstride_0_v)));
+ __pyx_t_22 = __pyx_v_i;
+ __pyx_t_20 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_21, __pyx_bstride_0_right_edge)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_22, __pyx_bstride_0_u)));
+ __pyx_t_23 = __pyx_v_i;
+ __pyx_t_18 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_23, __pyx_bstride_0_v));
+ if (unlikely(__pyx_t_18 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_tr = (__pyx_t_20 / __pyx_t_18);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":158
* tl = (left_edge[i] - u[i])/v[i]
@@ -9599,14 +10012,14 @@
* (left_edge[y] <= (u[y] + tl*v[y]) <= right_edge[y]) and \
* (0.0 <= tl < intersect_t):
*/
- __pyx_t_22 = __pyx_v_x;
- __pyx_t_23 = __pyx_v_x;
__pyx_t_24 = __pyx_v_x;
- __pyx_t_25 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_23, __pyx_bstride_0_u)) + (__pyx_v_tl * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_24, __pyx_bstride_0_v))));
- __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_22, __pyx_bstride_0_left_edge)) <= __pyx_t_25);
+ __pyx_t_25 = __pyx_v_x;
+ __pyx_t_26 = __pyx_v_x;
+ __pyx_t_18 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_25, __pyx_bstride_0_u)) + (__pyx_v_tl * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_26, __pyx_bstride_0_v))));
+ __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_24, __pyx_bstride_0_left_edge)) <= __pyx_t_18);
if (__pyx_t_13) {
- __pyx_t_26 = __pyx_v_x;
- __pyx_t_13 = (__pyx_t_25 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_26, __pyx_bstride_0_right_edge)));
+ __pyx_t_27 = __pyx_v_x;
+ __pyx_t_13 = (__pyx_t_18 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_27, __pyx_bstride_0_right_edge)));
}
if (__pyx_t_13) {
@@ -9617,16 +10030,16 @@
* (0.0 <= tl < intersect_t):
* intersect_t = tl
*/
- __pyx_t_27 = __pyx_v_y;
__pyx_t_28 = __pyx_v_y;
__pyx_t_29 = __pyx_v_y;
- __pyx_t_25 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_28, __pyx_bstride_0_u)) + (__pyx_v_tl * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_29, __pyx_bstride_0_v))));
- __pyx_t_30 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_27, __pyx_bstride_0_left_edge)) <= __pyx_t_25);
- if (__pyx_t_30) {
- __pyx_t_31 = __pyx_v_y;
- __pyx_t_30 = (__pyx_t_25 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_31, __pyx_bstride_0_right_edge)));
+ __pyx_t_30 = __pyx_v_y;
+ __pyx_t_18 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_29, __pyx_bstride_0_u)) + (__pyx_v_tl * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_30, __pyx_bstride_0_v))));
+ __pyx_t_31 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_28, __pyx_bstride_0_left_edge)) <= __pyx_t_18);
+ if (__pyx_t_31) {
+ __pyx_t_32 = __pyx_v_y;
+ __pyx_t_31 = (__pyx_t_18 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_32, __pyx_bstride_0_right_edge)));
}
- if (__pyx_t_30) {
+ if (__pyx_t_31) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":160
* if (left_edge[x] <= (u[x] + tl*v[x]) <= right_edge[x]) and \
@@ -9635,19 +10048,19 @@
* intersect_t = tl
* if (left_edge[x] <= (u[x] + tr*v[x]) <= right_edge[x]) and \
*/
- __pyx_t_32 = (0.0 <= __pyx_v_tl);
- if (__pyx_t_32) {
- __pyx_t_32 = (__pyx_v_tl < __pyx_v_intersect_t);
+ __pyx_t_33 = (0.0 <= __pyx_v_tl);
+ if (__pyx_t_33) {
+ __pyx_t_33 = (__pyx_v_tl < __pyx_v_intersect_t);
}
- __pyx_t_33 = __pyx_t_32;
+ __pyx_t_34 = __pyx_t_33;
} else {
- __pyx_t_33 = __pyx_t_30;
+ __pyx_t_34 = __pyx_t_31;
}
- __pyx_t_30 = __pyx_t_33;
+ __pyx_t_31 = __pyx_t_34;
} else {
- __pyx_t_30 = __pyx_t_13;
+ __pyx_t_31 = __pyx_t_13;
}
- if (__pyx_t_30) {
+ if (__pyx_t_31) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":161
* (left_edge[y] <= (u[y] + tl*v[y]) <= right_edge[y]) and \
@@ -9668,16 +10081,16 @@
* (left_edge[y] <= (u[y] + tr*v[y]) <= right_edge[y]) and \
* (0.0 <= tr < intersect_t):
*/
- __pyx_t_34 = __pyx_v_x;
__pyx_t_35 = __pyx_v_x;
__pyx_t_36 = __pyx_v_x;
- __pyx_t_25 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_35, __pyx_bstride_0_u)) + (__pyx_v_tr * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_36, __pyx_bstride_0_v))));
- __pyx_t_30 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_34, __pyx_bstride_0_left_edge)) <= __pyx_t_25);
- if (__pyx_t_30) {
- __pyx_t_37 = __pyx_v_x;
- __pyx_t_30 = (__pyx_t_25 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_37, __pyx_bstride_0_right_edge)));
+ __pyx_t_37 = __pyx_v_x;
+ __pyx_t_18 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_36, __pyx_bstride_0_u)) + (__pyx_v_tr * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_37, __pyx_bstride_0_v))));
+ __pyx_t_31 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_35, __pyx_bstride_0_left_edge)) <= __pyx_t_18);
+ if (__pyx_t_31) {
+ __pyx_t_38 = __pyx_v_x;
+ __pyx_t_31 = (__pyx_t_18 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_38, __pyx_bstride_0_right_edge)));
}
- if (__pyx_t_30) {
+ if (__pyx_t_31) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":163
* intersect_t = tl
@@ -9686,14 +10099,14 @@
* (0.0 <= tr < intersect_t):
* intersect_t = tr
*/
- __pyx_t_38 = __pyx_v_y;
__pyx_t_39 = __pyx_v_y;
__pyx_t_40 = __pyx_v_y;
- __pyx_t_25 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_39, __pyx_bstride_0_u)) + (__pyx_v_tr * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_40, __pyx_bstride_0_v))));
- __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_38, __pyx_bstride_0_left_edge)) <= __pyx_t_25);
+ __pyx_t_41 = __pyx_v_y;
+ __pyx_t_18 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_40, __pyx_bstride_0_u)) + (__pyx_v_tr * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_41, __pyx_bstride_0_v))));
+ __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_39, __pyx_bstride_0_left_edge)) <= __pyx_t_18);
if (__pyx_t_13) {
- __pyx_t_41 = __pyx_v_y;
- __pyx_t_13 = (__pyx_t_25 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_41, __pyx_bstride_0_right_edge)));
+ __pyx_t_42 = __pyx_v_y;
+ __pyx_t_13 = (__pyx_t_18 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_42, __pyx_bstride_0_right_edge)));
}
if (__pyx_t_13) {
@@ -9704,17 +10117,17 @@
* intersect_t = tr
* # if fully enclosed
*/
- __pyx_t_33 = (0.0 <= __pyx_v_tr);
- if (__pyx_t_33) {
- __pyx_t_33 = (__pyx_v_tr < __pyx_v_intersect_t);
+ __pyx_t_34 = (0.0 <= __pyx_v_tr);
+ if (__pyx_t_34) {
+ __pyx_t_34 = (__pyx_v_tr < __pyx_v_intersect_t);
}
- __pyx_t_32 = __pyx_t_33;
+ __pyx_t_33 = __pyx_t_34;
} else {
- __pyx_t_32 = __pyx_t_13;
+ __pyx_t_33 = __pyx_t_13;
}
- __pyx_t_13 = __pyx_t_32;
+ __pyx_t_13 = __pyx_t_33;
} else {
- __pyx_t_13 = __pyx_t_30;
+ __pyx_t_13 = __pyx_t_31;
}
if (__pyx_t_13) {
@@ -9738,13 +10151,13 @@
* (left_edge[1] <= u[1] <= right_edge[1]) and \
* (left_edge[2] <= u[2] <= right_edge[2]):
*/
- __pyx_t_42 = 0;
__pyx_t_43 = 0;
- __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_43, __pyx_bstride_0_u));
- __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_42, __pyx_bstride_0_left_edge)) <= __pyx_t_25);
+ __pyx_t_44 = 0;
+ __pyx_t_18 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_44, __pyx_bstride_0_u));
+ __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_43, __pyx_bstride_0_left_edge)) <= __pyx_t_18);
if (__pyx_t_13) {
- __pyx_t_44 = 0;
- __pyx_t_13 = (__pyx_t_25 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_44, __pyx_bstride_0_right_edge)));
+ __pyx_t_45 = 0;
+ __pyx_t_13 = (__pyx_t_18 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_45, __pyx_bstride_0_right_edge)));
}
if (__pyx_t_13) {
@@ -9755,15 +10168,15 @@
* (left_edge[2] <= u[2] <= right_edge[2]):
* intersect_t = 0.0
*/
- __pyx_t_45 = 1;
__pyx_t_46 = 1;
- __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_46, __pyx_bstride_0_u));
- __pyx_t_30 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_45, __pyx_bstride_0_left_edge)) <= __pyx_t_25);
- if (__pyx_t_30) {
- __pyx_t_47 = 1;
- __pyx_t_30 = (__pyx_t_25 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_47, __pyx_bstride_0_right_edge)));
+ __pyx_t_47 = 1;
+ __pyx_t_18 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_47, __pyx_bstride_0_u));
+ __pyx_t_31 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_46, __pyx_bstride_0_left_edge)) <= __pyx_t_18);
+ if (__pyx_t_31) {
+ __pyx_t_48 = 1;
+ __pyx_t_31 = (__pyx_t_18 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_48, __pyx_bstride_0_right_edge)));
}
- if (__pyx_t_30) {
+ if (__pyx_t_31) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":169
* if (left_edge[0] <= u[0] <= right_edge[0]) and \
@@ -9772,23 +10185,23 @@
* intersect_t = 0.0
* if not (0 <= intersect_t <= 1): return
*/
- __pyx_t_48 = 2;
__pyx_t_49 = 2;
- __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_49, __pyx_bstride_0_u));
- __pyx_t_32 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_48, __pyx_bstride_0_left_edge)) <= __pyx_t_25);
- if (__pyx_t_32) {
- __pyx_t_50 = 2;
- __pyx_t_32 = (__pyx_t_25 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_50, __pyx_bstride_0_right_edge)));
+ __pyx_t_50 = 2;
+ __pyx_t_18 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_50, __pyx_bstride_0_u));
+ __pyx_t_33 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_49, __pyx_bstride_0_left_edge)) <= __pyx_t_18);
+ if (__pyx_t_33) {
+ __pyx_t_51 = 2;
+ __pyx_t_33 = (__pyx_t_18 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_51, __pyx_bstride_0_right_edge)));
}
- __pyx_t_33 = __pyx_t_32;
+ __pyx_t_34 = __pyx_t_33;
} else {
- __pyx_t_33 = __pyx_t_30;
+ __pyx_t_34 = __pyx_t_31;
}
- __pyx_t_30 = __pyx_t_33;
+ __pyx_t_31 = __pyx_t_34;
} else {
- __pyx_t_30 = __pyx_t_13;
+ __pyx_t_31 = __pyx_t_13;
}
- if (__pyx_t_30) {
+ if (__pyx_t_31) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":170
* (left_edge[1] <= u[1] <= right_edge[1]) and \
@@ -9809,11 +10222,11 @@
* # Now get the indices of the intersection
* intersect = u + intersect_t * v
*/
- __pyx_t_30 = (0 <= __pyx_v_intersect_t);
- if (__pyx_t_30) {
- __pyx_t_30 = (__pyx_v_intersect_t <= 1);
+ __pyx_t_31 = (0.0 <= __pyx_v_intersect_t);
+ if (__pyx_t_31) {
+ __pyx_t_31 = (__pyx_v_intersect_t <= 1.0);
}
- __pyx_t_13 = (!__pyx_t_30);
+ __pyx_t_13 = (!__pyx_t_31);
if (__pyx_t_13) {
__Pyx_XDECREF(__pyx_r);
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
@@ -9844,12 +10257,12 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_intersect);
__pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_intersect, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
if (unlikely(__pyx_t_11 < 0)) {
- PyErr_Fetch(&__pyx_t_51, &__pyx_t_52, &__pyx_t_53);
+ PyErr_Fetch(&__pyx_t_52, &__pyx_t_53, &__pyx_t_54);
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_intersect, (PyObject*)__pyx_v_intersect, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
- Py_XDECREF(__pyx_t_51); Py_XDECREF(__pyx_t_52); Py_XDECREF(__pyx_t_53);
+ Py_XDECREF(__pyx_t_52); Py_XDECREF(__pyx_t_53); Py_XDECREF(__pyx_t_54);
__Pyx_RaiseBufferFallbackError();
} else {
- PyErr_Restore(__pyx_t_51, __pyx_t_52, __pyx_t_53);
+ PyErr_Restore(__pyx_t_52, __pyx_t_53, __pyx_t_54);
}
}
__pyx_bstride_0_intersect = __pyx_bstruct_intersect.strides[0];
@@ -9883,11 +10296,17 @@
__pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__floor); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_54 = __pyx_v_i;
__pyx_t_55 = __pyx_v_i;
__pyx_t_56 = __pyx_v_i;
__pyx_t_57 = __pyx_v_i;
- __pyx_t_5 = PyFloat_FromDouble(((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_intersect.buf, __pyx_t_54, __pyx_bstride_0_intersect)) + (1e-08 * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_55, __pyx_bstride_0_dx)))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_56, __pyx_bstride_0_left_edge))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_57, __pyx_bstride_0_dx)))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_intersect.buf, __pyx_t_55, __pyx_bstride_0_intersect)) + (1e-8 * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_56, __pyx_bstride_0_dx)))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_57, __pyx_bstride_0_left_edge)));
+ __pyx_t_58 = __pyx_v_i;
+ __pyx_t_20 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_58, __pyx_bstride_0_dx));
+ if (unlikely(__pyx_t_20 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_5 = PyFloat_FromDouble((__pyx_t_18 / __pyx_t_20)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
@@ -9898,10 +10317,10 @@
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_58 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_58 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_59 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_5); if (unlikely((__pyx_t_59 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_59 = __pyx_v_i;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_59, __pyx_bstride_0_cur_ind) = __pyx_t_58;
+ __pyx_t_60 = __pyx_v_i;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_60, __pyx_bstride_0_cur_ind) = __pyx_t_59;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":176
* for i in range(3):
@@ -9910,14 +10329,20 @@
* if cur_ind[i] == grid_mask.shape[i] and step[i] < 0:
* cur_ind[i] = grid_mask.shape[i] - 1
*/
- __pyx_t_60 = __pyx_v_i;
__pyx_t_61 = __pyx_v_i;
__pyx_t_62 = __pyx_v_i;
__pyx_t_63 = __pyx_v_i;
__pyx_t_64 = __pyx_v_i;
__pyx_t_65 = __pyx_v_i;
+ __pyx_t_20 = (((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_61, __pyx_bstride_0_cur_ind)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_62, __pyx_bstride_0_step))) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_63, __pyx_bstride_0_dx))) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_64, __pyx_bstride_0_left_edge))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_65, __pyx_bstride_0_u)));
__pyx_t_66 = __pyx_v_i;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_66, __pyx_bstride_0_tmax) = ((((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_60, __pyx_bstride_0_cur_ind)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_61, __pyx_bstride_0_step))) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_62, __pyx_bstride_0_dx))) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_63, __pyx_bstride_0_left_edge))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_64, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_65, __pyx_bstride_0_v)));
+ __pyx_t_18 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_66, __pyx_bstride_0_v));
+ if (unlikely(__pyx_t_18 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_67 = __pyx_v_i;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_67, __pyx_bstride_0_tmax) = (__pyx_t_20 / __pyx_t_18);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":177
* cur_ind[i] = np.floor((intersect[i] + 1e-8*dx[i] - left_edge[i])/dx[i])
@@ -9926,16 +10351,16 @@
* cur_ind[i] = grid_mask.shape[i] - 1
* if step[i] > 0: tmax[i] = (((cur_ind[i]+1)*dx[i])+left_edge[i]-u[i])/v[i]
*/
- __pyx_t_67 = __pyx_v_i;
- __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_67, __pyx_bstride_0_cur_ind)) == (__pyx_v_grid_mask->dimensions[__pyx_v_i]));
+ __pyx_t_68 = __pyx_v_i;
+ __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_68, __pyx_bstride_0_cur_ind)) == (__pyx_v_grid_mask->dimensions[__pyx_v_i]));
if (__pyx_t_13) {
- __pyx_t_68 = __pyx_v_i;
- __pyx_t_30 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_68, __pyx_bstride_0_step)) < 0);
- __pyx_t_33 = __pyx_t_30;
+ __pyx_t_69 = __pyx_v_i;
+ __pyx_t_31 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_69, __pyx_bstride_0_step)) < 0);
+ __pyx_t_34 = __pyx_t_31;
} else {
- __pyx_t_33 = __pyx_t_13;
+ __pyx_t_34 = __pyx_t_13;
}
- if (__pyx_t_33) {
+ if (__pyx_t_34) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":178
* tmax[i] = (((cur_ind[i]+step[i])*dx[i])+left_edge[i]-u[i])/v[i]
@@ -9944,8 +10369,8 @@
* if step[i] > 0: tmax[i] = (((cur_ind[i]+1)*dx[i])+left_edge[i]-u[i])/v[i]
* if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i]
*/
- __pyx_t_69 = __pyx_v_i;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_69, __pyx_bstride_0_cur_ind) = ((__pyx_v_grid_mask->dimensions[__pyx_v_i]) - 1);
+ __pyx_t_70 = __pyx_v_i;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_70, __pyx_bstride_0_cur_ind) = ((__pyx_v_grid_mask->dimensions[__pyx_v_i]) - 1);
goto __pyx_L15;
}
__pyx_L15:;
@@ -9957,16 +10382,22 @@
* if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i]
* tdelta[i] = (dx[i]/v[i])
*/
- __pyx_t_70 = __pyx_v_i;
- __pyx_t_33 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_70, __pyx_bstride_0_step)) > 0);
- if (__pyx_t_33) {
- __pyx_t_71 = __pyx_v_i;
+ __pyx_t_71 = __pyx_v_i;
+ __pyx_t_34 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_71, __pyx_bstride_0_step)) > 0);
+ if (__pyx_t_34) {
__pyx_t_72 = __pyx_v_i;
__pyx_t_73 = __pyx_v_i;
__pyx_t_74 = __pyx_v_i;
__pyx_t_75 = __pyx_v_i;
+ __pyx_t_18 = (((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_72, __pyx_bstride_0_cur_ind)) + 1) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_73, __pyx_bstride_0_dx))) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_74, __pyx_bstride_0_left_edge))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_75, __pyx_bstride_0_u)));
__pyx_t_76 = __pyx_v_i;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_76, __pyx_bstride_0_tmax) = ((((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_71, __pyx_bstride_0_cur_ind)) + 1) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_72, __pyx_bstride_0_dx))) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_73, __pyx_bstride_0_left_edge))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_74, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_75, __pyx_bstride_0_v)));
+ __pyx_t_20 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_76, __pyx_bstride_0_v));
+ if (unlikely(__pyx_t_20 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_77 = __pyx_v_i;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_77, __pyx_bstride_0_tmax) = (__pyx_t_18 / __pyx_t_20);
goto __pyx_L16;
}
__pyx_L16:;
@@ -9978,16 +10409,22 @@
* tdelta[i] = (dx[i]/v[i])
* if tdelta[i] < 0: tdelta[i] *= -1
*/
- __pyx_t_77 = __pyx_v_i;
- __pyx_t_33 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_77, __pyx_bstride_0_step)) < 0);
- if (__pyx_t_33) {
- __pyx_t_78 = __pyx_v_i;
+ __pyx_t_78 = __pyx_v_i;
+ __pyx_t_34 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_78, __pyx_bstride_0_step)) < 0);
+ if (__pyx_t_34) {
__pyx_t_79 = __pyx_v_i;
__pyx_t_80 = __pyx_v_i;
__pyx_t_81 = __pyx_v_i;
__pyx_t_82 = __pyx_v_i;
+ __pyx_t_20 = (((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_79, __pyx_bstride_0_cur_ind)) + 0) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_80, __pyx_bstride_0_dx))) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_81, __pyx_bstride_0_left_edge))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_82, __pyx_bstride_0_u)));
__pyx_t_83 = __pyx_v_i;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_83, __pyx_bstride_0_tmax) = ((((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_78, __pyx_bstride_0_cur_ind)) + 0) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_79, __pyx_bstride_0_dx))) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_80, __pyx_bstride_0_left_edge))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_81, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_82, __pyx_bstride_0_v)));
+ __pyx_t_18 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_83, __pyx_bstride_0_v));
+ if (unlikely(__pyx_t_18 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_84 = __pyx_v_i;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_84, __pyx_bstride_0_tmax) = (__pyx_t_20 / __pyx_t_18);
goto __pyx_L17;
}
__pyx_L17:;
@@ -9999,10 +10436,16 @@
* if tdelta[i] < 0: tdelta[i] *= -1
* # The variable intersect contains the point we first pierce the grid
*/
- __pyx_t_84 = __pyx_v_i;
__pyx_t_85 = __pyx_v_i;
+ __pyx_t_18 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_85, __pyx_bstride_0_dx));
__pyx_t_86 = __pyx_v_i;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_86, __pyx_bstride_0_tdelta) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_84, __pyx_bstride_0_dx)) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_85, __pyx_bstride_0_v)));
+ __pyx_t_20 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_86, __pyx_bstride_0_v));
+ if (unlikely(__pyx_t_20 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_87 = __pyx_v_i;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_87, __pyx_bstride_0_tdelta) = (__pyx_t_18 / __pyx_t_20);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":182
* if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i]
@@ -10011,11 +10454,11 @@
* # The variable intersect contains the point we first pierce the grid
* enter_t = intersect_t
*/
- __pyx_t_87 = __pyx_v_i;
- __pyx_t_33 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_87, __pyx_bstride_0_tdelta)) < 0);
- if (__pyx_t_33) {
- __pyx_t_88 = __pyx_v_i;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_88, __pyx_bstride_0_tdelta) *= -1;
+ __pyx_t_88 = __pyx_v_i;
+ __pyx_t_34 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_88, __pyx_bstride_0_tdelta)) < 0.0);
+ if (__pyx_t_34) {
+ __pyx_t_89 = __pyx_v_i;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_89, __pyx_bstride_0_tdelta) *= -1.0;
goto __pyx_L18;
}
__pyx_L18:;
@@ -10038,8 +10481,7 @@
* (not (0 <= cur_ind[1] < grid_mask.shape[1])) or \
*/
while (1) {
- __pyx_t_33 = 1;
- if (!__pyx_t_33) break;
+ if (!1) break;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":186
* enter_t = intersect_t
@@ -10048,13 +10490,13 @@
* (not (0 <= cur_ind[1] < grid_mask.shape[1])) or \
* (not (0 <= cur_ind[2] < grid_mask.shape[2])):
*/
- __pyx_t_89 = 0;
- __pyx_t_58 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_89, __pyx_bstride_0_cur_ind));
- __pyx_t_33 = (0 <= __pyx_t_58);
- if (__pyx_t_33) {
- __pyx_t_33 = (__pyx_t_58 < (__pyx_v_grid_mask->dimensions[0]));
+ __pyx_t_90 = 0;
+ __pyx_t_59 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_90, __pyx_bstride_0_cur_ind));
+ __pyx_t_34 = (0 <= __pyx_t_59);
+ if (__pyx_t_34) {
+ __pyx_t_34 = (__pyx_t_59 < (__pyx_v_grid_mask->dimensions[0]));
}
- __pyx_t_13 = (!__pyx_t_33);
+ __pyx_t_13 = (!__pyx_t_34);
if (!__pyx_t_13) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":187
@@ -10064,14 +10506,14 @@
* (not (0 <= cur_ind[2] < grid_mask.shape[2])):
* break
*/
- __pyx_t_90 = 1;
- __pyx_t_58 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_90, __pyx_bstride_0_cur_ind));
- __pyx_t_33 = (0 <= __pyx_t_58);
- if (__pyx_t_33) {
- __pyx_t_33 = (__pyx_t_58 < (__pyx_v_grid_mask->dimensions[1]));
+ __pyx_t_91 = 1;
+ __pyx_t_59 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_91, __pyx_bstride_0_cur_ind));
+ __pyx_t_34 = (0 <= __pyx_t_59);
+ if (__pyx_t_34) {
+ __pyx_t_34 = (__pyx_t_59 < (__pyx_v_grid_mask->dimensions[1]));
}
- __pyx_t_30 = (!__pyx_t_33);
- if (!__pyx_t_30) {
+ __pyx_t_31 = (!__pyx_t_34);
+ if (!__pyx_t_31) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":188
* if (not (0 <= cur_ind[0] < grid_mask.shape[0])) or \
@@ -10080,22 +10522,22 @@
* break
* # Note that we are calculating t on the fly, but we get *negative* t
*/
- __pyx_t_91 = 2;
- __pyx_t_58 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_91, __pyx_bstride_0_cur_ind));
- __pyx_t_33 = (0 <= __pyx_t_58);
- if (__pyx_t_33) {
- __pyx_t_33 = (__pyx_t_58 < (__pyx_v_grid_mask->dimensions[2]));
+ __pyx_t_92 = 2;
+ __pyx_t_59 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_92, __pyx_bstride_0_cur_ind));
+ __pyx_t_34 = (0 <= __pyx_t_59);
+ if (__pyx_t_34) {
+ __pyx_t_34 = (__pyx_t_59 < (__pyx_v_grid_mask->dimensions[2]));
}
- __pyx_t_32 = (!__pyx_t_33);
- __pyx_t_33 = __pyx_t_32;
+ __pyx_t_33 = (!__pyx_t_34);
+ __pyx_t_34 = __pyx_t_33;
} else {
- __pyx_t_33 = __pyx_t_30;
+ __pyx_t_34 = __pyx_t_31;
}
- __pyx_t_30 = __pyx_t_33;
+ __pyx_t_31 = __pyx_t_34;
} else {
- __pyx_t_30 = __pyx_t_13;
+ __pyx_t_31 = __pyx_t_13;
}
- if (__pyx_t_30) {
+ if (__pyx_t_31) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":189
* (not (0 <= cur_ind[1] < grid_mask.shape[1])) or \
@@ -10116,13 +10558,13 @@
* if (tmax[0] > 1.0) and (tmax[1] > 1.0) and (tmax[2] > 1.0):
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = 1.0 - enter_t
*/
- __pyx_t_92 = 0;
- __pyx_t_93 = 1;
- __pyx_t_94 = 2;
- __pyx_t_58 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_92, __pyx_bstride_0_cur_ind));
- __pyx_t_95 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_93, __pyx_bstride_0_cur_ind));
+ __pyx_t_93 = 0;
+ __pyx_t_94 = 1;
+ __pyx_t_95 = 2;
+ __pyx_t_59 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_93, __pyx_bstride_0_cur_ind));
__pyx_t_96 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_94, __pyx_bstride_0_cur_ind));
- *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int_t *, __pyx_bstruct_grid_mask.buf, __pyx_t_58, __pyx_bstride_0_grid_mask, __pyx_t_95, __pyx_bstride_1_grid_mask, __pyx_t_96, __pyx_bstride_2_grid_mask) = 1;
+ __pyx_t_97 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_95, __pyx_bstride_0_cur_ind));
+ *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int_t *, __pyx_bstruct_grid_mask.buf, __pyx_t_59, __pyx_bstride_0_grid_mask, __pyx_t_96, __pyx_bstride_1_grid_mask, __pyx_t_97, __pyx_bstride_2_grid_mask) = 1;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":194
* # If we've reached t = 1, we are done.
@@ -10131,21 +10573,21 @@
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = 1.0 - enter_t
* break
*/
- __pyx_t_97 = 0;
- __pyx_t_30 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_97, __pyx_bstride_0_tmax)) > 1.0);
- if (__pyx_t_30) {
- __pyx_t_98 = 1;
- __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_98, __pyx_bstride_0_tmax)) > 1.0);
+ __pyx_t_98 = 0;
+ __pyx_t_31 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_98, __pyx_bstride_0_tmax)) > 1.0);
+ if (__pyx_t_31) {
+ __pyx_t_99 = 1;
+ __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_99, __pyx_bstride_0_tmax)) > 1.0);
if (__pyx_t_13) {
- __pyx_t_99 = 2;
- __pyx_t_33 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_99, __pyx_bstride_0_tmax)) > 1.0);
- __pyx_t_32 = __pyx_t_33;
+ __pyx_t_100 = 2;
+ __pyx_t_34 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_100, __pyx_bstride_0_tmax)) > 1.0);
+ __pyx_t_33 = __pyx_t_34;
} else {
- __pyx_t_32 = __pyx_t_13;
+ __pyx_t_33 = __pyx_t_13;
}
- __pyx_t_13 = __pyx_t_32;
+ __pyx_t_13 = __pyx_t_33;
} else {
- __pyx_t_13 = __pyx_t_30;
+ __pyx_t_13 = __pyx_t_31;
}
if (__pyx_t_13) {
@@ -10156,13 +10598,13 @@
* break
* if tmax[0] < tmax[1]:
*/
- __pyx_t_100 = 0;
- __pyx_t_101 = 1;
- __pyx_t_102 = 2;
- __pyx_t_103 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_100, __pyx_bstride_0_cur_ind));
+ __pyx_t_101 = 0;
+ __pyx_t_102 = 1;
+ __pyx_t_103 = 2;
__pyx_t_104 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_101, __pyx_bstride_0_cur_ind));
__pyx_t_105 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_102, __pyx_bstride_0_cur_ind));
- *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_dt.buf, __pyx_t_103, __pyx_bstride_0_grid_dt, __pyx_t_104, __pyx_bstride_1_grid_dt, __pyx_t_105, __pyx_bstride_2_grid_dt) = (1.0 - __pyx_v_enter_t);
+ __pyx_t_106 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_103, __pyx_bstride_0_cur_ind));
+ *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_dt.buf, __pyx_t_104, __pyx_bstride_0_grid_dt, __pyx_t_105, __pyx_bstride_1_grid_dt, __pyx_t_106, __pyx_bstride_2_grid_dt) = (1.0 - __pyx_v_enter_t);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":196
* if (tmax[0] > 1.0) and (tmax[1] > 1.0) and (tmax[2] > 1.0):
@@ -10183,9 +10625,9 @@
* if tmax[0] < tmax[2]:
* grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = enter_t
*/
- __pyx_t_106 = 0;
- __pyx_t_107 = 1;
- __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_106, __pyx_bstride_0_tmax)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_107, __pyx_bstride_0_tmax)));
+ __pyx_t_107 = 0;
+ __pyx_t_108 = 1;
+ __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_107, __pyx_bstride_0_tmax)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_108, __pyx_bstride_0_tmax)));
if (__pyx_t_13) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":198
@@ -10195,9 +10637,9 @@
* grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = enter_t
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[0] - enter_t
*/
- __pyx_t_108 = 0;
- __pyx_t_109 = 2;
- __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_108, __pyx_bstride_0_tmax)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_109, __pyx_bstride_0_tmax)));
+ __pyx_t_109 = 0;
+ __pyx_t_110 = 2;
+ __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_109, __pyx_bstride_0_tmax)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_110, __pyx_bstride_0_tmax)));
if (__pyx_t_13) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":199
@@ -10207,13 +10649,13 @@
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[0] - enter_t
* enter_t = tmax[0]
*/
- __pyx_t_110 = 0;
- __pyx_t_111 = 1;
- __pyx_t_112 = 2;
- __pyx_t_113 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_110, __pyx_bstride_0_cur_ind));
+ __pyx_t_111 = 0;
+ __pyx_t_112 = 1;
+ __pyx_t_113 = 2;
__pyx_t_114 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_111, __pyx_bstride_0_cur_ind));
__pyx_t_115 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_112, __pyx_bstride_0_cur_ind));
- *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_t.buf, __pyx_t_113, __pyx_bstride_0_grid_t, __pyx_t_114, __pyx_bstride_1_grid_t, __pyx_t_115, __pyx_bstride_2_grid_t) = __pyx_v_enter_t;
+ __pyx_t_116 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_113, __pyx_bstride_0_cur_ind));
+ *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_t.buf, __pyx_t_114, __pyx_bstride_0_grid_t, __pyx_t_115, __pyx_bstride_1_grid_t, __pyx_t_116, __pyx_bstride_2_grid_t) = __pyx_v_enter_t;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":200
* if tmax[0] < tmax[2]:
@@ -10222,14 +10664,14 @@
* enter_t = tmax[0]
* tmax[0] += tdelta[0]
*/
- __pyx_t_116 = 0;
__pyx_t_117 = 0;
- __pyx_t_118 = 1;
- __pyx_t_119 = 2;
- __pyx_t_120 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_117, __pyx_bstride_0_cur_ind));
+ __pyx_t_118 = 0;
+ __pyx_t_119 = 1;
+ __pyx_t_120 = 2;
__pyx_t_121 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_118, __pyx_bstride_0_cur_ind));
__pyx_t_122 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_119, __pyx_bstride_0_cur_ind));
- *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_dt.buf, __pyx_t_120, __pyx_bstride_0_grid_dt, __pyx_t_121, __pyx_bstride_1_grid_dt, __pyx_t_122, __pyx_bstride_2_grid_dt) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_116, __pyx_bstride_0_tmax)) - __pyx_v_enter_t);
+ __pyx_t_123 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_120, __pyx_bstride_0_cur_ind));
+ *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_dt.buf, __pyx_t_121, __pyx_bstride_0_grid_dt, __pyx_t_122, __pyx_bstride_1_grid_dt, __pyx_t_123, __pyx_bstride_2_grid_dt) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_117, __pyx_bstride_0_tmax)) - __pyx_v_enter_t);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":201
* grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = enter_t
@@ -10238,8 +10680,8 @@
* tmax[0] += tdelta[0]
* cur_ind[0] += step[0]
*/
- __pyx_t_123 = 0;
- __pyx_v_enter_t = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_123, __pyx_bstride_0_tmax));
+ __pyx_t_124 = 0;
+ __pyx_v_enter_t = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_124, __pyx_bstride_0_tmax));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":202
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[0] - enter_t
@@ -10248,9 +10690,9 @@
* cur_ind[0] += step[0]
* else:
*/
- __pyx_t_124 = 0;
__pyx_t_125 = 0;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_125, __pyx_bstride_0_tmax) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_124, __pyx_bstride_0_tdelta));
+ __pyx_t_126 = 0;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_126, __pyx_bstride_0_tmax) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_125, __pyx_bstride_0_tdelta));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":203
* enter_t = tmax[0]
@@ -10259,9 +10701,9 @@
* else:
* grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = enter_t
*/
- __pyx_t_126 = 0;
__pyx_t_127 = 0;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_127, __pyx_bstride_0_cur_ind) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_126, __pyx_bstride_0_step));
+ __pyx_t_128 = 0;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_128, __pyx_bstride_0_cur_ind) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_127, __pyx_bstride_0_step));
goto __pyx_L24;
}
/*else*/ {
@@ -10273,13 +10715,13 @@
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[2] - enter_t
* enter_t = tmax[2]
*/
- __pyx_t_128 = 0;
- __pyx_t_129 = 1;
- __pyx_t_130 = 2;
- __pyx_t_131 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_128, __pyx_bstride_0_cur_ind));
+ __pyx_t_129 = 0;
+ __pyx_t_130 = 1;
+ __pyx_t_131 = 2;
__pyx_t_132 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_129, __pyx_bstride_0_cur_ind));
__pyx_t_133 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_130, __pyx_bstride_0_cur_ind));
- *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_t.buf, __pyx_t_131, __pyx_bstride_0_grid_t, __pyx_t_132, __pyx_bstride_1_grid_t, __pyx_t_133, __pyx_bstride_2_grid_t) = __pyx_v_enter_t;
+ __pyx_t_134 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_131, __pyx_bstride_0_cur_ind));
+ *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_t.buf, __pyx_t_132, __pyx_bstride_0_grid_t, __pyx_t_133, __pyx_bstride_1_grid_t, __pyx_t_134, __pyx_bstride_2_grid_t) = __pyx_v_enter_t;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":206
* else:
@@ -10288,14 +10730,14 @@
* enter_t = tmax[2]
* tmax[2] += tdelta[2]
*/
- __pyx_t_134 = 2;
- __pyx_t_135 = 0;
- __pyx_t_136 = 1;
- __pyx_t_137 = 2;
- __pyx_t_138 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_135, __pyx_bstride_0_cur_ind));
+ __pyx_t_135 = 2;
+ __pyx_t_136 = 0;
+ __pyx_t_137 = 1;
+ __pyx_t_138 = 2;
__pyx_t_139 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_136, __pyx_bstride_0_cur_ind));
__pyx_t_140 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_137, __pyx_bstride_0_cur_ind));
- *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_dt.buf, __pyx_t_138, __pyx_bstride_0_grid_dt, __pyx_t_139, __pyx_bstride_1_grid_dt, __pyx_t_140, __pyx_bstride_2_grid_dt) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_134, __pyx_bstride_0_tmax)) - __pyx_v_enter_t);
+ __pyx_t_141 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_138, __pyx_bstride_0_cur_ind));
+ *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_dt.buf, __pyx_t_139, __pyx_bstride_0_grid_dt, __pyx_t_140, __pyx_bstride_1_grid_dt, __pyx_t_141, __pyx_bstride_2_grid_dt) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_135, __pyx_bstride_0_tmax)) - __pyx_v_enter_t);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":207
* grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = enter_t
@@ -10304,8 +10746,8 @@
* tmax[2] += tdelta[2]
* cur_ind[2] += step[2]
*/
- __pyx_t_141 = 2;
- __pyx_v_enter_t = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_141, __pyx_bstride_0_tmax));
+ __pyx_t_142 = 2;
+ __pyx_v_enter_t = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_142, __pyx_bstride_0_tmax));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":208
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[2] - enter_t
@@ -10314,9 +10756,9 @@
* cur_ind[2] += step[2]
* else:
*/
- __pyx_t_142 = 2;
__pyx_t_143 = 2;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_143, __pyx_bstride_0_tmax) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_142, __pyx_bstride_0_tdelta));
+ __pyx_t_144 = 2;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_144, __pyx_bstride_0_tmax) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_143, __pyx_bstride_0_tdelta));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":209
* enter_t = tmax[2]
@@ -10325,9 +10767,9 @@
* else:
* if tmax[1] < tmax[2]:
*/
- __pyx_t_144 = 2;
__pyx_t_145 = 2;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_145, __pyx_bstride_0_cur_ind) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_144, __pyx_bstride_0_step));
+ __pyx_t_146 = 2;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_146, __pyx_bstride_0_cur_ind) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_145, __pyx_bstride_0_step));
}
__pyx_L24:;
goto __pyx_L23;
@@ -10341,9 +10783,9 @@
* grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = enter_t
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[1] - enter_t
*/
- __pyx_t_146 = 1;
- __pyx_t_147 = 2;
- __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_146, __pyx_bstride_0_tmax)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_147, __pyx_bstride_0_tmax)));
+ __pyx_t_147 = 1;
+ __pyx_t_148 = 2;
+ __pyx_t_13 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_147, __pyx_bstride_0_tmax)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_148, __pyx_bstride_0_tmax)));
if (__pyx_t_13) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":212
@@ -10353,13 +10795,13 @@
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[1] - enter_t
* enter_t = tmax[1]
*/
- __pyx_t_148 = 0;
- __pyx_t_149 = 1;
- __pyx_t_150 = 2;
- __pyx_t_151 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_148, __pyx_bstride_0_cur_ind));
+ __pyx_t_149 = 0;
+ __pyx_t_150 = 1;
+ __pyx_t_151 = 2;
__pyx_t_152 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_149, __pyx_bstride_0_cur_ind));
__pyx_t_153 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_150, __pyx_bstride_0_cur_ind));
- *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_t.buf, __pyx_t_151, __pyx_bstride_0_grid_t, __pyx_t_152, __pyx_bstride_1_grid_t, __pyx_t_153, __pyx_bstride_2_grid_t) = __pyx_v_enter_t;
+ __pyx_t_154 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_151, __pyx_bstride_0_cur_ind));
+ *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_t.buf, __pyx_t_152, __pyx_bstride_0_grid_t, __pyx_t_153, __pyx_bstride_1_grid_t, __pyx_t_154, __pyx_bstride_2_grid_t) = __pyx_v_enter_t;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":213
* if tmax[1] < tmax[2]:
@@ -10368,14 +10810,14 @@
* enter_t = tmax[1]
* tmax[1] += tdelta[1]
*/
- __pyx_t_154 = 1;
- __pyx_t_155 = 0;
- __pyx_t_156 = 1;
- __pyx_t_157 = 2;
- __pyx_t_158 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_155, __pyx_bstride_0_cur_ind));
+ __pyx_t_155 = 1;
+ __pyx_t_156 = 0;
+ __pyx_t_157 = 1;
+ __pyx_t_158 = 2;
__pyx_t_159 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_156, __pyx_bstride_0_cur_ind));
__pyx_t_160 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_157, __pyx_bstride_0_cur_ind));
- *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_dt.buf, __pyx_t_158, __pyx_bstride_0_grid_dt, __pyx_t_159, __pyx_bstride_1_grid_dt, __pyx_t_160, __pyx_bstride_2_grid_dt) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_154, __pyx_bstride_0_tmax)) - __pyx_v_enter_t);
+ __pyx_t_161 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_158, __pyx_bstride_0_cur_ind));
+ *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_dt.buf, __pyx_t_159, __pyx_bstride_0_grid_dt, __pyx_t_160, __pyx_bstride_1_grid_dt, __pyx_t_161, __pyx_bstride_2_grid_dt) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_155, __pyx_bstride_0_tmax)) - __pyx_v_enter_t);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":214
* grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = enter_t
@@ -10384,8 +10826,8 @@
* tmax[1] += tdelta[1]
* cur_ind[1] += step[1]
*/
- __pyx_t_161 = 1;
- __pyx_v_enter_t = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_161, __pyx_bstride_0_tmax));
+ __pyx_t_162 = 1;
+ __pyx_v_enter_t = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_162, __pyx_bstride_0_tmax));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":215
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[1] - enter_t
@@ -10394,9 +10836,9 @@
* cur_ind[1] += step[1]
* else:
*/
- __pyx_t_162 = 1;
__pyx_t_163 = 1;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_163, __pyx_bstride_0_tmax) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_162, __pyx_bstride_0_tdelta));
+ __pyx_t_164 = 1;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_164, __pyx_bstride_0_tmax) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_163, __pyx_bstride_0_tdelta));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":216
* enter_t = tmax[1]
@@ -10405,9 +10847,9 @@
* else:
* grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = enter_t
*/
- __pyx_t_164 = 1;
__pyx_t_165 = 1;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_165, __pyx_bstride_0_cur_ind) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_164, __pyx_bstride_0_step));
+ __pyx_t_166 = 1;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_166, __pyx_bstride_0_cur_ind) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_165, __pyx_bstride_0_step));
goto __pyx_L25;
}
/*else*/ {
@@ -10419,13 +10861,13 @@
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[2] - enter_t
* enter_t = tmax[2]
*/
- __pyx_t_166 = 0;
- __pyx_t_167 = 1;
- __pyx_t_168 = 2;
- __pyx_t_169 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_166, __pyx_bstride_0_cur_ind));
+ __pyx_t_167 = 0;
+ __pyx_t_168 = 1;
+ __pyx_t_169 = 2;
__pyx_t_170 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_167, __pyx_bstride_0_cur_ind));
__pyx_t_171 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_168, __pyx_bstride_0_cur_ind));
- *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_t.buf, __pyx_t_169, __pyx_bstride_0_grid_t, __pyx_t_170, __pyx_bstride_1_grid_t, __pyx_t_171, __pyx_bstride_2_grid_t) = __pyx_v_enter_t;
+ __pyx_t_172 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_169, __pyx_bstride_0_cur_ind));
+ *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_t.buf, __pyx_t_170, __pyx_bstride_0_grid_t, __pyx_t_171, __pyx_bstride_1_grid_t, __pyx_t_172, __pyx_bstride_2_grid_t) = __pyx_v_enter_t;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":219
* else:
@@ -10434,14 +10876,14 @@
* enter_t = tmax[2]
* tmax[2] += tdelta[2]
*/
- __pyx_t_172 = 2;
- __pyx_t_173 = 0;
- __pyx_t_174 = 1;
- __pyx_t_175 = 2;
- __pyx_t_176 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_173, __pyx_bstride_0_cur_ind));
+ __pyx_t_173 = 2;
+ __pyx_t_174 = 0;
+ __pyx_t_175 = 1;
+ __pyx_t_176 = 2;
__pyx_t_177 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_174, __pyx_bstride_0_cur_ind));
__pyx_t_178 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_175, __pyx_bstride_0_cur_ind));
- *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_dt.buf, __pyx_t_176, __pyx_bstride_0_grid_dt, __pyx_t_177, __pyx_bstride_1_grid_dt, __pyx_t_178, __pyx_bstride_2_grid_dt) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_172, __pyx_bstride_0_tmax)) - __pyx_v_enter_t);
+ __pyx_t_179 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_176, __pyx_bstride_0_cur_ind));
+ *__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_dt.buf, __pyx_t_177, __pyx_bstride_0_grid_dt, __pyx_t_178, __pyx_bstride_1_grid_dt, __pyx_t_179, __pyx_bstride_2_grid_dt) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_173, __pyx_bstride_0_tmax)) - __pyx_v_enter_t);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":220
* grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = enter_t
@@ -10450,8 +10892,8 @@
* tmax[2] += tdelta[2]
* cur_ind[2] += step[2]
*/
- __pyx_t_179 = 2;
- __pyx_v_enter_t = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_179, __pyx_bstride_0_tmax));
+ __pyx_t_180 = 2;
+ __pyx_v_enter_t = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_180, __pyx_bstride_0_tmax));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":221
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[2] - enter_t
@@ -10460,9 +10902,9 @@
* cur_ind[2] += step[2]
* return
*/
- __pyx_t_180 = 2;
__pyx_t_181 = 2;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_181, __pyx_bstride_0_tmax) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_180, __pyx_bstride_0_tdelta));
+ __pyx_t_182 = 2;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tmax.buf, __pyx_t_182, __pyx_bstride_0_tmax) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_tdelta.buf, __pyx_t_181, __pyx_bstride_0_tdelta));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":222
* enter_t = tmax[2]
@@ -10471,9 +10913,9 @@
* return
*
*/
- __pyx_t_182 = 2;
__pyx_t_183 = 2;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_183, __pyx_bstride_0_cur_ind) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_182, __pyx_bstride_0_step));
+ __pyx_t_184 = 2;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_cur_ind.buf, __pyx_t_184, __pyx_bstride_0_cur_ind) += (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_step.buf, __pyx_t_183, __pyx_bstride_0_step));
}
__pyx_L25:;
}
@@ -10539,14 +10981,6 @@
__Pyx_XDECREF((PyObject *)__pyx_v_tdelta);
__Pyx_XDECREF((PyObject *)__pyx_v_tmax);
__Pyx_XDECREF((PyObject *)__pyx_v_intersect);
- __Pyx_DECREF((PyObject *)__pyx_v_grid_mask);
- __Pyx_DECREF((PyObject *)__pyx_v_grid_t);
- __Pyx_DECREF((PyObject *)__pyx_v_grid_dt);
- __Pyx_DECREF((PyObject *)__pyx_v_left_edge);
- __Pyx_DECREF((PyObject *)__pyx_v_right_edge);
- __Pyx_DECREF((PyObject *)__pyx_v_dx);
- __Pyx_DECREF((PyObject *)__pyx_v_u);
- __Pyx_DECREF((PyObject *)__pyx_v_v);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -10572,8 +11006,8 @@
PyArrayObject *__pyx_v_shells = 0;
int __pyx_v_i;
int __pyx_v_vi;
- PyObject *__pyx_v_intersect_t;
- PyObject *__pyx_v_dt_tolerance;
+ long __pyx_v_intersect_t;
+ double __pyx_v_dt_tolerance;
int __pyx_v_nv;
int __pyx_v_nshells;
PyArrayObject *__pyx_v_u = 0;
@@ -10721,18 +11155,9 @@
__Pyx_RaiseArgtupleInvalid("PlaneVoxelIntegration", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.PlaneVoxelIntegration");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_left_edge);
- __Pyx_INCREF((PyObject *)__pyx_v_right_edge);
- __Pyx_INCREF((PyObject *)__pyx_v_dx);
- __Pyx_INCREF((PyObject *)__pyx_v_ug);
- __Pyx_INCREF((PyObject *)__pyx_v_v);
- __Pyx_INCREF((PyObject *)__pyx_v_image);
- __Pyx_INCREF((PyObject *)__pyx_v_data);
- __Pyx_INCREF((PyObject *)__pyx_v_shells);
- __pyx_v_intersect_t = Py_None; __Pyx_INCREF(Py_None);
- __pyx_v_dt_tolerance = Py_None; __Pyx_INCREF(Py_None);
__pyx_bstruct_u.buf = NULL;
__pyx_bstruct_left_edge.buf = NULL;
__pyx_bstruct_right_edge.buf = NULL;
@@ -10806,9 +11231,7 @@
* dt_tolerance = 1e-6
* cdef int nv = ug.shape[0]
*/
- __Pyx_INCREF(__pyx_int_1);
- __Pyx_DECREF(__pyx_v_intersect_t);
- __pyx_v_intersect_t = __pyx_int_1;
+ __pyx_v_intersect_t = 1;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":240
* cdef int i, x, y, vi
@@ -10817,11 +11240,7 @@
* cdef int nv = ug.shape[0]
* cdef int nshells = shells.shape[0]
*/
- __pyx_t_1 = PyFloat_FromDouble(9.9999999999999995e-07); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_v_dt_tolerance);
- __pyx_v_dt_tolerance = __pyx_t_1;
- __pyx_t_1 = 0;
+ __pyx_v_dt_tolerance = 1e-6;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":241
* intersect_t = 1
@@ -11012,17 +11431,7 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_ug);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_data);
__pyx_L2:;
- __Pyx_DECREF(__pyx_v_intersect_t);
- __Pyx_DECREF(__pyx_v_dt_tolerance);
__Pyx_XDECREF((PyObject *)__pyx_v_u);
- __Pyx_DECREF((PyObject *)__pyx_v_left_edge);
- __Pyx_DECREF((PyObject *)__pyx_v_right_edge);
- __Pyx_DECREF((PyObject *)__pyx_v_dx);
- __Pyx_DECREF((PyObject *)__pyx_v_ug);
- __Pyx_DECREF((PyObject *)__pyx_v_v);
- __Pyx_DECREF((PyObject *)__pyx_v_image);
- __Pyx_DECREF((PyObject *)__pyx_v_data);
- __Pyx_DECREF((PyObject *)__pyx_v_shells);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -11109,9 +11518,9 @@
int __pyx_t_3;
int __pyx_t_4;
int __pyx_t_5;
- int __pyx_t_6;
+ __pyx_t_5numpy_float64_t __pyx_t_6;
int __pyx_t_7;
- int __pyx_t_8;
+ __pyx_t_5numpy_float64_t __pyx_t_8;
int __pyx_t_9;
int __pyx_t_10;
int __pyx_t_11;
@@ -11135,9 +11544,9 @@
int __pyx_t_29;
int __pyx_t_30;
int __pyx_t_31;
- long __pyx_t_32;
- long __pyx_t_33;
- __pyx_t_5numpy_float64_t __pyx_t_34;
+ int __pyx_t_32;
+ int __pyx_t_33;
+ long __pyx_t_34;
long __pyx_t_35;
long __pyx_t_36;
long __pyx_t_37;
@@ -11145,16 +11554,16 @@
long __pyx_t_39;
long __pyx_t_40;
long __pyx_t_41;
- int __pyx_t_42;
+ long __pyx_t_42;
int __pyx_t_43;
- PyObject *__pyx_t_44 = NULL;
+ int __pyx_t_44;
PyObject *__pyx_t_45 = NULL;
- int __pyx_t_46;
+ PyObject *__pyx_t_46 = NULL;
int __pyx_t_47;
int __pyx_t_48;
- PyObject *__pyx_t_49 = NULL;
- __pyx_t_5numpy_int64_t __pyx_t_50;
- int __pyx_t_51;
+ int __pyx_t_49;
+ PyObject *__pyx_t_50 = NULL;
+ __pyx_t_5numpy_int64_t __pyx_t_51;
int __pyx_t_52;
int __pyx_t_53;
int __pyx_t_54;
@@ -11168,38 +11577,39 @@
int __pyx_t_62;
int __pyx_t_63;
int __pyx_t_64;
- __pyx_t_5numpy_int64_t __pyx_t_65;
+ int __pyx_t_65;
__pyx_t_5numpy_int64_t __pyx_t_66;
- long __pyx_t_67;
- __pyx_t_5numpy_int64_t __pyx_t_68;
- int __pyx_t_69;
+ __pyx_t_5numpy_int64_t __pyx_t_67;
+ long __pyx_t_68;
+ __pyx_t_5numpy_int64_t __pyx_t_69;
int __pyx_t_70;
int __pyx_t_71;
- long __pyx_t_72;
- int __pyx_t_73;
- long __pyx_t_74;
- int __pyx_t_75;
- long __pyx_t_76;
- int __pyx_t_77;
- long __pyx_t_78;
- int __pyx_t_79;
- long __pyx_t_80;
- int __pyx_t_81;
- long __pyx_t_82;
- int __pyx_t_83;
- long __pyx_t_84;
- int __pyx_t_85;
- long __pyx_t_86;
- int __pyx_t_87;
- long __pyx_t_88;
- int __pyx_t_89;
- long __pyx_t_90;
- int __pyx_t_91;
- long __pyx_t_92;
- int __pyx_t_93;
- long __pyx_t_94;
- __pyx_t_5numpy_int64_t __pyx_t_95;
+ int __pyx_t_72;
+ long __pyx_t_73;
+ int __pyx_t_74;
+ long __pyx_t_75;
+ int __pyx_t_76;
+ long __pyx_t_77;
+ int __pyx_t_78;
+ long __pyx_t_79;
+ int __pyx_t_80;
+ long __pyx_t_81;
+ int __pyx_t_82;
+ long __pyx_t_83;
+ int __pyx_t_84;
+ long __pyx_t_85;
+ int __pyx_t_86;
+ long __pyx_t_87;
+ int __pyx_t_88;
+ long __pyx_t_89;
+ int __pyx_t_90;
+ long __pyx_t_91;
+ int __pyx_t_92;
+ long __pyx_t_93;
+ int __pyx_t_94;
+ long __pyx_t_95;
__pyx_t_5numpy_int64_t __pyx_t_96;
+ __pyx_t_5numpy_int64_t __pyx_t_97;
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__u,&__pyx_n_s__v,&__pyx_n_s__left_edge,&__pyx_n_s__right_edge,&__pyx_n_s__dx,&__pyx_n_s__nshells,&__pyx_n_s__ind,&__pyx_n_s__data,&__pyx_n_s__shells,&__pyx_n_s__image,0};
__Pyx_RefNannySetupContext("integrate_ray");
__pyx_self = __pyx_self;
@@ -11312,16 +11722,9 @@
__Pyx_RaiseArgtupleInvalid("integrate_ray", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.integrate_ray");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_u);
- __Pyx_INCREF((PyObject *)__pyx_v_v);
- __Pyx_INCREF((PyObject *)__pyx_v_left_edge);
- __Pyx_INCREF((PyObject *)__pyx_v_right_edge);
- __Pyx_INCREF((PyObject *)__pyx_v_dx);
- __Pyx_INCREF((PyObject *)__pyx_v_data);
- __Pyx_INCREF((PyObject *)__pyx_v_shells);
- __Pyx_INCREF((PyObject *)__pyx_v_image);
__pyx_bstruct_u.buf = NULL;
__pyx_bstruct_v.buf = NULL;
__pyx_bstruct_left_edge.buf = NULL;
@@ -11394,7 +11797,7 @@
* cdef np.float64_t dt_tolerance = 1e-6
* cdef np.float64_t tl, tr, enter_t, exit_t
*/
- __pyx_v_intersect_t = 1;
+ __pyx_v_intersect_t = 1.0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":263
* cdef int step[3], x, y, i, n
@@ -11403,7 +11806,7 @@
* cdef np.float64_t tl, tr, enter_t, exit_t
* cdef np.int64_t cur_ind[3]
*/
- __pyx_v_dt_tolerance = 9.9999999999999995e-07;
+ __pyx_v_dt_tolerance = 1e-6;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":271
* cdef np.float64_t dt, dv
@@ -11441,7 +11844,7 @@
* x = (i+1)%3
*/
__pyx_t_2 = __pyx_v_i;
- __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_2, __pyx_bstride_0_v)) < 0);
+ __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_2, __pyx_bstride_0_v)) < 0.0);
if (__pyx_t_3) {
(__pyx_v_step[__pyx_v_i]) = -1;
goto __pyx_L8;
@@ -11466,7 +11869,7 @@
* y = (i+2)%3
* tl = (left_edge[i] - u[i])/v[i]
*/
- __pyx_v_x = ((__pyx_v_i + 1) % 3);
+ __pyx_v_x = __Pyx_mod_long((__pyx_v_i + 1), 3);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":280
* else: step[i] = 1
@@ -11475,7 +11878,7 @@
* tl = (left_edge[i] - u[i])/v[i]
* tr = (right_edge[i] - u[i])/v[i]
*/
- __pyx_v_y = ((__pyx_v_i + 2) % 3);
+ __pyx_v_y = __Pyx_mod_long((__pyx_v_i + 2), 3);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":281
* x = (i+1)%3
@@ -11486,8 +11889,14 @@
*/
__pyx_t_4 = __pyx_v_i;
__pyx_t_5 = __pyx_v_i;
- __pyx_t_6 = __pyx_v_i;
- __pyx_v_tl = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_4, __pyx_bstride_0_left_edge)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_5, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_6, __pyx_bstride_0_v)));
+ __pyx_t_6 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_4, __pyx_bstride_0_left_edge)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_5, __pyx_bstride_0_u)));
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_8 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_7, __pyx_bstride_0_v));
+ if (unlikely(__pyx_t_8 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_tl = (__pyx_t_6 / __pyx_t_8);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":282
* y = (i+2)%3
@@ -11496,10 +11905,16 @@
* temp_x = (u[x] + tl*v[x])
* temp_y = (u[y] + tl*v[y])
*/
- __pyx_t_7 = __pyx_v_i;
- __pyx_t_8 = __pyx_v_i;
__pyx_t_9 = __pyx_v_i;
- __pyx_v_tr = (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_7, __pyx_bstride_0_right_edge)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_8, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_9, __pyx_bstride_0_v)));
+ __pyx_t_10 = __pyx_v_i;
+ __pyx_t_8 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_9, __pyx_bstride_0_right_edge)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_10, __pyx_bstride_0_u)));
+ __pyx_t_11 = __pyx_v_i;
+ __pyx_t_6 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_11, __pyx_bstride_0_v));
+ if (unlikely(__pyx_t_6 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_tr = (__pyx_t_8 / __pyx_t_6);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":283
* tl = (left_edge[i] - u[i])/v[i]
@@ -11508,9 +11923,9 @@
* temp_y = (u[y] + tl*v[y])
* if (left_edge[x] <= temp_x) and (temp_x <= right_edge[x]) and \
*/
- __pyx_t_10 = __pyx_v_x;
- __pyx_t_11 = __pyx_v_x;
- __pyx_v_temp_x = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_10, __pyx_bstride_0_u)) + (__pyx_v_tl * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_11, __pyx_bstride_0_v))));
+ __pyx_t_12 = __pyx_v_x;
+ __pyx_t_13 = __pyx_v_x;
+ __pyx_v_temp_x = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_12, __pyx_bstride_0_u)) + (__pyx_v_tl * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_13, __pyx_bstride_0_v))));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":284
* tr = (right_edge[i] - u[i])/v[i]
@@ -11519,9 +11934,9 @@
* if (left_edge[x] <= temp_x) and (temp_x <= right_edge[x]) and \
* (left_edge[y] <= temp_y) and (temp_y <= right_edge[y]) and \
*/
- __pyx_t_12 = __pyx_v_y;
- __pyx_t_13 = __pyx_v_y;
- __pyx_v_temp_y = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_12, __pyx_bstride_0_u)) + (__pyx_v_tl * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_13, __pyx_bstride_0_v))));
+ __pyx_t_14 = __pyx_v_y;
+ __pyx_t_15 = __pyx_v_y;
+ __pyx_v_temp_y = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_14, __pyx_bstride_0_u)) + (__pyx_v_tl * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_15, __pyx_bstride_0_v))));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":285
* temp_x = (u[x] + tl*v[x])
@@ -11530,12 +11945,12 @@
* (left_edge[y] <= temp_y) and (temp_y <= right_edge[y]) and \
* (0.0 <= tl) and (tl < intersect_t):
*/
- __pyx_t_14 = __pyx_v_x;
- __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_14, __pyx_bstride_0_left_edge)) <= __pyx_v_temp_x);
+ __pyx_t_16 = __pyx_v_x;
+ __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_16, __pyx_bstride_0_left_edge)) <= __pyx_v_temp_x);
if (__pyx_t_3) {
- __pyx_t_15 = __pyx_v_x;
- __pyx_t_16 = (__pyx_v_temp_x <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_15, __pyx_bstride_0_right_edge)));
- if (__pyx_t_16) {
+ __pyx_t_17 = __pyx_v_x;
+ __pyx_t_18 = (__pyx_v_temp_x <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_17, __pyx_bstride_0_right_edge)));
+ if (__pyx_t_18) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":286
* temp_y = (u[y] + tl*v[y])
@@ -11544,12 +11959,12 @@
* (0.0 <= tl) and (tl < intersect_t):
* intersect_t = tl
*/
- __pyx_t_17 = __pyx_v_y;
- __pyx_t_18 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_17, __pyx_bstride_0_left_edge)) <= __pyx_v_temp_y);
- if (__pyx_t_18) {
- __pyx_t_19 = __pyx_v_y;
- __pyx_t_20 = (__pyx_v_temp_y <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_19, __pyx_bstride_0_right_edge)));
- if (__pyx_t_20) {
+ __pyx_t_19 = __pyx_v_y;
+ __pyx_t_20 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_19, __pyx_bstride_0_left_edge)) <= __pyx_v_temp_y);
+ if (__pyx_t_20) {
+ __pyx_t_21 = __pyx_v_y;
+ __pyx_t_22 = (__pyx_v_temp_y <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_21, __pyx_bstride_0_right_edge)));
+ if (__pyx_t_22) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":287
* if (left_edge[x] <= temp_x) and (temp_x <= right_edge[x]) and \
@@ -11558,30 +11973,30 @@
* intersect_t = tl
* temp_x = (u[x] + tr*v[x])
*/
- __pyx_t_21 = (0.0 <= __pyx_v_tl);
- if (__pyx_t_21) {
- __pyx_t_22 = (__pyx_v_tl < __pyx_v_intersect_t);
- __pyx_t_23 = __pyx_t_22;
+ __pyx_t_23 = (0.0 <= __pyx_v_tl);
+ if (__pyx_t_23) {
+ __pyx_t_24 = (__pyx_v_tl < __pyx_v_intersect_t);
+ __pyx_t_25 = __pyx_t_24;
} else {
- __pyx_t_23 = __pyx_t_21;
+ __pyx_t_25 = __pyx_t_23;
}
- __pyx_t_21 = __pyx_t_23;
+ __pyx_t_23 = __pyx_t_25;
} else {
- __pyx_t_21 = __pyx_t_20;
+ __pyx_t_23 = __pyx_t_22;
}
- __pyx_t_20 = __pyx_t_21;
+ __pyx_t_22 = __pyx_t_23;
} else {
- __pyx_t_20 = __pyx_t_18;
+ __pyx_t_22 = __pyx_t_20;
}
- __pyx_t_18 = __pyx_t_20;
+ __pyx_t_20 = __pyx_t_22;
} else {
- __pyx_t_18 = __pyx_t_16;
+ __pyx_t_20 = __pyx_t_18;
}
- __pyx_t_16 = __pyx_t_18;
+ __pyx_t_18 = __pyx_t_20;
} else {
- __pyx_t_16 = __pyx_t_3;
+ __pyx_t_18 = __pyx_t_3;
}
- if (__pyx_t_16) {
+ if (__pyx_t_18) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":288
* (left_edge[y] <= temp_y) and (temp_y <= right_edge[y]) and \
@@ -11602,9 +12017,9 @@
* temp_y = (u[y] + tr*v[y])
* if (left_edge[x] <= temp_x) and (temp_x <= right_edge[x]) and \
*/
- __pyx_t_24 = __pyx_v_x;
- __pyx_t_25 = __pyx_v_x;
- __pyx_v_temp_x = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_24, __pyx_bstride_0_u)) + (__pyx_v_tr * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_25, __pyx_bstride_0_v))));
+ __pyx_t_26 = __pyx_v_x;
+ __pyx_t_27 = __pyx_v_x;
+ __pyx_v_temp_x = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_26, __pyx_bstride_0_u)) + (__pyx_v_tr * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_27, __pyx_bstride_0_v))));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":290
* intersect_t = tl
@@ -11613,9 +12028,9 @@
* if (left_edge[x] <= temp_x) and (temp_x <= right_edge[x]) and \
* (left_edge[y] <= temp_y) and (temp_y <= right_edge[y]) and \
*/
- __pyx_t_26 = __pyx_v_y;
- __pyx_t_27 = __pyx_v_y;
- __pyx_v_temp_y = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_26, __pyx_bstride_0_u)) + (__pyx_v_tr * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_27, __pyx_bstride_0_v))));
+ __pyx_t_28 = __pyx_v_y;
+ __pyx_t_29 = __pyx_v_y;
+ __pyx_v_temp_y = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_28, __pyx_bstride_0_u)) + (__pyx_v_tr * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_29, __pyx_bstride_0_v))));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":291
* temp_x = (u[x] + tr*v[x])
@@ -11624,11 +12039,11 @@
* (left_edge[y] <= temp_y) and (temp_y <= right_edge[y]) and \
* (0.0 <= tr) and (tr < intersect_t):
*/
- __pyx_t_28 = __pyx_v_x;
- __pyx_t_16 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_28, __pyx_bstride_0_left_edge)) <= __pyx_v_temp_x);
- if (__pyx_t_16) {
- __pyx_t_29 = __pyx_v_x;
- __pyx_t_3 = (__pyx_v_temp_x <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_29, __pyx_bstride_0_right_edge)));
+ __pyx_t_30 = __pyx_v_x;
+ __pyx_t_18 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_30, __pyx_bstride_0_left_edge)) <= __pyx_v_temp_x);
+ if (__pyx_t_18) {
+ __pyx_t_31 = __pyx_v_x;
+ __pyx_t_3 = (__pyx_v_temp_x <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_31, __pyx_bstride_0_right_edge)));
if (__pyx_t_3) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":292
@@ -11638,12 +12053,12 @@
* (0.0 <= tr) and (tr < intersect_t):
* intersect_t = tr
*/
- __pyx_t_30 = __pyx_v_y;
- __pyx_t_18 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_30, __pyx_bstride_0_left_edge)) <= __pyx_v_temp_y);
- if (__pyx_t_18) {
- __pyx_t_31 = __pyx_v_y;
- __pyx_t_20 = (__pyx_v_temp_y <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_31, __pyx_bstride_0_right_edge)));
- if (__pyx_t_20) {
+ __pyx_t_32 = __pyx_v_y;
+ __pyx_t_20 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_32, __pyx_bstride_0_left_edge)) <= __pyx_v_temp_y);
+ if (__pyx_t_20) {
+ __pyx_t_33 = __pyx_v_y;
+ __pyx_t_22 = (__pyx_v_temp_y <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_33, __pyx_bstride_0_right_edge)));
+ if (__pyx_t_22) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":293
* if (left_edge[x] <= temp_x) and (temp_x <= right_edge[x]) and \
@@ -11652,28 +12067,28 @@
* intersect_t = tr
* # if fully enclosed
*/
- __pyx_t_21 = (0.0 <= __pyx_v_tr);
- if (__pyx_t_21) {
- __pyx_t_23 = (__pyx_v_tr < __pyx_v_intersect_t);
- __pyx_t_22 = __pyx_t_23;
+ __pyx_t_23 = (0.0 <= __pyx_v_tr);
+ if (__pyx_t_23) {
+ __pyx_t_25 = (__pyx_v_tr < __pyx_v_intersect_t);
+ __pyx_t_24 = __pyx_t_25;
} else {
- __pyx_t_22 = __pyx_t_21;
+ __pyx_t_24 = __pyx_t_23;
}
- __pyx_t_21 = __pyx_t_22;
+ __pyx_t_23 = __pyx_t_24;
} else {
- __pyx_t_21 = __pyx_t_20;
+ __pyx_t_23 = __pyx_t_22;
}
- __pyx_t_20 = __pyx_t_21;
+ __pyx_t_22 = __pyx_t_23;
} else {
- __pyx_t_20 = __pyx_t_18;
+ __pyx_t_22 = __pyx_t_20;
}
- __pyx_t_18 = __pyx_t_20;
+ __pyx_t_20 = __pyx_t_22;
} else {
- __pyx_t_18 = __pyx_t_3;
+ __pyx_t_20 = __pyx_t_3;
}
- __pyx_t_3 = __pyx_t_18;
+ __pyx_t_3 = __pyx_t_20;
} else {
- __pyx_t_3 = __pyx_t_16;
+ __pyx_t_3 = __pyx_t_18;
}
if (__pyx_t_3) {
@@ -11697,13 +12112,13 @@
* (left_edge[1] <= u[1] <= right_edge[1]) and \
* (left_edge[2] <= u[2] <= right_edge[2]):
*/
- __pyx_t_32 = 0;
- __pyx_t_33 = 0;
- __pyx_t_34 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_33, __pyx_bstride_0_u));
- __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_32, __pyx_bstride_0_left_edge)) <= __pyx_t_34);
+ __pyx_t_34 = 0;
+ __pyx_t_35 = 0;
+ __pyx_t_6 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_35, __pyx_bstride_0_u));
+ __pyx_t_3 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_34, __pyx_bstride_0_left_edge)) <= __pyx_t_6);
if (__pyx_t_3) {
- __pyx_t_35 = 0;
- __pyx_t_3 = (__pyx_t_34 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_35, __pyx_bstride_0_right_edge)));
+ __pyx_t_36 = 0;
+ __pyx_t_3 = (__pyx_t_6 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_36, __pyx_bstride_0_right_edge)));
}
if (__pyx_t_3) {
@@ -11714,15 +12129,15 @@
* (left_edge[2] <= u[2] <= right_edge[2]):
* intersect_t = 0.0
*/
- __pyx_t_36 = 1;
__pyx_t_37 = 1;
- __pyx_t_34 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_37, __pyx_bstride_0_u));
- __pyx_t_16 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_36, __pyx_bstride_0_left_edge)) <= __pyx_t_34);
- if (__pyx_t_16) {
- __pyx_t_38 = 1;
- __pyx_t_16 = (__pyx_t_34 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_38, __pyx_bstride_0_right_edge)));
+ __pyx_t_38 = 1;
+ __pyx_t_6 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_38, __pyx_bstride_0_u));
+ __pyx_t_18 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_37, __pyx_bstride_0_left_edge)) <= __pyx_t_6);
+ if (__pyx_t_18) {
+ __pyx_t_39 = 1;
+ __pyx_t_18 = (__pyx_t_6 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_39, __pyx_bstride_0_right_edge)));
}
- if (__pyx_t_16) {
+ if (__pyx_t_18) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":298
* if (left_edge[0] <= u[0] <= right_edge[0]) and \
@@ -11731,23 +12146,23 @@
* intersect_t = 0.0
* if not (0 <= intersect_t <= 1):
*/
- __pyx_t_39 = 2;
__pyx_t_40 = 2;
- __pyx_t_34 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_40, __pyx_bstride_0_u));
- __pyx_t_18 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_39, __pyx_bstride_0_left_edge)) <= __pyx_t_34);
- if (__pyx_t_18) {
- __pyx_t_41 = 2;
- __pyx_t_18 = (__pyx_t_34 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_41, __pyx_bstride_0_right_edge)));
+ __pyx_t_41 = 2;
+ __pyx_t_6 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_41, __pyx_bstride_0_u));
+ __pyx_t_20 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_40, __pyx_bstride_0_left_edge)) <= __pyx_t_6);
+ if (__pyx_t_20) {
+ __pyx_t_42 = 2;
+ __pyx_t_20 = (__pyx_t_6 <= (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_42, __pyx_bstride_0_right_edge)));
}
- __pyx_t_20 = __pyx_t_18;
+ __pyx_t_22 = __pyx_t_20;
} else {
- __pyx_t_20 = __pyx_t_16;
+ __pyx_t_22 = __pyx_t_18;
}
- __pyx_t_16 = __pyx_t_20;
+ __pyx_t_18 = __pyx_t_22;
} else {
- __pyx_t_16 = __pyx_t_3;
+ __pyx_t_18 = __pyx_t_3;
}
- if (__pyx_t_16) {
+ if (__pyx_t_18) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":299
* (left_edge[1] <= u[1] <= right_edge[1]) and \
@@ -11768,11 +12183,11 @@
* #print "Returning: intersect_t ==", intersect_t
* return
*/
- __pyx_t_16 = (0 <= __pyx_v_intersect_t);
- if (__pyx_t_16) {
- __pyx_t_16 = (__pyx_v_intersect_t <= 1);
+ __pyx_t_18 = (0.0 <= __pyx_v_intersect_t);
+ if (__pyx_t_18) {
+ __pyx_t_18 = (__pyx_v_intersect_t <= 1.0);
}
- __pyx_t_3 = (!__pyx_t_16);
+ __pyx_t_3 = (!__pyx_t_18);
if (__pyx_t_3) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":302
@@ -11798,9 +12213,9 @@
*/
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- __pyx_t_42 = __pyx_v_i;
__pyx_t_43 = __pyx_v_i;
- (__pyx_v_intersect[__pyx_v_i]) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_42, __pyx_bstride_0_u)) + (__pyx_v_intersect_t * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_43, __pyx_bstride_0_v))));
+ __pyx_t_44 = __pyx_v_i;
+ (__pyx_v_intersect[__pyx_v_i]) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_43, __pyx_bstride_0_u)) + (__pyx_v_intersect_t * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_44, __pyx_bstride_0_v))));
}
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":305
@@ -11829,28 +12244,34 @@
* tmax[i] = (((cur_ind[i]+step[i])*dx[i])+left_edge[i]-u[i])/v[i]
* if cur_ind[i] == dims[i] and step[i] < 0:
*/
- __pyx_t_44 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_44);
- __pyx_t_45 = PyObject_GetAttr(__pyx_t_44, __pyx_n_s__floor); if (unlikely(!__pyx_t_45)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_45 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_45)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_45);
- __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
- __pyx_t_46 = __pyx_v_i;
+ __pyx_t_46 = PyObject_GetAttr(__pyx_t_45, __pyx_n_s__floor); if (unlikely(!__pyx_t_46)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_46);
+ __Pyx_DECREF(__pyx_t_45); __pyx_t_45 = 0;
__pyx_t_47 = __pyx_v_i;
__pyx_t_48 = __pyx_v_i;
- __pyx_t_44 = PyFloat_FromDouble(((((__pyx_v_intersect[__pyx_v_i]) + (1e-08 * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_46, __pyx_bstride_0_dx)))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_47, __pyx_bstride_0_left_edge))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_48, __pyx_bstride_0_dx)))); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_44);
- __pyx_t_49 = PyTuple_New(1); if (unlikely(!__pyx_t_49)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_49);
- PyTuple_SET_ITEM(__pyx_t_49, 0, __pyx_t_44);
- __Pyx_GIVEREF(__pyx_t_44);
- __pyx_t_44 = 0;
- __pyx_t_44 = PyObject_Call(__pyx_t_45, __pyx_t_49, NULL); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_44);
+ __pyx_t_6 = (((__pyx_v_intersect[__pyx_v_i]) + (1e-8 * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_47, __pyx_bstride_0_dx)))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_48, __pyx_bstride_0_left_edge)));
+ __pyx_t_49 = __pyx_v_i;
+ __pyx_t_8 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_49, __pyx_bstride_0_dx));
+ if (unlikely(__pyx_t_8 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_45 = PyFloat_FromDouble((__pyx_t_6 / __pyx_t_8)); if (unlikely(!__pyx_t_45)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_45);
+ __pyx_t_50 = PyTuple_New(1); if (unlikely(!__pyx_t_50)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_50);
+ PyTuple_SET_ITEM(__pyx_t_50, 0, __pyx_t_45);
+ __Pyx_GIVEREF(__pyx_t_45);
+ __pyx_t_45 = 0;
+ __pyx_t_45 = PyObject_Call(__pyx_t_46, __pyx_t_50, NULL); if (unlikely(!__pyx_t_45)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_45);
+ __Pyx_DECREF(__pyx_t_46); __pyx_t_46 = 0;
+ __Pyx_DECREF(__pyx_t_50); __pyx_t_50 = 0;
+ __pyx_t_51 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_45); if (unlikely((__pyx_t_51 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_45); __pyx_t_45 = 0;
- __Pyx_DECREF(__pyx_t_49); __pyx_t_49 = 0;
- __pyx_t_50 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_44); if (unlikely((__pyx_t_50 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_44); __pyx_t_44 = 0;
- (__pyx_v_cur_ind[__pyx_v_i]) = __pyx_t_50;
+ (__pyx_v_cur_ind[__pyx_v_i]) = __pyx_t_51;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":308
* for i in range(3):
@@ -11859,11 +12280,17 @@
* if cur_ind[i] == dims[i] and step[i] < 0:
* cur_ind[i] = dims[i] - 1
*/
- __pyx_t_51 = __pyx_v_i;
__pyx_t_52 = __pyx_v_i;
__pyx_t_53 = __pyx_v_i;
__pyx_t_54 = __pyx_v_i;
- (__pyx_v_tmax[__pyx_v_i]) = ((((((__pyx_v_cur_ind[__pyx_v_i]) + (__pyx_v_step[__pyx_v_i])) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_51, __pyx_bstride_0_dx))) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_52, __pyx_bstride_0_left_edge))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_53, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_54, __pyx_bstride_0_v)));
+ __pyx_t_8 = (((((__pyx_v_cur_ind[__pyx_v_i]) + (__pyx_v_step[__pyx_v_i])) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_52, __pyx_bstride_0_dx))) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_53, __pyx_bstride_0_left_edge))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_54, __pyx_bstride_0_u)));
+ __pyx_t_55 = __pyx_v_i;
+ __pyx_t_6 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_55, __pyx_bstride_0_v));
+ if (unlikely(__pyx_t_6 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ (__pyx_v_tmax[__pyx_v_i]) = (__pyx_t_8 / __pyx_t_6);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":309
* cur_ind[i] = np.floor((intersect[i] + 1e-8*dx[i] - left_edge[i])/dx[i])
@@ -11874,12 +12301,12 @@
*/
__pyx_t_3 = ((__pyx_v_cur_ind[__pyx_v_i]) == (__pyx_v_dims[__pyx_v_i]));
if (__pyx_t_3) {
- __pyx_t_16 = ((__pyx_v_step[__pyx_v_i]) < 0);
- __pyx_t_20 = __pyx_t_16;
+ __pyx_t_18 = ((__pyx_v_step[__pyx_v_i]) < 0);
+ __pyx_t_22 = __pyx_t_18;
} else {
- __pyx_t_20 = __pyx_t_3;
+ __pyx_t_22 = __pyx_t_3;
}
- if (__pyx_t_20) {
+ if (__pyx_t_22) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":310
* tmax[i] = (((cur_ind[i]+step[i])*dx[i])+left_edge[i]-u[i])/v[i]
@@ -11900,13 +12327,19 @@
* if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i]
* tdelta[i] = (dx[i]/v[i])
*/
- __pyx_t_20 = ((__pyx_v_step[__pyx_v_i]) > 0);
- if (__pyx_t_20) {
- __pyx_t_55 = __pyx_v_i;
+ __pyx_t_22 = ((__pyx_v_step[__pyx_v_i]) > 0);
+ if (__pyx_t_22) {
__pyx_t_56 = __pyx_v_i;
__pyx_t_57 = __pyx_v_i;
__pyx_t_58 = __pyx_v_i;
- (__pyx_v_tmax[__pyx_v_i]) = ((((((__pyx_v_cur_ind[__pyx_v_i]) + 1) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_55, __pyx_bstride_0_dx))) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_56, __pyx_bstride_0_left_edge))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_57, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_58, __pyx_bstride_0_v)));
+ __pyx_t_6 = (((((__pyx_v_cur_ind[__pyx_v_i]) + 1) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_56, __pyx_bstride_0_dx))) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_57, __pyx_bstride_0_left_edge))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_58, __pyx_bstride_0_u)));
+ __pyx_t_59 = __pyx_v_i;
+ __pyx_t_8 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_59, __pyx_bstride_0_v));
+ if (unlikely(__pyx_t_8 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ (__pyx_v_tmax[__pyx_v_i]) = (__pyx_t_6 / __pyx_t_8);
goto __pyx_L18;
}
__pyx_L18:;
@@ -11918,13 +12351,19 @@
* tdelta[i] = (dx[i]/v[i])
* if tdelta[i] < 0: tdelta[i] *= -1
*/
- __pyx_t_20 = ((__pyx_v_step[__pyx_v_i]) < 0);
- if (__pyx_t_20) {
- __pyx_t_59 = __pyx_v_i;
+ __pyx_t_22 = ((__pyx_v_step[__pyx_v_i]) < 0);
+ if (__pyx_t_22) {
__pyx_t_60 = __pyx_v_i;
__pyx_t_61 = __pyx_v_i;
__pyx_t_62 = __pyx_v_i;
- (__pyx_v_tmax[__pyx_v_i]) = ((((((__pyx_v_cur_ind[__pyx_v_i]) + 0) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_59, __pyx_bstride_0_dx))) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_60, __pyx_bstride_0_left_edge))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_61, __pyx_bstride_0_u))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_62, __pyx_bstride_0_v)));
+ __pyx_t_8 = (((((__pyx_v_cur_ind[__pyx_v_i]) + 0) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_60, __pyx_bstride_0_dx))) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_61, __pyx_bstride_0_left_edge))) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_62, __pyx_bstride_0_u)));
+ __pyx_t_63 = __pyx_v_i;
+ __pyx_t_6 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_63, __pyx_bstride_0_v));
+ if (unlikely(__pyx_t_6 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ (__pyx_v_tmax[__pyx_v_i]) = (__pyx_t_8 / __pyx_t_6);
goto __pyx_L19;
}
__pyx_L19:;
@@ -11936,9 +12375,15 @@
* if tdelta[i] < 0: tdelta[i] *= -1
* # The variable intersect contains the point we first pierce the grid
*/
- __pyx_t_63 = __pyx_v_i;
__pyx_t_64 = __pyx_v_i;
- (__pyx_v_tdelta[__pyx_v_i]) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_63, __pyx_bstride_0_dx)) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_64, __pyx_bstride_0_v)));
+ __pyx_t_6 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_64, __pyx_bstride_0_dx));
+ __pyx_t_65 = __pyx_v_i;
+ __pyx_t_8 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_v.buf, __pyx_t_65, __pyx_bstride_0_v));
+ if (unlikely(__pyx_t_8 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ (__pyx_v_tdelta[__pyx_v_i]) = (__pyx_t_6 / __pyx_t_8);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":314
* if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i]
@@ -11947,9 +12392,9 @@
* # The variable intersect contains the point we first pierce the grid
* enter_t = intersect_t
*/
- __pyx_t_20 = ((__pyx_v_tdelta[__pyx_v_i]) < 0);
- if (__pyx_t_20) {
- (__pyx_v_tdelta[__pyx_v_i]) *= -1;
+ __pyx_t_22 = ((__pyx_v_tdelta[__pyx_v_i]) < 0.0);
+ if (__pyx_t_22) {
+ (__pyx_v_tdelta[__pyx_v_i]) *= -1.0;
goto __pyx_L20;
}
__pyx_L20:;
@@ -11971,12 +12416,12 @@
* (not (0 <= cur_ind[1] < dims[1])) or \
* (not (0 <= cur_ind[2] < dims[2])):
*/
- __pyx_t_50 = (__pyx_v_cur_ind[0]);
- __pyx_t_20 = (0 <= __pyx_t_50);
- if (__pyx_t_20) {
- __pyx_t_20 = (__pyx_t_50 < (__pyx_v_dims[0]));
+ __pyx_t_51 = (__pyx_v_cur_ind[0]);
+ __pyx_t_22 = (0 <= __pyx_t_51);
+ if (__pyx_t_22) {
+ __pyx_t_22 = (__pyx_t_51 < (__pyx_v_dims[0]));
}
- __pyx_t_3 = (!__pyx_t_20);
+ __pyx_t_3 = (!__pyx_t_22);
if (!__pyx_t_3) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":318
@@ -11986,13 +12431,13 @@
* (not (0 <= cur_ind[2] < dims[2])):
* #print "Returning: cur_ind", cur_ind[0], cur_ind[1], cur_ind[2]
*/
- __pyx_t_50 = (__pyx_v_cur_ind[1]);
- __pyx_t_20 = (0 <= __pyx_t_50);
- if (__pyx_t_20) {
- __pyx_t_20 = (__pyx_t_50 < (__pyx_v_dims[1]));
+ __pyx_t_51 = (__pyx_v_cur_ind[1]);
+ __pyx_t_22 = (0 <= __pyx_t_51);
+ if (__pyx_t_22) {
+ __pyx_t_22 = (__pyx_t_51 < (__pyx_v_dims[1]));
}
- __pyx_t_16 = (!__pyx_t_20);
- if (!__pyx_t_16) {
+ __pyx_t_18 = (!__pyx_t_22);
+ if (!__pyx_t_18) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":319
* if (not (0 <= cur_ind[0] < dims[0])) or \
@@ -12001,21 +12446,21 @@
* #print "Returning: cur_ind", cur_ind[0], cur_ind[1], cur_ind[2]
* #print " dims: ", dims[0], dims[1], dims[2]
*/
- __pyx_t_50 = (__pyx_v_cur_ind[2]);
- __pyx_t_20 = (0 <= __pyx_t_50);
- if (__pyx_t_20) {
- __pyx_t_20 = (__pyx_t_50 < (__pyx_v_dims[2]));
+ __pyx_t_51 = (__pyx_v_cur_ind[2]);
+ __pyx_t_22 = (0 <= __pyx_t_51);
+ if (__pyx_t_22) {
+ __pyx_t_22 = (__pyx_t_51 < (__pyx_v_dims[2]));
}
- __pyx_t_18 = (!__pyx_t_20);
- __pyx_t_20 = __pyx_t_18;
+ __pyx_t_20 = (!__pyx_t_22);
+ __pyx_t_22 = __pyx_t_20;
} else {
- __pyx_t_20 = __pyx_t_16;
+ __pyx_t_22 = __pyx_t_18;
}
- __pyx_t_16 = __pyx_t_20;
+ __pyx_t_18 = __pyx_t_22;
} else {
- __pyx_t_16 = __pyx_t_3;
+ __pyx_t_18 = __pyx_t_3;
}
- if (__pyx_t_16) {
+ if (__pyx_t_18) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":326
* #print " u :", u[0], u[1], u[2]
@@ -12038,10 +12483,10 @@
* #dt = 1e300
* while 1:
*/
- __pyx_t_50 = (__pyx_v_cur_ind[0]);
- __pyx_t_65 = (__pyx_v_cur_ind[1]);
- __pyx_t_66 = (__pyx_v_cur_ind[2]);
- __pyx_v_dv = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_data.buf, __pyx_t_50, __pyx_bstride_0_data, __pyx_t_65, __pyx_bstride_1_data, __pyx_t_66, __pyx_bstride_2_data));
+ __pyx_t_51 = (__pyx_v_cur_ind[0]);
+ __pyx_t_66 = (__pyx_v_cur_ind[1]);
+ __pyx_t_67 = (__pyx_v_cur_ind[2]);
+ __pyx_v_dv = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_data.buf, __pyx_t_51, __pyx_bstride_0_data, __pyx_t_66, __pyx_bstride_1_data, __pyx_t_67, __pyx_bstride_2_data));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":330
* dv = data[cur_ind[0], cur_ind[1], cur_ind[2]]
@@ -12051,8 +12496,7 @@
* if (not (0 <= cur_ind[0] < dims[0])) or \
*/
while (1) {
- __pyx_t_16 = 1;
- if (!__pyx_t_16) break;
+ if (!1) break;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":331
* #dt = 1e300
@@ -12062,9 +12506,9 @@
* (not (0 <= cur_ind[1] < dims[1])) or \
*/
__pyx_t_1 = __pyx_v_ind;
- __pyx_t_67 = 3;
- __pyx_t_16 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_image.buf, __pyx_t_1, __pyx_bstride_0_image, __pyx_t_67, __pyx_bstride_1_image)) >= 1.0);
- if (__pyx_t_16) {
+ __pyx_t_68 = 3;
+ __pyx_t_18 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_image.buf, __pyx_t_1, __pyx_bstride_0_image, __pyx_t_68, __pyx_bstride_1_image)) >= 1.0);
+ if (__pyx_t_18) {
goto __pyx_L23_break;
goto __pyx_L24;
}
@@ -12077,12 +12521,12 @@
* (not (0 <= cur_ind[1] < dims[1])) or \
* (not (0 <= cur_ind[2] < dims[2])):
*/
- __pyx_t_68 = (__pyx_v_cur_ind[0]);
- __pyx_t_16 = (0 <= __pyx_t_68);
- if (__pyx_t_16) {
- __pyx_t_16 = (__pyx_t_68 < (__pyx_v_dims[0]));
+ __pyx_t_69 = (__pyx_v_cur_ind[0]);
+ __pyx_t_18 = (0 <= __pyx_t_69);
+ if (__pyx_t_18) {
+ __pyx_t_18 = (__pyx_t_69 < (__pyx_v_dims[0]));
}
- __pyx_t_3 = (!__pyx_t_16);
+ __pyx_t_3 = (!__pyx_t_18);
if (!__pyx_t_3) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":333
@@ -12092,13 +12536,13 @@
* (not (0 <= cur_ind[2] < dims[2])):
* break
*/
- __pyx_t_68 = (__pyx_v_cur_ind[1]);
- __pyx_t_16 = (0 <= __pyx_t_68);
- if (__pyx_t_16) {
- __pyx_t_16 = (__pyx_t_68 < (__pyx_v_dims[1]));
+ __pyx_t_69 = (__pyx_v_cur_ind[1]);
+ __pyx_t_18 = (0 <= __pyx_t_69);
+ if (__pyx_t_18) {
+ __pyx_t_18 = (__pyx_t_69 < (__pyx_v_dims[1]));
}
- __pyx_t_20 = (!__pyx_t_16);
- if (!__pyx_t_20) {
+ __pyx_t_22 = (!__pyx_t_18);
+ if (!__pyx_t_22) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":334
* if (not (0 <= cur_ind[0] < dims[0])) or \
@@ -12107,21 +12551,21 @@
* break
* # Do our transfer here
*/
- __pyx_t_68 = (__pyx_v_cur_ind[2]);
- __pyx_t_16 = (0 <= __pyx_t_68);
- if (__pyx_t_16) {
- __pyx_t_16 = (__pyx_t_68 < (__pyx_v_dims[2]));
+ __pyx_t_69 = (__pyx_v_cur_ind[2]);
+ __pyx_t_18 = (0 <= __pyx_t_69);
+ if (__pyx_t_18) {
+ __pyx_t_18 = (__pyx_t_69 < (__pyx_v_dims[2]));
}
- __pyx_t_18 = (!__pyx_t_16);
- __pyx_t_16 = __pyx_t_18;
+ __pyx_t_20 = (!__pyx_t_18);
+ __pyx_t_18 = __pyx_t_20;
} else {
- __pyx_t_16 = __pyx_t_20;
+ __pyx_t_18 = __pyx_t_22;
}
- __pyx_t_20 = __pyx_t_16;
+ __pyx_t_22 = __pyx_t_18;
} else {
- __pyx_t_20 = __pyx_t_3;
+ __pyx_t_22 = __pyx_t_3;
}
- if (__pyx_t_20) {
+ if (__pyx_t_22) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":335
* (not (0 <= cur_ind[1] < dims[1])) or \
@@ -12142,9 +12586,9 @@
* dist = shells[n, 0] - dv
* if dist < shells[n,1]:
*/
- __pyx_t_69 = __pyx_v_nshells;
- for (__pyx_t_70 = 0; __pyx_t_70 < __pyx_t_69; __pyx_t_70+=1) {
- __pyx_v_n = __pyx_t_70;
+ __pyx_t_70 = __pyx_v_nshells;
+ for (__pyx_t_71 = 0; __pyx_t_71 < __pyx_t_70; __pyx_t_71+=1) {
+ __pyx_v_n = __pyx_t_71;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":338
* # Do our transfer here
@@ -12153,9 +12597,9 @@
* if dist < shells[n,1]:
* dist = exp(-dist/8.0)
*/
- __pyx_t_71 = __pyx_v_n;
- __pyx_t_72 = 0;
- __pyx_v_dist = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_71, __pyx_bstride_0_shells, __pyx_t_72, __pyx_bstride_1_shells)) - __pyx_v_dv);
+ __pyx_t_72 = __pyx_v_n;
+ __pyx_t_73 = 0;
+ __pyx_v_dist = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_72, __pyx_bstride_0_shells, __pyx_t_73, __pyx_bstride_1_shells)) - __pyx_v_dv);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":339
* for n in range(nshells):
@@ -12164,10 +12608,10 @@
* dist = exp(-dist/8.0)
* alpha = (1.0 - shells[n,5])*shells[n,5]#*dt
*/
- __pyx_t_73 = __pyx_v_n;
- __pyx_t_74 = 1;
- __pyx_t_20 = (__pyx_v_dist < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_73, __pyx_bstride_0_shells, __pyx_t_74, __pyx_bstride_1_shells)));
- if (__pyx_t_20) {
+ __pyx_t_74 = __pyx_v_n;
+ __pyx_t_75 = 1;
+ __pyx_t_22 = (__pyx_v_dist < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_74, __pyx_bstride_0_shells, __pyx_t_75, __pyx_bstride_1_shells)));
+ if (__pyx_t_22) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":340
* dist = shells[n, 0] - dv
@@ -12185,11 +12629,11 @@
* image[ind,0] += alpha*shells[n,2]*dist
* image[ind,1] += alpha*shells[n,3]*dist
*/
- __pyx_t_75 = __pyx_v_n;
- __pyx_t_76 = 5;
- __pyx_t_77 = __pyx_v_n;
- __pyx_t_78 = 5;
- __pyx_v_alpha = ((1.0 - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_75, __pyx_bstride_0_shells, __pyx_t_76, __pyx_bstride_1_shells))) * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_77, __pyx_bstride_0_shells, __pyx_t_78, __pyx_bstride_1_shells)));
+ __pyx_t_76 = __pyx_v_n;
+ __pyx_t_77 = 5;
+ __pyx_t_78 = __pyx_v_n;
+ __pyx_t_79 = 5;
+ __pyx_v_alpha = ((1.0 - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_76, __pyx_bstride_0_shells, __pyx_t_77, __pyx_bstride_1_shells))) * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_78, __pyx_bstride_0_shells, __pyx_t_79, __pyx_bstride_1_shells)));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":342
* dist = exp(-dist/8.0)
@@ -12198,11 +12642,11 @@
* image[ind,1] += alpha*shells[n,3]*dist
* image[ind,2] += alpha*shells[n,4]*dist
*/
- __pyx_t_79 = __pyx_v_n;
- __pyx_t_80 = 2;
- __pyx_t_81 = __pyx_v_ind;
- __pyx_t_82 = 0;
- *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_image.buf, __pyx_t_81, __pyx_bstride_0_image, __pyx_t_82, __pyx_bstride_1_image) += ((__pyx_v_alpha * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_79, __pyx_bstride_0_shells, __pyx_t_80, __pyx_bstride_1_shells))) * __pyx_v_dist);
+ __pyx_t_80 = __pyx_v_n;
+ __pyx_t_81 = 2;
+ __pyx_t_82 = __pyx_v_ind;
+ __pyx_t_83 = 0;
+ *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_image.buf, __pyx_t_82, __pyx_bstride_0_image, __pyx_t_83, __pyx_bstride_1_image) += ((__pyx_v_alpha * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_80, __pyx_bstride_0_shells, __pyx_t_81, __pyx_bstride_1_shells))) * __pyx_v_dist);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":343
* alpha = (1.0 - shells[n,5])*shells[n,5]#*dt
@@ -12211,11 +12655,11 @@
* image[ind,2] += alpha*shells[n,4]*dist
* image[ind,3] += alpha*shells[n,5]*dist
*/
- __pyx_t_83 = __pyx_v_n;
- __pyx_t_84 = 3;
- __pyx_t_85 = __pyx_v_ind;
- __pyx_t_86 = 1;
- *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_image.buf, __pyx_t_85, __pyx_bstride_0_image, __pyx_t_86, __pyx_bstride_1_image) += ((__pyx_v_alpha * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_83, __pyx_bstride_0_shells, __pyx_t_84, __pyx_bstride_1_shells))) * __pyx_v_dist);
+ __pyx_t_84 = __pyx_v_n;
+ __pyx_t_85 = 3;
+ __pyx_t_86 = __pyx_v_ind;
+ __pyx_t_87 = 1;
+ *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_image.buf, __pyx_t_86, __pyx_bstride_0_image, __pyx_t_87, __pyx_bstride_1_image) += ((__pyx_v_alpha * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_84, __pyx_bstride_0_shells, __pyx_t_85, __pyx_bstride_1_shells))) * __pyx_v_dist);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":344
* image[ind,0] += alpha*shells[n,2]*dist
@@ -12224,11 +12668,11 @@
* image[ind,3] += alpha*shells[n,5]*dist
* #image[ind,i] += rgba[i]*dist*rgba[3]/dt
*/
- __pyx_t_87 = __pyx_v_n;
- __pyx_t_88 = 4;
- __pyx_t_89 = __pyx_v_ind;
- __pyx_t_90 = 2;
- *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_image.buf, __pyx_t_89, __pyx_bstride_0_image, __pyx_t_90, __pyx_bstride_1_image) += ((__pyx_v_alpha * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_87, __pyx_bstride_0_shells, __pyx_t_88, __pyx_bstride_1_shells))) * __pyx_v_dist);
+ __pyx_t_88 = __pyx_v_n;
+ __pyx_t_89 = 4;
+ __pyx_t_90 = __pyx_v_ind;
+ __pyx_t_91 = 2;
+ *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_image.buf, __pyx_t_90, __pyx_bstride_0_image, __pyx_t_91, __pyx_bstride_1_image) += ((__pyx_v_alpha * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_88, __pyx_bstride_0_shells, __pyx_t_89, __pyx_bstride_1_shells))) * __pyx_v_dist);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":345
* image[ind,1] += alpha*shells[n,3]*dist
@@ -12237,11 +12681,11 @@
* #image[ind,i] += rgba[i]*dist*rgba[3]/dt
* #print rgba[i], image[ind,i], dist, dt
*/
- __pyx_t_91 = __pyx_v_n;
- __pyx_t_92 = 5;
- __pyx_t_93 = __pyx_v_ind;
- __pyx_t_94 = 3;
- *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_image.buf, __pyx_t_93, __pyx_bstride_0_image, __pyx_t_94, __pyx_bstride_1_image) += ((__pyx_v_alpha * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_91, __pyx_bstride_0_shells, __pyx_t_92, __pyx_bstride_1_shells))) * __pyx_v_dist);
+ __pyx_t_92 = __pyx_v_n;
+ __pyx_t_93 = 5;
+ __pyx_t_94 = __pyx_v_ind;
+ __pyx_t_95 = 3;
+ *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_image.buf, __pyx_t_94, __pyx_bstride_0_image, __pyx_t_95, __pyx_bstride_1_image) += ((__pyx_v_alpha * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_92, __pyx_bstride_0_shells, __pyx_t_93, __pyx_bstride_1_shells))) * __pyx_v_dist);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":348
* #image[ind,i] += rgba[i]*dist*rgba[3]/dt
@@ -12264,18 +12708,18 @@
* dt = 1.0 - enter_t
* break
*/
- __pyx_t_20 = ((__pyx_v_tmax[0]) > 1.0);
- if (__pyx_t_20) {
+ __pyx_t_22 = ((__pyx_v_tmax[0]) > 1.0);
+ if (__pyx_t_22) {
__pyx_t_3 = ((__pyx_v_tmax[1]) > 1.0);
if (__pyx_t_3) {
- __pyx_t_16 = ((__pyx_v_tmax[2]) > 1.0);
- __pyx_t_18 = __pyx_t_16;
+ __pyx_t_18 = ((__pyx_v_tmax[2]) > 1.0);
+ __pyx_t_20 = __pyx_t_18;
} else {
- __pyx_t_18 = __pyx_t_3;
+ __pyx_t_20 = __pyx_t_3;
}
- __pyx_t_3 = __pyx_t_18;
- } else {
__pyx_t_3 = __pyx_t_20;
+ } else {
+ __pyx_t_3 = __pyx_t_22;
}
if (__pyx_t_3) {
@@ -12493,19 +12937,19 @@
* cur_ind[2] += step[2]
* dv = data[cur_ind[0], cur_ind[1], cur_ind[2]] # <<<<<<<<<<<<<<
*/
- __pyx_t_68 = (__pyx_v_cur_ind[0]);
- __pyx_t_95 = (__pyx_v_cur_ind[1]);
- __pyx_t_96 = (__pyx_v_cur_ind[2]);
- __pyx_v_dv = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_data.buf, __pyx_t_68, __pyx_bstride_0_data, __pyx_t_95, __pyx_bstride_1_data, __pyx_t_96, __pyx_bstride_2_data));
+ __pyx_t_69 = (__pyx_v_cur_ind[0]);
+ __pyx_t_96 = (__pyx_v_cur_ind[1]);
+ __pyx_t_97 = (__pyx_v_cur_ind[2]);
+ __pyx_v_dv = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_data.buf, __pyx_t_69, __pyx_bstride_0_data, __pyx_t_96, __pyx_bstride_1_data, __pyx_t_97, __pyx_bstride_2_data));
}
__pyx_L23_break:;
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_44);
__Pyx_XDECREF(__pyx_t_45);
- __Pyx_XDECREF(__pyx_t_49);
+ __Pyx_XDECREF(__pyx_t_46);
+ __Pyx_XDECREF(__pyx_t_50);
{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_image);
@@ -12530,14 +12974,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_u);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_v);
__pyx_L2:;
- __Pyx_DECREF((PyObject *)__pyx_v_u);
- __Pyx_DECREF((PyObject *)__pyx_v_v);
- __Pyx_DECREF((PyObject *)__pyx_v_left_edge);
- __Pyx_DECREF((PyObject *)__pyx_v_right_edge);
- __Pyx_DECREF((PyObject *)__pyx_v_dx);
- __Pyx_DECREF((PyObject *)__pyx_v_data);
- __Pyx_DECREF((PyObject *)__pyx_v_shells);
- __Pyx_DECREF((PyObject *)__pyx_v_image);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -12818,6 +13254,7 @@
int __pyx_v_weight_field_id = ((int)-1);
int __pyx_v_weight_table_id = ((int)-1);
int __pyx_v_pass_through = ((int)0);
+ __pyx_t_5numpy_float64_t __pyx_t_1;
__Pyx_RefNannySetupContext("FIT_initialize_table");
if (__pyx_optional_args) {
if (__pyx_optional_args->__pyx_n > 0) {
@@ -12857,7 +13294,12 @@
* fit.idbin = 1.0/fit.dbin
* # Better not pull this out from under us, yo
*/
- __pyx_v_fit->dbin = (((__pyx_v_fit->bounds[1]) - (__pyx_v_fit->bounds[0])) / __pyx_v_fit->nbins);
+ __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[2]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_fit->dbin = (__pyx_t_1 / __pyx_v_fit->nbins);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":96
* fit.nbins = nbins
@@ -12866,6 +13308,10 @@
* # 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[2]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_v_fit->idbin = (1.0 / __pyx_v_fit->dbin);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":98
@@ -12913,6 +13359,10 @@
*/
__pyx_v_fit->pass_through = __pyx_v_pass_through;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_WriteUnraisable("yt.amr_utils.FIT_initialize_table");
+ __pyx_L0:;
__Pyx_RefNannyFinishContext();
}
@@ -13046,6 +13496,164 @@
return __pyx_r;
}
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":121
+ * 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_9amr_utils_21TransferFunctionProxy_2ns___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_2ns___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->ns); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 121; __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.amr_utils.TransferFunctionProxy.ns.__get__");
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_2ns___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_2ns___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("__set__");
+ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ ((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->ns = __pyx_t_1;
+
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("yt.amr_utils.TransferFunctionProxy.ns.__set__");
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":136
+ * # 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_9amr_utils_21TransferFunctionProxy_6tf_obj___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_6tf_obj___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->tf_obj);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__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;
+}
+
+static int __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_6tf_obj___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_6tf_obj___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->tf_obj);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->tf_obj);
+ ((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->tf_obj = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_6tf_obj___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_6tf_obj___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->tf_obj);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->tf_obj);
+ ((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->tf_obj = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":137
+ * # interpolation tables
+ * cdef public object tf_obj
+ * cdef public object my_field_tables # <<<<<<<<<<<<<<
+ *
+ * def __cinit__(self, tf_obj):
+ */
+
+static PyObject *__pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_15my_field_tables___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_15my_field_tables___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->my_field_tables);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__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;
+}
+
+static int __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_15my_field_tables___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_15my_field_tables___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->my_field_tables);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->my_field_tables);
+ ((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->my_field_tables = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_15my_field_tables___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_15my_field_tables___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->my_field_tables);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->my_field_tables);
+ ((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->my_field_tables = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":139
* cdef public object my_field_tables
*
@@ -13109,10 +13717,9 @@
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.TransferFunctionProxy.__cinit__");
+ __Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_self);
- __Pyx_INCREF(__pyx_v_tf_obj);
__pyx_v_temp = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
__pyx_bstruct_temp.buf = NULL;
@@ -13414,7 +14021,7 @@
PyTuple_SET_ITEM(__pyx_t_16, 2, ((PyObject *)__pyx_kp_s_4));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_s_4));
__pyx_t_4 = 0;
- if (__Pyx_Print(__pyx_t_16, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_Print(0, __pyx_t_16, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":171
@@ -13431,7 +14038,7 @@
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_16);
__Pyx_GIVEREF(__pyx_t_16);
__pyx_t_16 = 0;
- if (__Pyx_Print(__pyx_t_4, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_Print(0, __pyx_t_4, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":172
@@ -13451,7 +14058,7 @@
PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- if (__Pyx_Print(__pyx_t_16, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_Print(0, __pyx_t_16, 0) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":173
@@ -13461,7 +14068,7 @@
*
* for i in range(6):
*/
- if (__Pyx_PrintOne(((PyObject *)__pyx_kp_s_6)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_PrintOne(0, ((PyObject *)__pyx_kp_s_6)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":175
@@ -13515,7 +14122,7 @@
__Pyx_GIVEREF(__pyx_t_16);
__pyx_t_4 = 0;
__pyx_t_16 = 0;
- if (__Pyx_Print(__pyx_t_1, 1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_Print(0, __pyx_t_1, 1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
@@ -13536,8 +14143,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_temp);
__pyx_L2:;
__Pyx_DECREF((PyObject *)__pyx_v_temp);
- __Pyx_DECREF((PyObject *)__pyx_v_self);
- __Pyx_DECREF(__pyx_v_tf_obj);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
@@ -13559,7 +14164,6 @@
int __pyx_t_2;
int __pyx_t_3;
__Pyx_RefNannySetupContext("eval_transfer");
- __Pyx_INCREF((PyObject *)__pyx_v_self);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":194
* # use = 1
@@ -13666,151 +14270,435 @@
(__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_DECREF((PyObject *)__pyx_v_self);
__Pyx_RefNannyFinishContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":233
- * cdef np.float64_t *x_vec, *y_vec
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":223
*
- * def __cinit__(self, # <<<<<<<<<<<<<<
- * np.ndarray[np.float64_t, ndim=3] vp_pos,
- * np.ndarray vp_dir,
+ * 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 int __pyx_pf_2yt_9amr_utils_11VectorPlane___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
-static int __pyx_pf_2yt_9amr_utils_11VectorPlane___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_v_i;
- Py_buffer __pyx_bstruct_center;
- Py_ssize_t __pyx_bstride_0_center = 0;
- Py_ssize_t __pyx_bshape_0_center = 0;
- Py_buffer __pyx_bstruct_x_vec;
- Py_ssize_t __pyx_bstride_0_x_vec = 0;
- Py_ssize_t __pyx_bshape_0_x_vec = 0;
- Py_buffer __pyx_bstruct_y_vec;
- Py_ssize_t __pyx_bstride_0_y_vec = 0;
- Py_ssize_t __pyx_bshape_0_y_vec = 0;
- Py_buffer __pyx_bstruct_image;
- Py_ssize_t __pyx_bstride_0_image = 0;
- Py_ssize_t __pyx_bstride_1_image = 0;
- Py_ssize_t __pyx_bstride_2_image = 0;
- Py_ssize_t __pyx_bshape_0_image = 0;
- Py_ssize_t __pyx_bshape_1_image = 0;
- Py_ssize_t __pyx_bshape_2_image = 0;
- Py_buffer __pyx_bstruct_vp_pos;
- Py_ssize_t __pyx_bstride_0_vp_pos = 0;
- Py_ssize_t __pyx_bstride_1_vp_pos = 0;
- Py_ssize_t __pyx_bstride_2_vp_pos = 0;
- Py_ssize_t __pyx_bshape_0_vp_pos = 0;
- Py_ssize_t __pyx_bshape_1_vp_pos = 0;
- Py_ssize_t __pyx_bshape_2_vp_pos = 0;
+static PyObject *__pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_pos___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_pos___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_pos);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__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;
+}
+
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_pos___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_pos___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
int __pyx_r;
- int __pyx_t_1;
- PyObject *__pyx_t_2 = NULL;
- __pyx_t_5numpy_float64_t __pyx_t_3;
- int __pyx_t_4;
- 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};
- __Pyx_RefNannySetupContext("__cinit__");
- if (unlikely(__pyx_kwds)) {
- Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
- PyObject* values[7] = {0,0,0,0,0,0,0};
- 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);
- 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;
- }
- switch (PyTuple_GET_SIZE(__pyx_args)) {
- case 0:
- values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vp_pos);
- if (likely(values[0])) kw_args--;
- else goto __pyx_L5_argtuple_error;
- case 1:
- values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vp_dir);
- if (likely(values[1])) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- case 2:
- values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__center);
- if (likely(values[2])) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- case 3:
- values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bounds);
- if (likely(values[3])) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- case 4:
- values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__image);
- if (likely(values[4])) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- case 5:
- values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x_vec);
- if (likely(values[5])) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- case 6:
- values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y_vec);
- if (likely(values[6])) kw_args--;
- else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 6); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- }
- if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- }
- __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]);
- } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
- goto __pyx_L5_argtuple_error;
- } else {
- __pyx_v_vp_pos = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
- __pyx_v_vp_dir = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
- __pyx_v_center = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
- __pyx_v_bounds = PyTuple_GET_ITEM(__pyx_args, 3);
- __pyx_v_image = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 4));
- __pyx_v_x_vec = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 5));
- __pyx_v_y_vec = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_L3_error:;
- __Pyx_AddTraceback("yt.amr_utils.VectorPlane.__cinit__");
- return -1;
- __pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_self);
- __Pyx_INCREF((PyObject *)__pyx_v_vp_pos);
- __Pyx_INCREF((PyObject *)__pyx_v_vp_dir);
- __Pyx_INCREF((PyObject *)__pyx_v_center);
- __Pyx_INCREF(__pyx_v_bounds);
- __Pyx_INCREF((PyObject *)__pyx_v_image);
- __Pyx_INCREF((PyObject *)__pyx_v_x_vec);
- __Pyx_INCREF((PyObject *)__pyx_v_y_vec);
- __pyx_bstruct_vp_pos.buf = NULL;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_pos);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_pos);
+ ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_pos = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_pos___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_pos___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_pos);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_pos);
+ ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_pos = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_dir___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_dir___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_dir);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__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;
+}
+
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_dir___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_dir___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_dir);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_dir);
+ ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_dir = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_dir___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_dir___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_dir);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_dir);
+ ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->avp_dir = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_2yt_9amr_utils_11VectorPlane_7acenter___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_11VectorPlane_7acenter___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->acenter);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__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;
+}
+
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_7acenter___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_7acenter___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->acenter);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->acenter);
+ ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->acenter = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_7acenter___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_7acenter___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->acenter);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->acenter);
+ ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->acenter = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_2yt_9amr_utils_11VectorPlane_6aimage___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_11VectorPlane_6aimage___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->aimage);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__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;
+}
+
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_6aimage___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_6aimage___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->aimage);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->aimage);
+ ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->aimage = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_6aimage___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_6aimage___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->aimage);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->aimage);
+ ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->aimage = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":230
+ * 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_9amr_utils_11VectorPlane_6ax_vec___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_11VectorPlane_6ax_vec___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ax_vec);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__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;
+}
+
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_6ax_vec___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_6ax_vec___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ax_vec);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ax_vec);
+ ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ax_vec = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_6ax_vec___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_6ax_vec___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ax_vec);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ax_vec);
+ ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ax_vec = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_2yt_9amr_utils_11VectorPlane_6ay_vec___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_11VectorPlane_6ay_vec___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ay_vec);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__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;
+}
+
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_6ay_vec___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_6ay_vec___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ay_vec);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ay_vec);
+ ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ay_vec = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_6ay_vec___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane_6ay_vec___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ay_vec);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ay_vec);
+ ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->ay_vec = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":233
+ * 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_9amr_utils_11VectorPlane___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_11VectorPlane___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_v_i;
+ Py_buffer __pyx_bstruct_center;
+ Py_ssize_t __pyx_bstride_0_center = 0;
+ Py_ssize_t __pyx_bshape_0_center = 0;
+ Py_buffer __pyx_bstruct_x_vec;
+ Py_ssize_t __pyx_bstride_0_x_vec = 0;
+ Py_ssize_t __pyx_bshape_0_x_vec = 0;
+ Py_buffer __pyx_bstruct_y_vec;
+ Py_ssize_t __pyx_bstride_0_y_vec = 0;
+ Py_ssize_t __pyx_bshape_0_y_vec = 0;
+ Py_buffer __pyx_bstruct_image;
+ Py_ssize_t __pyx_bstride_0_image = 0;
+ Py_ssize_t __pyx_bstride_1_image = 0;
+ Py_ssize_t __pyx_bstride_2_image = 0;
+ Py_ssize_t __pyx_bshape_0_image = 0;
+ Py_ssize_t __pyx_bshape_1_image = 0;
+ Py_ssize_t __pyx_bshape_2_image = 0;
+ Py_buffer __pyx_bstruct_vp_pos;
+ Py_ssize_t __pyx_bstride_0_vp_pos = 0;
+ Py_ssize_t __pyx_bstride_1_vp_pos = 0;
+ Py_ssize_t __pyx_bstride_2_vp_pos = 0;
+ Py_ssize_t __pyx_bshape_0_vp_pos = 0;
+ Py_ssize_t __pyx_bshape_1_vp_pos = 0;
+ Py_ssize_t __pyx_bshape_2_vp_pos = 0;
+ int __pyx_r;
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ __pyx_t_5numpy_float64_t __pyx_t_3;
+ int __pyx_t_4;
+ 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};
+ __Pyx_RefNannySetupContext("__cinit__");
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+ PyObject* values[7] = {0,0,0,0,0,0,0};
+ 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);
+ 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;
+ }
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 0:
+ values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vp_pos);
+ if (likely(values[0])) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ case 1:
+ values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vp_dir);
+ if (likely(values[1])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 2:
+ values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__center);
+ if (likely(values[2])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 3:
+ values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__bounds);
+ if (likely(values[3])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 4:
+ values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__image);
+ if (likely(values[4])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 4); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 5:
+ values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x_vec);
+ if (likely(values[5])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 5); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ case 6:
+ values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y_vec);
+ if (likely(values[6])) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 6); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ }
+ __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]);
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ __pyx_v_vp_pos = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
+ __pyx_v_vp_dir = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
+ __pyx_v_center = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
+ __pyx_v_bounds = PyTuple_GET_ITEM(__pyx_args, 3);
+ __pyx_v_image = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 4));
+ __pyx_v_x_vec = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 5));
+ __pyx_v_y_vec = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 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[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("yt.amr_utils.VectorPlane.__cinit__");
+ __Pyx_RefNannyFinishContext();
+ return -1;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_bstruct_vp_pos.buf = NULL;
__pyx_bstruct_center.buf = NULL;
__pyx_bstruct_image.buf = NULL;
__pyx_bstruct_x_vec.buf = NULL;
@@ -14025,7 +14913,13 @@
* self.pdy = (self.bounds[3] - self.bounds[2])/self.nv[1]
* for i in range(3):
*/
- ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->pdx = (((((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->bounds[1]) - (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->bounds[0])) / (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->nv[0]));
+ __pyx_t_3 = ((((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->bounds[1]) - (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->bounds[0]));
+ __pyx_t_1 = (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->nv[0]);
+ if (unlikely(__pyx_t_1 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->pdx = (__pyx_t_3 / __pyx_t_1);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":258
* for i in range(4): self.bounds[i] = bounds[i]
@@ -14034,7 +14928,13 @@
* for i in range(3):
* self.vp_strides[i] = vp_pos.strides[i] / 8
*/
- ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->pdy = (((((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->bounds[3]) - (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->bounds[2])) / (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->nv[1]));
+ __pyx_t_3 = ((((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->bounds[3]) - (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->bounds[2]));
+ __pyx_t_1 = (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->nv[1]);
+ if (unlikely(__pyx_t_1 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[2]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ ((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->pdy = (__pyx_t_3 / __pyx_t_1);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":259
* self.pdx = (self.bounds[1] - self.bounds[0])/self.nv[0]
@@ -14053,7 +14953,7 @@
* self.im_strides[i] = image.strides[i] / 8
* if vp_dir.ndim > 1:
*/
- (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->vp_strides[__pyx_v_i]) = ((__pyx_v_vp_pos->strides[__pyx_v_i]) / 8);
+ (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->vp_strides[__pyx_v_i]) = __Pyx_div_long((__pyx_v_vp_pos->strides[__pyx_v_i]), 8);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":261
* for i in range(3):
@@ -14062,7 +14962,7 @@
* if vp_dir.ndim > 1:
* for i in range(3):
*/
- (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->im_strides[__pyx_v_i]) = ((__pyx_v_image->strides[__pyx_v_i]) / 8);
+ (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->im_strides[__pyx_v_i]) = __Pyx_div_long((__pyx_v_image->strides[__pyx_v_i]), 8);
}
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":262
@@ -14092,7 +14992,7 @@
* else:
* self.vd_strides[0] = self.vd_strides[1] = self.vd_strides[2] = -1
*/
- (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->vd_strides[__pyx_v_i]) = ((__pyx_v_vp_dir->strides[__pyx_v_i]) / 8);
+ (((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->vd_strides[__pyx_v_i]) = __Pyx_div_long((__pyx_v_vp_dir->strides[__pyx_v_i]), 8);
}
goto __pyx_L10;
}
@@ -14133,14 +15033,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_image);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_vp_pos);
__pyx_L2:;
- __Pyx_DECREF((PyObject *)__pyx_v_self);
- __Pyx_DECREF((PyObject *)__pyx_v_vp_pos);
- __Pyx_DECREF((PyObject *)__pyx_v_vp_dir);
- __Pyx_DECREF((PyObject *)__pyx_v_center);
- __Pyx_DECREF(__pyx_v_bounds);
- __Pyx_DECREF((PyObject *)__pyx_v_image);
- __Pyx_DECREF((PyObject *)__pyx_v_x_vec);
- __Pyx_DECREF((PyObject *)__pyx_v_y_vec);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
@@ -14158,8 +15050,8 @@
__pyx_t_5numpy_float64_t __pyx_v_cy;
int __pyx_v_i;
int __pyx_t_1;
+ __pyx_t_5numpy_float64_t __pyx_t_2;
__Pyx_RefNannySetupContext("get_start_stop");
- __Pyx_INCREF((PyObject *)__pyx_v_self);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":274
* cdef np.float64_t cx, cy
@@ -14207,7 +15099,12 @@
* rv[1] = rv[0] + lrint((ex[1] - ex[0])/self.pdx)
* rv[2] = lrint((ex[2] - cy - self.bounds[2])/self.pdy)
*/
- (__pyx_v_rv[0]) = lrint(((((__pyx_v_ex[0]) - __pyx_v_cx) - (__pyx_v_self->bounds[0])) / __pyx_v_self->pdx));
+ __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[2]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ (__pyx_v_rv[0]) = lrint((__pyx_t_2 / __pyx_v_self->pdx));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":279
* cy += self.center[i] * self.y_vec[i]
@@ -14216,7 +15113,12 @@
* rv[2] = lrint((ex[2] - cy - self.bounds[2])/self.pdy)
* rv[3] = rv[2] + lrint((ex[3] - ex[2])/self.pdy)
*/
- (__pyx_v_rv[1]) = ((__pyx_v_rv[0]) + lrint((((__pyx_v_ex[1]) - (__pyx_v_ex[0])) / __pyx_v_self->pdx)));
+ __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[2]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ (__pyx_v_rv[1]) = ((__pyx_v_rv[0]) + lrint((__pyx_t_2 / __pyx_v_self->pdx)));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":280
* rv[0] = lrint((ex[0] - cx - self.bounds[0])/self.pdx)
@@ -14225,7 +15127,12 @@
* rv[3] = rv[2] + lrint((ex[3] - ex[2])/self.pdy)
*
*/
- (__pyx_v_rv[2]) = lrint(((((__pyx_v_ex[2]) - __pyx_v_cy) - (__pyx_v_self->bounds[2])) / __pyx_v_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[2]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ (__pyx_v_rv[2]) = lrint((__pyx_t_2 / __pyx_v_self->pdy));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":281
* rv[1] = rv[0] + lrint((ex[1] - ex[0])/self.pdx)
@@ -14234,110 +15141,376 @@
*
* cdef inline void copy_into(self, np.float64_t *fv, np.float64_t *tv,
*/
- (__pyx_v_rv[3]) = ((__pyx_v_rv[2]) + lrint((((__pyx_v_ex[3]) - (__pyx_v_ex[2])) / __pyx_v_self->pdy)));
+ __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[2]; __pyx_lineno = 281; __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.amr_utils.VectorPlane.get_start_stop");
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":283
+ * 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_9amr_utils_11VectorPlane_copy_into(struct __pyx_obj_2yt_9amr_utils_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;
+ int __pyx_t_1;
+ int __pyx_t_2;
+ __Pyx_RefNannySetupContext("copy_into");
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":288
+ * # 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));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":289
+ * 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;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":290
+ * 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();
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":292
+ * 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_9amr_utils_11VectorPlane_copy_back(struct __pyx_obj_2yt_9amr_utils_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;
+ int __pyx_t_1;
+ int __pyx_t_2;
+ __Pyx_RefNannySetupContext("copy_back");
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":295
+ * 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));
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":296
+ * 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;
+
+ /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":297
+ * cdef int offset = strides[0] * i + strides[1] * j
+ * for k in range(nk):
+ * tv[offset + k] = fv[k] # <<<<<<<<<<<<<<
+ *
+ * cdef class PartitionedGrid:
+ */
+ (__pyx_v_tv[(__pyx_v_offset + __pyx_v_k)]) = (__pyx_v_fv[__pyx_v_k]);
+ }
+
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":300
+ *
+ * cdef class PartitionedGrid:
+ * cdef public object my_data # <<<<<<<<<<<<<<
+ * cdef public object LeftEdge
+ * cdef public object RightEdge
+ */
+
+static PyObject *__pyx_pf_2yt_9amr_utils_15PartitionedGrid_7my_data___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_15PartitionedGrid_7my_data___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->my_data);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__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;
+}
+
+static int __pyx_pf_2yt_9amr_utils_15PartitionedGrid_7my_data___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_15PartitionedGrid_7my_data___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->my_data);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->my_data);
+ ((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->my_data = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_15PartitionedGrid_7my_data___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_15PartitionedGrid_7my_data___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->my_data);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->my_data);
+ ((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->my_data = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":301
+ * 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_9amr_utils_15PartitionedGrid_8LeftEdge___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_15PartitionedGrid_8LeftEdge___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->LeftEdge);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__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;
+}
+
+static int __pyx_pf_2yt_9amr_utils_15PartitionedGrid_8LeftEdge___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_15PartitionedGrid_8LeftEdge___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->LeftEdge);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->LeftEdge);
+ ((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->LeftEdge = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_15PartitionedGrid_8LeftEdge___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_15PartitionedGrid_8LeftEdge___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->LeftEdge);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->LeftEdge);
+ ((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->LeftEdge = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":302
+ * 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_9amr_utils_15PartitionedGrid_9RightEdge___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_15PartitionedGrid_9RightEdge___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->RightEdge);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__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;
+}
+
+static int __pyx_pf_2yt_9amr_utils_15PartitionedGrid_9RightEdge___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_15PartitionedGrid_9RightEdge___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->RightEdge);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->RightEdge);
+ ((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->RightEdge = __pyx_v_value;
- __Pyx_DECREF((PyObject *)__pyx_v_self);
+ __pyx_r = 0;
__Pyx_RefNannyFinishContext();
+ return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":283
- * 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_9amr_utils_11VectorPlane_copy_into(struct __pyx_obj_2yt_9amr_utils_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;
- int __pyx_t_1;
- int __pyx_t_2;
- __Pyx_RefNannySetupContext("copy_into");
- __Pyx_INCREF((PyObject *)__pyx_v_self);
+static int __pyx_pf_2yt_9amr_utils_15PartitionedGrid_9RightEdge___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_15PartitionedGrid_9RightEdge___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->RightEdge);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->RightEdge);
+ ((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->RightEdge = Py_None;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":288
- * # 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));
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":289
- * cdef int k
- * cdef int offset = strides[0] * i + strides[1] * j
- * for k in range(nk): # <<<<<<<<<<<<<<
- * tv[k] = fv[offset + k]
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":310
+ * cdef np.float64_t idds[3]
+ * cdef int dims[3]
+ * cdef public int parent_grid_id # <<<<<<<<<<<<<<
+ * cdef public int n_fields
*
*/
- __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;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":290
- * 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)]);
- }
+static PyObject *__pyx_pf_2yt_9amr_utils_15PartitionedGrid_14parent_grid_id___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_15PartitionedGrid_14parent_grid_id___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->parent_grid_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 310; __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_DECREF((PyObject *)__pyx_v_self);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("yt.amr_utils.PartitionedGrid.parent_grid_id.__get__");
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
+ return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":292
- * 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_9amr_utils_11VectorPlane_copy_back(struct __pyx_obj_2yt_9amr_utils_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;
+static int __pyx_pf_2yt_9amr_utils_15PartitionedGrid_14parent_grid_id___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_15PartitionedGrid_14parent_grid_id___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
int __pyx_t_1;
- int __pyx_t_2;
- __Pyx_RefNannySetupContext("copy_back");
- __Pyx_INCREF((PyObject *)__pyx_v_self);
+ __Pyx_RefNannySetupContext("__set__");
+ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ ((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->parent_grid_id = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":295
- * 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));
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("yt.amr_utils.PartitionedGrid.parent_grid_id.__set__");
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":296
- * cdef int k
- * cdef int offset = strides[0] * i + strides[1] * j
- * for k in range(nk): # <<<<<<<<<<<<<<
- * tv[offset + k] = fv[k]
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":311
+ * cdef int dims[3]
+ * cdef public int parent_grid_id
+ * cdef public int n_fields # <<<<<<<<<<<<<<
*
+ * @cython.boundscheck(False)
*/
- __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;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":297
- * cdef int offset = strides[0] * i + strides[1] * j
- * for k in range(nk):
- * tv[offset + k] = fv[k] # <<<<<<<<<<<<<<
- *
- * cdef class PartitionedGrid:
- */
- (__pyx_v_tv[(__pyx_v_offset + __pyx_v_k)]) = (__pyx_v_fv[__pyx_v_k]);
- }
+static PyObject *__pyx_pf_2yt_9amr_utils_15PartitionedGrid_8n_fields___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_15PartitionedGrid_8n_fields___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->n_fields); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 311; __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.amr_utils.PartitionedGrid.n_fields.__get__");
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_15PartitionedGrid_8n_fields___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_15PartitionedGrid_8n_fields___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("__set__");
+ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ ((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->n_fields = __pyx_t_1;
- __Pyx_DECREF((PyObject *)__pyx_v_self);
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("yt.amr_utils.PartitionedGrid.n_fields.__set__");
+ __pyx_r = -1;
+ __pyx_L0:;
__Pyx_RefNannyFinishContext();
+ return __pyx_r;
}
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":315
@@ -14379,14 +15552,16 @@
int __pyx_t_2;
int __pyx_t_3;
int __pyx_t_4;
- int __pyx_t_5;
+ __pyx_t_5numpy_float64_t __pyx_t_5;
int __pyx_t_6;
- PyObject *__pyx_t_7 = NULL;
- PyArrayObject *__pyx_t_8 = NULL;
- int __pyx_t_9;
- PyObject *__pyx_t_10 = NULL;
- PyObject *__pyx_t_11 = NULL;
+ __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;
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,0};
__Pyx_RefNannySetupContext("__cinit__");
if (unlikely(__pyx_kwds)) {
@@ -14462,13 +15637,9 @@
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.PartitionedGrid.__cinit__");
+ __Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_self);
- __Pyx_INCREF(__pyx_v_data);
- __Pyx_INCREF((PyObject *)__pyx_v_left_edge);
- __Pyx_INCREF((PyObject *)__pyx_v_right_edge);
- __Pyx_INCREF((PyObject *)__pyx_v_dims);
__pyx_v_tdata = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
__pyx_bstruct_tdata.buf = NULL;
__pyx_bstruct_left_edge.buf = NULL;
@@ -14578,8 +15749,14 @@
* self.idds[i] = 1.0/self.dds[i]
* self.my_data = data
*/
- __pyx_t_5 = __pyx_v_i;
- (((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->dds[__pyx_v_i]) = (((((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->right_edge[__pyx_v_i]) - (((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->left_edge[__pyx_v_i])) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_dims.buf, __pyx_t_5, __pyx_bstride_0_dims)));
+ __pyx_t_5 = ((((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->right_edge[__pyx_v_i]) - (((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__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_bstruct_dims.buf, __pyx_t_6, __pyx_bstride_0_dims));
+ if (unlikely(__pyx_t_7 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[2]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ (((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->dds[__pyx_v_i]) = (__pyx_t_5 / __pyx_t_7);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":331
* self.dims[i] = dims[i]
@@ -14588,7 +15765,12 @@
* self.my_data = data
* self.n_fields = n_fields
*/
- (((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->idds[__pyx_v_i]) = (1.0 / (((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->dds[__pyx_v_i]));
+ __pyx_t_5 = (((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->dds[__pyx_v_i]);
+ if (unlikely(__pyx_t_5 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[2]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ (((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->idds[__pyx_v_i]) = (1.0 / __pyx_t_5);
}
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":332
@@ -14621,8 +15803,8 @@
* self.data[i] = <np.float64_t *> tdata.data
*/
__pyx_t_1 = __pyx_v_n_fields;
- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) {
- __pyx_v_i = __pyx_t_6;
+ for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) {
+ __pyx_v_i = __pyx_t_8;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":335
* self.n_fields = n_fields
@@ -14631,31 +15813,31 @@
* self.data[i] = <np.float64_t *> tdata.data
*
*/
- __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_data, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_8 = ((PyArrayObject *)__pyx_t_7);
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_data, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_9) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 335; __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[2]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = ((PyArrayObject *)__pyx_t_9);
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_tdata);
- __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_tdata, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack);
- if (unlikely(__pyx_t_9 < 0)) {
- PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
+ __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_tdata, (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_bstruct_tdata, (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_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
+ Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14);
__Pyx_RaiseBufferFallbackError();
} else {
- PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+ PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14);
}
}
__pyx_bstride_0_tdata = __pyx_bstruct_tdata.strides[0]; __pyx_bstride_1_tdata = __pyx_bstruct_tdata.strides[1]; __pyx_bstride_2_tdata = __pyx_bstruct_tdata.strides[2];
__pyx_bshape_0_tdata = __pyx_bstruct_tdata.shape[0]; __pyx_bshape_1_tdata = __pyx_bstruct_tdata.shape[1]; __pyx_bshape_2_tdata = __pyx_bstruct_tdata.shape[2];
- if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_t_11 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_8 = 0;
+ __pyx_t_10 = 0;
__Pyx_DECREF(((PyObject *)__pyx_v_tdata));
- __pyx_v_tdata = ((PyArrayObject *)__pyx_t_7);
- __pyx_t_7 = 0;
+ __pyx_v_tdata = ((PyArrayObject *)__pyx_t_9);
+ __pyx_t_9 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":336
* for i in range(n_fields):
@@ -14670,7 +15852,7 @@
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_9);
{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_tdata);
@@ -14688,11 +15870,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_edge);
__pyx_L2:;
__Pyx_DECREF((PyObject *)__pyx_v_tdata);
- __Pyx_DECREF((PyObject *)__pyx_v_self);
- __Pyx_DECREF(__pyx_v_data);
- __Pyx_DECREF((PyObject *)__pyx_v_left_edge);
- __Pyx_DECREF((PyObject *)__pyx_v_right_edge);
- __Pyx_DECREF((PyObject *)__pyx_v_dims);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
@@ -14763,11 +15940,9 @@
__Pyx_RaiseArgtupleInvalid("cast_plane", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.PartitionedGrid.cast_plane");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_self);
- __Pyx_INCREF((PyObject *)__pyx_v_tf);
- __Pyx_INCREF((PyObject *)__pyx_v_vp);
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tf), __pyx_ptype_2yt_9amr_utils_TransferFunctionProxy, 1, "tf", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vp), __pyx_ptype_2yt_9amr_utils_VectorPlane, 1, "vp", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -14999,9 +16174,6 @@
__Pyx_AddTraceback("yt.amr_utils.PartitionedGrid.cast_plane");
__pyx_r = NULL;
__pyx_L0:;
- __Pyx_DECREF((PyObject *)__pyx_v_self);
- __Pyx_DECREF((PyObject *)__pyx_v_tf);
- __Pyx_DECREF((PyObject *)__pyx_v_vp);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -15027,8 +16199,6 @@
int __pyx_t_4;
int __pyx_t_5;
__Pyx_RefNannySetupContext("calculate_extent");
- __Pyx_INCREF((PyObject *)__pyx_v_self);
- __Pyx_INCREF((PyObject *)__pyx_v_vp);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":379
* # We do this for all eight corners
@@ -15055,9 +16225,9 @@
* cdef int i, j, k
* for i in range(2):
*/
- (__pyx_v_extrema[0]) = 1.0000000000000001e+300;
- (__pyx_v_extrema[2]) = 1.0000000000000001e+300;
- __pyx_t_1 = (-1.0000000000000001e+300);
+ (__pyx_v_extrema[0]) = 1e300;
+ (__pyx_v_extrema[2]) = 1e300;
+ __pyx_t_1 = (-1e300);
(__pyx_v_extrema[1]) = __pyx_t_1;
(__pyx_v_extrema[3]) = __pyx_t_1;
@@ -15204,8 +16374,6 @@
}
}
- __Pyx_DECREF((PyObject *)__pyx_v_self);
- __Pyx_DECREF((PyObject *)__pyx_v_vp);
__Pyx_RefNannyFinishContext();
}
@@ -15239,15 +16407,14 @@
int __pyx_r;
int __pyx_t_1;
int __pyx_t_2;
- int __pyx_t_3;
+ __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;
__Pyx_RefNannySetupContext("integrate_ray");
- __Pyx_INCREF((PyObject *)__pyx_v_self);
- __Pyx_INCREF((PyObject *)__pyx_v_tf);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":406
* TransferFunctionProxy tf):
@@ -15275,7 +16442,7 @@
* step[i] = -1
* else:
*/
- __pyx_t_2 = ((__pyx_v_v_dir[__pyx_v_i]) < 0);
+ __pyx_t_2 = ((__pyx_v_v_dir[__pyx_v_i]) < 0.0);
if (__pyx_t_2) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":413
@@ -15306,31 +16473,36 @@
* step[i] = 1
* x = (i+1) % 3 # <<<<<<<<<<<<<<
* y = (i+2) % 3
- * iv_dir[i] = 1.0/v_dir[0]
+ * iv_dir[i] = 1.0/v_dir[i]
*/
- __pyx_v_x = ((__pyx_v_i + 1) % 3);
+ __pyx_v_x = __Pyx_mod_long((__pyx_v_i + 1), 3);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":417
* step[i] = 1
* x = (i+1) % 3
* y = (i+2) % 3 # <<<<<<<<<<<<<<
- * iv_dir[i] = 1.0/v_dir[0]
+ * iv_dir[i] = 1.0/v_dir[i]
* tl = (self.left_edge[i] - v_pos[i])*iv_dir[i]
*/
- __pyx_v_y = ((__pyx_v_i + 2) % 3);
+ __pyx_v_y = __Pyx_mod_long((__pyx_v_i + 2), 3);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":418
* x = (i+1) % 3
* y = (i+2) % 3
- * iv_dir[i] = 1.0/v_dir[0] # <<<<<<<<<<<<<<
+ * 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])
*/
- (__pyx_v_iv_dir[__pyx_v_i]) = (1.0 / (__pyx_v_v_dir[0]));
+ __pyx_t_3 = (__pyx_v_v_dir[__pyx_v_i]);
+ if (unlikely(__pyx_t_3 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[2]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ (__pyx_v_iv_dir[__pyx_v_i]) = (1.0 / __pyx_t_3);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":419
* y = (i+2) % 3
- * iv_dir[i] = 1.0/v_dir[0]
+ * 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])
@@ -15338,7 +16510,7 @@
__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]));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":420
- * iv_dir[i] = 1.0/v_dir[0]
+ * 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])
@@ -15364,8 +16536,8 @@
*/
__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) {
+ __pyx_t_4 = (__pyx_v_temp_x <= (__pyx_v_self->right_edge[__pyx_v_x]));
+ if (__pyx_t_4) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":423
* temp_y = (v_pos[y] + tl*v_dir[y])
@@ -15374,10 +16546,10 @@
* 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) {
+ __pyx_t_5 = ((__pyx_v_self->left_edge[__pyx_v_y]) <= __pyx_v_temp_y);
+ if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_temp_y <= (__pyx_v_self->right_edge[__pyx_v_y]));
+ if (__pyx_t_6) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":424
* if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
@@ -15386,30 +16558,30 @@
* 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;
+ __pyx_t_7 = (0.0 <= __pyx_v_tl);
+ if (__pyx_t_7) {
+ __pyx_t_8 = (__pyx_v_tl < __pyx_v_intersect_t);
+ __pyx_t_9 = __pyx_t_8;
} else {
- __pyx_t_8 = __pyx_t_6;
+ __pyx_t_9 = __pyx_t_7;
}
- __pyx_t_6 = __pyx_t_8;
+ __pyx_t_7 = __pyx_t_9;
} else {
- __pyx_t_6 = __pyx_t_5;
+ __pyx_t_7 = __pyx_t_6;
}
- __pyx_t_5 = __pyx_t_6;
+ __pyx_t_6 = __pyx_t_7;
} else {
- __pyx_t_5 = __pyx_t_4;
+ __pyx_t_6 = __pyx_t_5;
}
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
} else {
- __pyx_t_4 = __pyx_t_3;
+ __pyx_t_5 = __pyx_t_4;
}
- __pyx_t_3 = __pyx_t_4;
+ __pyx_t_4 = __pyx_t_5;
} else {
- __pyx_t_3 = __pyx_t_2;
+ __pyx_t_4 = __pyx_t_2;
}
- if (__pyx_t_3) {
+ if (__pyx_t_4) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":425
* self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
@@ -15466,8 +16638,8 @@
* 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_4 = ((__pyx_v_self->left_edge[__pyx_v_x]) <= __pyx_v_temp_x);
+ if (__pyx_t_4) {
__pyx_t_2 = (__pyx_v_temp_x <= (__pyx_v_self->right_edge[__pyx_v_x]));
if (__pyx_t_2) {
@@ -15478,10 +16650,10 @@
* 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) {
+ __pyx_t_5 = ((__pyx_v_self->left_edge[__pyx_v_y]) <= __pyx_v_temp_y);
+ if (__pyx_t_5) {
+ __pyx_t_6 = (__pyx_v_temp_y <= (__pyx_v_self->right_edge[__pyx_v_y]));
+ if (__pyx_t_6) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":432
* if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
@@ -15490,28 +16662,28 @@
* 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;
+ __pyx_t_7 = (0.0 <= __pyx_v_tr);
+ if (__pyx_t_7) {
+ __pyx_t_9 = (__pyx_v_tr < __pyx_v_intersect_t);
+ __pyx_t_8 = __pyx_t_9;
} else {
- __pyx_t_7 = __pyx_t_6;
+ __pyx_t_8 = __pyx_t_7;
}
- __pyx_t_6 = __pyx_t_7;
+ __pyx_t_7 = __pyx_t_8;
} else {
- __pyx_t_6 = __pyx_t_5;
+ __pyx_t_7 = __pyx_t_6;
}
- __pyx_t_5 = __pyx_t_6;
+ __pyx_t_6 = __pyx_t_7;
} else {
- __pyx_t_5 = __pyx_t_4;
+ __pyx_t_6 = __pyx_t_5;
}
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
} else {
- __pyx_t_4 = __pyx_t_2;
+ __pyx_t_5 = __pyx_t_2;
}
- __pyx_t_2 = __pyx_t_4;
+ __pyx_t_2 = __pyx_t_5;
} else {
- __pyx_t_2 = __pyx_t_3;
+ __pyx_t_2 = __pyx_t_4;
}
if (__pyx_t_2) {
@@ -15546,8 +16718,8 @@
*/
__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) {
+ __pyx_t_4 = ((__pyx_v_v_pos[0]) <= (__pyx_v_self->right_edge[0]));
+ if (__pyx_t_4) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":436
* intersect_t = tr
@@ -15556,10 +16728,10 @@
* 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) {
+ __pyx_t_5 = ((__pyx_v_self->left_edge[1]) <= (__pyx_v_v_pos[1]));
+ if (__pyx_t_5) {
+ __pyx_t_6 = ((__pyx_v_v_pos[1]) <= (__pyx_v_self->right_edge[1]));
+ if (__pyx_t_6) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":437
* if self.left_edge[0] <= v_pos[0] and v_pos[0] <= self.right_edge[0] and \
@@ -15568,30 +16740,30 @@
* intersect_t = 0.0
* if not ((0.0 <= intersect_t) and (intersect_t < 1.0)): return 0
*/
- __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;
+ __pyx_t_7 = ((__pyx_v_self->left_edge[2]) <= (__pyx_v_v_pos[2]));
+ if (__pyx_t_7) {
+ __pyx_t_8 = ((__pyx_v_v_pos[2]) <= (__pyx_v_self->right_edge[2]));
+ __pyx_t_9 = __pyx_t_8;
} else {
- __pyx_t_8 = __pyx_t_6;
+ __pyx_t_9 = __pyx_t_7;
}
- __pyx_t_6 = __pyx_t_8;
+ __pyx_t_7 = __pyx_t_9;
} else {
- __pyx_t_6 = __pyx_t_5;
+ __pyx_t_7 = __pyx_t_6;
}
- __pyx_t_5 = __pyx_t_6;
+ __pyx_t_6 = __pyx_t_7;
} else {
- __pyx_t_5 = __pyx_t_4;
+ __pyx_t_6 = __pyx_t_5;
}
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_5 = __pyx_t_6;
} else {
- __pyx_t_4 = __pyx_t_3;
+ __pyx_t_5 = __pyx_t_4;
}
- __pyx_t_3 = __pyx_t_4;
+ __pyx_t_4 = __pyx_t_5;
} else {
- __pyx_t_3 = __pyx_t_2;
+ __pyx_t_4 = __pyx_t_2;
}
- if (__pyx_t_3) {
+ if (__pyx_t_4) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":438
* self.left_edge[1] <= v_pos[1] and v_pos[1] <= self.right_edge[1] and \
@@ -15612,15 +16784,15 @@
* 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_4 = (0.0 <= __pyx_v_intersect_t);
+ if (__pyx_t_4) {
__pyx_t_2 = (__pyx_v_intersect_t < 1.0);
- __pyx_t_4 = __pyx_t_2;
+ __pyx_t_5 = __pyx_t_2;
} else {
- __pyx_t_4 = __pyx_t_3;
+ __pyx_t_5 = __pyx_t_4;
}
- __pyx_t_3 = (!__pyx_t_4);
- if (__pyx_t_3) {
+ __pyx_t_4 = (!__pyx_t_5);
+ if (__pyx_t_4) {
__pyx_r = 0;
goto __pyx_L0;
goto __pyx_L9;
@@ -15653,7 +16825,7 @@
* 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-08) * (__pyx_v_self->dds[__pyx_v_i]))) - (__pyx_v_self->left_edge[__pyx_v_i])) * (__pyx_v_self->idds[__pyx_v_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]))));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":445
* step[i]*1e-8*self.dds[i] -
@@ -15671,12 +16843,12 @@
* 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;
+ __pyx_t_4 = ((__pyx_v_cur_ind[__pyx_v_i]) == (__pyx_v_self->dims[__pyx_v_i]));
+ if (__pyx_t_4) {
+ __pyx_t_5 = ((__pyx_v_step[__pyx_v_i]) < 0);
+ __pyx_t_2 = __pyx_t_5;
} else {
- __pyx_t_2 = __pyx_t_3;
+ __pyx_t_2 = __pyx_t_4;
}
if (__pyx_t_2) {
@@ -15701,12 +16873,12 @@
*/
__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;
+ __pyx_t_4 = ((__pyx_v_cur_ind[__pyx_v_i]) >= (__pyx_v_self->dims[__pyx_v_i]));
+ __pyx_t_5 = __pyx_t_4;
} else {
- __pyx_t_4 = __pyx_t_2;
+ __pyx_t_5 = __pyx_t_2;
}
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
__pyx_r = 0;
goto __pyx_L0;
goto __pyx_L13;
@@ -15720,8 +16892,8 @@
* 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) {
+ __pyx_t_5 = ((__pyx_v_step[__pyx_v_i]) > 0);
+ if (__pyx_t_5) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":454
* if cur_ind[i] < 0 or cur_ind[i] >= self.dims[i]: return 0
@@ -15742,8 +16914,8 @@
* 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) {
+ __pyx_t_5 = ((__pyx_v_step[__pyx_v_i]) < 0);
+ if (__pyx_t_5) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":457
* +self.left_edge[i]-v_pos[i])*iv_dir[i]
@@ -15773,9 +16945,9 @@
* # We have to jumpstart our calculation
* enter_t = intersect_t
*/
- __pyx_t_4 = ((__pyx_v_tdelta[__pyx_v_i]) < 0);
- if (__pyx_t_4) {
- (__pyx_v_tdelta[__pyx_v_i]) *= -1;
+ __pyx_t_5 = ((__pyx_v_tdelta[__pyx_v_i]) < 0.0);
+ if (__pyx_t_5) {
+ (__pyx_v_tdelta[__pyx_v_i]) *= -1.0;
goto __pyx_L16;
}
__pyx_L16:;
@@ -15798,8 +16970,7 @@
* # but we are tracing on the grid, not on the data...
*/
while (1) {
- __pyx_t_4 = 1;
- if (!__pyx_t_4) break;
+ if (!1) break;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":466
* # dims here is one less than the dimensions of the data,
@@ -15809,11 +16980,11 @@
* (not (0 <= cur_ind[2] < self.dims[2])):
*/
__pyx_t_1 = (__pyx_v_cur_ind[0]);
- __pyx_t_4 = (0 <= __pyx_t_1);
- if (__pyx_t_4) {
- __pyx_t_4 = (__pyx_t_1 < (__pyx_v_self->dims[0]));
+ __pyx_t_5 = (0 <= __pyx_t_1);
+ if (__pyx_t_5) {
+ __pyx_t_5 = (__pyx_t_1 < (__pyx_v_self->dims[0]));
}
- __pyx_t_2 = (!__pyx_t_4);
+ __pyx_t_2 = (!__pyx_t_5);
if (!__pyx_t_2) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":467
@@ -15824,12 +16995,12 @@
* break
*/
__pyx_t_1 = (__pyx_v_cur_ind[1]);
- __pyx_t_4 = (0 <= __pyx_t_1);
- if (__pyx_t_4) {
- __pyx_t_4 = (__pyx_t_1 < (__pyx_v_self->dims[1]));
+ __pyx_t_5 = (0 <= __pyx_t_1);
+ if (__pyx_t_5) {
+ __pyx_t_5 = (__pyx_t_1 < (__pyx_v_self->dims[1]));
}
- __pyx_t_3 = (!__pyx_t_4);
- if (!__pyx_t_3) {
+ __pyx_t_4 = (!__pyx_t_5);
+ if (!__pyx_t_4) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":468
* if (not (0 <= cur_ind[0] < self.dims[0])) or \
@@ -15839,20 +17010,20 @@
* hit += 1
*/
__pyx_t_1 = (__pyx_v_cur_ind[2]);
- __pyx_t_4 = (0 <= __pyx_t_1);
- if (__pyx_t_4) {
- __pyx_t_4 = (__pyx_t_1 < (__pyx_v_self->dims[2]));
+ __pyx_t_5 = (0 <= __pyx_t_1);
+ if (__pyx_t_5) {
+ __pyx_t_5 = (__pyx_t_1 < (__pyx_v_self->dims[2]));
}
- __pyx_t_5 = (!__pyx_t_4);
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_6 = (!__pyx_t_5);
+ __pyx_t_5 = __pyx_t_6;
} else {
- __pyx_t_4 = __pyx_t_3;
+ __pyx_t_5 = __pyx_t_4;
}
- __pyx_t_3 = __pyx_t_4;
+ __pyx_t_4 = __pyx_t_5;
} else {
- __pyx_t_3 = __pyx_t_2;
+ __pyx_t_4 = __pyx_t_2;
}
- if (__pyx_t_3) {
+ if (__pyx_t_4) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":469
* (not (0 <= cur_ind[1] < self.dims[1])) or \
@@ -15882,8 +17053,8 @@
* 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) {
+ __pyx_t_4 = ((__pyx_v_tmax[0]) < (__pyx_v_tmax[1]));
+ if (__pyx_t_4) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":472
* hit += 1
@@ -15892,8 +17063,8 @@
* 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) {
+ __pyx_t_4 = ((__pyx_v_tmax[0]) < (__pyx_v_tmax[2]));
+ if (__pyx_t_4) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":473
* if tmax[0] < tmax[1]:
@@ -16000,8 +17171,8 @@
* 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) {
+ __pyx_t_4 = ((__pyx_v_tmax[1]) < (__pyx_v_tmax[2]));
+ if (__pyx_t_4) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":488
* else:
@@ -16107,8 +17278,8 @@
* return hit
*
*/
- __pyx_t_3 = (__pyx_v_enter_t > 1.0);
- if (__pyx_t_3) {
+ __pyx_t_4 = (__pyx_v_enter_t > 1.0);
+ if (__pyx_t_4) {
goto __pyx_L18_break;
goto __pyx_L23;
}
@@ -16125,11 +17296,13 @@
*/
__pyx_r = __pyx_v_hit;
goto __pyx_L0;
-
+
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_WriteUnraisable("yt.amr_utils.PartitionedGrid.integrate_ray");
__pyx_r = 0;
__pyx_L0:;
- __Pyx_DECREF((PyObject *)__pyx_v_self);
- __Pyx_DECREF((PyObject *)__pyx_v_tf);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
@@ -16151,13 +17324,12 @@
int __pyx_v_dti;
int __pyx_v_i;
int __pyx_v_offset;
- int __pyx_t_1;
+ __pyx_t_5numpy_float64_t __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
int __pyx_t_4;
+ int __pyx_t_5;
__Pyx_RefNannySetupContext("sample_values");
- __Pyx_INCREF((PyObject *)__pyx_v_self);
- __Pyx_INCREF((PyObject *)__pyx_v_tf);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":516
* cdef np.float64_t cp[3], dp[3], temp, dt, t, dv
@@ -16177,7 +17349,12 @@
* cdef int offset = ci[0] * (self.dims[1] + 1) * (self.dims[2] + 1) \
* + ci[1] * (self.dims[2] + 1) + ci[2]
*/
- __pyx_v_dt = ((__pyx_v_exit_t - __pyx_v_enter_t) / __pyx_v_tf->ns);
+ __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[2]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_dt = (__pyx_t_1 / __pyx_v_tf->ns);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":520
* dt = (exit_t - enter_t) / tf.ns # 4 samples should be dt=0.25
@@ -16195,8 +17372,8 @@
* # temp is the left edge of the current cell
* temp = ci[i] * self.dds[i] + self.left_edge[i]
*/
- for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
- __pyx_v_i = __pyx_t_1;
+ for (__pyx_t_2 = 0; __pyx_t_2 < 3; __pyx_t_2+=1) {
+ __pyx_v_i = __pyx_t_2;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":523
* for i in range(3):
@@ -16242,9 +17419,9 @@
* for i in range(self.n_fields):
* self.dvs[i] = offset_interpolate(self.dims, dp, self.data[i] + offset)
*/
- __pyx_t_1 = __pyx_v_tf->ns;
- for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
- __pyx_v_dti = __pyx_t_2;
+ __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;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":529
* ds[i] = v_dir[i] * self.idds[i] * dt
@@ -16253,9 +17430,9 @@
* self.dvs[i] = offset_interpolate(self.dims, dp, self.data[i] + offset)
* #if (dv < tf.x_bounds[0]) or (dv > tf.x_bounds[1]):
*/
- __pyx_t_3 = __pyx_v_self->n_fields;
- for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
- __pyx_v_i = __pyx_t_4;
+ __pyx_t_4 = __pyx_v_self->n_fields;
+ for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
+ __pyx_v_i = __pyx_t_5;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":530
* for dti in range(tf.ns):
@@ -16274,8 +17451,8 @@
* dp[i] += ds[i]
* tf.eval_transfer(dt, self.dvs, rgba, grad)
*/
- for (__pyx_t_3 = 0; __pyx_t_3 < 3; __pyx_t_3+=1) {
- __pyx_v_i = __pyx_t_3;
+ for (__pyx_t_4 = 0; __pyx_t_4 < 3; __pyx_t_4+=1) {
+ __pyx_v_i = __pyx_t_4;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":534
* # continue
@@ -16297,9 +17474,61 @@
((struct __pyx_vtabstruct_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_tf->__pyx_vtab)->eval_transfer(__pyx_v_tf, __pyx_v_dt, __pyx_v_self->dvs, __pyx_v_rgba, __pyx_v_grad);
}
- __Pyx_DECREF((PyObject *)__pyx_v_self);
- __Pyx_DECREF((PyObject *)__pyx_v_tf);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_WriteUnraisable("yt.amr_utils.PartitionedGrid.sample_values");
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":539
+ * 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_9amr_utils_8GridFace_5coord___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_8GridFace_5coord___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyFloat_FromDouble(((struct __pyx_obj_2yt_9amr_utils_GridFace *)__pyx_v_self)->coord); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 539; __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.amr_utils.GridFace.coord.__get__");
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_8GridFace_5coord___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_8GridFace_5coord___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __pyx_t_5numpy_float64_t __pyx_t_1;
+ __Pyx_RefNannySetupContext("__set__");
+ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ ((struct __pyx_obj_2yt_9amr_utils_GridFace *)__pyx_v_self)->coord = __pyx_t_1;
+
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("yt.amr_utils.GridFace.coord.__set__");
+ __pyx_r = -1;
+ __pyx_L0:;
__Pyx_RefNannyFinishContext();
+ return __pyx_r;
}
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":545
@@ -16370,10 +17599,9 @@
__Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.GridFace.__init__");
+ __Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_self);
- __Pyx_INCREF(__pyx_v_grid);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":546
* @cython.wraparound(False)
@@ -16492,8 +17720,6 @@
__Pyx_AddTraceback("yt.amr_utils.GridFace.__init__");
__pyx_r = -1;
__pyx_L0:;
- __Pyx_DECREF((PyObject *)__pyx_v_self);
- __Pyx_DECREF(__pyx_v_grid);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
@@ -16512,7 +17738,6 @@
int __pyx_r;
int __pyx_t_1;
__Pyx_RefNannySetupContext("proj_overlap");
- __Pyx_INCREF((PyObject *)__pyx_v_self);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":561
* cdef int proj_overlap(self, np.float64_t *left_edge, np.float64_t *right_edge):
@@ -16521,7 +17746,7 @@
* yax = (self.direction + 2) % 3
* if left_edge[xax] >= self.right_edge[xax]: return 0
*/
- __pyx_v_xax = ((__pyx_v_self->direction + 1) % 3);
+ __pyx_v_xax = __Pyx_mod_long((__pyx_v_self->direction + 1), 3);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":562
* cdef int xax, yax
@@ -16530,7 +17755,7 @@
* if left_edge[xax] >= self.right_edge[xax]: return 0
* if right_edge[xax] <= self.left_edge[xax]: return 0
*/
- __pyx_v_yax = ((__pyx_v_self->direction + 2) % 3);
+ __pyx_v_yax = __Pyx_mod_long((__pyx_v_self->direction + 2), 3);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":563
* xax = (self.direction + 1) % 3
@@ -16604,7 +17829,218 @@
__pyx_r = 0;
__pyx_L0:;
- __Pyx_DECREF((PyObject *)__pyx_v_self);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":572
+ * 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_9amr_utils_10ProtoPrism_8LeftEdge___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_10ProtoPrism_8LeftEdge___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->LeftEdge);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__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;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10ProtoPrism_8LeftEdge___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10ProtoPrism_8LeftEdge___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->LeftEdge);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->LeftEdge);
+ ((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->LeftEdge = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10ProtoPrism_8LeftEdge___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10ProtoPrism_8LeftEdge___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->LeftEdge);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->LeftEdge);
+ ((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->LeftEdge = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":573
+ * 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_9amr_utils_10ProtoPrism_9RightEdge___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_10ProtoPrism_9RightEdge___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->RightEdge);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__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;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10ProtoPrism_9RightEdge___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10ProtoPrism_9RightEdge___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->RightEdge);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->RightEdge);
+ ((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->RightEdge = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10ProtoPrism_9RightEdge___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10ProtoPrism_9RightEdge___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->RightEdge);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->RightEdge);
+ ((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->RightEdge = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":574
+ * 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_9amr_utils_10ProtoPrism_13subgrid_faces___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_10ProtoPrism_13subgrid_faces___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->subgrid_faces);
+ __pyx_r = ((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__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;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10ProtoPrism_13subgrid_faces___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10ProtoPrism_13subgrid_faces___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__set__");
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->subgrid_faces);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->subgrid_faces);
+ ((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->subgrid_faces = __pyx_v_value;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10ProtoPrism_13subgrid_faces___del__(PyObject *__pyx_v_self); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10ProtoPrism_13subgrid_faces___del__(PyObject *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannySetupContext("__del__");
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ __Pyx_GOTREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->subgrid_faces);
+ __Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->subgrid_faces);
+ ((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->subgrid_faces = Py_None;
+
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":575
+ * 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_9amr_utils_10ProtoPrism_14parent_grid_id___get__(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_pf_2yt_9amr_utils_10ProtoPrism_14parent_grid_id___get__(PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__get__");
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->parent_grid_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 575; __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.amr_utils.ProtoPrism.parent_grid_id.__get__");
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_2yt_9amr_utils_10ProtoPrism_14parent_grid_id___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
+static int __pyx_pf_2yt_9amr_utils_10ProtoPrism_14parent_grid_id___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ int __pyx_r;
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("__set__");
+ __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ ((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->parent_grid_id = __pyx_t_1;
+
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("yt.amr_utils.ProtoPrism.parent_grid_id.__set__");
+ __pyx_r = -1;
+ __pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
@@ -16692,12 +18128,9 @@
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.ProtoPrism.__cinit__");
+ __Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_self);
- __Pyx_INCREF((PyObject *)__pyx_v_left_edge);
- __Pyx_INCREF((PyObject *)__pyx_v_right_edge);
- __Pyx_INCREF(__pyx_v_subgrid_faces);
__pyx_bstruct_left_edge.buf = NULL;
__pyx_bstruct_right_edge.buf = NULL;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left_edge), __pyx_ptype_5numpy_ndarray, 1, "left_edge", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -16827,10 +18260,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_right_edge);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_left_edge);
__pyx_L2:;
- __Pyx_DECREF((PyObject *)__pyx_v_self);
- __Pyx_DECREF((PyObject *)__pyx_v_left_edge);
- __Pyx_DECREF((PyObject *)__pyx_v_right_edge);
- __Pyx_DECREF(__pyx_v_subgrid_faces);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
@@ -16914,9 +18343,9 @@
__Pyx_RaiseArgtupleInvalid("sweep", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.ProtoPrism.sweep");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_self);
__pyx_v_face = ((struct __pyx_obj_2yt_9amr_utils_GridFace *)Py_None); __Pyx_INCREF(Py_None);
__pyx_v_left = Py_None; __Pyx_INCREF(Py_None);
__pyx_v_right = Py_None; __Pyx_INCREF(Py_None);
@@ -17045,7 +18474,7 @@
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__sweep); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyInt_FromLong(((__pyx_v_direction + 1) % 3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyInt_FromLong(__Pyx_mod_long((__pyx_v_direction + 1), 3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = PyInt_FromLong((__pyx_v_stack + 1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
@@ -17107,7 +18536,7 @@
__Pyx_GOTREF(__pyx_t_8);
__pyx_t_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (__Pyx_EndUnpack(__pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_v_left);
__pyx_v_left = __pyx_t_8;
@@ -17126,7 +18555,7 @@
*/
__pyx_t_7 = PyObject_GetAttr(__pyx_v_left, __pyx_n_s__sweep); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_3 = PyInt_FromLong(((__pyx_v_direction + 1) % 3)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__Pyx_mod_long((__pyx_v_direction + 1), 3)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
@@ -17212,7 +18641,6 @@
__Pyx_DECREF(__pyx_v_right);
__Pyx_DECREF(__pyx_v_LC);
__Pyx_DECREF(__pyx_v_RC);
- __Pyx_DECREF((PyObject *)__pyx_v_self);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -17230,16 +18658,15 @@
int __pyx_v_i;
PyArrayObject *__pyx_v_split_left = 0;
PyArrayObject *__pyx_v_split_right = 0;
- PyObject *__pyx_v_left;
- PyObject *__pyx_v_right;
+ struct __pyx_obj_2yt_9amr_utils_ProtoPrism *__pyx_v_left;
+ struct __pyx_obj_2yt_9amr_utils_ProtoPrism *__pyx_v_right;
PyObject *__pyx_r = NULL;
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
int __pyx_t_3;
__Pyx_RefNannySetupContext("split");
- __Pyx_INCREF((PyObject *)__pyx_v_self);
- __pyx_v_left = Py_None; __Pyx_INCREF(Py_None);
- __pyx_v_right = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_v_left = ((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)Py_None); __Pyx_INCREF(Py_None);
+ __pyx_v_right = ((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)Py_None); __Pyx_INCREF(Py_None);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":614
* cdef object split(self, np.float64_t *sp, int direction):
@@ -17334,8 +18761,8 @@
__pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2yt_9amr_utils_ProtoPrism)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_v_left);
- __pyx_v_left = __pyx_t_1;
+ __Pyx_DECREF(((PyObject *)__pyx_v_left));
+ __pyx_v_left = ((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_t_1);
__pyx_t_1 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":622
@@ -17399,8 +18826,8 @@
__pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_2yt_9amr_utils_ProtoPrism)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __Pyx_DECREF(__pyx_v_right);
- __pyx_v_right = __pyx_t_1;
+ __Pyx_DECREF(((PyObject *)__pyx_v_right));
+ __pyx_v_right = ((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_t_1);
__pyx_t_1 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":627
@@ -17413,12 +18840,12 @@
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_INCREF(__pyx_v_left);
- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_left);
- __Pyx_GIVEREF(__pyx_v_left);
- __Pyx_INCREF(__pyx_v_right);
- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_right);
- __Pyx_GIVEREF(__pyx_v_right);
+ __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 = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
@@ -17433,9 +18860,8 @@
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_split_left);
__Pyx_XDECREF((PyObject *)__pyx_v_split_right);
- __Pyx_DECREF(__pyx_v_left);
- __Pyx_DECREF(__pyx_v_right);
- __Pyx_DECREF((PyObject *)__pyx_v_self);
+ __Pyx_DECREF((PyObject *)__pyx_v_left);
+ __Pyx_DECREF((PyObject *)__pyx_v_right);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -17471,17 +18897,19 @@
PyObject *__pyx_r = NULL;
int __pyx_t_1;
int __pyx_t_2;
- int __pyx_t_3;
+ __pyx_t_5numpy_float64_t __pyx_t_3;
int __pyx_t_4;
- int __pyx_t_5;
- PyObject *__pyx_t_6 = NULL;
- PyObject *__pyx_t_7 = NULL;
+ __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;
- int __pyx_t_10;
- PyArrayObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
int __pyx_t_12;
- PyObject *__pyx_t_13 = NULL;
+ PyArrayObject *__pyx_t_13 = NULL;
+ int __pyx_t_14;
+ PyObject *__pyx_t_15 = NULL;
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__grid_left_edge,&__pyx_n_s__grid_dds,&__pyx_n_s__child_mask,0};
__Pyx_RefNannySetupContext("get_brick");
if (unlikely(__pyx_kwds)) {
@@ -17530,12 +18958,9 @@
__Pyx_RaiseArgtupleInvalid("get_brick", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.ProtoPrism.get_brick");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_self);
- __Pyx_INCREF((PyObject *)__pyx_v_grid_left_edge);
- __Pyx_INCREF((PyObject *)__pyx_v_grid_dds);
- __Pyx_INCREF(__pyx_v_child_mask);
__pyx_bstruct_dims.buf = NULL;
__pyx_bstruct_grid_left_edge.buf = NULL;
__pyx_bstruct_grid_dds.buf = NULL;
@@ -17572,8 +18997,14 @@
* idims[i] = ri[i] - li[i]
*/
__pyx_t_2 = __pyx_v_i;
- __pyx_t_3 = __pyx_v_i;
- (__pyx_v_li[__pyx_v_i]) = lrint((((((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->left_edge[__pyx_v_i]) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_left_edge.buf, __pyx_t_2, __pyx_bstride_0_grid_left_edge))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_dds.buf, __pyx_t_3, __pyx_bstride_0_grid_dds))));
+ __pyx_t_3 = ((((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->left_edge[__pyx_v_i]) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_left_edge.buf, __pyx_t_2, __pyx_bstride_0_grid_left_edge)));
+ __pyx_t_4 = __pyx_v_i;
+ __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_dds.buf, __pyx_t_4, __pyx_bstride_0_grid_dds));
+ if (unlikely(__pyx_t_5 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[2]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ (__pyx_v_li[__pyx_v_i]) = lrint((__pyx_t_3 / __pyx_t_5));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":640
* for i in range(3):
@@ -17582,9 +19013,15 @@
* idims[i] = ri[i] - li[i]
* if child_mask[li[0], li[1], li[2]] == 0: return []
*/
- __pyx_t_4 = __pyx_v_i;
- __pyx_t_5 = __pyx_v_i;
- (__pyx_v_ri[__pyx_v_i]) = lrint((((((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->right_edge[__pyx_v_i]) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_left_edge.buf, __pyx_t_4, __pyx_bstride_0_grid_left_edge))) / (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_dds.buf, __pyx_t_5, __pyx_bstride_0_grid_dds))));
+ __pyx_t_6 = __pyx_v_i;
+ __pyx_t_5 = ((((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->right_edge[__pyx_v_i]) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_left_edge.buf, __pyx_t_6, __pyx_bstride_0_grid_left_edge)));
+ __pyx_t_7 = __pyx_v_i;
+ __pyx_t_3 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_dds.buf, __pyx_t_7, __pyx_bstride_0_grid_dds));
+ if (unlikely(__pyx_t_3 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[2]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ (__pyx_v_ri[__pyx_v_i]) = lrint((__pyx_t_5 / __pyx_t_3));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":641
* li[i] = lrint((self.left_edge[i] - grid_left_edge[i])/grid_dds[i])
@@ -17603,37 +19040,37 @@
* cdef np.ndarray[np.int64_t, ndim=1] dims = np.empty(3, dtype='int64')
* for i in range(3):
*/
- __pyx_t_6 = PyInt_FromLong((__pyx_v_li[0])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyInt_FromLong((__pyx_v_li[1])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_8 = PyInt_FromLong((__pyx_v_li[2])); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong((__pyx_v_li[0])); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyInt_FromLong((__pyx_v_li[1])); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_8);
+ __pyx_t_10 = PyInt_FromLong((__pyx_v_li[2])); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __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[2]; __pyx_lineno = 642; __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);
- __pyx_t_6 = 0;
- __pyx_t_7 = 0;
+ 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_8 = PyObject_GetItem(__pyx_v_child_mask, __pyx_t_9); if (!__pyx_t_8) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyObject_RichCompare(__pyx_t_8, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- if (__pyx_t_10) {
+ __pyx_t_9 = 0;
+ __pyx_t_10 = 0;
+ __pyx_t_10 = PyObject_GetItem(__pyx_v_child_mask, __pyx_t_11); if (!__pyx_t_10) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = PyObject_RichCompare(__pyx_t_10, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_11);
+ __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[2]; __pyx_lineno = 642; __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_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(((PyObject *)__pyx_t_9));
- __pyx_r = ((PyObject *)__pyx_t_9);
- __pyx_t_9 = 0;
+ __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_11));
+ __pyx_r = ((PyObject *)__pyx_t_11);
+ __pyx_t_11 = 0;
goto __pyx_L0;
goto __pyx_L8;
}
@@ -17646,38 +19083,38 @@
* for i in range(3):
* dims[i] = idims[i]
*/
- __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
- __pyx_t_8 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __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[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_11);
__Pyx_INCREF(__pyx_int_3);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_int_3);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_int_3);
__Pyx_GIVEREF(__pyx_int_3);
- __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(((PyObject *)__pyx_t_7));
- if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__int64)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_8, __pyx_t_9, ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_11 = ((PyArrayObject *)__pyx_t_6);
+ __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __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__int64)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_10, __pyx_t_11, ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
+ if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = ((PyArrayObject *)__pyx_t_8);
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_dims, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_dims, (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_bstruct_dims.buf = NULL;
{__pyx_filename = __pyx_f[2]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
} else {__pyx_bstride_0_dims = __pyx_bstruct_dims.strides[0];
__pyx_bshape_0_dims = __pyx_bstruct_dims.shape[0];
}
}
- __pyx_t_11 = 0;
- __pyx_v_dims = ((PyArrayObject *)__pyx_t_6);
- __pyx_t_6 = 0;
+ __pyx_t_13 = 0;
+ __pyx_v_dims = ((PyArrayObject *)__pyx_t_8);
+ __pyx_t_8 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":644
* if child_mask[li[0], li[1], li[2]] == 0: return []
@@ -17696,8 +19133,8 @@
* #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_12 = __pyx_v_i;
- *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_dims.buf, __pyx_t_12, __pyx_bstride_0_dims) = (__pyx_v_idims[__pyx_v_i]);
+ __pyx_t_14 = __pyx_v_i;
+ *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_dims.buf, __pyx_t_14, __pyx_bstride_0_dims) = (__pyx_v_idims[__pyx_v_i]);
}
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":650
@@ -17706,68 +19143,68 @@
* return ((li[0], ri[0]), (li[1], ri[1]), (li[2], ri[2]), dims) # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_6 = PyInt_FromLong((__pyx_v_li[0])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyInt_FromLong((__pyx_v_ri[0])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __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[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong((__pyx_v_li[0])); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = PyInt_FromLong((__pyx_v_ri[0])); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_7);
- __pyx_t_6 = 0;
- __pyx_t_7 = 0;
- __pyx_t_7 = PyInt_FromLong((__pyx_v_li[1])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_6 = PyInt_FromLong((__pyx_v_ri[1])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __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);
+ __pyx_t_8 = 0;
+ __pyx_t_9 = 0;
+ __pyx_t_9 = PyInt_FromLong((__pyx_v_li[1])); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_8 = PyInt_FromLong((__pyx_v_ri[1])); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_6);
- __pyx_t_7 = 0;
- __pyx_t_6 = 0;
- __pyx_t_6 = PyInt_FromLong((__pyx_v_li[2])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyInt_FromLong((__pyx_v_ri[2])); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_13);
- PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_6);
- PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_7);
- __pyx_t_6 = 0;
- __pyx_t_7 = 0;
- __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9);
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __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_7, 1, __pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_8);
+ __pyx_t_9 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_8 = PyInt_FromLong((__pyx_v_li[2])); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = PyInt_FromLong((__pyx_v_ri[2])); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
- PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_13);
- __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_9);
+ __pyx_t_8 = 0;
+ __pyx_t_9 = 0;
+ __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_15);
__Pyx_INCREF(((PyObject *)__pyx_v_dims));
- PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)__pyx_v_dims));
+ PyTuple_SET_ITEM(__pyx_t_9, 3, ((PyObject *)__pyx_v_dims));
__Pyx_GIVEREF(((PyObject *)__pyx_v_dims));
+ __pyx_t_11 = 0;
+ __pyx_t_10 = 0;
+ __pyx_t_15 = 0;
+ __pyx_r = __pyx_t_9;
__pyx_t_9 = 0;
- __pyx_t_8 = 0;
- __pyx_t_13 = 0;
- __pyx_r = __pyx_t_7;
- __pyx_t_7 = 0;
goto __pyx_L0;
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_6);
- __Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
- __Pyx_XDECREF(__pyx_t_13);
+ __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_bstruct_grid_dds);
@@ -17783,10 +19220,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_grid_left_edge);
__pyx_L2:;
__Pyx_XDECREF((PyObject *)__pyx_v_dims);
- __Pyx_DECREF((PyObject *)__pyx_v_self);
- __Pyx_DECREF((PyObject *)__pyx_v_grid_left_edge);
- __Pyx_DECREF((PyObject *)__pyx_v_grid_dds);
- __Pyx_DECREF(__pyx_v_child_mask);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -18003,15 +19436,9 @@
__Pyx_RaiseArgtupleInvalid("CICDeposit_3", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.CICDeposit_3");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_posx);
- __Pyx_INCREF((PyObject *)__pyx_v_posy);
- __Pyx_INCREF((PyObject *)__pyx_v_posz);
- __Pyx_INCREF((PyObject *)__pyx_v_mass);
- __Pyx_INCREF((PyObject *)__pyx_v_field);
- __Pyx_INCREF((PyObject *)__pyx_v_leftEdge);
- __Pyx_INCREF((PyObject *)__pyx_v_gridDimension);
__pyx_bstruct_posx.buf = NULL;
__pyx_bstruct_posy.buf = NULL;
__pyx_bstruct_posz.buf = NULL;
@@ -18077,7 +19504,7 @@
* edge2 = (<float> gridDimension[2]) - 0.5001
*/
__pyx_t_1 = 0;
- __pyx_v_edge0 = (((float)(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_gridDimension.buf, __pyx_t_1, __pyx_bstride_0_gridDimension))) - 0.50009999999999999);
+ __pyx_v_edge0 = (((float)(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_gridDimension.buf, __pyx_t_1, __pyx_bstride_0_gridDimension))) - 0.5001);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":45
*
@@ -18087,7 +19514,7 @@
* fact = 1.0 / cellSize
*/
__pyx_t_2 = 1;
- __pyx_v_edge1 = (((float)(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_gridDimension.buf, __pyx_t_2, __pyx_bstride_0_gridDimension))) - 0.50009999999999999);
+ __pyx_v_edge1 = (((float)(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_gridDimension.buf, __pyx_t_2, __pyx_bstride_0_gridDimension))) - 0.5001);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":46
* edge0 = (<float> gridDimension[0]) - 0.5001
@@ -18097,7 +19524,7 @@
*
*/
__pyx_t_3 = 2;
- __pyx_v_edge2 = (((float)(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_gridDimension.buf, __pyx_t_3, __pyx_bstride_0_gridDimension))) - 0.50009999999999999);
+ __pyx_v_edge2 = (((float)(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_gridDimension.buf, __pyx_t_3, __pyx_bstride_0_gridDimension))) - 0.5001);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":47
* edge1 = (<float> gridDimension[1]) - 0.5001
@@ -18106,6 +19533,10 @@
*
* le0 = leftEdge[0]
*/
+ if (unlikely(__pyx_v_cellSize == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_v_fact = (1.0 / __pyx_v_cellSize);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":49
@@ -18157,7 +19588,7 @@
* zpos = fmin(fmax((posz[n] - le2)*fact, 0.5001), edge2)
*/
__pyx_t_9 = __pyx_v_n;
- __pyx_v_xpos = __pyx_f_2yt_9amr_utils_fmin(__pyx_f_2yt_9amr_utils_fmax((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_posx.buf, __pyx_t_9, __pyx_bstride_0_posx)) - __pyx_v_le0) * __pyx_v_fact), 0.50009999999999999), __pyx_v_edge0);
+ __pyx_v_xpos = __pyx_f_2yt_9amr_utils_fmin(__pyx_f_2yt_9amr_utils_fmax((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_posx.buf, __pyx_t_9, __pyx_bstride_0_posx)) - __pyx_v_le0) * __pyx_v_fact), 0.5001), __pyx_v_edge0);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":57
* # Compute the position of the central cell
@@ -18167,7 +19598,7 @@
*
*/
__pyx_t_10 = __pyx_v_n;
- __pyx_v_ypos = __pyx_f_2yt_9amr_utils_fmin(__pyx_f_2yt_9amr_utils_fmax((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_posy.buf, __pyx_t_10, __pyx_bstride_0_posy)) - __pyx_v_le1) * __pyx_v_fact), 0.50009999999999999), __pyx_v_edge1);
+ __pyx_v_ypos = __pyx_f_2yt_9amr_utils_fmin(__pyx_f_2yt_9amr_utils_fmax((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_posy.buf, __pyx_t_10, __pyx_bstride_0_posy)) - __pyx_v_le1) * __pyx_v_fact), 0.5001), __pyx_v_edge1);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":58
* xpos = fmin(fmax((posx[n] - le0)*fact, 0.5001), edge0)
@@ -18177,7 +19608,7 @@
* i1 = <int> (xpos + 0.5)
*/
__pyx_t_11 = __pyx_v_n;
- __pyx_v_zpos = __pyx_f_2yt_9amr_utils_fmin(__pyx_f_2yt_9amr_utils_fmax((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_posz.buf, __pyx_t_11, __pyx_bstride_0_posz)) - __pyx_v_le2) * __pyx_v_fact), 0.50009999999999999), __pyx_v_edge2);
+ __pyx_v_zpos = __pyx_f_2yt_9amr_utils_fmin(__pyx_f_2yt_9amr_utils_fmax((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_posz.buf, __pyx_t_11, __pyx_bstride_0_posz)) - __pyx_v_le2) * __pyx_v_fact), 0.5001), __pyx_v_edge2);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":60
* zpos = fmin(fmax((posz[n] - le2)*fact, 0.5001), edge2)
@@ -18387,13 +19818,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_gridDimension);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_mass);
__pyx_L2:;
- __Pyx_DECREF((PyObject *)__pyx_v_posx);
- __Pyx_DECREF((PyObject *)__pyx_v_posy);
- __Pyx_DECREF((PyObject *)__pyx_v_posz);
- __Pyx_DECREF((PyObject *)__pyx_v_mass);
- __Pyx_DECREF((PyObject *)__pyx_v_field);
- __Pyx_DECREF((PyObject *)__pyx_v_leftEdge);
- __Pyx_DECREF((PyObject *)__pyx_v_gridDimension);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -18535,8 +19959,8 @@
int __pyx_t_16;
PyObject *__pyx_t_17 = NULL;
PyObject *__pyx_t_18 = NULL;
- long __pyx_t_19;
- int __pyx_t_20;
+ int __pyx_t_19;
+ long __pyx_t_20;
int __pyx_t_21;
long __pyx_t_22;
int __pyx_t_23;
@@ -18565,10 +19989,10 @@
int __pyx_t_46;
int __pyx_t_47;
long __pyx_t_48;
+ int __pyx_t_49;
__Pyx_RefNannySetupContext("construct_boundary_relationships");
__pyx_self = __pyx_self;
- __Pyx_INCREF((PyObject *)__pyx_v_contour_ids);
- __pyx_v_tree = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_v_tree = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
__pyx_bstruct_contour_ids.buf = NULL;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_contour_ids), __pyx_ptype_5numpy_ndarray, 1, "contour_ids", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
{
@@ -18587,8 +20011,8 @@
*/
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- __Pyx_DECREF(__pyx_v_tree);
- __pyx_v_tree = ((PyObject *)__pyx_t_1);
+ __Pyx_DECREF(((PyObject *)__pyx_v_tree));
+ __pyx_v_tree = __pyx_t_1;
__pyx_t_1 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":48
@@ -18811,6 +20235,9 @@
* c1 = contour_ids[nx-1, i, j]
* c2 = contour_ids[nx-2, i + oi, j + oj]
*/
+ if (unlikely(__pyx_v_tree == Py_None)) {
+ PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64max(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_17 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64min(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -18823,10 +20250,8 @@
__Pyx_GIVEREF(__pyx_t_17);
__pyx_t_1 = 0;
__pyx_t_17 = 0;
- __pyx_t_17 = __Pyx_PyObject_Append(__pyx_v_tree, __pyx_t_18); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_19 = PyList_Append(((PyObject *)__pyx_v_tree), __pyx_t_18); if (unlikely(__pyx_t_19 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
goto __pyx_L17;
}
__pyx_L17:;
@@ -18838,13 +20263,13 @@
* c2 = contour_ids[nx-2, i + oi, j + oj]
* if c1 > -1 and c2 > -1:
*/
- __pyx_t_19 = (__pyx_v_nx - 1);
- __pyx_t_20 = __pyx_v_i;
+ __pyx_t_20 = (__pyx_v_nx - 1);
+ __pyx_t_19 = __pyx_v_i;
__pyx_t_21 = __pyx_v_j;
- if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_bshape_0_contour_ids;
- if (__pyx_t_20 < 0) __pyx_t_20 += __pyx_bshape_1_contour_ids;
+ if (__pyx_t_20 < 0) __pyx_t_20 += __pyx_bshape_0_contour_ids;
+ if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_bshape_1_contour_ids;
if (__pyx_t_21 < 0) __pyx_t_21 += __pyx_bshape_2_contour_ids;
- __pyx_v_c1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_19, __pyx_bstride_0_contour_ids, __pyx_t_20, __pyx_bstride_1_contour_ids, __pyx_t_21, __pyx_bstride_2_contour_ids));
+ __pyx_v_c1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_20, __pyx_bstride_0_contour_ids, __pyx_t_19, __pyx_bstride_1_contour_ids, __pyx_t_21, __pyx_bstride_2_contour_ids));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":67
* tree.append((i64max(c1,c2), i64min(c1,c2)))
@@ -18884,22 +20309,23 @@
* # Now y-pass
* for i in range(nx):
*/
- __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64max(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_17);
- __pyx_t_18 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64min(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_v_tree == Py_None)) {
+ PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_18 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64max(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
+ __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64min(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_17);
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_17);
- __Pyx_GIVEREF(__pyx_t_17);
- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_18);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_18);
__Pyx_GIVEREF(__pyx_t_18);
- __pyx_t_17 = 0;
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_17);
+ __Pyx_GIVEREF(__pyx_t_17);
__pyx_t_18 = 0;
- __pyx_t_18 = __Pyx_PyObject_Append(__pyx_v_tree, __pyx_t_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_18);
+ __pyx_t_17 = 0;
+ __pyx_t_25 = PyList_Append(((PyObject *)__pyx_v_tree), __pyx_t_1); if (unlikely(__pyx_t_25 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
goto __pyx_L18;
}
__pyx_L18:;
@@ -19103,22 +20529,23 @@
* c1 = contour_ids[i, ny-1, j]
* c2 = contour_ids[i + oi, ny-2, j + oj]
*/
- __pyx_t_18 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64max(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_18);
- __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64min(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_v_tree == Py_None)) {
+ PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64max(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64min(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
- PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_18);
- __Pyx_GIVEREF(__pyx_t_18);
- PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_1);
+ __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_18);
+ PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
- __pyx_t_18 = 0;
+ PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_17);
+ __Pyx_GIVEREF(__pyx_t_17);
__pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_tree, __pyx_t_17); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_31 = PyList_Append(((PyObject *)__pyx_v_tree), __pyx_t_18); if (unlikely(__pyx_t_31 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
goto __pyx_L31;
}
__pyx_L31:;
@@ -19176,22 +20603,23 @@
* for i in range(nx):
* for j in range(ny):
*/
- __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64max(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(__pyx_v_tree == Py_None)) {
+ PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_18 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64max(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_18);
__pyx_t_17 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64min(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
- __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_18);
- PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_17);
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_18);
+ __Pyx_GIVEREF(__pyx_t_18);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_17);
__Pyx_GIVEREF(__pyx_t_17);
- __pyx_t_1 = 0;
+ __pyx_t_18 = 0;
__pyx_t_17 = 0;
- __pyx_t_17 = __Pyx_PyObject_Append(__pyx_v_tree, __pyx_t_18); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_17);
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __pyx_t_37 = PyList_Append(((PyObject *)__pyx_v_tree), __pyx_t_1); if (unlikely(__pyx_t_37 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L32;
}
__pyx_L32:;
@@ -19395,21 +20823,22 @@
* c1 = contour_ids[i, j, nz-1]
* c2 = contour_ids[i + oi, j + oj, nz-2]
*/
- __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64max(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_v_tree == Py_None)) {
+ PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64max(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64min(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
- __pyx_t_18 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64min(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_17);
+ PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_17);
__Pyx_GIVEREF(__pyx_t_17);
- PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_18);
- __Pyx_GIVEREF(__pyx_t_18);
+ __pyx_t_1 = 0;
__pyx_t_17 = 0;
- __pyx_t_18 = 0;
- __pyx_t_18 = __Pyx_PyObject_Append(__pyx_v_tree, __pyx_t_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_18);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_43 = PyList_Append(((PyObject *)__pyx_v_tree), __pyx_t_18); if (unlikely(__pyx_t_43 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
goto __pyx_L45;
}
@@ -19468,21 +20897,22 @@
* return tree
*
*/
+ if (unlikely(__pyx_v_tree == Py_None)) {
+ PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
__pyx_t_18 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64max(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_18);
- __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64min(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_17 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_2yt_9amr_utils_i64min(__pyx_v_c1, __pyx_v_c2)); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
- PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_18);
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_18);
__Pyx_GIVEREF(__pyx_t_18);
- PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_17);
+ __Pyx_GIVEREF(__pyx_t_17);
__pyx_t_18 = 0;
- __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_tree, __pyx_t_17); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_49 = PyList_Append(((PyObject *)__pyx_v_tree), __pyx_t_1); if (unlikely(__pyx_t_49 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L46;
}
@@ -19502,8 +20932,8 @@
* cdef inline int are_neighbors(
*/
__Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_v_tree);
- __pyx_r = __pyx_v_tree;
+ __Pyx_INCREF(((PyObject *)__pyx_v_tree));
+ __pyx_r = ((PyObject *)__pyx_v_tree);
goto __pyx_L0;
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
@@ -19523,7 +20953,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_contour_ids);
__pyx_L2:;
__Pyx_DECREF(__pyx_v_tree);
- __Pyx_DECREF((PyObject *)__pyx_v_contour_ids);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -19659,14 +21088,14 @@
int __pyx_t_3;
PyObject *__pyx_t_4 = NULL;
int __pyx_t_5;
- int __pyx_t_6;
- PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
int __pyx_t_8;
int __pyx_t_9;
int __pyx_t_10;
int __pyx_t_11;
int __pyx_t_12;
- Py_ssize_t __pyx_t_13;
+ int __pyx_t_13;
int __pyx_t_14;
int __pyx_t_15;
int __pyx_t_16;
@@ -19758,16 +21187,10 @@
__Pyx_RaiseArgtupleInvalid("identify_field_neighbors", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.identify_field_neighbors");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_field);
- __Pyx_INCREF((PyObject *)__pyx_v_x);
- __Pyx_INCREF((PyObject *)__pyx_v_y);
- __Pyx_INCREF((PyObject *)__pyx_v_z);
- __Pyx_INCREF((PyObject *)__pyx_v_dx);
- __Pyx_INCREF((PyObject *)__pyx_v_dy);
- __Pyx_INCREF((PyObject *)__pyx_v_dz);
- __pyx_v_joins = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_v_joins = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
__pyx_v_this_joins = Py_None; __Pyx_INCREF(Py_None);
__pyx_bstruct_field.buf = NULL;
__pyx_bstruct_x.buf = NULL;
@@ -19849,12 +21272,12 @@
__pyx_v_outer = __pyx_t_3;
__pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
- __pyx_t_5 = PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4); if (unlikely(__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
}
__Pyx_INCREF(((PyObject *)__pyx_t_1));
- __Pyx_DECREF(__pyx_v_joins);
- __pyx_v_joins = ((PyObject *)__pyx_t_1);
+ __Pyx_DECREF(((PyObject *)__pyx_v_joins));
+ __pyx_v_joins = __pyx_t_1;
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":139
@@ -19875,22 +21298,22 @@
* x1 = x[outer]
* y1 = y[outer]
*/
- __pyx_t_6 = ((__pyx_v_outer % 10000) == 0);
- if (__pyx_t_6) {
+ __pyx_t_5 = (__Pyx_mod_long(__pyx_v_outer, 10000) == 0);
+ if (__pyx_t_5) {
__pyx_t_1 = PyInt_FromLong(__pyx_v_outer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_4 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
- PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_1 = 0;
__pyx_t_4 = 0;
- if (__Pyx_Print(__pyx_t_7, 1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (__Pyx_Print(0, __pyx_t_6, 1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
goto __pyx_L10;
}
__pyx_L10:;
@@ -19902,8 +21325,8 @@
* y1 = y[outer]
* z1 = z[outer]
*/
- __pyx_t_5 = __pyx_v_outer;
- __pyx_v_x1 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x.buf, __pyx_t_5, __pyx_bstride_0_x));
+ __pyx_t_7 = __pyx_v_outer;
+ __pyx_v_x1 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x.buf, __pyx_t_7, __pyx_bstride_0_x));
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":142
* if (outer % 10000) == 0: print outer, N
@@ -19962,11 +21385,11 @@
* added = 0
* # Go in reverse order
*/
- __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_joins, __pyx_v_outer, sizeof(int), PyInt_FromLong); if (!__pyx_t_7) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_6 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_joins), __pyx_v_outer, sizeof(int), PyInt_FromLong); if (!__pyx_t_6) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_v_this_joins);
- __pyx_v_this_joins = __pyx_t_7;
- __pyx_t_7 = 0;
+ __pyx_v_this_joins = __pyx_t_6;
+ __pyx_t_6 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":148
* dz1 = dz[outer]
@@ -19984,47 +21407,8 @@
* if not are_neighbors(x1, y1, z1, dx1, dy1, dz1,
* x[inner], y[inner], z[inner],
*/
- __pyx_t_7 = PyInt_FromLong(__pyx_v_outer); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
- __Pyx_GIVEREF(__pyx_t_7);
- __Pyx_INCREF(__pyx_int_0);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_0);
- __Pyx_GIVEREF(__pyx_int_0);
- __Pyx_INCREF(__pyx_int_neg_1);
- PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_neg_1);
- __Pyx_GIVEREF(__pyx_int_neg_1);
- __pyx_t_7 = 0;
- __pyx_t_7 = PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
- __pyx_t_13 = 0; __pyx_t_4 = __pyx_t_7; __Pyx_INCREF(__pyx_t_4);
- } else {
- __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- }
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- for (;;) {
- if (likely(PyList_CheckExact(__pyx_t_4))) {
- if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_4)) break;
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++;
- } else if (likely(PyTuple_CheckExact(__pyx_t_4))) {
- if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_13); __Pyx_INCREF(__pyx_t_7); __pyx_t_13++;
- } else {
- __pyx_t_7 = PyIter_Next(__pyx_t_4);
- if (!__pyx_t_7) {
- if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- break;
- }
- __Pyx_GOTREF(__pyx_t_7);
- }
- __pyx_t_14 = __Pyx_PyInt_AsInt(__pyx_t_7); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_v_inner = __pyx_t_14;
+ for (__pyx_t_13 = __pyx_v_outer; __pyx_t_13 > 0; __pyx_t_13-=1) {
+ __pyx_v_inner = __pyx_t_13;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":152
* for inner in range(outer, 0, -1):
@@ -20047,8 +21431,8 @@
__pyx_t_17 = __pyx_v_inner;
__pyx_t_18 = __pyx_v_inner;
__pyx_t_19 = __pyx_v_inner;
- __pyx_t_6 = (!__pyx_f_2yt_9amr_utils_are_neighbors(__pyx_v_x1, __pyx_v_y1, __pyx_v_z1, __pyx_v_dx1, __pyx_v_dy1, __pyx_v_dz1, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x.buf, __pyx_t_14, __pyx_bstride_0_x)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y.buf, __pyx_t_15, __pyx_bstride_0_y)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_z.buf, __pyx_t_16, __pyx_bstride_0_z)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_17, __pyx_bstride_0_dx)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dy.buf, __pyx_t_18, __pyx_bstride_0_dy)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dz.buf, __pyx_t_19, __pyx_bstride_0_dz))));
- if (__pyx_t_6) {
+ __pyx_t_5 = (!__pyx_f_2yt_9amr_utils_are_neighbors(__pyx_v_x1, __pyx_v_y1, __pyx_v_z1, __pyx_v_dx1, __pyx_v_dy1, __pyx_v_dz1, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x.buf, __pyx_t_14, __pyx_bstride_0_x)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y.buf, __pyx_t_15, __pyx_bstride_0_y)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_z.buf, __pyx_t_16, __pyx_bstride_0_z)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_17, __pyx_bstride_0_dx)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dy.buf, __pyx_t_18, __pyx_bstride_0_dy)), (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dz.buf, __pyx_t_19, __pyx_bstride_0_dz))));
+ if (__pyx_t_5) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":154
* x[inner], y[inner], z[inner],
@@ -20069,12 +21453,12 @@
* added += 1
* if added == 26: break
*/
- __pyx_t_7 = PyInt_FromLong(__pyx_v_inner); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
- __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_this_joins, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_6 = PyInt_FromLong(__pyx_v_inner); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_this_joins, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":157
* # Hot dog, we have a weiner!
@@ -20092,8 +21476,8 @@
* return joins
*
*/
- __pyx_t_6 = (__pyx_v_added == 26);
- if (__pyx_t_6) {
+ __pyx_t_5 = (__pyx_v_added == 26);
+ if (__pyx_t_5) {
goto __pyx_L12_break;
goto __pyx_L14;
}
@@ -20101,7 +21485,6 @@
__pyx_L11_continue:;
}
__pyx_L12_break:;
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":159
@@ -20112,8 +21495,8 @@
* @cython.boundscheck(False)
*/
__Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_v_joins);
- __pyx_r = __pyx_v_joins;
+ __Pyx_INCREF(((PyObject *)__pyx_v_joins));
+ __pyx_r = ((PyObject *)__pyx_v_joins);
goto __pyx_L0;
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
@@ -20121,7 +21504,7 @@
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_6);
{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_field);
@@ -20146,13 +21529,6 @@
__pyx_L2:;
__Pyx_DECREF(__pyx_v_joins);
__Pyx_DECREF(__pyx_v_this_joins);
- __Pyx_DECREF((PyObject *)__pyx_v_field);
- __Pyx_DECREF((PyObject *)__pyx_v_x);
- __Pyx_DECREF((PyObject *)__pyx_v_y);
- __Pyx_DECREF((PyObject *)__pyx_v_z);
- __Pyx_DECREF((PyObject *)__pyx_v_dx);
- __Pyx_DECREF((PyObject *)__pyx_v_dy);
- __Pyx_DECREF((PyObject *)__pyx_v_dz);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -20179,9 +21555,10 @@
long __pyx_t_2;
int __pyx_t_3;
PyObject *__pyx_t_4 = NULL;
- Py_ssize_t __pyx_t_5;
- int __pyx_t_6;
- PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_5;
+ Py_ssize_t __pyx_t_6;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__max_ind,&__pyx_n_s__joins,0};
__Pyx_RefNannySetupContext("extract_identified_contours");
__pyx_self = __pyx_self;
@@ -20222,10 +21599,10 @@
__Pyx_RaiseArgtupleInvalid("extract_identified_contours", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.extract_identified_contours");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF(__pyx_v_joins);
- __pyx_v_contours = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_v_contours = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
__pyx_v_proto_contour = Py_None; __Pyx_INCREF(Py_None);
__pyx_v_j = Py_None; __Pyx_INCREF(Py_None);
@@ -20238,8 +21615,8 @@
*/
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- __Pyx_DECREF(__pyx_v_contours);
- __pyx_v_contours = ((PyObject *)__pyx_t_1);
+ __Pyx_DECREF(((PyObject *)__pyx_v_contours));
+ __pyx_v_contours = __pyx_t_1;
__pyx_t_1 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":166
@@ -20260,15 +21637,25 @@
* if len(joins[i]) == 0:
* continue
*/
- __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(((PyObject *)__pyx_t_1));
- __pyx_t_4 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- if (unlikely(PySet_Add(__pyx_t_1, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Append(__pyx_v_contours, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_v_contours == Py_None)) {
+ PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+ PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_4));
+ __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
+ __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)&PySet_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_5 = PyList_Append(((PyObject *)__pyx_v_contours), __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":168
@@ -20280,10 +21667,10 @@
*/
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_joins, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = (__pyx_t_5 == 0);
- if (__pyx_t_6) {
+ __pyx_t_7 = (__pyx_t_6 == 0);
+ if (__pyx_t_7) {
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":169
* contours.append(set([i]))
@@ -20325,19 +21712,19 @@
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_joins, __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
- __pyx_t_5 = 0; __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4);
+ __pyx_t_6 = 0; __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4);
} else {
- __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
if (likely(PyList_CheckExact(__pyx_t_4))) {
- if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++;
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
} else if (likely(PyTuple_CheckExact(__pyx_t_4))) {
- if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++;
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
} else {
__pyx_t_1 = PyIter_Next(__pyx_t_4);
if (!__pyx_t_1) {
@@ -20357,14 +21744,14 @@
* proto_contour = set(proto_contour)
* for j in proto_contour:
*/
- __pyx_t_1 = PyObject_GetItem(__pyx_v_contours, __pyx_v_j); if (!__pyx_t_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_contours), __pyx_v_j); if (!__pyx_t_1) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_proto_contour, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_proto_contour, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_v_proto_contour);
- __pyx_v_proto_contour = __pyx_t_7;
- __pyx_t_7 = 0;
+ __pyx_v_proto_contour = __pyx_t_8;
+ __pyx_t_8 = 0;
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -20380,12 +21767,12 @@
__Pyx_INCREF(__pyx_v_proto_contour);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_proto_contour);
__Pyx_GIVEREF(__pyx_v_proto_contour);
- __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)&PySet_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)&PySet_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_v_proto_contour);
- __pyx_v_proto_contour = __pyx_t_7;
- __pyx_t_7 = 0;
+ __pyx_v_proto_contour = __pyx_t_8;
+ __pyx_t_8 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":174
* proto_contour += contours[j]
@@ -20395,20 +21782,20 @@
* return contours
*/
if (PyList_CheckExact(__pyx_v_proto_contour) || PyTuple_CheckExact(__pyx_v_proto_contour)) {
- __pyx_t_5 = 0; __pyx_t_7 = __pyx_v_proto_contour; __Pyx_INCREF(__pyx_t_7);
+ __pyx_t_6 = 0; __pyx_t_8 = __pyx_v_proto_contour; __Pyx_INCREF(__pyx_t_8);
} else {
- __pyx_t_5 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_proto_contour); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_6 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_proto_contour); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
}
for (;;) {
- if (likely(PyList_CheckExact(__pyx_t_7))) {
- if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_7)) break;
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++;
- } else if (likely(PyTuple_CheckExact(__pyx_t_7))) {
- if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++;
+ if (likely(PyList_CheckExact(__pyx_t_8))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_8)) break;
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
+ } else if (likely(PyTuple_CheckExact(__pyx_t_8))) {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
} else {
- __pyx_t_4 = PyIter_Next(__pyx_t_7);
+ __pyx_t_4 = PyIter_Next(__pyx_t_8);
if (!__pyx_t_4) {
if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
break;
@@ -20425,9 +21812,9 @@
* contours[j] = proto_contour # <<<<<<<<<<<<<<
* return contours
*/
- if (PyObject_SetItem(__pyx_v_contours, __pyx_v_j, __pyx_v_proto_contour) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetItem(((PyObject *)__pyx_v_contours), __pyx_v_j, __pyx_v_proto_contour) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_L6_continue:;
}
@@ -20437,8 +21824,8 @@
* return contours # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(__pyx_r);
- __Pyx_INCREF(__pyx_v_contours);
- __pyx_r = __pyx_v_contours;
+ __Pyx_INCREF(((PyObject *)__pyx_v_contours));
+ __pyx_r = ((PyObject *)__pyx_v_contours);
goto __pyx_L0;
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
@@ -20446,14 +21833,13 @@
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_4);
- __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("yt.amr_utils.extract_identified_contours");
__pyx_r = NULL;
__pyx_L0:;
__Pyx_DECREF(__pyx_v_contours);
__Pyx_DECREF(__pyx_v_proto_contour);
__Pyx_DECREF(__pyx_v_j);
- __Pyx_DECREF(__pyx_v_joins);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -20514,7 +21900,7 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__filename);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("write_png", 0, 2, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("write_png", 0, 2, 3, 1); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (kw_args > 0) {
@@ -20523,12 +21909,12 @@
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "write_png") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "write_png") < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
__pyx_v_buffer = ((PyArrayObject *)values[0]);
- __pyx_v_filename = __Pyx_PyBytes_AsString(values[1]); if (unlikely((!__pyx_v_filename) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_filename = PyBytes_AsString(values[1]); if (unlikely((!__pyx_v_filename) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (values[2]) {
- __pyx_v_dpi = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_dpi == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_dpi = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_dpi == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_dpi = ((int)100);
}
@@ -20536,9 +21922,9 @@
__pyx_v_dpi = ((int)100);
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 3:
- __pyx_v_dpi = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_dpi == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_dpi = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 2)); if (unlikely((__pyx_v_dpi == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
case 2:
- __pyx_v_filename = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((!__pyx_v_filename) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_filename = PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((!__pyx_v_filename) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_v_buffer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
break;
default: goto __pyx_L5_argtuple_error;
@@ -20546,17 +21932,17 @@
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("write_png", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("write_png", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.write_png");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_buffer);
__pyx_bstruct_buffer.buf = NULL;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_buffer), __pyx_ptype_5numpy_ndarray, 1, "buffer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_buffer), __pyx_ptype_5numpy_ndarray, 1, "buffer", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_buffer, (PyObject*)__pyx_v_buffer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_buffer, (PyObject*)__pyx_v_buffer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_buffer = __pyx_bstruct_buffer.strides[0]; __pyx_bstride_1_buffer = __pyx_bstruct_buffer.strides[1]; __pyx_bstride_2_buffer = __pyx_bstruct_buffer.strides[2];
__pyx_bshape_0_buffer = __pyx_bstruct_buffer.shape[0]; __pyx_bshape_1_buffer = __pyx_bstruct_buffer.shape[1]; __pyx_bshape_2_buffer = __pyx_bstruct_buffer.shape[2];
@@ -20769,7 +22155,6 @@
__pyx_L0:;
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_buffer);
__pyx_L2:;
- __Pyx_DECREF((PyObject *)__pyx_v_buffer);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -20851,67 +22236,65 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__px);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("add_points_to_image", 1, 4, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_points_to_image", 1, 4, 4, 1); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__py);
if (likely(values[2])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("add_points_to_image", 1, 4, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_points_to_image", 1, 4, 4, 2); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pv);
if (likely(values[3])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("add_points_to_image", 1, 4, 4, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_points_to_image", 1, 4, 4, 3); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "add_points_to_image") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "add_points_to_image") < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
__pyx_v_buffer = ((PyArrayObject *)values[0]);
__pyx_v_px = ((PyArrayObject *)values[1]);
__pyx_v_py = ((PyArrayObject *)values[2]);
- __pyx_v_pv = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_pv == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_pv = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_pv == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
goto __pyx_L5_argtuple_error;
} else {
__pyx_v_buffer = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
__pyx_v_px = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
__pyx_v_py = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
- __pyx_v_pv = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_pv == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_pv = __pyx_PyFloat_AsDouble(PyTuple_GET_ITEM(__pyx_args, 3)); if (unlikely((__pyx_v_pv == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("add_points_to_image", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_points_to_image", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.add_points_to_image");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_buffer);
- __Pyx_INCREF((PyObject *)__pyx_v_px);
- __Pyx_INCREF((PyObject *)__pyx_v_py);
__pyx_bstruct_buffer.buf = NULL;
__pyx_bstruct_px.buf = NULL;
__pyx_bstruct_py.buf = NULL;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_buffer), __pyx_ptype_5numpy_ndarray, 1, "buffer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_px), __pyx_ptype_5numpy_ndarray, 1, "px", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_py), __pyx_ptype_5numpy_ndarray, 1, "py", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_buffer), __pyx_ptype_5numpy_ndarray, 1, "buffer", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_px), __pyx_ptype_5numpy_ndarray, 1, "px", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_py), __pyx_ptype_5numpy_ndarray, 1, "py", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_buffer, (PyObject*)__pyx_v_buffer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_buffer, (PyObject*)__pyx_v_buffer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 3, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_buffer = __pyx_bstruct_buffer.strides[0]; __pyx_bstride_1_buffer = __pyx_bstruct_buffer.strides[1]; __pyx_bstride_2_buffer = __pyx_bstruct_buffer.strides[2];
__pyx_bshape_0_buffer = __pyx_bstruct_buffer.shape[0]; __pyx_bshape_1_buffer = __pyx_bstruct_buffer.shape[1]; __pyx_bshape_2_buffer = __pyx_bstruct_buffer.shape[2];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_px, (PyObject*)__pyx_v_px, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_px, (PyObject*)__pyx_v_px, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_px = __pyx_bstruct_px.strides[0];
__pyx_bshape_0_px = __pyx_bstruct_px.shape[0];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_py, (PyObject*)__pyx_v_py, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_py, (PyObject*)__pyx_v_py, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_py = __pyx_bstruct_py.strides[0];
__pyx_bshape_0_py = __pyx_bstruct_py.shape[0];
@@ -20950,7 +22333,7 @@
* for pi in range(np):
* j = <int> (xs * px[pi])
*/
- __pyx_v_v = __pyx_f_2yt_9amr_utils_iclip(((int)(__pyx_v_pv * 255)), 0, 255);
+ __pyx_v_v = __pyx_f_2yt_9amr_utils_iclip(((int)(__pyx_v_pv * 255.0)), 0, 255);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":160
* cdef int v
@@ -20978,7 +22361,7 @@
} else if (unlikely(__pyx_t_3 >= __pyx_bshape_0_px)) __pyx_t_4 = 0;
if (unlikely(__pyx_t_4 != -1)) {
__Pyx_RaiseBufferIndexError(__pyx_t_4);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_v_j = ((int)(__pyx_v_xs * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_px.buf, __pyx_t_3, __pyx_bstride_0_px))));
@@ -20997,7 +22380,7 @@
} else if (unlikely(__pyx_t_4 >= __pyx_bshape_0_py)) __pyx_t_5 = 0;
if (unlikely(__pyx_t_5 != -1)) {
__Pyx_RaiseBufferIndexError(__pyx_t_5);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[7]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_v_i = ((int)(__pyx_v_ys * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_py.buf, __pyx_t_4, __pyx_bstride_0_py))));
@@ -21036,7 +22419,7 @@
} else if (unlikely(__pyx_t_8 >= __pyx_bshape_2_buffer)) __pyx_t_9 = 2;
if (unlikely(__pyx_t_9 != -1)) {
__Pyx_RaiseBufferIndexError(__pyx_t_9);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[7]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_buffer.buf, __pyx_t_6, __pyx_bstride_0_buffer, __pyx_t_7, __pyx_bstride_1_buffer, __pyx_t_8, __pyx_bstride_2_buffer) = 0;
}
@@ -21109,7 +22492,7 @@
} else if (unlikely(__pyx_t_13 >= __pyx_bshape_2_buffer)) __pyx_t_14 = 2;
if (unlikely(__pyx_t_14 != -1)) {
__Pyx_RaiseBufferIndexError(__pyx_t_14);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[7]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_v_v = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_buffer.buf, __pyx_t_11, __pyx_bstride_0_buffer, __pyx_t_12, __pyx_bstride_1_buffer, __pyx_t_13, __pyx_bstride_2_buffer));
@@ -21136,7 +22519,7 @@
} else if (unlikely(__pyx_t_16 >= __pyx_bshape_2_buffer)) __pyx_t_17 = 2;
if (unlikely(__pyx_t_17 != -1)) {
__Pyx_RaiseBufferIndexError(__pyx_t_17);
- {__pyx_filename = __pyx_f[8]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[7]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_uint8_t *, __pyx_bstruct_buffer.buf, __pyx_t_14, __pyx_bstride_0_buffer, __pyx_t_15, __pyx_bstride_1_buffer, __pyx_t_16, __pyx_bstride_2_buffer) = __pyx_f_2yt_9amr_utils_iclip(__pyx_v_v, 0, 255);
}
@@ -21160,9 +22543,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_px);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_py);
__pyx_L2:;
- __Pyx_DECREF((PyObject *)__pyx_v_buffer);
- __Pyx_DECREF((PyObject *)__pyx_v_px);
- __Pyx_DECREF((PyObject *)__pyx_v_py);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -21242,19 +22622,19 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__slab_start);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("read_tiger_section", 0, 4, 5, 1); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("read_tiger_section", 0, 4, 5, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__slab_size);
if (likely(values[2])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("read_tiger_section", 0, 4, 5, 2); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("read_tiger_section", 0, 4, 5, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__root_size);
if (likely(values[3])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("read_tiger_section", 0, 4, 5, 3); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("read_tiger_section", 0, 4, 5, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 4:
if (kw_args > 0) {
@@ -21263,14 +22643,14 @@
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "read_tiger_section") < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "read_tiger_section") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
- __pyx_v_fn = __Pyx_PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_fn) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_fn = PyBytes_AsString(values[0]); if (unlikely((!__pyx_v_fn) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_v_slab_start = ((PyArrayObject *)values[1]);
__pyx_v_slab_size = ((PyArrayObject *)values[2]);
__pyx_v_root_size = ((PyArrayObject *)values[3]);
if (values[4]) {
- __pyx_v_offset = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_offset = __Pyx_PyInt_AsInt(values[4]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_offset = ((int)36);
}
@@ -21278,47 +22658,45 @@
__pyx_v_offset = ((int)36);
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 5:
- __pyx_v_offset = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_offset = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 4)); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
case 4:
__pyx_v_root_size = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 3));
__pyx_v_slab_size = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
__pyx_v_slab_start = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
- __pyx_v_fn = __Pyx_PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((!__pyx_v_fn) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_fn = PyBytes_AsString(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((!__pyx_v_fn) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
break;
default: goto __pyx_L5_argtuple_error;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("read_tiger_section", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("read_tiger_section", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.read_tiger_section");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_slab_start);
- __Pyx_INCREF((PyObject *)__pyx_v_slab_size);
- __Pyx_INCREF((PyObject *)__pyx_v_root_size);
__pyx_bstruct_slab_start.buf = NULL;
__pyx_bstruct_slab_size.buf = NULL;
__pyx_bstruct_root_size.buf = NULL;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_slab_start), __pyx_ptype_5numpy_ndarray, 1, "slab_start", 0))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_slab_size), __pyx_ptype_5numpy_ndarray, 1, "slab_size", 0))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root_size), __pyx_ptype_5numpy_ndarray, 1, "root_size", 0))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_slab_start), __pyx_ptype_5numpy_ndarray, 1, "slab_start", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_slab_size), __pyx_ptype_5numpy_ndarray, 1, "slab_size", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root_size), __pyx_ptype_5numpy_ndarray, 1, "root_size", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_slab_start, (PyObject*)__pyx_v_slab_start, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_slab_start, (PyObject*)__pyx_v_slab_start, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_slab_start = __pyx_bstruct_slab_start.strides[0];
__pyx_bshape_0_slab_start = __pyx_bstruct_slab_start.shape[0];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_slab_size, (PyObject*)__pyx_v_slab_size, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_slab_size, (PyObject*)__pyx_v_slab_size, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_slab_size = __pyx_bstruct_slab_size.strides[0];
__pyx_bshape_0_slab_size = __pyx_bstruct_slab_size.shape[0];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_root_size, (PyObject*)__pyx_v_root_size, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_root_size, (PyObject*)__pyx_v_root_size, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_root_size = __pyx_bstruct_root_size.strides[0];
__pyx_bshape_0_root_size = __pyx_bstruct_root_size.shape[0];
@@ -21359,26 +22737,26 @@
* cdef FILE *f = fopen(fn, "rb")
* #for i in range(3): offset += strides[i] * slab_start[i]
*/
- __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__zeros); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__zeros); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_v_slab_size));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_slab_size));
__Pyx_GIVEREF(((PyObject *)__pyx_v_slab_size));
- __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
- if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float32)) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__order), ((PyObject *)__pyx_n_s__F)) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_4, __pyx_t_3, ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float32)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__order), ((PyObject *)__pyx_n_s__F)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_4, __pyx_t_3, ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
- if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_buffer = ((PyArrayObject *)__pyx_t_6);
__pyx_t_6 = 0;
@@ -21541,9 +22919,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_root_size);
__pyx_L2:;
__Pyx_XDECREF((PyObject *)__pyx_v_buffer);
- __Pyx_DECREF((PyObject *)__pyx_v_slab_start);
- __Pyx_DECREF((PyObject *)__pyx_v_slab_size);
- __Pyx_DECREF((PyObject *)__pyx_v_root_size);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -21968,34 +23343,33 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nvals);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__cinit__") < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
__pyx_v_top_grid_dims = ((PyArrayObject *)values[0]);
- __pyx_v_nvals = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_nvals == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_nvals = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_nvals == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
} else {
__pyx_v_top_grid_dims = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
- __pyx_v_nvals = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_nvals == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_nvals = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_nvals == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.QuadTree.__cinit__");
+ __Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_self);
- __Pyx_INCREF((PyObject *)__pyx_v_top_grid_dims);
__pyx_bstruct_top_grid_dims.buf = NULL;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_top_grid_dims), __pyx_ptype_5numpy_ndarray, 1, "top_grid_dims", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_top_grid_dims), __pyx_ptype_5numpy_ndarray, 1, "top_grid_dims", 0))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_top_grid_dims, (PyObject*)__pyx_v_top_grid_dims, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_top_grid_dims, (PyObject*)__pyx_v_top_grid_dims, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_top_grid_dims = __pyx_bstruct_top_grid_dims.strides[0];
__pyx_bshape_0_top_grid_dims = __pyx_bstruct_top_grid_dims.shape[0];
@@ -22055,7 +23429,7 @@
} else if (unlikely(__pyx_t_3 >= __pyx_bshape_0_top_grid_dims)) __pyx_t_1 = 0;
if (unlikely(__pyx_t_1 != -1)) {
__Pyx_RaiseBufferIndexError(__pyx_t_1);
- {__pyx_filename = __pyx_f[10]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[9]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
(((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->top_grid_dims[0]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_top_grid_dims.buf, __pyx_t_3, __pyx_bstride_0_top_grid_dims));
@@ -22074,7 +23448,7 @@
} else if (unlikely(__pyx_t_4 >= __pyx_bshape_0_top_grid_dims)) __pyx_t_1 = 0;
if (unlikely(__pyx_t_1 != -1)) {
__Pyx_RaiseBufferIndexError(__pyx_t_1);
- {__pyx_filename = __pyx_f[10]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[9]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
(((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->top_grid_dims[1]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_top_grid_dims.buf, __pyx_t_4, __pyx_bstride_0_top_grid_dims));
@@ -22113,7 +23487,7 @@
} else if (unlikely(__pyx_t_5 >= __pyx_bshape_0_top_grid_dims)) __pyx_t_1 = 0;
if (unlikely(__pyx_t_1 != -1)) {
__Pyx_RaiseBufferIndexError(__pyx_t_1);
- {__pyx_filename = __pyx_f[10]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[9]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":122
@@ -22140,7 +23514,7 @@
} else if (unlikely(__pyx_t_6 >= __pyx_bshape_0_top_grid_dims)) __pyx_t_1 = 0;
if (unlikely(__pyx_t_1 != -1)) {
__Pyx_RaiseBufferIndexError(__pyx_t_1);
- {__pyx_filename = __pyx_f[10]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[9]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_t_7 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_top_grid_dims.buf, __pyx_t_6, __pyx_bstride_0_top_grid_dims));
for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_7; __pyx_t_1+=1) {
@@ -22170,7 +23544,7 @@
} else if (unlikely(__pyx_t_8 >= __pyx_bshape_0_top_grid_dims)) __pyx_t_2 = 0;
if (unlikely(__pyx_t_2 != -1)) {
__Pyx_RaiseBufferIndexError(__pyx_t_2);
- {__pyx_filename = __pyx_f[10]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[9]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":128
@@ -22197,7 +23571,7 @@
} else if (unlikely(__pyx_t_9 >= __pyx_bshape_0_top_grid_dims)) __pyx_t_2 = 0;
if (unlikely(__pyx_t_2 != -1)) {
__Pyx_RaiseBufferIndexError(__pyx_t_2);
- {__pyx_filename = __pyx_f[10]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[9]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_t_10 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_top_grid_dims.buf, __pyx_t_9, __pyx_bstride_0_top_grid_dims));
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_10; __pyx_t_2+=1) {
@@ -22236,8 +23610,6 @@
__pyx_L0:;
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_top_grid_dims);
__pyx_L2:;
- __Pyx_DECREF((PyObject *)__pyx_v_self);
- __Pyx_DECREF((PyObject *)__pyx_v_top_grid_dims);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
@@ -22263,7 +23635,6 @@
PyObject *__pyx_t_5 = NULL;
Py_ssize_t __pyx_t_6;
__Pyx_RefNannySetupContext("add_to_position");
- __Pyx_INCREF((PyObject *)__pyx_v_self);
__pyx_v_L = Py_None; __Pyx_INCREF(Py_None);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":141
@@ -22282,20 +23653,20 @@
* if node.children[0][0] == NULL:
* QTN_refine(node)
*/
- __pyx_t_2 = PyInt_FromLong(__pyx_v_level); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_level); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
__pyx_t_1 = 0; __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
} else {
- __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -22309,7 +23680,7 @@
} else {
__pyx_t_2 = PyIter_Next(__pyx_t_3);
if (!__pyx_t_2) {
- if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
break;
}
__Pyx_GOTREF(__pyx_t_2);
@@ -22347,15 +23718,15 @@
* i = (pos[0] >= fac*(2*node.pos[0]+1))
* j = (pos[1] >= fac*(2*node.pos[1]+1))
*/
- __pyx_t_2 = PyInt_FromLong(__pyx_v_level); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(__pyx_v_level); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_5 = PyNumber_Subtract(__pyx_t_2, __pyx_v_L); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Subtract(__pyx_t_2, __pyx_v_L); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyNumber_Subtract(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyNumber_Subtract(__pyx_t_5, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_fac = (__pyx_v_self->po2[__pyx_t_6]);
@@ -22405,7 +23776,6 @@
__Pyx_WriteUnraisable("yt.amr_utils.QuadTree.add_to_position");
__pyx_L0:;
__Pyx_DECREF(__pyx_v_L);
- __Pyx_DECREF((PyObject *)__pyx_v_self);
__Pyx_RefNannyFinishContext();
}
@@ -22421,6 +23791,8 @@
__pyx_t_5numpy_int64_t __pyx_v_i;
__pyx_t_5numpy_int64_t __pyx_v_j;
struct __pyx_t_2yt_9amr_utils_QuadTreeNode *__pyx_r;
+ __pyx_t_5numpy_int64_t __pyx_t_1;
+ __pyx_t_5numpy_int64_t __pyx_t_2;
__Pyx_RefNannySetupContext("find_on_root_level");
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":157
@@ -22430,7 +23802,17 @@
* j = <np.int64_t> (pos[1] / self.po2[level])
* return self.root_nodes[i][j]
*/
- __pyx_v_i = ((__pyx_t_5numpy_int64_t)((__pyx_v_pos[0]) / (__pyx_v_self->po2[__pyx_v_level])));
+ __pyx_t_1 = (__pyx_v_pos[0]);
+ __pyx_t_2 = (__pyx_v_self->po2[__pyx_v_level]);
+ if (unlikely(__pyx_t_2 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
+ {__pyx_filename = __pyx_f[9]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ else if (sizeof(__pyx_t_5numpy_int64_t) == sizeof(long) && unlikely(__pyx_t_2 == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_1))) {
+ PyErr_Format(PyExc_OverflowError, "value too large to perform division");
+ {__pyx_filename = __pyx_f[9]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_i = __Pyx_div___pyx_t_5numpy_int64_t(__pyx_t_1, __pyx_t_2);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":158
* cdef np.int64_t i, j
@@ -22439,7 +23821,17 @@
* return self.root_nodes[i][j]
*
*/
- __pyx_v_j = ((__pyx_t_5numpy_int64_t)((__pyx_v_pos[1]) / (__pyx_v_self->po2[__pyx_v_level])));
+ __pyx_t_2 = (__pyx_v_pos[1]);
+ __pyx_t_1 = (__pyx_v_self->po2[__pyx_v_level]);
+ if (unlikely(__pyx_t_1 == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "integer division or modulo by zero");
+ {__pyx_filename = __pyx_f[9]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ else if (sizeof(__pyx_t_5numpy_int64_t) == sizeof(long) && unlikely(__pyx_t_1 == -1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_2))) {
+ PyErr_Format(PyExc_OverflowError, "value too large to perform division");
+ {__pyx_filename = __pyx_f[9]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+ __pyx_v_j = __Pyx_div___pyx_t_5numpy_int64_t(__pyx_t_2, __pyx_t_1);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":159
* i = <np.int64_t> (pos[0] / self.po2[level])
@@ -22452,6 +23844,10 @@
goto __pyx_L0;
__pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_WriteUnraisable("yt.amr_utils.QuadTree.find_on_root_level");
+ __pyx_r = 0;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -22520,31 +23916,31 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pxs);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("add_array_to_tree", 1, 5, 5, 1); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_array_to_tree", 1, 5, 5, 1); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pys);
if (likely(values[2])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("add_array_to_tree", 1, 5, 5, 2); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_array_to_tree", 1, 5, 5, 2); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pvals);
if (likely(values[3])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("add_array_to_tree", 1, 5, 5, 3); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_array_to_tree", 1, 5, 5, 3); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 4:
values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pweight_vals);
if (likely(values[4])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("add_array_to_tree", 1, 5, 5, 4); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_array_to_tree", 1, 5, 5, 4); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "add_array_to_tree") < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "add_array_to_tree") < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
- __pyx_v_level = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_level = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_v_pxs = ((PyArrayObject *)values[1]);
__pyx_v_pys = ((PyArrayObject *)values[2]);
__pyx_v_pvals = ((PyArrayObject *)values[3]);
@@ -22552,7 +23948,7 @@
} else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
goto __pyx_L5_argtuple_error;
} else {
- __pyx_v_level = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_level = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_v_pxs = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
__pyx_v_pys = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
__pyx_v_pvals = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 3));
@@ -22560,45 +23956,41 @@
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("add_array_to_tree", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_array_to_tree", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.QuadTree.add_array_to_tree");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_self);
- __Pyx_INCREF((PyObject *)__pyx_v_pxs);
- __Pyx_INCREF((PyObject *)__pyx_v_pys);
- __Pyx_INCREF((PyObject *)__pyx_v_pvals);
- __Pyx_INCREF((PyObject *)__pyx_v_pweight_vals);
__pyx_bstruct_pxs.buf = NULL;
__pyx_bstruct_pys.buf = NULL;
__pyx_bstruct_pvals.buf = NULL;
__pyx_bstruct_pweight_vals.buf = NULL;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pxs), __pyx_ptype_5numpy_ndarray, 1, "pxs", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pys), __pyx_ptype_5numpy_ndarray, 1, "pys", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pvals), __pyx_ptype_5numpy_ndarray, 1, "pvals", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pweight_vals), __pyx_ptype_5numpy_ndarray, 1, "pweight_vals", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pxs), __pyx_ptype_5numpy_ndarray, 1, "pxs", 0))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pys), __pyx_ptype_5numpy_ndarray, 1, "pys", 0))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pvals), __pyx_ptype_5numpy_ndarray, 1, "pvals", 0))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pweight_vals), __pyx_ptype_5numpy_ndarray, 1, "pweight_vals", 0))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_pxs, (PyObject*)__pyx_v_pxs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_pxs, (PyObject*)__pyx_v_pxs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_pxs = __pyx_bstruct_pxs.strides[0];
__pyx_bshape_0_pxs = __pyx_bstruct_pxs.shape[0];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_pys, (PyObject*)__pyx_v_pys, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_pys, (PyObject*)__pyx_v_pys, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_pys = __pyx_bstruct_pys.strides[0];
__pyx_bshape_0_pys = __pyx_bstruct_pys.shape[0];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_pvals, (PyObject*)__pyx_v_pvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_pvals, (PyObject*)__pyx_v_pvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_pvals = __pyx_bstruct_pvals.strides[0]; __pyx_bstride_1_pvals = __pyx_bstruct_pvals.strides[1];
__pyx_bshape_0_pvals = __pyx_bstruct_pvals.shape[0]; __pyx_bshape_1_pvals = __pyx_bstruct_pvals.shape[1];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_pweight_vals, (PyObject*)__pyx_v_pweight_vals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_pweight_vals, (PyObject*)__pyx_v_pweight_vals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_pweight_vals = __pyx_bstruct_pweight_vals.strides[0];
__pyx_bshape_0_pweight_vals = __pyx_bstruct_pweight_vals.shape[0];
@@ -22691,11 +24083,6 @@
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_pvals);
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_pys);
__pyx_L2:;
- __Pyx_DECREF((PyObject *)__pyx_v_self);
- __Pyx_DECREF((PyObject *)__pyx_v_pxs);
- __Pyx_DECREF((PyObject *)__pyx_v_pys);
- __Pyx_DECREF((PyObject *)__pyx_v_pvals);
- __Pyx_DECREF((PyObject *)__pyx_v_pweight_vals);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -22758,31 +24145,31 @@
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__start_index);
if (likely(values[1])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("add_grid_to_tree", 1, 5, 5, 1); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_grid_to_tree", 1, 5, 5, 1); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pvals);
if (likely(values[2])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("add_grid_to_tree", 1, 5, 5, 2); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_grid_to_tree", 1, 5, 5, 2); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__wvals);
if (likely(values[3])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("add_grid_to_tree", 1, 5, 5, 3); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_grid_to_tree", 1, 5, 5, 3); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 4:
values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cm);
if (likely(values[4])) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("add_grid_to_tree", 1, 5, 5, 4); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_grid_to_tree", 1, 5, 5, 4); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "add_grid_to_tree") < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "add_grid_to_tree") < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
- __pyx_v_level = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_level = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_v_start_index = ((PyArrayObject *)values[1]);
__pyx_v_pvals = ((PyArrayObject *)values[2]);
__pyx_v_wvals = ((PyArrayObject *)values[3]);
@@ -22790,7 +24177,7 @@
} else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
goto __pyx_L5_argtuple_error;
} else {
- __pyx_v_level = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_level = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_v_start_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
__pyx_v_pvals = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 2));
__pyx_v_wvals = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 3));
@@ -22798,40 +24185,41 @@
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("add_grid_to_tree", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("add_grid_to_tree", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.QuadTree.add_grid_to_tree");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_bstruct_start_index.buf = NULL;
__pyx_bstruct_pvals.buf = NULL;
__pyx_bstruct_wvals.buf = NULL;
__pyx_bstruct_cm.buf = NULL;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start_index), __pyx_ptype_5numpy_ndarray, 1, "start_index", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pvals), __pyx_ptype_5numpy_ndarray, 1, "pvals", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_wvals), __pyx_ptype_5numpy_ndarray, 1, "wvals", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cm), __pyx_ptype_5numpy_ndarray, 1, "cm", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start_index), __pyx_ptype_5numpy_ndarray, 1, "start_index", 0))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pvals), __pyx_ptype_5numpy_ndarray, 1, "pvals", 0))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_wvals), __pyx_ptype_5numpy_ndarray, 1, "wvals", 0))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cm), __pyx_ptype_5numpy_ndarray, 1, "cm", 0))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_start_index, (PyObject*)__pyx_v_start_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_start_index, (PyObject*)__pyx_v_start_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_start_index = __pyx_bstruct_start_index.strides[0];
__pyx_bshape_0_start_index = __pyx_bstruct_start_index.shape[0];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_pvals, (PyObject*)__pyx_v_pvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_pvals, (PyObject*)__pyx_v_pvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_pvals = __pyx_bstruct_pvals.strides[0]; __pyx_bstride_1_pvals = __pyx_bstruct_pvals.strides[1];
__pyx_bshape_0_pvals = __pyx_bstruct_pvals.shape[0]; __pyx_bshape_1_pvals = __pyx_bstruct_pvals.shape[1];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_wvals, (PyObject*)__pyx_v_wvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_wvals, (PyObject*)__pyx_v_wvals, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_wvals = __pyx_bstruct_wvals.strides[0]; __pyx_bstride_1_wvals = __pyx_bstruct_wvals.strides[1];
__pyx_bshape_0_wvals = __pyx_bstruct_wvals.shape[0]; __pyx_bshape_1_wvals = __pyx_bstruct_wvals.shape[1];
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_cm, (PyObject*)__pyx_v_cm, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_cm, (PyObject*)__pyx_v_cm, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_bstride_0_cm = __pyx_bstruct_cm.strides[0]; __pyx_bstride_1_cm = __pyx_bstruct_cm.strides[1];
__pyx_bshape_0_cm = __pyx_bstruct_cm.shape[0]; __pyx_bshape_1_cm = __pyx_bstruct_cm.shape[1];
@@ -22934,32 +24322,32 @@
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get_all_from_level") < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get_all_from_level") < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
- __pyx_v_level = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_level = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (values[1]) {
- __pyx_v_count_only = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_count_only == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_count_only = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_count_only == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_count_only = ((int)0);
}
} else {
__pyx_v_count_only = ((int)0);
switch (PyTuple_GET_SIZE(__pyx_args)) {
- case 2: __pyx_v_count_only = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_count_only == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- case 1: __pyx_v_level = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ case 2: __pyx_v_count_only = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_count_only == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ case 1: __pyx_v_level = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
break;
default: goto __pyx_L5_argtuple_error;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("get_all_from_level", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("get_all_from_level", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("yt.amr_utils.QuadTree.get_all_from_level");
+ __Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- __Pyx_INCREF((PyObject *)__pyx_v_self);
- __pyx_v_vals = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_v_vals = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
__pyx_v_npos = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
__pyx_v_nvals = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
__pyx_v_nwvals = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
@@ -22983,10 +24371,10 @@
* for i in range(self.top_grid_dims[0]):
* for j in range(self.top_grid_dims[1]):
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- __Pyx_DECREF(__pyx_v_vals);
- __pyx_v_vals = ((PyObject *)__pyx_t_1);
+ __Pyx_DECREF(((PyObject *)__pyx_v_vals));
+ __pyx_v_vals = __pyx_t_1;
__pyx_t_1 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":193
@@ -23029,10 +24417,9 @@
* # Allocate our array
* cdef np.ndarray[np.int64_t, ndim=2] npos
*/
- __pyx_t_3 = __pyx_v_count_only;
- if (__pyx_t_3) {
+ if (__pyx_v_count_only) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyInt_FromLong(__pyx_v_total); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_total); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -23048,14 +24435,14 @@
* nvals = np.zeros( (total, self.nvals), dtype='float64')
* nwvals = np.zeros( total, dtype='float64')
*/
- __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyInt_FromLong(__pyx_v_total); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(__pyx_v_total); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
@@ -23063,20 +24450,20 @@
PyTuple_SET_ITEM(__pyx_t_7, 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[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
__Pyx_GIVEREF(__pyx_t_7);
__pyx_t_7 = 0;
- __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_7));
- if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__int64)) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_6, __pyx_t_1, ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__int64)) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_6, __pyx_t_1, ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
- if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_9 = ((PyArrayObject *)__pyx_t_8);
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
@@ -23093,7 +24480,7 @@
}
__pyx_bstride_0_npos = __pyx_bstruct_npos.strides[0]; __pyx_bstride_1_npos = __pyx_bstruct_npos.strides[1];
__pyx_bshape_0_npos = __pyx_bstruct_npos.shape[0]; __pyx_bshape_1_npos = __pyx_bstruct_npos.shape[1];
- if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_t_9 = 0;
__Pyx_DECREF(((PyObject *)__pyx_v_npos));
@@ -23107,16 +24494,16 @@
* nwvals = np.zeros( total, dtype='float64')
* cdef np.int64_t curpos = 0
*/
- __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_7 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__zeros); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__zeros); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyInt_FromLong(__pyx_v_total); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong(__pyx_v_total); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->nvals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyInt_FromLong(((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->nvals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
@@ -23124,20 +24511,20 @@
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_8 = 0;
__pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__pyx_t_6 = 0;
- __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_6));
- if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64)) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_7, __pyx_t_1, ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64)) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyEval_CallObjectWithKeywords(__pyx_t_7, __pyx_t_1, ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
- if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_13 = ((PyArrayObject *)__pyx_t_8);
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
@@ -23154,7 +24541,7 @@
}
__pyx_bstride_0_nvals = __pyx_bstruct_nvals.strides[0]; __pyx_bstride_1_nvals = __pyx_bstruct_nvals.strides[1];
__pyx_bshape_0_nvals = __pyx_bstruct_nvals.shape[0]; __pyx_bshape_1_nvals = __pyx_bstruct_nvals.shape[1];
- if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_t_13 = 0;
__Pyx_DECREF(((PyObject *)__pyx_v_nvals));
@@ -23168,27 +24555,27 @@
* cdef np.int64_t curpos = 0
* cdef np.int64_t *pdata = <np.int64_t *> npos.data
*/
- __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_6 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__zeros); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__zeros); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyInt_FromLong(__pyx_v_total); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyInt_FromLong(__pyx_v_total); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
__Pyx_GIVEREF(__pyx_t_8);
__pyx_t_8 = 0;
- __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_8));
- if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64)) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_7 = PyEval_CallObjectWithKeywords(__pyx_t_6, __pyx_t_1, ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_8, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__float64)) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyEval_CallObjectWithKeywords(__pyx_t_6, __pyx_t_1, ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
- if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_14 = ((PyArrayObject *)__pyx_t_7);
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
@@ -23205,7 +24592,7 @@
}
__pyx_bstride_0_nwvals = __pyx_bstruct_nwvals.strides[0];
__pyx_bshape_0_nwvals = __pyx_bstruct_nwvals.shape[0];
- if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_t_14 = 0;
__Pyx_DECREF(((PyObject *)__pyx_v_nwvals));
@@ -23289,7 +24676,7 @@
* cdef int count_at_level(self, QuadTreeNode *node, int level):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(((PyObject *)__pyx_v_npos));
PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_npos));
@@ -23329,7 +24716,6 @@
__Pyx_DECREF((PyObject *)__pyx_v_npos);
__Pyx_DECREF((PyObject *)__pyx_v_nvals);
__Pyx_DECREF((PyObject *)__pyx_v_nwvals);
- __Pyx_DECREF((PyObject *)__pyx_v_self);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -23352,7 +24738,6 @@
int __pyx_t_2;
int __pyx_t_3;
__Pyx_RefNannySetupContext("count_at_level");
- __Pyx_INCREF((PyObject *)__pyx_v_self);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":218
* # We only really return a non-zero, calculated value if we are at the
@@ -23444,7 +24829,6 @@
__pyx_r = 0;
__pyx_L0:;
- __Pyx_DECREF((PyObject *)__pyx_v_self);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
@@ -23466,7 +24850,6 @@
int __pyx_t_2;
int __pyx_t_3;
__Pyx_RefNannySetupContext("fill_from_level");
- __Pyx_INCREF((PyObject *)__pyx_v_self);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":235
* np.float64_t *wdata):
@@ -23621,7 +25004,6 @@
__pyx_r = 0;
__pyx_L0:;
- __Pyx_DECREF((PyObject *)__pyx_v_self);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
@@ -23643,7 +25025,6 @@
__pyx_t_5numpy_int64_t __pyx_t_3;
int __pyx_t_4;
__Pyx_RefNannySetupContext("__dealloc__");
- __Pyx_INCREF((PyObject *)__pyx_v_self);
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":253
* def __dealloc__(self):
@@ -23693,11 +25074,10 @@
*/
free(((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->root_nodes);
- __Pyx_DECREF((PyObject *)__pyx_v_self);
__Pyx_RefNannyFinishContext();
}
-/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":187
+/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":188
* # experimental exception made for __getbuffer__ and __releasebuffer__
* # -- the details of this may change.
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
@@ -23705,8 +25085,8 @@
* # requirements, and does not yet fullfill the PEP.
*/
-static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
-static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
+static CYTHON_UNUSED int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
+static CYTHON_UNUSED int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__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;
@@ -23731,9 +25111,8 @@
if (__pyx_v_info == NULL) return 0;
__pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
__Pyx_GIVEREF(__pyx_v_info->obj);
- __Pyx_INCREF((PyObject *)__pyx_v_self);
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":193
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":194
* # of flags
* cdef int copy_shape, i, ndim
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -23742,7 +25121,7 @@
*/
__pyx_v_endian_detector = 1;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":194
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":195
* cdef int copy_shape, i, ndim
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -23751,7 +25130,7 @@
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":196
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":197
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
*
* ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
@@ -23760,7 +25139,7 @@
*/
__pyx_v_ndim = PyArray_NDIM(((PyArrayObject *)__pyx_v_self));
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":198
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":199
* ndim = PyArray_NDIM(self)
*
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -23770,7 +25149,7 @@
__pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
if (__pyx_t_1) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":199
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":200
*
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
* copy_shape = 1 # <<<<<<<<<<<<<<
@@ -23782,7 +25161,7 @@
}
/*else*/ {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":201
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":202
* copy_shape = 1
* else:
* copy_shape = 0 # <<<<<<<<<<<<<<
@@ -23793,7 +25172,7 @@
}
__pyx_L5:;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":203
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":204
* copy_shape = 0
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -23803,7 +25182,7 @@
__pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS);
if (__pyx_t_1) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":204
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":205
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -23817,29 +25196,29 @@
}
if (__pyx_t_3) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":205
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":206
* 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 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)__pyx_kp_u_7));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_u_7));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_7));
- __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[11]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[10]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L6;
}
__pyx_L6:;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":207
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":208
* raise ValueError(u"ndarray is not C contiguous")
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
@@ -23849,7 +25228,7 @@
__pyx_t_3 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS);
if (__pyx_t_3) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":208
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":209
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
@@ -23863,29 +25242,29 @@
}
if (__pyx_t_2) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":209
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":210
* 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_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(((PyObject *)__pyx_kp_u_8));
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_u_8));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_8));
- __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- {__pyx_filename = __pyx_f[11]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[10]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L7;
}
__pyx_L7:;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":211
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":212
* raise ValueError(u"ndarray is not Fortran contiguous")
*
* info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
@@ -23894,7 +25273,7 @@
*/
__pyx_v_info->buf = PyArray_DATA(((PyArrayObject *)__pyx_v_self));
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":212
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":213
*
* info.buf = PyArray_DATA(self)
* info.ndim = ndim # <<<<<<<<<<<<<<
@@ -23903,17 +25282,16 @@
*/
__pyx_v_info->ndim = __pyx_v_ndim;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":213
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":214
* 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.
*/
- __pyx_t_6 = __pyx_v_copy_shape;
- if (__pyx_t_6) {
+ if (__pyx_v_copy_shape) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":216
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":217
* # Allocate new buffer for strides and shape info. This is allocated
* # as one block, strides first.
* info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<<
@@ -23922,7 +25300,7 @@
*/
__pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * __pyx_v_ndim) * 2)));
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":217
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":218
* # as one block, strides first.
* info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
* info.shape = info.strides + ndim # <<<<<<<<<<<<<<
@@ -23931,7 +25309,7 @@
*/
__pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":218
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":219
* info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
* info.shape = info.strides + ndim
* for i in range(ndim): # <<<<<<<<<<<<<<
@@ -23942,7 +25320,7 @@
for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
__pyx_v_i = __pyx_t_7;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":219
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":220
* info.shape = info.strides + ndim
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
@@ -23951,7 +25329,7 @@
*/
(__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))[__pyx_v_i]);
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":220
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":221
* for i in range(ndim):
* info.strides[i] = PyArray_STRIDES(self)[i]
* info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
@@ -23964,7 +25342,7 @@
}
/*else*/ {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":222
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":223
* info.shape[i] = PyArray_DIMS(self)[i]
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
@@ -23973,7 +25351,7 @@
*/
__pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(((PyArrayObject *)__pyx_v_self)));
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":223
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":224
* else:
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
@@ -23984,7 +25362,7 @@
}
__pyx_L8:;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":224
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":225
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL # <<<<<<<<<<<<<<
@@ -23993,7 +25371,7 @@
*/
__pyx_v_info->suboffsets = NULL;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":225
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":226
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
@@ -24002,7 +25380,7 @@
*/
__pyx_v_info->itemsize = PyArray_ITEMSIZE(((PyArrayObject *)__pyx_v_self));
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":226
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":227
* info.suboffsets = NULL
* info.itemsize = PyArray_ITEMSIZE(self)
* info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
@@ -24011,7 +25389,7 @@
*/
__pyx_v_info->readonly = (!PyArray_ISWRITEABLE(((PyArrayObject *)__pyx_v_self)));
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":229
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":230
*
* cdef int t
* cdef char* f = NULL # <<<<<<<<<<<<<<
@@ -24020,7 +25398,7 @@
*/
__pyx_v_f = NULL;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":230
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":231
* cdef int t
* cdef char* f = NULL
* cdef dtype descr = self.descr # <<<<<<<<<<<<<<
@@ -24030,7 +25408,7 @@
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self)->descr));
__pyx_v_descr = ((PyArrayObject *)__pyx_v_self)->descr;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":234
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":235
* cdef int offset
*
* cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<<
@@ -24039,7 +25417,7 @@
*/
__pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":236
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":237
* cdef bint hasfields = PyDataType_HASFIELDS(descr)
*
* if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
@@ -24055,7 +25433,7 @@
}
if (__pyx_t_1) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":238
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":239
* if not hasfields and not copy_shape:
* # do not call releasebuffer
* info.obj = None # <<<<<<<<<<<<<<
@@ -24071,7 +25449,7 @@
}
/*else*/ {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":241
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":242
* else:
* # need to call releasebuffer
* info.obj = self # <<<<<<<<<<<<<<
@@ -24086,7 +25464,7 @@
}
__pyx_L11:;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":243
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":244
* info.obj = self
*
* if not hasfields: # <<<<<<<<<<<<<<
@@ -24096,7 +25474,7 @@
__pyx_t_1 = (!__pyx_v_hasfields);
if (__pyx_t_1) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":244
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":245
*
* if not hasfields:
* t = descr.type_num # <<<<<<<<<<<<<<
@@ -24105,7 +25483,7 @@
*/
__pyx_v_t = __pyx_v_descr->type_num;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":245
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":246
* if not hasfields:
* t = descr.type_num
* if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<<
@@ -24120,7 +25498,7 @@
}
if (!__pyx_t_2) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":246
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":247
* t = descr.type_num
* if ((descr.byteorder == '>' and little_endian) or
* (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -24140,29 +25518,29 @@
}
if (__pyx_t_1) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":247
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":248
* if ((descr.byteorder == '>' and little_endian) or
* (descr.byteorder == '<' 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 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)__pyx_kp_u_9));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_u_9));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_9));
- __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[11]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[10]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L13;
}
__pyx_L13:;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":248
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":249
* (descr.byteorder == '<' and not little_endian)):
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
@@ -24175,7 +25553,7 @@
goto __pyx_L14;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":249
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":250
* raise ValueError(u"Non-native byte order not supported")
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
@@ -24188,7 +25566,7 @@
goto __pyx_L14;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":250
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":251
* if t == NPY_BYTE: f = "b"
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
@@ -24201,7 +25579,7 @@
goto __pyx_L14;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":251
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":252
* elif t == NPY_UBYTE: f = "B"
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
@@ -24214,7 +25592,7 @@
goto __pyx_L14;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":252
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":253
* elif t == NPY_SHORT: f = "h"
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
@@ -24227,7 +25605,7 @@
goto __pyx_L14;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":253
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":254
* elif t == NPY_USHORT: f = "H"
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
@@ -24240,7 +25618,7 @@
goto __pyx_L14;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":254
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":255
* elif t == NPY_INT: f = "i"
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
@@ -24253,7 +25631,7 @@
goto __pyx_L14;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":255
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":256
* elif t == NPY_UINT: f = "I"
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
@@ -24266,7 +25644,7 @@
goto __pyx_L14;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":256
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":257
* elif t == NPY_LONG: f = "l"
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
@@ -24279,7 +25657,7 @@
goto __pyx_L14;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":257
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":258
* elif t == NPY_ULONG: f = "L"
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
@@ -24292,7 +25670,7 @@
goto __pyx_L14;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":258
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":259
* elif t == NPY_LONGLONG: f = "q"
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
@@ -24305,7 +25683,7 @@
goto __pyx_L14;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":259
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":260
* elif t == NPY_ULONGLONG: f = "Q"
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
@@ -24318,7 +25696,7 @@
goto __pyx_L14;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":260
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":261
* elif t == NPY_FLOAT: f = "f"
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
@@ -24331,7 +25709,7 @@
goto __pyx_L14;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":261
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":262
* elif t == NPY_DOUBLE: f = "d"
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
@@ -24344,7 +25722,7 @@
goto __pyx_L14;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":262
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":263
* elif t == NPY_LONGDOUBLE: f = "g"
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
@@ -24357,7 +25735,7 @@
goto __pyx_L14;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":263
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":264
* elif t == NPY_CFLOAT: f = "Zf"
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
@@ -24370,7 +25748,7 @@
goto __pyx_L14;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":264
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":265
* elif t == NPY_CDOUBLE: f = "Zd"
* elif t == NPY_CLONGDOUBLE: f = "Zg"
* elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
@@ -24384,33 +25762,33 @@
}
/*else*/ {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":266
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":267
* elif t == NPY_OBJECT: f = "O"
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
* info.format = f
* return
*/
- __pyx_t_5 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_10), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_10), __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_4));
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
- __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4));
+ __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- {__pyx_filename = __pyx_f[11]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[10]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L14:;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":267
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":268
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f # <<<<<<<<<<<<<<
@@ -24419,7 +25797,7 @@
*/
__pyx_v_info->format = __pyx_v_f;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":268
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":269
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* info.format = f
* return # <<<<<<<<<<<<<<
@@ -24432,7 +25810,7 @@
}
/*else*/ {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":270
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":271
* return
* else:
* info.format = <char*>stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
@@ -24441,7 +25819,7 @@
*/
__pyx_v_info->format = ((char *)malloc(255));
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":271
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":272
* else:
* info.format = <char*>stdlib.malloc(_buffer_format_string_len)
* info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<<
@@ -24450,7 +25828,7 @@
*/
(__pyx_v_info->format[0]) = '^';
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":272
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":273
* info.format = <char*>stdlib.malloc(_buffer_format_string_len)
* info.format[0] = '^' # Native data types, manual alignment
* offset = 0 # <<<<<<<<<<<<<<
@@ -24459,17 +25837,17 @@
*/
__pyx_v_offset = 0;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":275
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":276
* f = _util_dtypestring(descr, info.format + 1,
* info.format + _buffer_format_string_len,
* &offset) # <<<<<<<<<<<<<<
* f[0] = 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[11]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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[10]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_f = __pyx_t_9;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":276
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":277
* info.format + _buffer_format_string_len,
* &offset)
* f[0] = 0 # Terminate format string # <<<<<<<<<<<<<<
@@ -24497,12 +25875,11 @@
}
__pyx_L2:;
__Pyx_XDECREF((PyObject *)__pyx_v_descr);
- __Pyx_DECREF((PyObject *)__pyx_v_self);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":278
+/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":279
* f[0] = 0 # Terminate format string
*
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
@@ -24510,13 +25887,12 @@
* stdlib.free(info.format)
*/
-static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
-static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
+static CYTHON_UNUSED void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
+static CYTHON_UNUSED void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
int __pyx_t_1;
__Pyx_RefNannySetupContext("__releasebuffer__");
- __Pyx_INCREF((PyObject *)__pyx_v_self);
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":279
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":280
*
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
@@ -24526,7 +25902,7 @@
__pyx_t_1 = PyArray_HASFIELDS(((PyArrayObject *)__pyx_v_self));
if (__pyx_t_1) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":280
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":281
* def __releasebuffer__(ndarray self, Py_buffer* info):
* if PyArray_HASFIELDS(self):
* stdlib.free(info.format) # <<<<<<<<<<<<<<
@@ -24538,7 +25914,7 @@
}
__pyx_L5:;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":281
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":282
* if PyArray_HASFIELDS(self):
* stdlib.free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
@@ -24548,7 +25924,7 @@
__pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
if (__pyx_t_1) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":282
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":283
* stdlib.free(info.format)
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
* stdlib.free(info.strides) # <<<<<<<<<<<<<<
@@ -24560,11 +25936,10 @@
}
__pyx_L6:;
- __Pyx_DECREF((PyObject *)__pyx_v_self);
__Pyx_RefNannyFinishContext();
}
-/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":755
+/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":756
* ctypedef npy_cdouble complex_t
*
* cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
@@ -24577,7 +25952,7 @@
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew1");
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":756
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":757
*
* cdef inline object PyArray_MultiIterNew1(a):
* return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
@@ -24585,7 +25960,7 @@
* 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[11]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -24603,7 +25978,7 @@
return __pyx_r;
}
-/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":758
+/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":759
* return PyArray_MultiIterNew(1, <void*>a)
*
* cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
@@ -24616,7 +25991,7 @@
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew2");
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":759
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":760
*
* cdef inline object PyArray_MultiIterNew2(a, b):
* return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
@@ -24624,7 +25999,7 @@
* 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[11]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -24642,7 +26017,7 @@
return __pyx_r;
}
-/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":761
+/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":762
* return PyArray_MultiIterNew(2, <void*>a, <void*>b)
*
* cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
@@ -24655,7 +26030,7 @@
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew3");
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":762
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":763
*
* cdef inline object PyArray_MultiIterNew3(a, b, c):
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
@@ -24663,7 +26038,7 @@
* 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[11]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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[10]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -24681,7 +26056,7 @@
return __pyx_r;
}
-/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":764
+/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":765
* return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
@@ -24694,7 +26069,7 @@
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew4");
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":765
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":766
*
* cdef inline object PyArray_MultiIterNew4(a, b, c, d):
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
@@ -24702,7 +26077,7 @@
* 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[11]; __pyx_lineno = 765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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[10]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -24720,7 +26095,7 @@
return __pyx_r;
}
-/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":767
+/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":768
* return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
@@ -24733,7 +26108,7 @@
PyObject *__pyx_t_1 = NULL;
__Pyx_RefNannySetupContext("PyArray_MultiIterNew5");
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":768
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":769
*
* cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
* return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
@@ -24741,7 +26116,7 @@
* 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[11]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __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[10]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -24759,7 +26134,7 @@
return __pyx_r;
}
-/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":770
+/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":771
* 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: # <<<<<<<<<<<<<<
@@ -24787,14 +26162,13 @@
int __pyx_t_9;
char *__pyx_t_10;
__Pyx_RefNannySetupContext("_util_dtypestring");
- __Pyx_INCREF((PyObject *)__pyx_v_descr);
__pyx_v_child = ((PyArray_Descr *)Py_None); __Pyx_INCREF(Py_None);
__pyx_v_fields = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
__pyx_v_childname = Py_None; __Pyx_INCREF(Py_None);
__pyx_v_new_offset = Py_None; __Pyx_INCREF(Py_None);
__pyx_v_t = Py_None; __Pyx_INCREF(Py_None);
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":777
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":778
* cdef int delta_offset
* cdef tuple i
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
@@ -24803,7 +26177,7 @@
*/
__pyx_v_endian_detector = 1;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":778
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":779
* cdef tuple i
* cdef int endian_detector = 1
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
@@ -24812,7 +26186,7 @@
*/
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":781
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":782
* cdef tuple fields
*
* for childname in descr.names: # <<<<<<<<<<<<<<
@@ -24822,7 +26196,7 @@
if (likely(((PyObject *)__pyx_v_descr->names) != Py_None)) {
__pyx_t_1 = 0; __pyx_t_2 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_2);
} else {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
for (;;) {
if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
@@ -24831,21 +26205,21 @@
__pyx_v_childname = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":782
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":783
*
* 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[11]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 783; __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[11]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ 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[10]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_v_fields));
__pyx_v_fields = ((PyObject *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":783
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":784
* for childname in descr.names:
* fields = descr.fields[childname]
* child, new_offset = fields # <<<<<<<<<<<<<<
@@ -24855,7 +26229,7 @@
if (likely(((PyObject *)__pyx_v_fields) != Py_None) && likely(PyTuple_GET_SIZE(((PyObject *)__pyx_v_fields)) == 2)) {
PyObject* tuple = ((PyObject *)__pyx_v_fields);
__pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
__Pyx_DECREF(((PyObject *)__pyx_v_child));
__pyx_v_child = ((PyArray_Descr *)__pyx_t_3);
@@ -24865,57 +26239,57 @@
__pyx_t_4 = 0;
} else {
__Pyx_UnpackTupleError(((PyObject *)__pyx_v_fields), 2);
- {__pyx_filename = __pyx_f[11]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[10]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":785
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":786
* 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[11]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 786; __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[11]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 786; __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[11]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 786; __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[11]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 786; __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); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":786
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":787
*
* if (end - f) - (new_offset - offset[0]) < 15:
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
*
* if ((child.byteorder == '>' and little_endian) or
*/
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(((PyObject *)__pyx_kp_u_11));
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_kp_u_11));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_11));
- __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- {__pyx_filename = __pyx_f[11]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[10]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L5;
}
__pyx_L5:;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":788
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":789
* raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
*
* if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<<
@@ -24930,7 +26304,7 @@
}
if (!__pyx_t_7) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":789
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":790
*
* if ((child.byteorder == '>' and little_endian) or
* (child.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<<
@@ -24950,29 +26324,29 @@
}
if (__pyx_t_6) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":790
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":791
* if ((child.byteorder == '>' and little_endian) or
* (child.byteorder == '<' 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_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_kp_u_9));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_9));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_9));
- __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[11]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[10]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L6;
}
__pyx_L6:;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":800
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":801
*
* # Output padding bytes
* while offset[0] < new_offset: # <<<<<<<<<<<<<<
@@ -24980,16 +26354,16 @@
* f += 1
*/
while (1) {
- __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 801; __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); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (!__pyx_t_6) break;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":801
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":802
* # Output padding bytes
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
@@ -24998,7 +26372,7 @@
*/
(__pyx_v_f[0]) = 120;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":802
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":803
* while offset[0] < new_offset:
* f[0] = 120 # "x"; pad byte
* f += 1 # <<<<<<<<<<<<<<
@@ -25007,7 +26381,7 @@
*/
__pyx_v_f += 1;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":803
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":804
* f[0] = 120 # "x"; pad byte
* f += 1
* offset[0] += 1 # <<<<<<<<<<<<<<
@@ -25017,7 +26391,7 @@
(__pyx_v_offset[0]) += 1;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":805
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":806
* offset[0] += 1
*
* offset[0] += child.itemsize # <<<<<<<<<<<<<<
@@ -25026,7 +26400,7 @@
*/
(__pyx_v_offset[0]) += __pyx_v_child->elsize;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":807
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":808
* offset[0] += child.itemsize
*
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
@@ -25036,20 +26410,20 @@
__pyx_t_6 = (!PyDataType_HASFIELDS(__pyx_v_child));
if (__pyx_t_6) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":808
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":809
*
* 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[11]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_v_t);
__pyx_v_t = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":809
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":810
* if not PyDataType_HASFIELDS(child):
* t = child.type_num
* if end - f < 5: # <<<<<<<<<<<<<<
@@ -25059,288 +26433,288 @@
__pyx_t_6 = ((__pyx_v_end - __pyx_v_f) < 5);
if (__pyx_t_6) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":810
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":811
* 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 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_kp_u_12));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_kp_u_12));
__Pyx_GIVEREF(((PyObject *)__pyx_kp_u_12));
- __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[11]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[10]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L10;
}
__pyx_L10:;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":813
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":814
*
* # 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_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 814; __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); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 98;
goto __pyx_L11;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":814
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":815
* # 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_3 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 815; __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); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 66;
goto __pyx_L11;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":815
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":816
* 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_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 816; __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); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 104;
goto __pyx_L11;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":816
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":817
* 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_3 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 817; __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); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 72;
goto __pyx_L11;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":817
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":818
* 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_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 818; __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); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 105;
goto __pyx_L11;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":818
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":819
* 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_3 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 819; __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); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 73;
goto __pyx_L11;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":819
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":820
* 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_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 820; __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); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 108;
goto __pyx_L11;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":820
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":821
* 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_3 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 821; __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); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 76;
goto __pyx_L11;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":821
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":822
* 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_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 822; __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); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 113;
goto __pyx_L11;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":822
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":823
* 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_3 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 823; __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); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 81;
goto __pyx_L11;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":823
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":824
* 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_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 824; __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); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 102;
goto __pyx_L11;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":824
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":825
* 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_3 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 825; __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); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 100;
goto __pyx_L11;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":825
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":826
* 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_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 826; __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); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 103;
goto __pyx_L11;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":826
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":827
* 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_3 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 827; __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); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 90;
@@ -25349,19 +26723,19 @@
goto __pyx_L11;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":827
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":828
* 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_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 828; __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); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 90;
@@ -25370,19 +26744,19 @@
goto __pyx_L11;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":828
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":829
* 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_3 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 829; __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); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 90;
@@ -25391,19 +26765,19 @@
goto __pyx_L11;
}
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":829
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":830
* 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_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 830; __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); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_6) {
(__pyx_v_f[0]) = 79;
@@ -25411,30 +26785,30 @@
}
/*else*/ {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":831
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":832
* 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_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_10), __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 831; __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[11]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_10), __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 832; __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);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_3));
+ __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- {__pyx_filename = __pyx_f[11]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[10]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L11:;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":832
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":833
* else:
* raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
* f += 1 # <<<<<<<<<<<<<<
@@ -25446,21 +26820,21 @@
}
/*else*/ {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":836
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":837
* # Cython ignores struct boundary information ("T{...}"),
* # so don't output it
* f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
* return f
*
*/
- __pyx_t_10 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_f = __pyx_t_10;
}
__pyx_L9:;
}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":837
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":838
* # so don't output it
* f = _util_dtypestring(child, f, end, offset)
* return f # <<<<<<<<<<<<<<
@@ -25485,12 +26859,11 @@
__Pyx_DECREF(__pyx_v_childname);
__Pyx_DECREF(__pyx_v_new_offset);
__Pyx_DECREF(__pyx_v_t);
- __Pyx_DECREF((PyObject *)__pyx_v_descr);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":952
+/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":953
*
*
* cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
@@ -25502,10 +26875,8 @@
PyObject *__pyx_v_baseptr;
int __pyx_t_1;
__Pyx_RefNannySetupContext("set_array_base");
- __Pyx_INCREF((PyObject *)__pyx_v_arr);
- __Pyx_INCREF(__pyx_v_base);
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":954
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":955
* cdef inline void set_array_base(ndarray arr, object base):
* cdef PyObject* baseptr
* if base is None: # <<<<<<<<<<<<<<
@@ -25515,7 +26886,7 @@
__pyx_t_1 = (__pyx_v_base == Py_None);
if (__pyx_t_1) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":955
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":956
* cdef PyObject* baseptr
* if base is None:
* baseptr = NULL # <<<<<<<<<<<<<<
@@ -25527,7 +26898,7 @@
}
/*else*/ {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":957
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":958
* baseptr = NULL
* else:
* Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<<
@@ -25536,7 +26907,7 @@
*/
Py_INCREF(__pyx_v_base);
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":958
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":959
* else:
* Py_INCREF(base) # important to do this before decref below!
* baseptr = <PyObject*>base # <<<<<<<<<<<<<<
@@ -25547,7 +26918,7 @@
}
__pyx_L3:;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":959
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":960
* Py_INCREF(base) # important to do this before decref below!
* baseptr = <PyObject*>base
* Py_XDECREF(arr.base) # <<<<<<<<<<<<<<
@@ -25556,7 +26927,7 @@
*/
Py_XDECREF(__pyx_v_arr->base);
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":960
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":961
* baseptr = <PyObject*>base
* Py_XDECREF(arr.base)
* arr.base = baseptr # <<<<<<<<<<<<<<
@@ -25565,12 +26936,10 @@
*/
__pyx_v_arr->base = __pyx_v_baseptr;
- __Pyx_DECREF((PyObject *)__pyx_v_arr);
- __Pyx_DECREF(__pyx_v_base);
__Pyx_RefNannyFinishContext();
}
-/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":962
+/* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":963
* arr.base = baseptr
*
* cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
@@ -25582,9 +26951,8 @@
PyObject *__pyx_r = NULL;
int __pyx_t_1;
__Pyx_RefNannySetupContext("get_array_base");
- __Pyx_INCREF((PyObject *)__pyx_v_arr);
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":963
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":964
*
* cdef inline object get_array_base(ndarray arr):
* if arr.base is NULL: # <<<<<<<<<<<<<<
@@ -25594,7 +26962,7 @@
__pyx_t_1 = (__pyx_v_arr->base == NULL);
if (__pyx_t_1) {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":964
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":965
* cdef inline object get_array_base(ndarray arr):
* if arr.base is NULL:
* return None # <<<<<<<<<<<<<<
@@ -25609,7 +26977,7 @@
}
/*else*/ {
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":966
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":967
* return None
* else:
* return <object>arr.base # <<<<<<<<<<<<<<
@@ -25623,7 +26991,6 @@
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
__pyx_L0:;
- __Pyx_DECREF((PyObject *)__pyx_v_arr);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
@@ -25642,13 +27009,41 @@
(*Py_TYPE(o)->tp_free)(o);
}
-static struct PyMethodDef __pyx_methods_2yt_9amr_utils_position[] = {
+static PyObject *__pyx_getprop_2yt_9amr_utils_8position_output_pos(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_8position_10output_pos___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_8position_output_pos(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_8position_10output_pos___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_8position_refined_pos(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_8position_11refined_pos___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_8position_refined_pos(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_8position_11refined_pos___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyMethodDef __pyx_methods_2yt_9amr_utils_position[] = {
{0, 0, 0, 0}
};
-static struct PyMemberDef __pyx_members_2yt_9amr_utils_position[] = {
- {(char *)"output_pos", T_INT, offsetof(struct __pyx_obj_2yt_9amr_utils_position, output_pos), 0, 0},
- {(char *)"refined_pos", T_INT, offsetof(struct __pyx_obj_2yt_9amr_utils_position, refined_pos), 0, 0},
+static struct PyGetSetDef __pyx_getsets_2yt_9amr_utils_position[] = {
+ {(char *)"output_pos", __pyx_getprop_2yt_9amr_utils_8position_output_pos, __pyx_setprop_2yt_9amr_utils_8position_output_pos, 0, 0},
+ {(char *)"refined_pos", __pyx_getprop_2yt_9amr_utils_8position_refined_pos, __pyx_setprop_2yt_9amr_utils_8position_refined_pos, 0, 0},
{0, 0, 0, 0, 0}
};
@@ -25759,7 +27154,11 @@
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*reserved*/
+ #else
0, /*tp_compare*/
+ #endif
0, /*tp_repr*/
&__pyx_tp_as_number_position, /*tp_as_number*/
&__pyx_tp_as_sequence_position, /*tp_as_sequence*/
@@ -25779,8 +27178,8 @@
0, /*tp_iter*/
0, /*tp_iternext*/
__pyx_methods_2yt_9amr_utils_position, /*tp_methods*/
- __pyx_members_2yt_9amr_utils_position, /*tp_members*/
- 0, /*tp_getset*/
+ 0, /*tp_members*/
+ __pyx_getsets_2yt_9amr_utils_position, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -25870,17 +27269,96 @@
return 0;
}
-static struct PyMethodDef __pyx_methods_2yt_9amr_utils_OctreeGrid[] = {
+static PyObject *__pyx_getprop_2yt_9amr_utils_10OctreeGrid_child_indices(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_13child_indices___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_10OctreeGrid_child_indices(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_13child_indices___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_13child_indices___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_10OctreeGrid_fields(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_6fields___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_10OctreeGrid_fields(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_6fields___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_6fields___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_10OctreeGrid_left_edges(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_10left_edges___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_10OctreeGrid_left_edges(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_10left_edges___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_10left_edges___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_10OctreeGrid_dimensions(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_10dimensions___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_10OctreeGrid_dimensions(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_10dimensions___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_10dimensions___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_10OctreeGrid_dx(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_2dx___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_10OctreeGrid_dx(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_2dx___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_2dx___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_10OctreeGrid_level(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_5level___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_10OctreeGrid_level(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_10OctreeGrid_5level___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyMethodDef __pyx_methods_2yt_9amr_utils_OctreeGrid[] = {
{0, 0, 0, 0}
};
-static struct PyMemberDef __pyx_members_2yt_9amr_utils_OctreeGrid[] = {
- {(char *)"child_indices", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_OctreeGrid, child_indices), 0, 0},
- {(char *)"fields", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_OctreeGrid, fields), 0, 0},
- {(char *)"left_edges", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_OctreeGrid, left_edges), 0, 0},
- {(char *)"dimensions", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_OctreeGrid, dimensions), 0, 0},
- {(char *)"dx", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_OctreeGrid, dx), 0, 0},
- {(char *)"level", T_INT, offsetof(struct __pyx_obj_2yt_9amr_utils_OctreeGrid, level), 0, 0},
+static struct PyGetSetDef __pyx_getsets_2yt_9amr_utils_OctreeGrid[] = {
+ {(char *)"child_indices", __pyx_getprop_2yt_9amr_utils_10OctreeGrid_child_indices, __pyx_setprop_2yt_9amr_utils_10OctreeGrid_child_indices, 0, 0},
+ {(char *)"fields", __pyx_getprop_2yt_9amr_utils_10OctreeGrid_fields, __pyx_setprop_2yt_9amr_utils_10OctreeGrid_fields, 0, 0},
+ {(char *)"left_edges", __pyx_getprop_2yt_9amr_utils_10OctreeGrid_left_edges, __pyx_setprop_2yt_9amr_utils_10OctreeGrid_left_edges, 0, 0},
+ {(char *)"dimensions", __pyx_getprop_2yt_9amr_utils_10OctreeGrid_dimensions, __pyx_setprop_2yt_9amr_utils_10OctreeGrid_dimensions, 0, 0},
+ {(char *)"dx", __pyx_getprop_2yt_9amr_utils_10OctreeGrid_dx, __pyx_setprop_2yt_9amr_utils_10OctreeGrid_dx, 0, 0},
+ {(char *)"level", __pyx_getprop_2yt_9amr_utils_10OctreeGrid_level, __pyx_setprop_2yt_9amr_utils_10OctreeGrid_level, 0, 0},
{0, 0, 0, 0, 0}
};
@@ -25991,7 +27469,11 @@
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*reserved*/
+ #else
0, /*tp_compare*/
+ #endif
0, /*tp_repr*/
&__pyx_tp_as_number_OctreeGrid, /*tp_as_number*/
&__pyx_tp_as_sequence_OctreeGrid, /*tp_as_sequence*/
@@ -26011,8 +27493,8 @@
0, /*tp_iter*/
0, /*tp_iternext*/
__pyx_methods_2yt_9amr_utils_OctreeGrid, /*tp_methods*/
- __pyx_members_2yt_9amr_utils_OctreeGrid, /*tp_members*/
- 0, /*tp_getset*/
+ 0, /*tp_members*/
+ __pyx_getsets_2yt_9amr_utils_OctreeGrid, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -26077,13 +27559,26 @@
return r;
}
-static struct PyMethodDef __pyx_methods_2yt_9amr_utils_OctreeGridList[] = {
+static PyObject *__pyx_getprop_2yt_9amr_utils_14OctreeGridList_grids(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_14OctreeGridList_5grids___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_14OctreeGridList_grids(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_14OctreeGridList_5grids___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_14OctreeGridList_5grids___del__(o);
+ }
+}
+
+static PyMethodDef __pyx_methods_2yt_9amr_utils_OctreeGridList[] = {
{__Pyx_NAMESTR("__getitem__"), (PyCFunction)__pyx_pf_2yt_9amr_utils_14OctreeGridList___getitem__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static struct PyMemberDef __pyx_members_2yt_9amr_utils_OctreeGridList[] = {
- {(char *)"grids", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_OctreeGridList, grids), 0, 0},
+static struct PyGetSetDef __pyx_getsets_2yt_9amr_utils_OctreeGridList[] = {
+ {(char *)"grids", __pyx_getprop_2yt_9amr_utils_14OctreeGridList_grids, __pyx_setprop_2yt_9amr_utils_14OctreeGridList_grids, 0, 0},
{0, 0, 0, 0, 0}
};
@@ -26194,7 +27689,11 @@
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*reserved*/
+ #else
0, /*tp_compare*/
+ #endif
0, /*tp_repr*/
&__pyx_tp_as_number_OctreeGridList, /*tp_as_number*/
&__pyx_tp_as_sequence_OctreeGridList, /*tp_as_sequence*/
@@ -26214,8 +27713,8 @@
0, /*tp_iter*/
0, /*tp_iternext*/
__pyx_methods_2yt_9amr_utils_OctreeGridList, /*tp_methods*/
- __pyx_members_2yt_9amr_utils_OctreeGridList, /*tp_members*/
- 0, /*tp_getset*/
+ 0, /*tp_members*/
+ __pyx_getsets_2yt_9amr_utils_OctreeGridList, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -26315,17 +27814,95 @@
return 0;
}
-static struct PyMethodDef __pyx_methods_2yt_9amr_utils_VectorPlane[] = {
+static PyObject *__pyx_getprop_2yt_9amr_utils_11VectorPlane_avp_pos(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_pos___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_11VectorPlane_avp_pos(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_pos___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_pos___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_11VectorPlane_avp_dir(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_dir___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_11VectorPlane_avp_dir(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_dir___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_7avp_dir___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_11VectorPlane_acenter(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_7acenter___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_11VectorPlane_acenter(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_7acenter___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_7acenter___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_11VectorPlane_aimage(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_6aimage___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_11VectorPlane_aimage(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_6aimage___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_6aimage___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_11VectorPlane_ax_vec(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_6ax_vec___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_11VectorPlane_ax_vec(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_6ax_vec___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_6ax_vec___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_11VectorPlane_ay_vec(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_6ay_vec___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_11VectorPlane_ay_vec(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_6ay_vec___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_11VectorPlane_6ay_vec___del__(o);
+ }
+}
+
+static PyMethodDef __pyx_methods_2yt_9amr_utils_VectorPlane[] = {
{0, 0, 0, 0}
};
-static struct PyMemberDef __pyx_members_2yt_9amr_utils_VectorPlane[] = {
- {(char *)"avp_pos", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_VectorPlane, avp_pos), 0, 0},
- {(char *)"avp_dir", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_VectorPlane, avp_dir), 0, 0},
- {(char *)"acenter", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_VectorPlane, acenter), 0, 0},
- {(char *)"aimage", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_VectorPlane, aimage), 0, 0},
- {(char *)"ax_vec", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_VectorPlane, ax_vec), 0, 0},
- {(char *)"ay_vec", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_VectorPlane, ay_vec), 0, 0},
+static struct PyGetSetDef __pyx_getsets_2yt_9amr_utils_VectorPlane[] = {
+ {(char *)"avp_pos", __pyx_getprop_2yt_9amr_utils_11VectorPlane_avp_pos, __pyx_setprop_2yt_9amr_utils_11VectorPlane_avp_pos, 0, 0},
+ {(char *)"avp_dir", __pyx_getprop_2yt_9amr_utils_11VectorPlane_avp_dir, __pyx_setprop_2yt_9amr_utils_11VectorPlane_avp_dir, 0, 0},
+ {(char *)"acenter", __pyx_getprop_2yt_9amr_utils_11VectorPlane_acenter, __pyx_setprop_2yt_9amr_utils_11VectorPlane_acenter, 0, 0},
+ {(char *)"aimage", __pyx_getprop_2yt_9amr_utils_11VectorPlane_aimage, __pyx_setprop_2yt_9amr_utils_11VectorPlane_aimage, 0, 0},
+ {(char *)"ax_vec", __pyx_getprop_2yt_9amr_utils_11VectorPlane_ax_vec, __pyx_setprop_2yt_9amr_utils_11VectorPlane_ax_vec, 0, 0},
+ {(char *)"ay_vec", __pyx_getprop_2yt_9amr_utils_11VectorPlane_ay_vec, __pyx_setprop_2yt_9amr_utils_11VectorPlane_ay_vec, 0, 0},
{0, 0, 0, 0, 0}
};
@@ -26436,7 +28013,11 @@
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*reserved*/
+ #else
0, /*tp_compare*/
+ #endif
0, /*tp_repr*/
&__pyx_tp_as_number_VectorPlane, /*tp_as_number*/
&__pyx_tp_as_sequence_VectorPlane, /*tp_as_sequence*/
@@ -26456,8 +28037,8 @@
0, /*tp_iter*/
0, /*tp_iternext*/
__pyx_methods_2yt_9amr_utils_VectorPlane, /*tp_methods*/
- __pyx_members_2yt_9amr_utils_VectorPlane, /*tp_members*/
- 0, /*tp_getset*/
+ 0, /*tp_members*/
+ __pyx_getsets_2yt_9amr_utils_VectorPlane, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -26525,14 +28106,54 @@
return 0;
}
-static struct PyMethodDef __pyx_methods_2yt_9amr_utils_TransferFunctionProxy[] = {
+static PyObject *__pyx_getprop_2yt_9amr_utils_21TransferFunctionProxy_ns(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_2ns___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_21TransferFunctionProxy_ns(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_2ns___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_21TransferFunctionProxy_tf_obj(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_6tf_obj___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_21TransferFunctionProxy_tf_obj(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_6tf_obj___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_6tf_obj___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_21TransferFunctionProxy_my_field_tables(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_15my_field_tables___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_21TransferFunctionProxy_my_field_tables(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_15my_field_tables___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_21TransferFunctionProxy_15my_field_tables___del__(o);
+ }
+}
+
+static PyMethodDef __pyx_methods_2yt_9amr_utils_TransferFunctionProxy[] = {
{0, 0, 0, 0}
};
-static struct PyMemberDef __pyx_members_2yt_9amr_utils_TransferFunctionProxy[] = {
- {(char *)"ns", T_INT, offsetof(struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy, ns), 0, 0},
- {(char *)"tf_obj", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy, tf_obj), 0, 0},
- {(char *)"my_field_tables", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy, my_field_tables), 0, 0},
+static struct PyGetSetDef __pyx_getsets_2yt_9amr_utils_TransferFunctionProxy[] = {
+ {(char *)"ns", __pyx_getprop_2yt_9amr_utils_21TransferFunctionProxy_ns, __pyx_setprop_2yt_9amr_utils_21TransferFunctionProxy_ns, 0, 0},
+ {(char *)"tf_obj", __pyx_getprop_2yt_9amr_utils_21TransferFunctionProxy_tf_obj, __pyx_setprop_2yt_9amr_utils_21TransferFunctionProxy_tf_obj, 0, 0},
+ {(char *)"my_field_tables", __pyx_getprop_2yt_9amr_utils_21TransferFunctionProxy_my_field_tables, __pyx_setprop_2yt_9amr_utils_21TransferFunctionProxy_my_field_tables, 0, 0},
{0, 0, 0, 0, 0}
};
@@ -26643,7 +28264,11 @@
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*reserved*/
+ #else
0, /*tp_compare*/
+ #endif
0, /*tp_repr*/
&__pyx_tp_as_number_TransferFunctionProxy, /*tp_as_number*/
&__pyx_tp_as_sequence_TransferFunctionProxy, /*tp_as_sequence*/
@@ -26663,8 +28288,8 @@
0, /*tp_iter*/
0, /*tp_iternext*/
__pyx_methods_2yt_9amr_utils_TransferFunctionProxy, /*tp_methods*/
- __pyx_members_2yt_9amr_utils_TransferFunctionProxy, /*tp_members*/
- 0, /*tp_getset*/
+ 0, /*tp_members*/
+ __pyx_getsets_2yt_9amr_utils_TransferFunctionProxy, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -26719,38 +28344,105 @@
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->RightEdge) {
+ e = (*v)(p->RightEdge, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_2yt_9amr_utils_PartitionedGrid(PyObject *o) {
+ struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *p = (struct __pyx_obj_2yt_9amr_utils_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_9amr_utils_15PartitionedGrid_my_data(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_15PartitionedGrid_7my_data___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_15PartitionedGrid_my_data(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_15PartitionedGrid_7my_data___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_15PartitionedGrid_7my_data___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_15PartitionedGrid_LeftEdge(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_15PartitionedGrid_8LeftEdge___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_15PartitionedGrid_LeftEdge(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_15PartitionedGrid_8LeftEdge___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_15PartitionedGrid_8LeftEdge___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_15PartitionedGrid_RightEdge(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_15PartitionedGrid_9RightEdge___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_15PartitionedGrid_RightEdge(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_15PartitionedGrid_9RightEdge___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_15PartitionedGrid_9RightEdge___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_15PartitionedGrid_parent_grid_id(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_15PartitionedGrid_14parent_grid_id___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_15PartitionedGrid_parent_grid_id(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_15PartitionedGrid_14parent_grid_id___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
}
- return 0;
}
-static int __pyx_tp_clear_2yt_9amr_utils_PartitionedGrid(PyObject *o) {
- struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *p = (struct __pyx_obj_2yt_9amr_utils_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_9amr_utils_15PartitionedGrid_n_fields(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_15PartitionedGrid_8n_fields___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_15PartitionedGrid_n_fields(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_15PartitionedGrid_8n_fields___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
}
-static struct PyMethodDef __pyx_methods_2yt_9amr_utils_PartitionedGrid[] = {
+static PyMethodDef __pyx_methods_2yt_9amr_utils_PartitionedGrid[] = {
{__Pyx_NAMESTR("cast_plane"), (PyCFunction)__pyx_pf_2yt_9amr_utils_15PartitionedGrid_cast_plane, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static struct PyMemberDef __pyx_members_2yt_9amr_utils_PartitionedGrid[] = {
- {(char *)"my_data", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_PartitionedGrid, my_data), 0, 0},
- {(char *)"LeftEdge", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_PartitionedGrid, LeftEdge), 0, 0},
- {(char *)"RightEdge", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_PartitionedGrid, RightEdge), 0, 0},
- {(char *)"parent_grid_id", T_INT, offsetof(struct __pyx_obj_2yt_9amr_utils_PartitionedGrid, parent_grid_id), 0, 0},
- {(char *)"n_fields", T_INT, offsetof(struct __pyx_obj_2yt_9amr_utils_PartitionedGrid, n_fields), 0, 0},
+static struct PyGetSetDef __pyx_getsets_2yt_9amr_utils_PartitionedGrid[] = {
+ {(char *)"my_data", __pyx_getprop_2yt_9amr_utils_15PartitionedGrid_my_data, __pyx_setprop_2yt_9amr_utils_15PartitionedGrid_my_data, 0, 0},
+ {(char *)"LeftEdge", __pyx_getprop_2yt_9amr_utils_15PartitionedGrid_LeftEdge, __pyx_setprop_2yt_9amr_utils_15PartitionedGrid_LeftEdge, 0, 0},
+ {(char *)"RightEdge", __pyx_getprop_2yt_9amr_utils_15PartitionedGrid_RightEdge, __pyx_setprop_2yt_9amr_utils_15PartitionedGrid_RightEdge, 0, 0},
+ {(char *)"parent_grid_id", __pyx_getprop_2yt_9amr_utils_15PartitionedGrid_parent_grid_id, __pyx_setprop_2yt_9amr_utils_15PartitionedGrid_parent_grid_id, 0, 0},
+ {(char *)"n_fields", __pyx_getprop_2yt_9amr_utils_15PartitionedGrid_n_fields, __pyx_setprop_2yt_9amr_utils_15PartitionedGrid_n_fields, 0, 0},
{0, 0, 0, 0, 0}
};
@@ -26861,7 +28553,11 @@
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*reserved*/
+ #else
0, /*tp_compare*/
+ #endif
0, /*tp_repr*/
&__pyx_tp_as_number_PartitionedGrid, /*tp_as_number*/
&__pyx_tp_as_sequence_PartitionedGrid, /*tp_as_sequence*/
@@ -26881,8 +28577,8 @@
0, /*tp_iter*/
0, /*tp_iternext*/
__pyx_methods_2yt_9amr_utils_PartitionedGrid, /*tp_methods*/
- __pyx_members_2yt_9amr_utils_PartitionedGrid, /*tp_members*/
- 0, /*tp_getset*/
+ 0, /*tp_members*/
+ __pyx_getsets_2yt_9amr_utils_PartitionedGrid, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -26918,12 +28614,26 @@
(*Py_TYPE(o)->tp_free)(o);
}
-static struct PyMethodDef __pyx_methods_2yt_9amr_utils_GridFace[] = {
+static PyObject *__pyx_getprop_2yt_9amr_utils_8GridFace_coord(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_8GridFace_5coord___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_8GridFace_coord(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_8GridFace_5coord___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyMethodDef __pyx_methods_2yt_9amr_utils_GridFace[] = {
{0, 0, 0, 0}
};
-static struct PyMemberDef __pyx_members_2yt_9amr_utils_GridFace[] = {
- {(char *)"coord", __Pyx_T_FLOATING(npy_float64), offsetof(struct __pyx_obj_2yt_9amr_utils_GridFace, coord), 0, 0},
+static struct PyGetSetDef __pyx_getsets_2yt_9amr_utils_GridFace[] = {
+ {(char *)"coord", __pyx_getprop_2yt_9amr_utils_8GridFace_coord, __pyx_setprop_2yt_9amr_utils_8GridFace_coord, 0, 0},
{0, 0, 0, 0, 0}
};
@@ -27034,7 +28744,11 @@
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*reserved*/
+ #else
0, /*tp_compare*/
+ #endif
0, /*tp_repr*/
&__pyx_tp_as_number_GridFace, /*tp_as_number*/
&__pyx_tp_as_sequence_GridFace, /*tp_as_sequence*/
@@ -27054,8 +28768,8 @@
0, /*tp_iter*/
0, /*tp_iternext*/
__pyx_methods_2yt_9amr_utils_GridFace, /*tp_methods*/
- __pyx_members_2yt_9amr_utils_GridFace, /*tp_members*/
- 0, /*tp_getset*/
+ 0, /*tp_members*/
+ __pyx_getsets_2yt_9amr_utils_GridFace, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -27131,17 +28845,70 @@
return 0;
}
-static struct PyMethodDef __pyx_methods_2yt_9amr_utils_ProtoPrism[] = {
+static PyObject *__pyx_getprop_2yt_9amr_utils_10ProtoPrism_LeftEdge(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_10ProtoPrism_8LeftEdge___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_10ProtoPrism_LeftEdge(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_10ProtoPrism_8LeftEdge___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_10ProtoPrism_8LeftEdge___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_10ProtoPrism_RightEdge(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_10ProtoPrism_9RightEdge___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_10ProtoPrism_RightEdge(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_10ProtoPrism_9RightEdge___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_10ProtoPrism_9RightEdge___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_10ProtoPrism_subgrid_faces(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_10ProtoPrism_13subgrid_faces___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_10ProtoPrism_subgrid_faces(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_10ProtoPrism_13subgrid_faces___set__(o, v);
+ }
+ else {
+ return __pyx_pf_2yt_9amr_utils_10ProtoPrism_13subgrid_faces___del__(o);
+ }
+}
+
+static PyObject *__pyx_getprop_2yt_9amr_utils_10ProtoPrism_parent_grid_id(PyObject *o, void *x) {
+ return __pyx_pf_2yt_9amr_utils_10ProtoPrism_14parent_grid_id___get__(o);
+}
+
+static int __pyx_setprop_2yt_9amr_utils_10ProtoPrism_parent_grid_id(PyObject *o, PyObject *v, void *x) {
+ if (v) {
+ return __pyx_pf_2yt_9amr_utils_10ProtoPrism_14parent_grid_id___set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyMethodDef __pyx_methods_2yt_9amr_utils_ProtoPrism[] = {
{__Pyx_NAMESTR("sweep"), (PyCFunction)__pyx_pf_2yt_9amr_utils_10ProtoPrism_sweep, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{__Pyx_NAMESTR("get_brick"), (PyCFunction)__pyx_pf_2yt_9amr_utils_10ProtoPrism_get_brick, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static struct PyMemberDef __pyx_members_2yt_9amr_utils_ProtoPrism[] = {
- {(char *)"LeftEdge", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_ProtoPrism, LeftEdge), 0, 0},
- {(char *)"RightEdge", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_ProtoPrism, RightEdge), 0, 0},
- {(char *)"subgrid_faces", T_OBJECT, offsetof(struct __pyx_obj_2yt_9amr_utils_ProtoPrism, subgrid_faces), 0, 0},
- {(char *)"parent_grid_id", T_INT, offsetof(struct __pyx_obj_2yt_9amr_utils_ProtoPrism, parent_grid_id), 0, 0},
+static struct PyGetSetDef __pyx_getsets_2yt_9amr_utils_ProtoPrism[] = {
+ {(char *)"LeftEdge", __pyx_getprop_2yt_9amr_utils_10ProtoPrism_LeftEdge, __pyx_setprop_2yt_9amr_utils_10ProtoPrism_LeftEdge, 0, 0},
+ {(char *)"RightEdge", __pyx_getprop_2yt_9amr_utils_10ProtoPrism_RightEdge, __pyx_setprop_2yt_9amr_utils_10ProtoPrism_RightEdge, 0, 0},
+ {(char *)"subgrid_faces", __pyx_getprop_2yt_9amr_utils_10ProtoPrism_subgrid_faces, __pyx_setprop_2yt_9amr_utils_10ProtoPrism_subgrid_faces, 0, 0},
+ {(char *)"parent_grid_id", __pyx_getprop_2yt_9amr_utils_10ProtoPrism_parent_grid_id, __pyx_setprop_2yt_9amr_utils_10ProtoPrism_parent_grid_id, 0, 0},
{0, 0, 0, 0, 0}
};
@@ -27252,7 +29019,11 @@
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*reserved*/
+ #else
0, /*tp_compare*/
+ #endif
0, /*tp_repr*/
&__pyx_tp_as_number_ProtoPrism, /*tp_as_number*/
&__pyx_tp_as_sequence_ProtoPrism, /*tp_as_sequence*/
@@ -27272,8 +29043,8 @@
0, /*tp_iter*/
0, /*tp_iternext*/
__pyx_methods_2yt_9amr_utils_ProtoPrism, /*tp_methods*/
- __pyx_members_2yt_9amr_utils_ProtoPrism, /*tp_members*/
- 0, /*tp_getset*/
+ 0, /*tp_members*/
+ __pyx_getsets_2yt_9amr_utils_ProtoPrism, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
@@ -27321,7 +29092,7 @@
(*Py_TYPE(o)->tp_free)(o);
}
-static struct PyMethodDef __pyx_methods_2yt_9amr_utils_QuadTree[] = {
+static PyMethodDef __pyx_methods_2yt_9amr_utils_QuadTree[] = {
{__Pyx_NAMESTR("add_array_to_tree"), (PyCFunction)__pyx_pf_2yt_9amr_utils_8QuadTree_add_array_to_tree, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{__Pyx_NAMESTR("add_grid_to_tree"), (PyCFunction)__pyx_pf_2yt_9amr_utils_8QuadTree_add_grid_to_tree, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{__Pyx_NAMESTR("get_all_from_level"), (PyCFunction)__pyx_pf_2yt_9amr_utils_8QuadTree_get_all_from_level, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
@@ -27435,7 +29206,11 @@
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*reserved*/
+ #else
0, /*tp_compare*/
+ #endif
0, /*tp_repr*/
&__pyx_tp_as_number_QuadTree, /*tp_as_number*/
&__pyx_tp_as_sequence_QuadTree, /*tp_as_sequence*/
@@ -27478,7 +29253,7 @@
#endif
};
-static struct PyMethodDef __pyx_methods[] = {
+static PyMethodDef __pyx_methods[] = {
{__Pyx_NAMESTR("RecurseOctreeDepthFirst"), (PyCFunction)__pyx_pf_2yt_9amr_utils_RecurseOctreeDepthFirst, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{__Pyx_NAMESTR("RecurseOctreeByLevels"), (PyCFunction)__pyx_pf_2yt_9amr_utils_RecurseOctreeByLevels, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{__Pyx_NAMESTR("UnilinearlyInterpolate"), (PyCFunction)__pyx_pf_2yt_9amr_utils_UnilinearlyInterpolate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
@@ -27503,8 +29278,6 @@
{0, 0, 0, 0}
};
-static void __pyx_init_filenames(void); /*proto*/
-
#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
PyModuleDef_HEAD_INIT,
@@ -27769,7 +29542,7 @@
__pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
__pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 608; __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[11]; __pyx_lineno = 205; __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[10]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
return 0;
__pyx_L1_error:;
return -1;
@@ -27777,15 +29550,14 @@
static int __Pyx_InitGlobals(void) {
#if PY_VERSION_HEX < 0x02040000
- if (unlikely(__Pyx_Py23SetsImport() < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_Py23SetsImport() < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[7]; __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[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[7]; __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[7]; __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[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[7]; __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[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[11]; __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[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[11]; __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[11]; __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[11]; __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[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
return 0;
__pyx_L1_error:;
return -1;
@@ -27813,12 +29585,10 @@
}
__pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_amr_utils(void)", __LINE__, __FILE__);
#endif
- __pyx_init_filenames();
- __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #if PY_MAJOR_VERSION < 3
- __pyx_empty_bytes = PyString_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[7]; __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[11]; __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[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ #ifdef __pyx_binding_PyCFunctionType_USED
+ if (__pyx_binding_PyCFunctionType_init() < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
/*--- Library function declarations ---*/
/*--- Threads initialization code ---*/
@@ -27833,20 +29603,20 @@
#else
__pyx_m = PyModule_Create(&__pyx_moduledef);
#endif
- if (!__pyx_m) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ if (!__pyx_m) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
#if PY_MAJOR_VERSION < 3
Py_INCREF(__pyx_m);
#endif
__pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
- if (!__pyx_b) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ if (!__pyx_b) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
/*--- Initialize various global constants etc. ---*/
- if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_module_is_main_yt__amr_utils) {
- if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
}
/*--- Builtin init code ---*/
- if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/*--- Global init code ---*/
/*--- Function export code ---*/
/*--- Type init code ---*/
@@ -27929,16 +29699,16 @@
*(void(**)(void))&__pyx_vtable_2yt_9amr_utils_QuadTree.count_at_level = (void(*)(void))__pyx_f_2yt_9amr_utils_8QuadTree_count_at_level;
*(void(**)(void))&__pyx_vtable_2yt_9amr_utils_QuadTree.fill_from_level = (void(*)(void))__pyx_f_2yt_9amr_utils_8QuadTree_fill_from_level;
#endif
- if (PyType_Ready(&__pyx_type_2yt_9amr_utils_QuadTree) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetVtable(__pyx_type_2yt_9amr_utils_QuadTree.tp_dict, __pyx_vtabptr_2yt_9amr_utils_QuadTree) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "QuadTree", (PyObject *)&__pyx_type_2yt_9amr_utils_QuadTree) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_2yt_9amr_utils_QuadTree) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_2yt_9amr_utils_QuadTree.tp_dict, __pyx_vtabptr_2yt_9amr_utils_QuadTree) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "QuadTree", (PyObject *)&__pyx_type_2yt_9amr_utils_QuadTree) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_2yt_9amr_utils_QuadTree = &__pyx_type_2yt_9amr_utils_QuadTree;
/*--- Type import code ---*/
- __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 148; __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[11]; __pyx_lineno = 158; __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[11]; __pyx_lineno = 162; __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[11]; __pyx_lineno = 171; __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[11]; __pyx_lineno = 848; __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[10]; __pyx_lineno = 149; __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[10]; __pyx_lineno = 159; __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[10]; __pyx_lineno = 163; __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[10]; __pyx_lineno = 172; __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[10]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/*--- Function import code ---*/
/*--- Execution code ---*/
@@ -27949,9 +29719,9 @@
* cimport numpy as np
* cimport cython
*/
- __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 32; __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[7]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":26
@@ -28027,9 +29797,9 @@
* A light interface to libpng
*
*/
- __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __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[8]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":26
@@ -28039,9 +29809,9 @@
* cimport numpy as np
* cimport cython
*/
- __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __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[9]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":27
@@ -28051,9 +29821,9 @@
* cimport numpy as np
* # Double up here for def'd functions
*/
- __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 27; __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[10]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "/Users/matthewturk/Development/yt/trunk/yt/amr_utils.pyx":1
@@ -28061,30 +29831,31 @@
* Container file to hold all our Cython routines. This is to avoid problems with
* static linking.
*/
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
- __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Transfer3D); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyObject_GetAttr(__pyx_m, __pyx_n_s__Transfer3D); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_2, "__doc__");
+ __pyx_t_3 = __Pyx_GetAttrString(__pyx_t_2, "__doc__"); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_14), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_14), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__TransferShells); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_GetAttr(__pyx_m, __pyx_n_s__TransferShells); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__");
+ __pyx_t_2 = __Pyx_GetAttrString(__pyx_t_3, "__doc__"); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_15), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_kp_u_15), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/stdlib.pxd":2
+ /* "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Cython/Includes/numpy.pxd":963
+ * arr.base = baseptr
*
- * cdef extern from "stdlib.h" nogil: # <<<<<<<<<<<<<<
- * void free(void *ptr)
- * void *malloc(size_t size)
+ * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
+ * if arr.base is NULL:
+ * return None
*/
goto __pyx_L0;
__pyx_L1_error:;
@@ -28106,25 +29877,14 @@
#endif
}
-static const char *__pyx_filenames[] = {
- "DepthFirstOctree.pyx",
- "PointsInVolume.pyx",
- "VolumeIntegrator.pyx",
- "Interpolators.pyx",
- "RayIntegrators.pyx",
- "CICDeposit.pyx",
- "ContourFinding.pyx",
- "amr_utils.pyx",
- "png_writer.pyx",
- "fortran_reader.pyx",
- "QuadTree.pyx",
- "numpy.pxd",
-};
-
/* Runtime support code */
-static void __pyx_init_filenames(void) {
- __pyx_f = __pyx_filenames;
+static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
+ PyObject *result;
+ result = PyObject_GetAttr(dict, name);
+ if (!result)
+ PyErr_SetObject(PyExc_NameError, name);
+ return result;
}
static void __Pyx_RaiseArgtupleInvalid(
@@ -28283,6 +30043,26 @@
return -1;
}
+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_IsLittleEndian(void) {
unsigned int n = 1;
return *(unsigned char*)(&n) != 0;
@@ -28688,7 +30468,7 @@
buf->suboffsets = __Pyx_minusones;
}
-static int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) {
+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) {
__Pyx_ZeroBuffer(buf);
return 0;
@@ -28778,6 +30558,19 @@
}
+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 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 void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
PyErr_Format(PyExc_ValueError,
#if PY_VERSION_HEX < 0x02050000
@@ -28788,8 +30581,13 @@
(index == 1) ? "" : "s");
}
-static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void) {
- PyErr_SetString(PyExc_ValueError, "too many values to unpack");
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
+ PyErr_Format(PyExc_ValueError,
+ #if PY_VERSION_HEX < 0x02050000
+ "too many values to unpack (expected %d)", (int)expected);
+ #else
+ "too many values to unpack (expected %zd)", expected);
+ #endif
}
static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
@@ -28802,11 +30600,11 @@
return item;
}
-static int __Pyx_EndUnpack(PyObject *iter) {
+static int __Pyx_EndUnpack(PyObject *iter, Py_ssize_t expected) {
PyObject *item;
if ((item = PyIter_Next(iter))) {
Py_DECREF(item);
- __Pyx_RaiseTooManyValuesError();
+ __Pyx_RaiseTooManyValuesError(expected);
return -1;
}
else if (!PyErr_Occurred())
@@ -28816,6 +30614,13 @@
}
+static CYTHON_INLINE __pyx_t_5numpy_int64_t __Pyx_div___pyx_t_5numpy_int64_t(__pyx_t_5numpy_int64_t a, __pyx_t_5numpy_int64_t b) {
+ __pyx_t_5numpy_int64_t q = a / b;
+ __pyx_t_5numpy_int64_t r = a - q*b;
+ q -= ((r != 0) & ((r ^ b) < 0));
+ return q;
+}
+
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}
@@ -28826,28 +30631,8 @@
} else if (PyTuple_GET_SIZE(t) < index) {
__Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
} else {
- __Pyx_RaiseTooManyValuesError();
- }
-}
-
-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;
+ __Pyx_RaiseTooManyValuesError(index);
}
- PyErr_Format(PyExc_TypeError,
- "Argument '%s' has incorrect type (expected %s, got %s)",
- name, type->tp_name, Py_TYPE(obj)->tp_name);
- return 0;
}
#if PY_MAJOR_VERSION < 3
@@ -28875,14 +30660,14 @@
#endif
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
- PyObject *__import__ = 0;
+ PyObject *py_import = 0;
PyObject *empty_list = 0;
PyObject *module = 0;
PyObject *global_dict = 0;
PyObject *empty_dict = 0;
PyObject *list;
- __import__ = __Pyx_GetAttrString(__pyx_b, "__import__");
- if (!__import__)
+ py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
+ if (!py_import)
goto bad;
if (from_list)
list = from_list;
@@ -28898,44 +30683,43 @@
empty_dict = PyDict_New();
if (!empty_dict)
goto bad;
- module = PyObject_CallFunctionObjArgs(__import__,
+ module = PyObject_CallFunctionObjArgs(py_import,
name, global_dict, empty_dict, list, NULL);
bad:
Py_XDECREF(empty_list);
- Py_XDECREF(__import__);
+ Py_XDECREF(py_import);
Py_XDECREF(empty_dict);
return module;
}
-static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
- PyObject *result;
- result = PyObject_GetAttr(dict, name);
- if (!result)
- PyErr_SetObject(PyExc_NameError, name);
- return result;
-}
-
static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_intp(npy_intp val) {
- const npy_intp neg_one = (npy_intp)-1, const_zero = 0;
- const int is_unsigned = neg_one > const_zero;
- if (sizeof(npy_intp) < sizeof(long)) {
+ const npy_intp neg_one = (npy_intp)-1, const_zero = (npy_intp)0;
+ const int is_unsigned = const_zero < neg_one;
+ if ((sizeof(npy_intp) == sizeof(char)) ||
+ (sizeof(npy_intp) == sizeof(short))) {
return PyInt_FromLong((long)val);
- } else if (sizeof(npy_intp) == sizeof(long)) {
+ } else if ((sizeof(npy_intp) == sizeof(int)) ||
+ (sizeof(npy_intp) == sizeof(long))) {
if (is_unsigned)
return PyLong_FromUnsignedLong((unsigned long)val);
else
return PyInt_FromLong((long)val);
- } else { /* (sizeof(npy_intp) > sizeof(long)) */
+ } else if (sizeof(npy_intp) == 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(npy_intp),
+ little, !is_unsigned);
}
}
static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject* x) {
- const npy_int32 neg_one = (npy_int32)-1, const_zero = 0;
- const int is_unsigned = neg_one > const_zero;
+ const npy_int32 neg_one = (npy_int32)-1, const_zero = (npy_int32)0;
+ const int is_unsigned = const_zero < neg_one;
if (sizeof(npy_int32) == sizeof(char)) {
if (is_unsigned)
return (npy_int32)__Pyx_PyInt_AsUnsignedChar(x);
@@ -28961,34 +30745,52 @@
return (npy_int32)__Pyx_PyInt_AsUnsignedLongLong(x);
else
return (npy_int32)__Pyx_PyInt_AsSignedLongLong(x);
-#if 0
- } else if (sizeof(npy_int32) > sizeof(short) &&
- sizeof(npy_int32) < sizeof(int)) { /* __int32 ILP64 ? */
- if (is_unsigned)
- return (npy_int32)__Pyx_PyInt_AsUnsignedInt(x);
- else
- return (npy_int32)__Pyx_PyInt_AsSignedInt(x);
-#endif
+ } else {
+ npy_int32 val;
+ PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_VERSION_HEX < 0x03000000
+ if (likely(v) && !PyLong_Check(v)) {
+ PyObject *tmp = v;
+ v = PyNumber_Long(tmp);
+ Py_DECREF(tmp);
+ }
+ #endif
+ if (likely(v)) {
+ int one = 1; int is_little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&val;
+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
+ bytes, sizeof(val),
+ is_little, !is_unsigned);
+ Py_DECREF(v);
+ if (likely(!ret))
+ return val;
+ }
+ return (npy_int32)-1;
}
- PyErr_SetString(PyExc_TypeError, "npy_int32");
- return (npy_int32)-1;
}
static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32 val) {
- const npy_int32 neg_one = (npy_int32)-1, const_zero = 0;
- const int is_unsigned = neg_one > const_zero;
- if (sizeof(npy_int32) < sizeof(long)) {
+ const npy_int32 neg_one = (npy_int32)-1, const_zero = (npy_int32)0;
+ const int is_unsigned = const_zero < neg_one;
+ if ((sizeof(npy_int32) == sizeof(char)) ||
+ (sizeof(npy_int32) == sizeof(short))) {
return PyInt_FromLong((long)val);
- } else if (sizeof(npy_int32) == sizeof(long)) {
+ } else if ((sizeof(npy_int32) == sizeof(int)) ||
+ (sizeof(npy_int32) == sizeof(long))) {
if (is_unsigned)
return PyLong_FromUnsignedLong((unsigned long)val);
else
return PyInt_FromLong((long)val);
- } else { /* (sizeof(npy_int32) > sizeof(long)) */
+ } else if (sizeof(npy_int32) == 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(npy_int32),
+ little, !is_unsigned);
}
}
@@ -29001,13 +30803,14 @@
return f;
}
-static int __Pyx_Print(PyObject *arg_tuple, int newline) {
- PyObject *f;
+static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
PyObject* v;
int i;
- if (!(f = __Pyx_GetStdout()))
- return -1;
+ if (!f) {
+ if (!(f = __Pyx_GetStdout()))
+ return -1;
+ }
for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
if (PyFile_SoftSpace(f, 1)) {
if (PyFile_WriteString(" ", f) < 0)
@@ -29035,22 +30838,38 @@
#else /* Python 3 has a print function */
-static int __Pyx_Print(PyObject *arg_tuple, int newline) {
+static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
PyObject* kwargs = 0;
PyObject* result = 0;
PyObject* end_string;
- if (!__pyx_print) {
+ if (unlikely(!__pyx_print)) {
__pyx_print = __Pyx_GetAttrString(__pyx_b, "print");
if (!__pyx_print)
return -1;
}
- if (!newline) {
- if (!__pyx_print_kwargs) {
+ 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 (!__pyx_print_kwargs)
+ if (unlikely(!__pyx_print_kwargs))
return -1;
end_string = PyUnicode_FromStringAndSize(" ", 1);
- if (!end_string)
+ if (unlikely(!end_string))
return -1;
if (PyDict_SetItemString(__pyx_print_kwargs, "end", end_string) < 0) {
Py_DECREF(end_string);
@@ -29061,17 +30880,23 @@
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
static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject* x) {
- const npy_int64 neg_one = (npy_int64)-1, const_zero = 0;
- const int is_unsigned = neg_one > const_zero;
+ const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0;
+ const int is_unsigned = const_zero < neg_one;
if (sizeof(npy_int64) == sizeof(char)) {
if (is_unsigned)
return (npy_int64)__Pyx_PyInt_AsUnsignedChar(x);
@@ -29097,25 +30922,37 @@
return (npy_int64)__Pyx_PyInt_AsUnsignedLongLong(x);
else
return (npy_int64)__Pyx_PyInt_AsSignedLongLong(x);
-#if 0
- } else if (sizeof(npy_int64) > sizeof(short) &&
- sizeof(npy_int64) < sizeof(int)) { /* __int32 ILP64 ? */
- if (is_unsigned)
- return (npy_int64)__Pyx_PyInt_AsUnsignedInt(x);
- else
- return (npy_int64)__Pyx_PyInt_AsSignedInt(x);
-#endif
+ } else {
+ npy_int64 val;
+ PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_VERSION_HEX < 0x03000000
+ if (likely(v) && !PyLong_Check(v)) {
+ PyObject *tmp = v;
+ v = PyNumber_Long(tmp);
+ Py_DECREF(tmp);
+ }
+ #endif
+ if (likely(v)) {
+ int one = 1; int is_little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&val;
+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
+ bytes, sizeof(val),
+ is_little, !is_unsigned);
+ Py_DECREF(v);
+ if (likely(!ret))
+ return val;
+ }
+ return (npy_int64)-1;
}
- PyErr_SetString(PyExc_TypeError, "npy_int64");
- return (npy_int64)-1;
}
#if PY_MAJOR_VERSION < 3
-static int __Pyx_PrintOne(PyObject *o) {
- PyObject *f;
- if (!(f = __Pyx_GetStdout()))
- return -1;
+static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
+ if (!f) {
+ if (!(f = __Pyx_GetStdout()))
+ return -1;
+ }
if (PyFile_SoftSpace(f, 0)) {
if (PyFile_WriteString(" ", f) < 0)
return -1;
@@ -29127,19 +30964,19 @@
return 0;
/* the line below is just to avoid compiler
* compiler warnings about unused functions */
- return __Pyx_Print(NULL, 0);
+ return __Pyx_Print(f, NULL, 0);
}
#else /* Python 3 has a print function */
-static int __Pyx_PrintOne(PyObject *o) {
+static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
int res;
PyObject* arg_tuple = PyTuple_New(1);
if (unlikely(!arg_tuple))
return -1;
Py_INCREF(o);
PyTuple_SET_ITEM(arg_tuple, 0, o);
- res = __Pyx_Print(arg_tuple, 1);
+ res = __Pyx_Print(stream, arg_tuple, 1);
Py_DECREF(arg_tuple);
return res;
}
@@ -29257,26 +31094,33 @@
#endif
static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64 val) {
- const npy_int64 neg_one = (npy_int64)-1, const_zero = 0;
- const int is_unsigned = neg_one > const_zero;
- if (sizeof(npy_int64) < sizeof(long)) {
+ const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0;
+ const int is_unsigned = const_zero < neg_one;
+ if ((sizeof(npy_int64) == sizeof(char)) ||
+ (sizeof(npy_int64) == sizeof(short))) {
return PyInt_FromLong((long)val);
- } else if (sizeof(npy_int64) == sizeof(long)) {
+ } else if ((sizeof(npy_int64) == sizeof(int)) ||
+ (sizeof(npy_int64) == sizeof(long))) {
if (is_unsigned)
return PyLong_FromUnsignedLong((unsigned long)val);
else
return PyInt_FromLong((long)val);
- } else { /* (sizeof(npy_int64) > sizeof(long)) */
+ } else if (sizeof(npy_int64) == 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(npy_int64),
+ little, !is_unsigned);
}
}
static CYTHON_INLINE png_uint_32 __Pyx_PyInt_from_py_png_uint_32(PyObject* x) {
- const png_uint_32 neg_one = (png_uint_32)-1, const_zero = 0;
- const int is_unsigned = neg_one > const_zero;
+ const png_uint_32 neg_one = (png_uint_32)-1, const_zero = (png_uint_32)0;
+ const int is_unsigned = const_zero < neg_one;
if (sizeof(png_uint_32) == sizeof(char)) {
if (is_unsigned)
return (png_uint_32)__Pyx_PyInt_AsUnsignedChar(x);
@@ -29302,17 +31146,28 @@
return (png_uint_32)__Pyx_PyInt_AsUnsignedLongLong(x);
else
return (png_uint_32)__Pyx_PyInt_AsSignedLongLong(x);
-#if 0
- } else if (sizeof(png_uint_32) > sizeof(short) &&
- sizeof(png_uint_32) < sizeof(int)) { /* __int32 ILP64 ? */
- if (is_unsigned)
- return (png_uint_32)__Pyx_PyInt_AsUnsignedInt(x);
- else
- return (png_uint_32)__Pyx_PyInt_AsSignedInt(x);
-#endif
+ } else {
+ png_uint_32 val;
+ PyObject *v = __Pyx_PyNumber_Int(x);
+ #if PY_VERSION_HEX < 0x03000000
+ if (likely(v) && !PyLong_Check(v)) {
+ PyObject *tmp = v;
+ v = PyNumber_Long(tmp);
+ Py_DECREF(tmp);
+ }
+ #endif
+ if (likely(v)) {
+ int one = 1; int is_little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&val;
+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
+ bytes, sizeof(val),
+ is_little, !is_unsigned);
+ Py_DECREF(v);
+ if (likely(!ret))
+ return val;
+ }
+ return (png_uint_32)-1;
}
- PyErr_SetString(PyExc_TypeError, "png_uint_32");
- return (png_uint_32)-1;
}
static CYTHON_INLINE long __Pyx_pow_long(long b, long e) {
@@ -29658,6 +31513,25 @@
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;
@@ -29887,10 +31761,10 @@
}
static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
-#if PY_VERSION_HEX < 0x03010000
- PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
-#else
+#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;
@@ -29940,7 +31814,11 @@
PyOS_snprintf(warning, sizeof(warning),
"%s.%s size changed, may indicate binary incompatibility",
module_name, class_name);
+ #if PY_VERSION_HEX < 0x02050000
+ PyErr_Warn(NULL, warning);
+ #else
PyErr_WarnEx(NULL, warning, 0);
+ #endif
}
else if (((PyTypeObject *)result)->tp_basicsize != size) {
PyErr_Format(PyExc_ValueError,
@@ -30081,8 +31959,8 @@
/* Type Conversion Functions */
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
- if (x == Py_True) return 1;
- else if ((x == Py_False) | (x == Py_None)) return 0;
+ int is_true = x == Py_True;
+ if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
else return PyObject_IsTrue(x);
}
More information about the yt-svn
mailing list