[Yt-svn] yt-commit r1805 - in branches/yt-1.7/yt: . _amr_utils
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Thu Jul 29 17:19:41 PDT 2010
Author: mturk
Date: Thu Jul 29 17:19:40 2010
New Revision: 1805
URL: http://yt.enzotools.org/changeset/1805
Log:
Fixed the bug in volume rendering where iv_dir[i] was always the inverse of
v_dir[0]
Modified:
branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx
branches/yt-1.7/yt/amr_utils.c
Modified: branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx
==============================================================================
--- branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx (original)
+++ branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx Thu Jul 29 17:19:40 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: branches/yt-1.7/yt/amr_utils.c
==============================================================================
--- branches/yt-1.7/yt/amr_utils.c (original)
+++ branches/yt-1.7/yt/amr_utils.c Thu Jul 29 17:19:40 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:19:34 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;
@@ -378,7 +376,7 @@
typedef npy_cdouble __pyx_t_5numpy_complex_t;
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":76
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":76
* cdef class VectorPlane
*
* cdef struct FieldInterpolationTable: # <<<<<<<<<<<<<<
@@ -398,7 +396,7 @@
int pass_through;
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":89
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":89
* int pass_through
*
* cdef void FIT_initialize_table(FieldInterpolationTable *fit, int nbins, # <<<<<<<<<<<<<<
@@ -413,7 +411,7 @@
int pass_through;
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":39
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":39
* void *alloca(int)
*
* cdef struct QuadTreeNode: # <<<<<<<<<<<<<<
@@ -430,7 +428,7 @@
struct __pyx_t_2yt_9amr_utils_QuadTreeNode *children[2][2];
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":118
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":118
* return (bv + dd*dy*fit.idbin)
*
* cdef class TransferFunctionProxy: # <<<<<<<<<<<<<<
@@ -451,7 +449,7 @@
PyObject *my_field_tables;
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":36
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":36
* self.refined_pos = 0
*
* cdef class OctreeGrid: # <<<<<<<<<<<<<<
@@ -469,7 +467,7 @@
int level;
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":53
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":53
* self.level = level
*
* cdef class OctreeGridList: # <<<<<<<<<<<<<<
@@ -482,7 +480,7 @@
PyObject *grids;
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":569
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":569
* return 1
*
* cdef class ProtoPrism: # <<<<<<<<<<<<<<
@@ -501,7 +499,7 @@
int parent_grid_id;
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":30
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":30
* cimport cython
*
* cdef class position: # <<<<<<<<<<<<<<
@@ -515,7 +513,7 @@
int refined_pos;
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":537
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":537
* tf.eval_transfer(dt, self.dvs, rgba, grad)
*
* cdef class GridFace: # <<<<<<<<<<<<<<
@@ -532,7 +530,7 @@
__pyx_t_5numpy_float64_t right_edge[3];
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":99
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":99
* free(node)
*
* cdef class QuadTree: # <<<<<<<<<<<<<<
@@ -549,7 +547,7 @@
__pyx_t_5numpy_int64_t top_grid_dims[2];
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":74
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":74
* np.float64_t *data, np.float64_t *grad)
*
* cdef class VectorPlane # <<<<<<<<<<<<<<
@@ -581,7 +579,7 @@
__pyx_t_5numpy_float64_t *y_vec;
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":299
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":299
* tv[offset + k] = fv[k]
*
* cdef class PartitionedGrid: # <<<<<<<<<<<<<<
@@ -607,7 +605,7 @@
};
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":537
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":537
* tf.eval_transfer(dt, self.dvs, rgba, grad)
*
* cdef class GridFace: # <<<<<<<<<<<<<<
@@ -621,7 +619,7 @@
static struct __pyx_vtabstruct_2yt_9amr_utils_GridFace *__pyx_vtabptr_2yt_9amr_utils_GridFace;
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":118
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":118
* return (bv + dd*dy*fit.idbin)
*
* cdef class TransferFunctionProxy: # <<<<<<<<<<<<<<
@@ -635,7 +633,7 @@
static struct __pyx_vtabstruct_2yt_9amr_utils_TransferFunctionProxy *__pyx_vtabptr_2yt_9amr_utils_TransferFunctionProxy;
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":569
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":569
* return 1
*
* cdef class ProtoPrism: # <<<<<<<<<<<<<<
@@ -649,7 +647,7 @@
static struct __pyx_vtabstruct_2yt_9amr_utils_ProtoPrism *__pyx_vtabptr_2yt_9amr_utils_ProtoPrism;
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":99
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":99
* free(node)
*
* cdef class QuadTree: # <<<<<<<<<<<<<<
@@ -666,7 +664,7 @@
static struct __pyx_vtabstruct_2yt_9amr_utils_QuadTree *__pyx_vtabptr_2yt_9amr_utils_QuadTree;
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":222
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":222
* #rgba[i+3] += trgba[i] * (1.0 - rgba[i+3])*dt*trgba[i+3]
*
* cdef class VectorPlane: # <<<<<<<<<<<<<<
@@ -682,7 +680,7 @@
static struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *__pyx_vtabptr_2yt_9amr_utils_VectorPlane;
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":299
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":299
* tv[offset + k] = fv[k]
*
* cdef class PartitionedGrid: # <<<<<<<<<<<<<<
@@ -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,10 +1759,101 @@
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":32
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/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/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":32
* cdef class position:
* cdef public int output_pos, refined_pos
* def __cinit__(self): # <<<<<<<<<<<<<<
@@ -1764,7 +1869,7 @@
__Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":33
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":33
* cdef public int output_pos, refined_pos
* def __cinit__(self):
* self.output_pos = 0 # <<<<<<<<<<<<<<
@@ -1773,7 +1878,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_position *)__pyx_v_self)->output_pos = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":34
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":34
* def __cinit__(self):
* self.output_pos = 0
* self.refined_pos = 0 # <<<<<<<<<<<<<<
@@ -1787,22 +1892,310 @@
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/branches/yt-1.7/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;
- int __pyx_v_level;
+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/branches/yt-1.7/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/branches/yt-1.7/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;
Py_ssize_t __pyx_bstride_1_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;
@@ -1947,7 +2341,7 @@
__pyx_bstride_0_dx = __pyx_bstruct_dx.strides[0];
__pyx_bshape_0_dx = __pyx_bstruct_dx.shape[0];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":46
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":46
* np.ndarray[np.float64_t, ndim=1] dx,
* int level):
* self.child_indices = child_indices # <<<<<<<<<<<<<<
@@ -1960,7 +2354,7 @@
__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 = ((PyObject *)__pyx_v_child_indices);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":47
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":47
* int level):
* self.child_indices = child_indices
* self.fields = fields # <<<<<<<<<<<<<<
@@ -1973,7 +2367,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->fields);
((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->fields = ((PyObject *)__pyx_v_fields);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":48
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":48
* self.child_indices = child_indices
* self.fields = fields
* self.left_edges = left_edges # <<<<<<<<<<<<<<
@@ -1986,7 +2380,7 @@
__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 = ((PyObject *)__pyx_v_left_edges);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":49
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":49
* self.fields = fields
* self.left_edges = left_edges
* self.dimensions = dimensions # <<<<<<<<<<<<<<
@@ -1999,7 +2393,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dimensions);
((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dimensions = ((PyObject *)__pyx_v_dimensions);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":50
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":50
* self.left_edges = left_edges
* self.dimensions = dimensions
* self.dx = dx # <<<<<<<<<<<<<<
@@ -2012,7 +2406,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dx);
((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_v_self)->dx = ((PyObject *)__pyx_v_dx);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":51
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":51
* self.dimensions = dimensions
* self.dx = dx
* self.level = level # <<<<<<<<<<<<<<
@@ -2046,7 +2440,61 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":55
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/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/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":55
* cdef class OctreeGridList:
* cdef public object grids
* def __cinit__(self, grids): # <<<<<<<<<<<<<<
@@ -2088,10 +2536,11 @@
__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:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":56
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":56
* cdef public object grids
* def __cinit__(self, grids):
* self.grids = grids # <<<<<<<<<<<<<<
@@ -2109,7 +2558,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":58
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":58
* self.grids = grids
*
* def __getitem__(self, int item): # <<<<<<<<<<<<<<
@@ -2129,10 +2578,11 @@
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:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":59
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":59
*
* def __getitem__(self, int item):
* return self.grids[item] # <<<<<<<<<<<<<<
@@ -2158,7 +2608,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":62
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":62
*
* @cython.boundscheck(False)
* def RecurseOctreeDepthFirst(int i_i, int j_i, int k_i, # <<<<<<<<<<<<<<
@@ -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);
@@ -2429,7 +2876,7 @@
__pyx_bstride_0_refined = __pyx_bstruct_refined.strides[0];
__pyx_bshape_0_refined = __pyx_bstruct_refined.shape[0];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":71
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":71
* cdef int child_i, child_j, child_k
* cdef OctreeGrid child_grid
* cdef OctreeGrid grid = grids[gi-1] # <<<<<<<<<<<<<<
@@ -2443,7 +2890,7 @@
__pyx_v_grid = ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":72
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":72
* cdef OctreeGrid child_grid
* cdef OctreeGrid grid = grids[gi-1]
* cdef np.ndarray[np.int32_t, ndim=3] child_indices = grid.child_indices # <<<<<<<<<<<<<<
@@ -2465,7 +2912,7 @@
__Pyx_INCREF(__pyx_v_grid->child_indices);
__pyx_v_child_indices = ((PyArrayObject *)__pyx_v_grid->child_indices);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":73
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":73
* cdef OctreeGrid grid = grids[gi-1]
* cdef np.ndarray[np.int32_t, ndim=3] child_indices = grid.child_indices
* cdef np.ndarray[np.int32_t, ndim=1] dimensions = grid.dimensions # <<<<<<<<<<<<<<
@@ -2487,7 +2934,7 @@
__Pyx_INCREF(__pyx_v_grid->dimensions);
__pyx_v_dimensions = ((PyArrayObject *)__pyx_v_grid->dimensions);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":74
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":74
* cdef np.ndarray[np.int32_t, ndim=3] child_indices = grid.child_indices
* cdef np.ndarray[np.int32_t, ndim=1] dimensions = grid.dimensions
* cdef np.ndarray[np.float64_t, ndim=4] fields = grid.fields # <<<<<<<<<<<<<<
@@ -2509,7 +2956,7 @@
__Pyx_INCREF(__pyx_v_grid->fields);
__pyx_v_fields = ((PyArrayObject *)__pyx_v_grid->fields);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":75
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":75
* cdef np.ndarray[np.int32_t, ndim=1] dimensions = grid.dimensions
* cdef np.ndarray[np.float64_t, ndim=4] fields = grid.fields
* cdef np.ndarray[np.float64_t, ndim=1] leftedges = grid.left_edges # <<<<<<<<<<<<<<
@@ -2531,7 +2978,7 @@
__Pyx_INCREF(__pyx_v_grid->left_edges);
__pyx_v_leftedges = ((PyArrayObject *)__pyx_v_grid->left_edges);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":76
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":76
* cdef np.ndarray[np.float64_t, ndim=4] fields = grid.fields
* cdef np.ndarray[np.float64_t, ndim=1] leftedges = grid.left_edges
* cdef np.float64_t dx = grid.dx[0] # <<<<<<<<<<<<<<
@@ -2544,7 +2991,7 @@
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_dx = __pyx_t_7;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":80
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":80
* cdef np.ndarray[np.float64_t, ndim=1] child_leftedges
* cdef np.float64_t cx, cy, cz
* for k_off in range(k_f): # <<<<<<<<<<<<<<
@@ -2555,7 +3002,7 @@
for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
__pyx_v_k_off = __pyx_t_9;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":81
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":81
* cdef np.float64_t cx, cy, cz
* for k_off in range(k_f):
* k = k_off + k_i # <<<<<<<<<<<<<<
@@ -2564,7 +3011,7 @@
*/
__pyx_v_k = (__pyx_v_k_off + __pyx_v_k_i);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":82
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":82
* for k_off in range(k_f):
* k = k_off + k_i
* cz = (leftedges[2] + k*dx) # <<<<<<<<<<<<<<
@@ -2575,7 +3022,7 @@
if (__pyx_t_1 < 0) __pyx_t_1 += __pyx_bshape_0_leftedges;
__pyx_v_cz = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_leftedges.buf, __pyx_t_1, __pyx_bstride_0_leftedges)) + (__pyx_v_k * __pyx_v_dx));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":83
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":83
* k = k_off + k_i
* cz = (leftedges[2] + k*dx)
* for j_off in range(j_f): # <<<<<<<<<<<<<<
@@ -2586,7 +3033,7 @@
for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
__pyx_v_j_off = __pyx_t_11;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":84
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":84
* cz = (leftedges[2] + k*dx)
* for j_off in range(j_f):
* j = j_off + j_i # <<<<<<<<<<<<<<
@@ -2595,7 +3042,7 @@
*/
__pyx_v_j = (__pyx_v_j_off + __pyx_v_j_i);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":85
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":85
* for j_off in range(j_f):
* j = j_off + j_i
* cy = (leftedges[1] + j*dx) # <<<<<<<<<<<<<<
@@ -2606,7 +3053,7 @@
if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_bshape_0_leftedges;
__pyx_v_cy = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_leftedges.buf, __pyx_t_12, __pyx_bstride_0_leftedges)) + (__pyx_v_j * __pyx_v_dx));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":86
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":86
* j = j_off + j_i
* cy = (leftedges[1] + j*dx)
* for i_off in range(i_f): # <<<<<<<<<<<<<<
@@ -2617,7 +3064,7 @@
for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
__pyx_v_i_off = __pyx_t_14;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":87
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":87
* cy = (leftedges[1] + j*dx)
* for i_off in range(i_f):
* i = i_off + i_i # <<<<<<<<<<<<<<
@@ -2626,7 +3073,7 @@
*/
__pyx_v_i = (__pyx_v_i_off + __pyx_v_i_i);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":88
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":88
* for i_off in range(i_f):
* i = i_off + i_i
* cx = (leftedges[0] + i*dx) # <<<<<<<<<<<<<<
@@ -2637,7 +3084,7 @@
if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_bshape_0_leftedges;
__pyx_v_cx = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_leftedges.buf, __pyx_t_15, __pyx_bstride_0_leftedges)) + (__pyx_v_i * __pyx_v_dx));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":89
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":89
* i = i_off + i_i
* cx = (leftedges[0] + i*dx)
* ci = grid.child_indices[i,j,k] # <<<<<<<<<<<<<<
@@ -2668,7 +3115,7 @@
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
__pyx_v_ci = __pyx_t_19;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":90
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":90
* cx = (leftedges[0] + i*dx)
* ci = grid.child_indices[i,j,k]
* if ci == -1: # <<<<<<<<<<<<<<
@@ -2678,7 +3125,7 @@
__pyx_t_20 = (__pyx_v_ci == -1);
if (__pyx_t_20) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":91
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":91
* ci = grid.child_indices[i,j,k]
* if ci == -1:
* for fi in range(fields.shape[0]): # <<<<<<<<<<<<<<
@@ -2689,7 +3136,7 @@
for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_21; __pyx_t_19+=1) {
__pyx_v_fi = __pyx_t_19;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":92
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":92
* if ci == -1:
* for fi in range(fields.shape[0]):
* output[curpos.output_pos,fi] = fields[fi,i,j,k] # <<<<<<<<<<<<<<
@@ -2711,7 +3158,7 @@
*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_output.buf, __pyx_t_26, __pyx_bstride_0_output, __pyx_t_27, __pyx_bstride_1_output) = (*__Pyx_BufPtrStrided4d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_fields.buf, __pyx_t_22, __pyx_bstride_0_fields, __pyx_t_23, __pyx_bstride_1_fields, __pyx_t_24, __pyx_bstride_2_fields, __pyx_t_25, __pyx_bstride_3_fields));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":93
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":93
* for fi in range(fields.shape[0]):
* output[curpos.output_pos,fi] = fields[fi,i,j,k]
* refined[curpos.refined_pos] = 0 # <<<<<<<<<<<<<<
@@ -2722,7 +3169,7 @@
if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_bshape_0_refined;
*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_refined.buf, __pyx_t_19, __pyx_bstride_0_refined) = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":94
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":94
* output[curpos.output_pos,fi] = fields[fi,i,j,k]
* refined[curpos.refined_pos] = 0
* curpos.output_pos += 1 # <<<<<<<<<<<<<<
@@ -2731,7 +3178,7 @@
*/
__pyx_v_curpos->output_pos += 1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":95
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":95
* refined[curpos.refined_pos] = 0
* curpos.output_pos += 1
* curpos.refined_pos += 1 # <<<<<<<<<<<<<<
@@ -2743,7 +3190,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":97
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":97
* curpos.refined_pos += 1
* else:
* refined[curpos.refined_pos] = 1 # <<<<<<<<<<<<<<
@@ -2754,7 +3201,7 @@
if (__pyx_t_28 < 0) __pyx_t_28 += __pyx_bshape_0_refined;
*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_refined.buf, __pyx_t_28, __pyx_bstride_0_refined) = 1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":98
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":98
* else:
* refined[curpos.refined_pos] = 1
* curpos.refined_pos += 1 # <<<<<<<<<<<<<<
@@ -2763,7 +3210,7 @@
*/
__pyx_v_curpos->refined_pos += 1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":99
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":99
* refined[curpos.refined_pos] = 1
* curpos.refined_pos += 1
* child_grid = grids[ci-1] # <<<<<<<<<<<<<<
@@ -2778,7 +3225,7 @@
__pyx_v_child_grid = ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_t_17);
__pyx_t_17 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":100
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":100
* curpos.refined_pos += 1
* child_grid = grids[ci-1]
* child_dx = child_grid.dx[0] # <<<<<<<<<<<<<<
@@ -2791,7 +3238,7 @@
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
__pyx_v_child_dx = __pyx_t_7;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":101
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":101
* child_grid = grids[ci-1]
* child_dx = child_grid.dx[0]
* child_leftedges = child_grid.left_edges # <<<<<<<<<<<<<<
@@ -2822,7 +3269,7 @@
__Pyx_DECREF(((PyObject *)__pyx_v_child_leftedges));
__pyx_v_child_leftedges = ((PyArrayObject *)__pyx_v_child_grid->left_edges);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":102
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":102
* child_dx = child_grid.dx[0]
* child_leftedges = child_grid.left_edges
* child_i = int((cx - child_leftedges[0])/child_dx) # <<<<<<<<<<<<<<
@@ -2831,9 +3278,14 @@
*/
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":103
* child_leftedges = child_grid.left_edges
* child_i = int((cx - child_leftedges[0])/child_dx)
* child_j = int((cy - child_leftedges[1])/child_dx) # <<<<<<<<<<<<<<
@@ -2842,9 +3294,14 @@
*/
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":104
* child_i = int((cx - child_leftedges[0])/child_dx)
* child_j = int((cy - child_leftedges[1])/child_dx)
* child_k = int((cz - child_leftedges[2])/child_dx) # <<<<<<<<<<<<<<
@@ -2853,9 +3310,14 @@
*/
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":105
* child_j = int((cy - child_leftedges[1])/child_dx)
* child_k = int((cz - child_leftedges[2])/child_dx)
* s = RecurseOctreeDepthFirst(child_i, child_j, child_k, 2, 2, 2, # <<<<<<<<<<<<<<
@@ -2871,7 +3333,7 @@
__pyx_t_2 = PyInt_FromLong(__pyx_v_child_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":106
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":106
* child_k = int((cz - child_leftedges[2])/child_dx)
* s = RecurseOctreeDepthFirst(child_i, child_j, child_k, 2, 2, 2,
* curpos, ci, output, refined, grids) # <<<<<<<<<<<<<<
@@ -2928,7 +3390,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":107
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":107
* s = RecurseOctreeDepthFirst(child_i, child_j, child_k, 2, 2, 2,
* curpos, ci, output, refined, grids)
* return s # <<<<<<<<<<<<<<
@@ -2979,16 +3441,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":110
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":110
*
* @cython.boundscheck(False)
* def RecurseOctreeByLevels(int i_i, int j_i, int k_i, # <<<<<<<<<<<<<<
@@ -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);
@@ -3313,7 +3767,7 @@
__pyx_bstride_0_corners = __pyx_bstruct_corners.strides[0]; __pyx_bstride_1_corners = __pyx_bstruct_corners.strides[1];
__pyx_bshape_0_corners = __pyx_bstruct_corners.shape[0]; __pyx_bshape_1_corners = __pyx_bstruct_corners.shape[1];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":121
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":121
* cdef int child_i, child_j, child_k
* cdef OctreeGrid child_grid
* cdef OctreeGrid grid = grids[gi-1] # <<<<<<<<<<<<<<
@@ -3327,7 +3781,7 @@
__pyx_v_grid = ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":122
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":122
* cdef OctreeGrid child_grid
* cdef OctreeGrid grid = grids[gi-1]
* cdef int level = grid.level # <<<<<<<<<<<<<<
@@ -3336,7 +3790,7 @@
*/
__pyx_v_level = __pyx_v_grid->level;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":123
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":123
* cdef OctreeGrid grid = grids[gi-1]
* cdef int level = grid.level
* cdef np.ndarray[np.int32_t, ndim=3] child_indices = grid.child_indices # <<<<<<<<<<<<<<
@@ -3358,7 +3812,7 @@
__Pyx_INCREF(__pyx_v_grid->child_indices);
__pyx_v_child_indices = ((PyArrayObject *)__pyx_v_grid->child_indices);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":124
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":124
* cdef int level = grid.level
* cdef np.ndarray[np.int32_t, ndim=3] child_indices = grid.child_indices
* cdef np.ndarray[np.int32_t, ndim=1] dimensions = grid.dimensions # <<<<<<<<<<<<<<
@@ -3380,7 +3834,7 @@
__Pyx_INCREF(__pyx_v_grid->dimensions);
__pyx_v_dimensions = ((PyArrayObject *)__pyx_v_grid->dimensions);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":125
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":125
* cdef np.ndarray[np.int32_t, ndim=3] child_indices = grid.child_indices
* cdef np.ndarray[np.int32_t, ndim=1] dimensions = grid.dimensions
* cdef np.ndarray[np.float64_t, ndim=4] fields = grid.fields # <<<<<<<<<<<<<<
@@ -3402,7 +3856,7 @@
__Pyx_INCREF(__pyx_v_grid->fields);
__pyx_v_fields = ((PyArrayObject *)__pyx_v_grid->fields);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":126
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":126
* cdef np.ndarray[np.int32_t, ndim=1] dimensions = grid.dimensions
* cdef np.ndarray[np.float64_t, ndim=4] fields = grid.fields
* cdef np.ndarray[np.float64_t, ndim=1] leftedges = grid.left_edges # <<<<<<<<<<<<<<
@@ -3424,7 +3878,7 @@
__Pyx_INCREF(__pyx_v_grid->left_edges);
__pyx_v_leftedges = ((PyArrayObject *)__pyx_v_grid->left_edges);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":127
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":127
* cdef np.ndarray[np.float64_t, ndim=4] fields = grid.fields
* cdef np.ndarray[np.float64_t, ndim=1] leftedges = grid.left_edges
* cdef np.float64_t dx = grid.dx[0] # <<<<<<<<<<<<<<
@@ -3437,7 +3891,7 @@
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_dx = __pyx_t_7;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":132
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":132
* cdef np.float64_t cx, cy, cz
* cdef int cp
* for i_off in range(i_f): # <<<<<<<<<<<<<<
@@ -3448,7 +3902,7 @@
for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
__pyx_v_i_off = __pyx_t_9;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":133
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":133
* cdef int cp
* for i_off in range(i_f):
* i = i_off + i_i # <<<<<<<<<<<<<<
@@ -3457,7 +3911,7 @@
*/
__pyx_v_i = (__pyx_v_i_off + __pyx_v_i_i);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":134
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":134
* for i_off in range(i_f):
* i = i_off + i_i
* cx = (leftedges[0] + i*dx) # <<<<<<<<<<<<<<
@@ -3468,7 +3922,7 @@
if (__pyx_t_1 < 0) __pyx_t_1 += __pyx_bshape_0_leftedges;
__pyx_v_cx = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_leftedges.buf, __pyx_t_1, __pyx_bstride_0_leftedges)) + (__pyx_v_i * __pyx_v_dx));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":135
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":135
* i = i_off + i_i
* cx = (leftedges[0] + i*dx)
* if i_f > 2: print k, cz # <<<<<<<<<<<<<<
@@ -3489,13 +3943,13 @@
__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;
}
__pyx_L8:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":136
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":136
* cx = (leftedges[0] + i*dx)
* if i_f > 2: print k, cz
* for j_off in range(j_f): # <<<<<<<<<<<<<<
@@ -3506,7 +3960,7 @@
for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
__pyx_v_j_off = __pyx_t_14;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":137
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":137
* if i_f > 2: print k, cz
* for j_off in range(j_f):
* j = j_off + j_i # <<<<<<<<<<<<<<
@@ -3515,7 +3969,7 @@
*/
__pyx_v_j = (__pyx_v_j_off + __pyx_v_j_i);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":138
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":138
* for j_off in range(j_f):
* j = j_off + j_i
* cy = (leftedges[1] + j*dx) # <<<<<<<<<<<<<<
@@ -3526,7 +3980,7 @@
if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_bshape_0_leftedges;
__pyx_v_cy = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_leftedges.buf, __pyx_t_15, __pyx_bstride_0_leftedges)) + (__pyx_v_j * __pyx_v_dx));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":139
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":139
* j = j_off + j_i
* cy = (leftedges[1] + j*dx)
* for k_off in range(k_f): # <<<<<<<<<<<<<<
@@ -3537,7 +3991,7 @@
for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
__pyx_v_k_off = __pyx_t_17;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":140
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":140
* cy = (leftedges[1] + j*dx)
* for k_off in range(k_f):
* k = k_off + k_i # <<<<<<<<<<<<<<
@@ -3546,7 +4000,7 @@
*/
__pyx_v_k = (__pyx_v_k_off + __pyx_v_k_i);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":141
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":141
* for k_off in range(k_f):
* k = k_off + k_i
* cz = (leftedges[2] + k*dx) # <<<<<<<<<<<<<<
@@ -3557,7 +4011,7 @@
if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_bshape_0_leftedges;
__pyx_v_cz = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_leftedges.buf, __pyx_t_18, __pyx_bstride_0_leftedges)) + (__pyx_v_k * __pyx_v_dx));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":142
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":142
* k = k_off + k_i
* cz = (leftedges[2] + k*dx)
* cp = curpos[level] # <<<<<<<<<<<<<<
@@ -3568,7 +4022,7 @@
if (__pyx_t_19 < 0) __pyx_t_19 += __pyx_bshape_0_curpos;
__pyx_v_cp = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_curpos.buf, __pyx_t_19, __pyx_bstride_0_curpos));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":143
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":143
* cz = (leftedges[2] + k*dx)
* cp = curpos[level]
* corners[cp, 0] = cx # <<<<<<<<<<<<<<
@@ -3581,7 +4035,7 @@
if (__pyx_t_21 < 0) __pyx_t_21 += __pyx_bshape_1_corners;
*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_corners.buf, __pyx_t_20, __pyx_bstride_0_corners, __pyx_t_21, __pyx_bstride_1_corners) = __pyx_v_cx;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":144
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":144
* cp = curpos[level]
* corners[cp, 0] = cx
* corners[cp, 1] = cy # <<<<<<<<<<<<<<
@@ -3594,7 +4048,7 @@
if (__pyx_t_23 < 0) __pyx_t_23 += __pyx_bshape_1_corners;
*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_corners.buf, __pyx_t_22, __pyx_bstride_0_corners, __pyx_t_23, __pyx_bstride_1_corners) = __pyx_v_cy;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":145
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":145
* corners[cp, 0] = cx
* corners[cp, 1] = cy
* corners[cp, 2] = cz # <<<<<<<<<<<<<<
@@ -3607,7 +4061,7 @@
if (__pyx_t_25 < 0) __pyx_t_25 += __pyx_bshape_1_corners;
*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_corners.buf, __pyx_t_24, __pyx_bstride_0_corners, __pyx_t_25, __pyx_bstride_1_corners) = __pyx_v_cz;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":146
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":146
* corners[cp, 1] = cy
* corners[cp, 2] = cz
* genealogy[curpos[level], 2] = level # <<<<<<<<<<<<<<
@@ -3622,7 +4076,7 @@
if (__pyx_t_28 < 0) __pyx_t_28 += __pyx_bshape_1_genealogy;
*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_genealogy.buf, __pyx_t_27, __pyx_bstride_0_genealogy, __pyx_t_28, __pyx_bstride_1_genealogy) = __pyx_v_level;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":148
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":148
* genealogy[curpos[level], 2] = level
* # always output data
* for fi in range(fields.shape[0]): # <<<<<<<<<<<<<<
@@ -3633,7 +4087,7 @@
for (__pyx_t_30 = 0; __pyx_t_30 < __pyx_t_29; __pyx_t_30+=1) {
__pyx_v_fi = __pyx_t_30;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":149
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":149
* # always output data
* for fi in range(fields.shape[0]):
* output[cp,fi] = fields[fi,i,j,k] # <<<<<<<<<<<<<<
@@ -3655,7 +4109,7 @@
*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_output.buf, __pyx_t_35, __pyx_bstride_0_output, __pyx_t_36, __pyx_bstride_1_output) = (*__Pyx_BufPtrStrided4d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_fields.buf, __pyx_t_31, __pyx_bstride_0_fields, __pyx_t_32, __pyx_bstride_1_fields, __pyx_t_33, __pyx_bstride_2_fields, __pyx_t_34, __pyx_bstride_3_fields));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":150
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":150
* for fi in range(fields.shape[0]):
* output[cp,fi] = fields[fi,i,j,k]
* ci = child_indices[i,j,k] # <<<<<<<<<<<<<<
@@ -3670,7 +4124,7 @@
if (__pyx_t_38 < 0) __pyx_t_38 += __pyx_bshape_2_child_indices;
__pyx_v_ci = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_child_indices.buf, __pyx_t_30, __pyx_bstride_0_child_indices, __pyx_t_37, __pyx_bstride_1_child_indices, __pyx_t_38, __pyx_bstride_2_child_indices));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":151
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":151
* output[cp,fi] = fields[fi,i,j,k]
* ci = child_indices[i,j,k]
* if ci > -1: # <<<<<<<<<<<<<<
@@ -3680,7 +4134,7 @@
__pyx_t_10 = (__pyx_v_ci > -1);
if (__pyx_t_10) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":152
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":152
* ci = child_indices[i,j,k]
* if ci > -1:
* child_grid = grids[ci-1] # <<<<<<<<<<<<<<
@@ -3695,7 +4149,7 @@
__pyx_v_child_grid = ((struct __pyx_obj_2yt_9amr_utils_OctreeGrid *)__pyx_t_12);
__pyx_t_12 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":153
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":153
* if ci > -1:
* child_grid = grids[ci-1]
* child_dx = child_grid.dx[0] # <<<<<<<<<<<<<<
@@ -3708,7 +4162,7 @@
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_v_child_dx = __pyx_t_7;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":154
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":154
* child_grid = grids[ci-1]
* child_dx = child_grid.dx[0]
* child_leftedges = child_grid.left_edges # <<<<<<<<<<<<<<
@@ -3739,7 +4193,7 @@
__Pyx_DECREF(((PyObject *)__pyx_v_child_leftedges));
__pyx_v_child_leftedges = ((PyArrayObject *)__pyx_v_child_grid->left_edges);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":155
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":155
* child_dx = child_grid.dx[0]
* child_leftedges = child_grid.left_edges
* child_i = int((cx-child_leftedges[0])/child_dx) # <<<<<<<<<<<<<<
@@ -3748,9 +4202,14 @@
*/
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":156
* child_leftedges = child_grid.left_edges
* child_i = int((cx-child_leftedges[0])/child_dx)
* child_j = int((cy-child_leftedges[1])/child_dx) # <<<<<<<<<<<<<<
@@ -3759,9 +4218,14 @@
*/
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":157
* child_i = int((cx-child_leftedges[0])/child_dx)
* child_j = int((cy-child_leftedges[1])/child_dx)
* child_k = int((cz-child_leftedges[2])/child_dx) # <<<<<<<<<<<<<<
@@ -3770,9 +4234,14 @@
*/
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":159
* child_k = int((cz-child_leftedges[2])/child_dx)
* # set current child id to id of next cell to examine
* genealogy[cp, 0] = curpos[level+1] # <<<<<<<<<<<<<<
@@ -3787,7 +4256,7 @@
if (__pyx_t_48 < 0) __pyx_t_48 += __pyx_bshape_1_genealogy;
*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_genealogy.buf, __pyx_t_41, __pyx_bstride_0_genealogy, __pyx_t_48, __pyx_bstride_1_genealogy) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_curpos.buf, __pyx_t_47, __pyx_bstride_0_curpos));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":161
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":161
* genealogy[cp, 0] = curpos[level+1]
* # set next parent id to id of current cell
* genealogy[curpos[level+1]:curpos[level+1]+8, 1] = cp # <<<<<<<<<<<<<<
@@ -3820,7 +4289,7 @@
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":162
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":162
* # set next parent id to id of current cell
* genealogy[curpos[level+1]:curpos[level+1]+8, 1] = cp
* s = RecurseOctreeByLevels(child_i, child_j, child_k, 2, 2, 2, # <<<<<<<<<<<<<<
@@ -3836,7 +4305,7 @@
__pyx_t_11 = PyInt_FromLong(__pyx_v_child_k); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":163
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":163
* genealogy[curpos[level+1]:curpos[level+1]+8, 1] = cp
* s = RecurseOctreeByLevels(child_i, child_j, child_k, 2, 2, 2,
* curpos, ci, output, genealogy, # <<<<<<<<<<<<<<
@@ -3846,7 +4315,7 @@
__pyx_t_52 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_ci); if (unlikely(!__pyx_t_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_52);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":164
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":164
* s = RecurseOctreeByLevels(child_i, child_j, child_k, 2, 2, 2,
* curpos, ci, output, genealogy,
* corners, grids) # <<<<<<<<<<<<<<
@@ -3902,7 +4371,7 @@
}
__pyx_L15:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":165
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":165
* curpos, ci, output, genealogy,
* corners, grids)
* curpos[level] += 1 # <<<<<<<<<<<<<<
@@ -3916,7 +4385,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/DepthFirstOctree.pyx":166
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":166
* corners, grids)
* curpos[level] += 1
* return s # <<<<<<<<<<<<<<
@@ -3970,17 +4439,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":31
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":31
*
* @cython.boundscheck(False)
* def UnilinearlyInterpolate(np.ndarray[np.float64_t, ndim=1] table, # <<<<<<<<<<<<<<
@@ -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;
@@ -4147,7 +4608,7 @@
__pyx_bstride_0_output = __pyx_bstruct_output.strides[0];
__pyx_bshape_0_output = __pyx_bstruct_output.shape[0];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":38
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":38
* cdef double x, xp, xm
* cdef int i, x_i, y_i
* for i in range(x_vals.shape[0]): # <<<<<<<<<<<<<<
@@ -4158,7 +4619,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":39
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":39
* cdef int i, x_i, y_i
* for i in range(x_vals.shape[0]):
* x_i = x_is[i] # <<<<<<<<<<<<<<
@@ -4169,7 +4630,7 @@
if (__pyx_t_3 < 0) __pyx_t_3 += __pyx_bshape_0_x_is;
__pyx_v_x_i = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_x_is.buf, __pyx_t_3, __pyx_bstride_0_x_is));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":40
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":40
* for i in range(x_vals.shape[0]):
* x_i = x_is[i]
* x = x_vals[i] # <<<<<<<<<<<<<<
@@ -4180,7 +4641,7 @@
if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_bshape_0_x_vals;
__pyx_v_x = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_vals.buf, __pyx_t_4, __pyx_bstride_0_x_vals));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":41
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":41
* x_i = x_is[i]
* x = x_vals[i]
* dx_inv = 1.0 / (x_bins[x_i+1] - x_bins[x_i]) # <<<<<<<<<<<<<<
@@ -4191,85 +4652,90 @@
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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":42
* x = x_vals[i]
* dx_inv = 1.0 / (x_bins[x_i+1] - x_bins[x_i])
* xp = (x - x_bins[x_i]) * dx_inv # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":43
* dx_inv = 1.0 / (x_bins[x_i+1] - x_bins[x_i])
* xp = (x - x_bins[x_i]) * dx_inv
* xm = (x_bins[x_i+1] - x) * dx_inv # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":44
* xp = (x - x_bins[x_i]) * dx_inv
* xm = (x_bins[x_i+1] - x) * dx_inv
* output[i] = table[x_i ] * (xm) \ # <<<<<<<<<<<<<<
* + 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":45
* xm = (x_bins[x_i+1] - x) * dx_inv
* output[i] = table[x_i ] * (xm) \
* + table[x_i+1] * (xp) # <<<<<<<<<<<<<<
*
* @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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":44
* xp = (x - x_bins[x_i]) * dx_inv
* xm = (x_bins[x_i+1] - x) * dx_inv
* output[i] = table[x_i ] * (xm) \ # <<<<<<<<<<<<<<
* + 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,17 +4755,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":48
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":48
*
* @cython.boundscheck(False)
* def BilinearlyInterpolate(np.ndarray[np.float64_t, ndim=2] table, # <<<<<<<<<<<<<<
@@ -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;
@@ -4547,7 +5002,7 @@
__pyx_bstride_0_output = __pyx_bstruct_output.strides[0];
__pyx_bshape_0_output = __pyx_bstruct_output.shape[0];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":60
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":60
* cdef double dx_inv, dy_inv
* cdef int i, x_i, y_i
* for i in range(x_vals.shape[0]): # <<<<<<<<<<<<<<
@@ -4558,7 +5013,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":61
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":61
* cdef int i, x_i, y_i
* for i in range(x_vals.shape[0]):
* x_i = x_is[i] # <<<<<<<<<<<<<<
@@ -4569,7 +5024,7 @@
if (__pyx_t_3 < 0) __pyx_t_3 += __pyx_bshape_0_x_is;
__pyx_v_x_i = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_x_is.buf, __pyx_t_3, __pyx_bstride_0_x_is));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":62
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":62
* for i in range(x_vals.shape[0]):
* x_i = x_is[i]
* y_i = y_is[i] # <<<<<<<<<<<<<<
@@ -4580,7 +5035,7 @@
if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_bshape_0_y_is;
__pyx_v_y_i = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_y_is.buf, __pyx_t_4, __pyx_bstride_0_y_is));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":63
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":63
* x_i = x_is[i]
* y_i = y_is[i]
* x = x_vals[i] # <<<<<<<<<<<<<<
@@ -4591,7 +5046,7 @@
if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_bshape_0_x_vals;
__pyx_v_x = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_vals.buf, __pyx_t_5, __pyx_bstride_0_x_vals));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":64
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":64
* y_i = y_is[i]
* x = x_vals[i]
* y = y_vals[i] # <<<<<<<<<<<<<<
@@ -4602,7 +5057,7 @@
if (__pyx_t_6 < 0) __pyx_t_6 += __pyx_bshape_0_y_vals;
__pyx_v_y = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_vals.buf, __pyx_t_6, __pyx_bstride_0_y_vals));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":65
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":65
* x = x_vals[i]
* y = y_vals[i]
* dx_inv = 1.0 / (x_bins[x_i+1] - x_bins[x_i]) # <<<<<<<<<<<<<<
@@ -4613,123 +5068,133 @@
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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":66
* y = y_vals[i]
* dx_inv = 1.0 / (x_bins[x_i+1] - x_bins[x_i])
* dy_inv = 1.0 / (y_bins[y_i+1] - y_bins[y_i]) # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":67
* dx_inv = 1.0 / (x_bins[x_i+1] - x_bins[x_i])
* dy_inv = 1.0 / (y_bins[y_i+1] - y_bins[y_i])
* xp = (x - x_bins[x_i]) * dx_inv # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":68
* dy_inv = 1.0 / (y_bins[y_i+1] - y_bins[y_i])
* xp = (x - x_bins[x_i]) * dx_inv
* yp = (y - y_bins[y_i]) * dy_inv # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":69
* xp = (x - x_bins[x_i]) * dx_inv
* yp = (y - y_bins[y_i]) * dy_inv
* xm = (x_bins[x_i+1] - x) * dx_inv # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":70
* yp = (y - y_bins[y_i]) * dy_inv
* xm = (x_bins[x_i+1] - x) * dx_inv
* ym = (y_bins[y_i+1] - y) * dy_inv # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":71
* xm = (x_bins[x_i+1] - x) * dx_inv
* ym = (y_bins[y_i+1] - y) * dy_inv
* output[i] = table[x_i , y_i ] * (xm*ym) \ # <<<<<<<<<<<<<<
* + 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":72
* ym = (y_bins[y_i+1] - y) * dy_inv
* output[i] = table[x_i , y_i ] * (xm*ym) \
* + table[x_i+1, y_i ] * (xp*ym) \ # <<<<<<<<<<<<<<
* + 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":73
* output[i] = table[x_i , y_i ] * (xm*ym) \
* + table[x_i+1, y_i ] * (xp*ym) \
* + table[x_i , y_i+1] * (xm*yp) \ # <<<<<<<<<<<<<<
* + 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":74
* + table[x_i+1, y_i ] * (xp*ym) \
* + table[x_i , y_i+1] * (xm*yp) \
* + table[x_i+1, y_i+1] * (xp*yp) # <<<<<<<<<<<<<<
*
* @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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":71
* xm = (x_bins[x_i+1] - x) * dx_inv
* ym = (y_bins[y_i+1] - y) * dy_inv
* output[i] = table[x_i , y_i ] * (xm*ym) \ # <<<<<<<<<<<<<<
* + 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,20 +5224,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":77
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":77
*
* @cython.boundscheck(False)
* def TrilinearlyInterpolate(np.ndarray[np.float64_t, ndim=3] table, # <<<<<<<<<<<<<<
@@ -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;
@@ -5115,7 +5563,7 @@
__pyx_bstride_0_output = __pyx_bstruct_output.strides[0];
__pyx_bshape_0_output = __pyx_bstruct_output.shape[0];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":93
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":93
* cdef double dx_inv, dy_inv, dz_inv
* cdef int i, x_i, y_i, z_i
* for i in range(x_vals.shape[0]): # <<<<<<<<<<<<<<
@@ -5126,7 +5574,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":94
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":94
* cdef int i, x_i, y_i, z_i
* for i in range(x_vals.shape[0]):
* x_i = x_is[i] # <<<<<<<<<<<<<<
@@ -5137,7 +5585,7 @@
if (__pyx_t_3 < 0) __pyx_t_3 += __pyx_bshape_0_x_is;
__pyx_v_x_i = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_bstruct_x_is.buf, __pyx_t_3, __pyx_bstride_0_x_is));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":95
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":95
* for i in range(x_vals.shape[0]):
* x_i = x_is[i]
* y_i = y_is[i] # <<<<<<<<<<<<<<
@@ -5148,7 +5596,7 @@
if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_bshape_0_y_is;
__pyx_v_y_i = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_bstruct_y_is.buf, __pyx_t_4, __pyx_bstride_0_y_is));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":96
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":96
* x_i = x_is[i]
* y_i = y_is[i]
* z_i = z_is[i] # <<<<<<<<<<<<<<
@@ -5159,7 +5607,7 @@
if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_bshape_0_z_is;
__pyx_v_z_i = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_bstruct_z_is.buf, __pyx_t_5, __pyx_bstride_0_z_is));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":97
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":97
* y_i = y_is[i]
* z_i = z_is[i]
* x = x_vals[i] # <<<<<<<<<<<<<<
@@ -5170,7 +5618,7 @@
if (__pyx_t_6 < 0) __pyx_t_6 += __pyx_bshape_0_x_vals;
__pyx_v_x = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_x_vals.buf, __pyx_t_6, __pyx_bstride_0_x_vals));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":98
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":98
* z_i = z_is[i]
* x = x_vals[i]
* y = y_vals[i] # <<<<<<<<<<<<<<
@@ -5181,7 +5629,7 @@
if (__pyx_t_7 < 0) __pyx_t_7 += __pyx_bshape_0_y_vals;
__pyx_v_y = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y_vals.buf, __pyx_t_7, __pyx_bstride_0_y_vals));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":99
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":99
* x = x_vals[i]
* y = y_vals[i]
* z = z_vals[i] # <<<<<<<<<<<<<<
@@ -5192,7 +5640,7 @@
if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_bshape_0_z_vals;
__pyx_v_z = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_z_vals.buf, __pyx_t_8, __pyx_bstride_0_z_vals));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":100
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":100
* y = y_vals[i]
* z = z_vals[i]
* dx_inv = 1.0 / (x_bins[x_i+1] - x_bins[x_i]) # <<<<<<<<<<<<<<
@@ -5203,219 +5651,234 @@
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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":101
* z = z_vals[i]
* dx_inv = 1.0 / (x_bins[x_i+1] - x_bins[x_i])
* dy_inv = 1.0 / (y_bins[y_i+1] - y_bins[y_i]) # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":102
* dx_inv = 1.0 / (x_bins[x_i+1] - x_bins[x_i])
* dy_inv = 1.0 / (y_bins[y_i+1] - y_bins[y_i])
* dz_inv = 1.0 / (z_bins[z_i+1] - z_bins[z_i]) # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":103
* dy_inv = 1.0 / (y_bins[y_i+1] - y_bins[y_i])
* dz_inv = 1.0 / (z_bins[z_i+1] - z_bins[z_i])
* xp = (x - x_bins[x_i]) * dx_inv # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":104
* dz_inv = 1.0 / (z_bins[z_i+1] - z_bins[z_i])
* xp = (x - x_bins[x_i]) * dx_inv
* yp = (y - y_bins[y_i]) * dy_inv # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":105
* xp = (x - x_bins[x_i]) * dx_inv
* yp = (y - y_bins[y_i]) * dy_inv
* zp = (z - z_bins[z_i]) * dz_inv # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":106
* yp = (y - y_bins[y_i]) * dy_inv
* zp = (z - z_bins[z_i]) * dz_inv
* xm = (x_bins[x_i+1] - x) * dx_inv # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":107
* zp = (z - z_bins[z_i]) * dz_inv
* xm = (x_bins[x_i+1] - x) * dx_inv
* ym = (y_bins[y_i+1] - y) * dy_inv # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":108
* xm = (x_bins[x_i+1] - x) * dx_inv
* ym = (y_bins[y_i+1] - y) * dy_inv
* zm = (z_bins[z_i+1] - z) * dz_inv # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":109
* ym = (y_bins[y_i+1] - y) * dy_inv
* zm = (z_bins[z_i+1] - z) * dz_inv
* output[i] = table[x_i ,y_i ,z_i ] * (xm*ym*zm) \ # <<<<<<<<<<<<<<
* + 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":110
* zm = (z_bins[z_i+1] - z) * dz_inv
* output[i] = table[x_i ,y_i ,z_i ] * (xm*ym*zm) \
* + table[x_i+1,y_i ,z_i ] * (xp*ym*zm) \ # <<<<<<<<<<<<<<
* + 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":111
* output[i] = table[x_i ,y_i ,z_i ] * (xm*ym*zm) \
* + table[x_i+1,y_i ,z_i ] * (xp*ym*zm) \
* + table[x_i ,y_i+1,z_i ] * (xm*yp*zm) \ # <<<<<<<<<<<<<<
* + 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":112
* + table[x_i+1,y_i ,z_i ] * (xp*ym*zm) \
* + table[x_i ,y_i+1,z_i ] * (xm*yp*zm) \
* + table[x_i ,y_i ,z_i+1] * (xm*ym*zp) \ # <<<<<<<<<<<<<<
* + 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":113
* + table[x_i ,y_i+1,z_i ] * (xm*yp*zm) \
* + table[x_i ,y_i ,z_i+1] * (xm*ym*zp) \
* + table[x_i+1,y_i ,z_i+1] * (xp*ym*zp) \ # <<<<<<<<<<<<<<
* + 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":114
* + table[x_i ,y_i ,z_i+1] * (xm*ym*zp) \
* + table[x_i+1,y_i ,z_i+1] * (xp*ym*zp) \
* + 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_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":115
* + table[x_i+1,y_i ,z_i+1] * (xp*ym*zp) \
* + 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_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":109
* ym = (y_bins[y_i+1] - y) * dy_inv
* zm = (z_bins[z_i+1] - z) * dz_inv
* output[i] = table[x_i ,y_i ,z_i ] * (xm*ym*zm) \ # <<<<<<<<<<<<<<
* + 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,23 +5914,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":36
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":36
* @cython.wraparound(False)
* @cython.boundscheck(False)
* def planar_points_in_volume( # <<<<<<<<<<<<<<
@@ -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;
@@ -5674,7 +6122,7 @@
__pyx_bstride_0_mask = __pyx_bstruct_mask.strides[0]; __pyx_bstride_1_mask = __pyx_bstruct_mask.strides[1]; __pyx_bstride_2_mask = __pyx_bstruct_mask.strides[2];
__pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0]; __pyx_bshape_1_mask = __pyx_bstruct_mask.shape[1]; __pyx_bshape_2_mask = __pyx_bstruct_mask.shape[2];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":44
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":44
* float dx):
* cdef np.ndarray[np.int8_t, ndim=1] \
* valid = np.zeros(points.shape[0], dtype='int8') # <<<<<<<<<<<<<<
@@ -5716,7 +6164,7 @@
__pyx_v_valid = ((PyArrayObject *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":49
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":49
* cdef double dx_inv
* cdef unsigned int idx[3]
* count = 0 # <<<<<<<<<<<<<<
@@ -5725,16 +6173,20 @@
*/
__pyx_v_count = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":50
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":50
* cdef unsigned int idx[3]
* count = 0
* dx_inv = 1.0 / dx # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":51
* count = 0
* dx_inv = 1.0 / dx
* for i in xrange(points.shape[0]): # <<<<<<<<<<<<<<
@@ -5745,7 +6197,7 @@
for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
__pyx_v_i = __pyx_t_7;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":52
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":52
* dx_inv = 1.0 / dx
* for i in xrange(points.shape[0]):
* if pmask[i] == 0: # <<<<<<<<<<<<<<
@@ -5756,7 +6208,7 @@
__pyx_t_9 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_bstruct_pmask.buf, __pyx_t_8, __pyx_bstride_0_pmask)) == 0);
if (__pyx_t_9) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":53
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":53
* for i in xrange(points.shape[0]):
* if pmask[i] == 0:
* continue # <<<<<<<<<<<<<<
@@ -5768,7 +6220,7 @@
}
__pyx_L8:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":54
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":54
* if pmask[i] == 0:
* continue
* ex = 1 # <<<<<<<<<<<<<<
@@ -5777,7 +6229,7 @@
*/
__pyx_v_ex = 1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":55
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":55
* continue
* ex = 1
* for dim in xrange(3): # <<<<<<<<<<<<<<
@@ -5787,7 +6239,7 @@
for (__pyx_t_10 = 0; __pyx_t_10 < 3; __pyx_t_10+=1) {
__pyx_v_dim = __pyx_t_10;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":56
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":56
* ex = 1
* for dim in xrange(3):
* if points[i,dim] < left_edge[dim] or points[i,dim] > right_edge[dim]: # <<<<<<<<<<<<<<
@@ -5809,7 +6261,7 @@
}
if (__pyx_t_18) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":57
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":57
* for dim in xrange(3):
* if points[i,dim] < left_edge[dim] or points[i,dim] > right_edge[dim]:
* valid[i] = ex = 0 # <<<<<<<<<<<<<<
@@ -5820,7 +6272,7 @@
*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_bstruct_valid.buf, __pyx_t_19, __pyx_bstride_0_valid) = 0;
__pyx_v_ex = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":58
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":58
* if points[i,dim] < left_edge[dim] or points[i,dim] > right_edge[dim]:
* valid[i] = ex = 0
* break # <<<<<<<<<<<<<<
@@ -5834,7 +6286,7 @@
}
__pyx_L10_break:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":59
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":59
* valid[i] = ex = 0
* break
* if ex == 1: # <<<<<<<<<<<<<<
@@ -5844,7 +6296,7 @@
__pyx_t_18 = (__pyx_v_ex == 1);
if (__pyx_t_18) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":60
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":60
* break
* if ex == 1:
* for dim in xrange(3): # <<<<<<<<<<<<<<
@@ -5854,7 +6306,7 @@
for (__pyx_t_10 = 0; __pyx_t_10 < 3; __pyx_t_10+=1) {
__pyx_v_dim = __pyx_t_10;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":62
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":62
* for dim in xrange(3):
* idx[dim] = <unsigned int> \
* ((points[i,dim] - left_edge[dim]) * dx_inv) # <<<<<<<<<<<<<<
@@ -5865,7 +6317,7 @@
__pyx_t_21 = __pyx_v_dim;
__pyx_t_22 = __pyx_v_dim;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":61
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":61
* if ex == 1:
* for dim in xrange(3):
* idx[dim] = <unsigned int> \ # <<<<<<<<<<<<<<
@@ -5875,7 +6327,7 @@
(__pyx_v_idx[__pyx_v_dim]) = ((unsigned int)(((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_points.buf, __pyx_t_20, __pyx_bstride_0_points, __pyx_t_21, __pyx_bstride_1_points)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_22, __pyx_bstride_0_left_edge))) * __pyx_v_dx_inv));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":63
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":63
* idx[dim] = <unsigned int> \
* ((points[i,dim] - left_edge[dim]) * dx_inv)
* if mask[idx[0], idx[1], idx[2]] == 1: # <<<<<<<<<<<<<<
@@ -5888,7 +6340,7 @@
__pyx_t_18 = ((*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_mask.buf, __pyx_t_23, __pyx_bstride_0_mask, __pyx_t_24, __pyx_bstride_1_mask, __pyx_t_25, __pyx_bstride_2_mask)) == 1);
if (__pyx_t_18) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":64
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":64
* ((points[i,dim] - left_edge[dim]) * dx_inv)
* if mask[idx[0], idx[1], idx[2]] == 1:
* valid[i] = 1 # <<<<<<<<<<<<<<
@@ -5898,7 +6350,7 @@
__pyx_t_10 = __pyx_v_i;
*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_bstruct_valid.buf, __pyx_t_10, __pyx_bstride_0_valid) = 1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":65
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":65
* if mask[idx[0], idx[1], idx[2]] == 1:
* valid[i] = 1
* count += 1 # <<<<<<<<<<<<<<
@@ -5915,7 +6367,7 @@
__pyx_L6_continue:;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":67
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":67
* count += 1
*
* cdef np.ndarray[np.int32_t, ndim=1] result = np.empty(count, dtype='int32') # <<<<<<<<<<<<<<
@@ -5957,7 +6409,7 @@
__pyx_v_result = ((PyArrayObject *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":68
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":68
*
* cdef np.ndarray[np.int32_t, ndim=1] result = np.empty(count, dtype='int32')
* count = 0 # <<<<<<<<<<<<<<
@@ -5966,7 +6418,7 @@
*/
__pyx_v_count = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":69
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":69
* cdef np.ndarray[np.int32_t, ndim=1] result = np.empty(count, dtype='int32')
* count = 0
* for i in xrange(points.shape[0]): # <<<<<<<<<<<<<<
@@ -5977,7 +6429,7 @@
for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
__pyx_v_i = __pyx_t_7;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":70
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":70
* count = 0
* for i in xrange(points.shape[0]):
* if valid[i] == 1 and pmask[i] == 1: # <<<<<<<<<<<<<<
@@ -5995,7 +6447,7 @@
}
if (__pyx_t_17) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":71
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":71
* for i in xrange(points.shape[0]):
* if valid[i] == 1 and pmask[i] == 1:
* result[count] = i # <<<<<<<<<<<<<<
@@ -6005,7 +6457,7 @@
__pyx_t_29 = __pyx_v_count;
*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_result.buf, __pyx_t_29, __pyx_bstride_0_result) = __pyx_v_i;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":72
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":72
* if valid[i] == 1 and pmask[i] == 1:
* result[count] = i
* count += 1 # <<<<<<<<<<<<<<
@@ -6018,7 +6470,7 @@
__pyx_L18:;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":74
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":74
* count += 1
*
* return result # <<<<<<<<<<<<<<
@@ -6061,17 +6513,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":76
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":76
* return result
*
* cdef inline void set_rotated_pos( # <<<<<<<<<<<<<<
@@ -6084,7 +6531,7 @@
int __pyx_t_1;
__Pyx_RefNannySetupContext("set_rotated_pos");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":80
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":80
* np.float64_t rorigin[3], int i, int j, int k):
* cdef int oi
* for oi in range(3): # <<<<<<<<<<<<<<
@@ -6094,7 +6541,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_oi = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":81
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":81
* cdef int oi
* for oi in range(3):
* cp[oi] = rdds[0][oi] * (0.5 + i) \ # <<<<<<<<<<<<<<
@@ -6107,7 +6554,7 @@
__Pyx_RefNannyFinishContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":88
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":88
* #@cython.wraparound(False)
* #@cython.boundscheck(False)
* def grid_points_in_volume( # <<<<<<<<<<<<<<
@@ -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;
@@ -6345,7 +6786,7 @@
__pyx_bstride_0_mask = __pyx_bstruct_mask.strides[0]; __pyx_bstride_1_mask = __pyx_bstruct_mask.strides[1]; __pyx_bstride_2_mask = __pyx_bstruct_mask.strides[2];
__pyx_bshape_0_mask = __pyx_bstruct_mask.shape[0]; __pyx_bshape_1_mask = __pyx_bstruct_mask.shape[1]; __pyx_bshape_2_mask = __pyx_bstruct_mask.shape[2];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":99
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":99
* cdef int n[3], i, j, k, ax
* cdef np.float64_t rds[3][3], cur_pos[3], rorigin[3]
* for i in range(3): # <<<<<<<<<<<<<<
@@ -6355,7 +6796,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":100
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":100
* cdef np.float64_t rds[3][3], cur_pos[3], rorigin[3]
* for i in range(3):
* rorigin[i] = 0.0 # <<<<<<<<<<<<<<
@@ -6365,7 +6806,7 @@
(__pyx_v_rorigin[__pyx_v_i]) = 0.0;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":101
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":101
* for i in range(3):
* rorigin[i] = 0.0
* for i in range(3): # <<<<<<<<<<<<<<
@@ -6375,7 +6816,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":102
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":102
* rorigin[i] = 0.0
* for i in range(3):
* n[i] = mask.shape[i] # <<<<<<<<<<<<<<
@@ -6384,7 +6825,7 @@
*/
(__pyx_v_n[__pyx_v_i]) = (__pyx_v_mask->dimensions[__pyx_v_i]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":103
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":103
* for i in range(3):
* n[i] = mask.shape[i]
* for j in range(3): # <<<<<<<<<<<<<<
@@ -6394,7 +6835,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < 3; __pyx_t_2+=1) {
__pyx_v_j = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":106
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":106
* # Set up our transposed dx, which has a component in every
* # direction
* rds[i][j] = dds[i] * rot_mat[j,i] # <<<<<<<<<<<<<<
@@ -6428,7 +6869,7 @@
}
((__pyx_v_rds[__pyx_v_i])[__pyx_v_j]) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dds.buf, __pyx_t_3, __pyx_bstride_0_dds)) * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_rot_mat.buf, __pyx_t_4, __pyx_bstride_0_rot_mat, __pyx_t_5, __pyx_bstride_1_rot_mat)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":110
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":110
* # so we subtract the box_origin from the grid_origin and rotate
* # that
* rorigin[j] += (grid_left_edge[i] - box_origin[i]) * rot_mat[j,i] # <<<<<<<<<<<<<<
@@ -6474,7 +6915,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":112
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":112
* rorigin[j] += (grid_left_edge[i] - box_origin[i]) * rot_mat[j,i]
*
* for i in range(n[0]): # <<<<<<<<<<<<<<
@@ -6485,7 +6926,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":113
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":113
*
* for i in range(n[0]):
* for j in range(n[1]): # <<<<<<<<<<<<<<
@@ -6496,7 +6937,7 @@
for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
__pyx_v_j = __pyx_t_11;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":114
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":114
* for i in range(n[0]):
* for j in range(n[1]):
* for k in range(n[2]): # <<<<<<<<<<<<<<
@@ -6507,7 +6948,7 @@
for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
__pyx_v_k = __pyx_t_13;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":115
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":115
* for j in range(n[1]):
* for k in range(n[2]):
* set_rotated_pos(cur_pos, rds, rorigin, i, j, k) # <<<<<<<<<<<<<<
@@ -6516,7 +6957,7 @@
*/
__pyx_f_2yt_9amr_utils_set_rotated_pos(__pyx_v_cur_pos, __pyx_v_rds, __pyx_v_rorigin, __pyx_v_i, __pyx_v_j, __pyx_v_k);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":116
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":116
* for k in range(n[2]):
* set_rotated_pos(cur_pos, rds, rorigin, i, j, k)
* if (cur_pos[0] > box_lengths[0]): continue # <<<<<<<<<<<<<<
@@ -6540,7 +6981,7 @@
}
__pyx_L18:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":117
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":117
* set_rotated_pos(cur_pos, rds, rorigin, i, j, k)
* if (cur_pos[0] > box_lengths[0]): continue
* if (cur_pos[1] > box_lengths[1]): continue # <<<<<<<<<<<<<<
@@ -6564,7 +7005,7 @@
}
__pyx_L19:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":118
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":118
* if (cur_pos[0] > box_lengths[0]): continue
* if (cur_pos[1] > box_lengths[1]): continue
* if (cur_pos[2] > box_lengths[2]): continue # <<<<<<<<<<<<<<
@@ -6588,7 +7029,7 @@
}
__pyx_L20:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":119
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":119
* if (cur_pos[1] > box_lengths[1]): continue
* if (cur_pos[2] > box_lengths[2]): continue
* if (cur_pos[0] < 0.0): continue # <<<<<<<<<<<<<<
@@ -6602,7 +7043,7 @@
}
__pyx_L21:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":120
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":120
* if (cur_pos[2] > box_lengths[2]): continue
* if (cur_pos[0] < 0.0): continue
* if (cur_pos[1] < 0.0): continue # <<<<<<<<<<<<<<
@@ -6616,7 +7057,7 @@
}
__pyx_L22:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":121
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":121
* if (cur_pos[0] < 0.0): continue
* if (cur_pos[1] < 0.0): continue
* if (cur_pos[2] < 0.0): continue # <<<<<<<<<<<<<<
@@ -6630,17 +7071,16 @@
}
__pyx_L23:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":122
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":122
* if (cur_pos[1] < 0.0): continue
* if (cur_pos[2] < 0.0): continue
* if break_first: # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":123
* if (cur_pos[2] < 0.0): continue
* if break_first:
* if mask[i,j,k]: return 1 # <<<<<<<<<<<<<<
@@ -6680,7 +7120,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":125
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":125
* if mask[i,j,k]: return 1
* else:
* mask[i,j,k] = 1 # <<<<<<<<<<<<<<
@@ -6715,7 +7155,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":126
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":126
* else:
* mask[i,j,k] = 1
* return 0 # <<<<<<<<<<<<<<
@@ -6752,19 +7192,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":128
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":128
* return 0
*
* cdef void normalize_vector(np.float64_t vec[3]): # <<<<<<<<<<<<<<
@@ -6778,7 +7211,7 @@
int __pyx_t_1;
__Pyx_RefNannySetupContext("normalize_vector");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":130
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":130
* cdef void normalize_vector(np.float64_t vec[3]):
* cdef int i
* cdef np.float64_t norm = 0.0 # <<<<<<<<<<<<<<
@@ -6787,7 +7220,7 @@
*/
__pyx_v_norm = 0.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":131
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":131
* cdef int i
* cdef np.float64_t norm = 0.0
* for i in range(3): # <<<<<<<<<<<<<<
@@ -6797,7 +7230,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":132
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":132
* cdef np.float64_t norm = 0.0
* for i in range(3):
* norm += vec[i]*vec[i] # <<<<<<<<<<<<<<
@@ -6807,7 +7240,7 @@
__pyx_v_norm += ((__pyx_v_vec[__pyx_v_i]) * (__pyx_v_vec[__pyx_v_i]));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":133
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":133
* for i in range(3):
* norm += vec[i]*vec[i]
* norm = norm**0.5 # <<<<<<<<<<<<<<
@@ -6816,7 +7249,7 @@
*/
__pyx_v_norm = pow(__pyx_v_norm, 0.5);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":134
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":134
* norm += vec[i]*vec[i]
* norm = norm**0.5
* for i in range(3): # <<<<<<<<<<<<<<
@@ -6826,7 +7259,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":135
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":135
* norm = norm**0.5
* for i in range(3):
* vec[i] /= norm # <<<<<<<<<<<<<<
@@ -6839,7 +7272,7 @@
__Pyx_RefNannyFinishContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":137
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":137
* vec[i] /= norm
*
* cdef void get_cross_product(np.float64_t v1[3], # <<<<<<<<<<<<<<
@@ -6850,7 +7283,7 @@
static void __pyx_f_2yt_9amr_utils_get_cross_product(__pyx_t_5numpy_float64_t *__pyx_v_v1, __pyx_t_5numpy_float64_t *__pyx_v_v2, __pyx_t_5numpy_float64_t *__pyx_v_cp) {
__Pyx_RefNannySetupContext("get_cross_product");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":140
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":140
* np.float64_t v2[3],
* np.float64_t cp[3]):
* cp[0] = v1[1]*v2[2] - v1[2]*v2[1] # <<<<<<<<<<<<<<
@@ -6859,7 +7292,7 @@
*/
(__pyx_v_cp[0]) = (((__pyx_v_v1[1]) * (__pyx_v_v2[2])) - ((__pyx_v_v1[2]) * (__pyx_v_v2[1])));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":141
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":141
* np.float64_t cp[3]):
* cp[0] = v1[1]*v2[2] - v1[2]*v2[1]
* cp[1] = v1[3]*v2[0] - v1[0]*v2[3] # <<<<<<<<<<<<<<
@@ -6868,7 +7301,7 @@
*/
(__pyx_v_cp[1]) = (((__pyx_v_v1[3]) * (__pyx_v_v2[0])) - ((__pyx_v_v1[0]) * (__pyx_v_v2[3])));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":142
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":142
* cp[0] = v1[1]*v2[2] - v1[2]*v2[1]
* cp[1] = v1[3]*v2[0] - v1[0]*v2[3]
* cp[2] = v1[0]*v2[1] - v1[1]*v2[0] # <<<<<<<<<<<<<<
@@ -6880,7 +7313,7 @@
__Pyx_RefNannyFinishContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":145
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":145
* #print cp[0], cp[1], cp[2]
*
* cdef int check_projected_overlap( # <<<<<<<<<<<<<<
@@ -6901,7 +7334,7 @@
int __pyx_t_2;
__Pyx_RefNannySetupContext("check_projected_overlap");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":150
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":150
* cdef int g_ax, b_ax
* cdef np.float64_t tba, tga, ba, ga, sep_dot
* ba = ga = sep_dot = 0.0 # <<<<<<<<<<<<<<
@@ -6912,7 +7345,7 @@
__pyx_v_ga = 0.0;
__pyx_v_sep_dot = 0.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":151
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":151
* cdef np.float64_t tba, tga, ba, ga, sep_dot
* ba = ga = sep_dot = 0.0
* for g_ax in range(3): # <<<<<<<<<<<<<<
@@ -6922,7 +7355,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_g_ax = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":153
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":153
* for g_ax in range(3):
* # We need the grid vectors, which we'll precompute here
* tba = tga = 0.0 # <<<<<<<<<<<<<<
@@ -6932,7 +7365,7 @@
__pyx_v_tba = 0.0;
__pyx_v_tga = 0.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":154
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":154
* # We need the grid vectors, which we'll precompute here
* tba = tga = 0.0
* for b_ax in range(3): # <<<<<<<<<<<<<<
@@ -6942,7 +7375,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < 3; __pyx_t_2+=1) {
__pyx_v_b_ax = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":155
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":155
* tba = tga = 0.0
* for b_ax in range(3):
* tba += b_vec[g_ax][b_ax] * sep_vec[b_ax] # <<<<<<<<<<<<<<
@@ -6951,7 +7384,7 @@
*/
__pyx_v_tba += (((__pyx_v_b_vec[__pyx_v_g_ax])[__pyx_v_b_ax]) * (__pyx_v_sep_vec[__pyx_v_b_ax]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":156
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":156
* for b_ax in range(3):
* tba += b_vec[g_ax][b_ax] * sep_vec[b_ax]
* tga += g_vec[g_ax][b_ax] * sep_vec[b_ax] # <<<<<<<<<<<<<<
@@ -6961,7 +7394,7 @@
__pyx_v_tga += (((__pyx_v_g_vec[__pyx_v_g_ax])[__pyx_v_b_ax]) * (__pyx_v_sep_vec[__pyx_v_b_ax]));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":157
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":157
* tba += b_vec[g_ax][b_ax] * sep_vec[b_ax]
* tga += g_vec[g_ax][b_ax] * sep_vec[b_ax]
* ba += fabs(tba) # <<<<<<<<<<<<<<
@@ -6970,7 +7403,7 @@
*/
__pyx_v_ba += fabs(__pyx_v_tba);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":158
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":158
* tga += g_vec[g_ax][b_ax] * sep_vec[b_ax]
* ba += fabs(tba)
* ga += fabs(tga) # <<<<<<<<<<<<<<
@@ -6979,7 +7412,7 @@
*/
__pyx_v_ga += fabs(__pyx_v_tga);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":159
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":159
* ba += fabs(tba)
* ga += fabs(tga)
* sep_dot += sep_vec[g_ax] * sep_ax[g_ax] # <<<<<<<<<<<<<<
@@ -6989,7 +7422,7 @@
__pyx_v_sep_dot += ((__pyx_v_sep_vec[__pyx_v_g_ax]) * (__pyx_v_sep_ax[__pyx_v_g_ax]));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":162
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":162
* #print sep_vec[0], sep_vec[1], sep_vec[2],
* #print sep_ax[0], sep_ax[1], sep_ax[2]
* return (fabs(sep_dot) > ba+ga) # <<<<<<<<<<<<<<
@@ -7005,7 +7438,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":167
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":167
* @cython.wraparound(False)
* @cython.boundscheck(False)
* def find_grids_in_inclined_box( # <<<<<<<<<<<<<<
@@ -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;
@@ -7179,7 +7609,7 @@
__pyx_bstride_0_grid_right_edges = __pyx_bstruct_grid_right_edges.strides[0]; __pyx_bstride_1_grid_right_edges = __pyx_bstruct_grid_right_edges.strides[1];
__pyx_bshape_0_grid_right_edges = __pyx_bstruct_grid_right_edges.shape[0]; __pyx_bshape_1_grid_right_edges = __pyx_bstruct_grid_right_edges.shape[1];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":174
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":174
*
* # http://www.gamasutra.com/view/feature/3383/simple_intersection_tests_for_games.php?page=5
* cdef int n = grid_right_edges.shape[0] # <<<<<<<<<<<<<<
@@ -7188,7 +7618,7 @@
*/
__pyx_v_n = (__pyx_v_grid_right_edges->dimensions[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":178
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":178
* cdef np.float64_t b_vec[3][3], g_vec[3][3], a_vec[3][3], sep_ax[15][3]
* cdef np.float64_t sep_vec[3], norm
* cdef np.ndarray[np.int32_t, ndim=1] good = np.zeros(n, dtype='int32') # <<<<<<<<<<<<<<
@@ -7230,7 +7660,7 @@
__pyx_v_good = ((PyArrayObject *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":181
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":181
* cdef np.ndarray[np.float64_t, ndim=2] grid_centers
* # Fill in our axis unit vectors
* for b_ax in range(3): # <<<<<<<<<<<<<<
@@ -7240,7 +7670,7 @@
for (__pyx_t_6 = 0; __pyx_t_6 < 3; __pyx_t_6+=1) {
__pyx_v_b_ax = __pyx_t_6;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":182
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":182
* # Fill in our axis unit vectors
* for b_ax in range(3):
* for g_ax in range(3): # <<<<<<<<<<<<<<
@@ -7250,7 +7680,7 @@
for (__pyx_t_7 = 0; __pyx_t_7 < 3; __pyx_t_7+=1) {
__pyx_v_g_ax = __pyx_t_7;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":183
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":183
* for b_ax in range(3):
* for g_ax in range(3):
* a_vec[b_ax][g_ax] = <np.float64_t> (b_ax == g_ax) # <<<<<<<<<<<<<<
@@ -7261,7 +7691,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":184
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":184
* for g_ax in range(3):
* a_vec[b_ax][g_ax] = <np.float64_t> (b_ax == g_ax)
* grid_centers = (grid_right_edges + grid_left_edges)/2.0 # <<<<<<<<<<<<<<
@@ -7300,7 +7730,7 @@
__pyx_v_grid_centers = ((PyArrayObject *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":188
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":188
* # Now we pre-compute our candidate separating axes, because the unit
* # vectors for all the grids are identical
* for b_ax in range(3): # <<<<<<<<<<<<<<
@@ -7310,7 +7740,7 @@
for (__pyx_t_6 = 0; __pyx_t_6 < 3; __pyx_t_6+=1) {
__pyx_v_b_ax = __pyx_t_6;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":191
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":191
* # We have 6 principal axes we already know, which are the grid (domain)
* # principal axes and the box axes
* sep_ax[b_ax][0] = sep_ax[b_ax][1] = sep_ax[b_ax][2] = 0.0 # <<<<<<<<<<<<<<
@@ -7321,7 +7751,7 @@
((__pyx_v_sep_ax[__pyx_v_b_ax])[1]) = 0.0;
((__pyx_v_sep_ax[__pyx_v_b_ax])[2]) = 0.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":192
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":192
* # principal axes and the box axes
* sep_ax[b_ax][0] = sep_ax[b_ax][1] = sep_ax[b_ax][2] = 0.0
* sep_ax[b_ax][b_ax] = 1.0 # delta_ijk, for grid axes # <<<<<<<<<<<<<<
@@ -7330,7 +7760,7 @@
*/
((__pyx_v_sep_ax[__pyx_v_b_ax])[__pyx_v_b_ax]) = 1.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":193
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":193
* sep_ax[b_ax][0] = sep_ax[b_ax][1] = sep_ax[b_ax][2] = 0.0
* sep_ax[b_ax][b_ax] = 1.0 # delta_ijk, for grid axes
* for g_ax in range(3): # <<<<<<<<<<<<<<
@@ -7340,7 +7770,7 @@
for (__pyx_t_7 = 0; __pyx_t_7 < 3; __pyx_t_7+=1) {
__pyx_v_g_ax = __pyx_t_7;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":194
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":194
* sep_ax[b_ax][b_ax] = 1.0 # delta_ijk, for grid axes
* for g_ax in range(3):
* b_vec[b_ax][g_ax] = 0.5*box_vectors[b_ax,g_ax] # <<<<<<<<<<<<<<
@@ -7351,7 +7781,7 @@
__pyx_t_13 = __pyx_v_g_ax;
((__pyx_v_b_vec[__pyx_v_b_ax])[__pyx_v_g_ax]) = (0.5 * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_box_vectors.buf, __pyx_t_12, __pyx_bstride_0_box_vectors, __pyx_t_13, __pyx_bstride_1_box_vectors)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":195
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":195
* for g_ax in range(3):
* b_vec[b_ax][g_ax] = 0.5*box_vectors[b_ax,g_ax]
* sep_ax[b_ax + 3][g_ax] = b_vec[b_ax][g_ax] # box axes # <<<<<<<<<<<<<<
@@ -7361,7 +7791,7 @@
((__pyx_v_sep_ax[(__pyx_v_b_ax + 3)])[__pyx_v_g_ax]) = ((__pyx_v_b_vec[__pyx_v_b_ax])[__pyx_v_g_ax]);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":196
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":196
* b_vec[b_ax][g_ax] = 0.5*box_vectors[b_ax,g_ax]
* sep_ax[b_ax + 3][g_ax] = b_vec[b_ax][g_ax] # box axes
* normalize_vector(sep_ax[b_ax + 3]) # <<<<<<<<<<<<<<
@@ -7370,7 +7800,7 @@
*/
__pyx_f_2yt_9amr_utils_normalize_vector((__pyx_v_sep_ax[(__pyx_v_b_ax + 3)]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":197
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":197
* sep_ax[b_ax + 3][g_ax] = b_vec[b_ax][g_ax] # box axes
* normalize_vector(sep_ax[b_ax + 3])
* for g_ax in range(3): # <<<<<<<<<<<<<<
@@ -7380,7 +7810,7 @@
for (__pyx_t_7 = 0; __pyx_t_7 < 3; __pyx_t_7+=1) {
__pyx_v_g_ax = __pyx_t_7;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":198
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":198
* normalize_vector(sep_ax[b_ax + 3])
* for g_ax in range(3):
* get_cross_product(b_vec[b_ax], a_vec[g_ax], sep_ax[b_ax*3 + g_ax + 6]) # <<<<<<<<<<<<<<
@@ -7389,7 +7819,7 @@
*/
__pyx_f_2yt_9amr_utils_get_cross_product((__pyx_v_b_vec[__pyx_v_b_ax]), (__pyx_v_a_vec[__pyx_v_g_ax]), (__pyx_v_sep_ax[(((__pyx_v_b_ax * 3) + __pyx_v_g_ax) + 6)]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":199
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":199
* for g_ax in range(3):
* get_cross_product(b_vec[b_ax], a_vec[g_ax], sep_ax[b_ax*3 + g_ax + 6])
* normalize_vector(sep_ax[b_ax*3 + g_ax + 6]) # <<<<<<<<<<<<<<
@@ -7400,7 +7830,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":201
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":201
* normalize_vector(sep_ax[b_ax*3 + g_ax + 6])
*
* for gi in range(n): # <<<<<<<<<<<<<<
@@ -7411,7 +7841,7 @@
for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
__pyx_v_gi = __pyx_t_7;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":202
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":202
*
* for gi in range(n):
* for g_ax in range(3): # <<<<<<<<<<<<<<
@@ -7421,7 +7851,7 @@
for (__pyx_t_14 = 0; __pyx_t_14 < 3; __pyx_t_14+=1) {
__pyx_v_g_ax = __pyx_t_14;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":204
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":204
* for g_ax in range(3):
* # Calculate the separation vector
* sep_vec[g_ax] = grid_centers[gi, g_ax] - box_center[g_ax] # <<<<<<<<<<<<<<
@@ -7433,7 +7863,7 @@
__pyx_t_17 = __pyx_v_g_ax;
(__pyx_v_sep_vec[__pyx_v_g_ax]) = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_centers.buf, __pyx_t_15, __pyx_bstride_0_grid_centers, __pyx_t_16, __pyx_bstride_1_grid_centers)) - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_box_center.buf, __pyx_t_17, __pyx_bstride_0_box_center)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":206
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":206
* sep_vec[g_ax] = grid_centers[gi, g_ax] - box_center[g_ax]
* # Calculate the grid axis lengths
* g_vec[g_ax][0] = g_vec[g_ax][1] = g_vec[g_ax][2] = 0.0 # <<<<<<<<<<<<<<
@@ -7444,7 +7874,7 @@
((__pyx_v_g_vec[__pyx_v_g_ax])[1]) = 0.0;
((__pyx_v_g_vec[__pyx_v_g_ax])[2]) = 0.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":207
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":207
* # Calculate the grid axis lengths
* g_vec[g_ax][0] = g_vec[g_ax][1] = g_vec[g_ax][2] = 0.0
* g_vec[g_ax][g_ax] = 0.5 * (grid_right_edges[gi, g_ax] # <<<<<<<<<<<<<<
@@ -7454,7 +7884,7 @@
__pyx_t_18 = __pyx_v_gi;
__pyx_t_19 = __pyx_v_g_ax;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":208
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":208
* g_vec[g_ax][0] = g_vec[g_ax][1] = g_vec[g_ax][2] = 0.0
* g_vec[g_ax][g_ax] = 0.5 * (grid_right_edges[gi, g_ax]
* - grid_left_edges[gi, g_ax]) # <<<<<<<<<<<<<<
@@ -7464,7 +7894,7 @@
__pyx_t_20 = __pyx_v_gi;
__pyx_t_21 = __pyx_v_g_ax;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":207
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":207
* # Calculate the grid axis lengths
* g_vec[g_ax][0] = g_vec[g_ax][1] = g_vec[g_ax][2] = 0.0
* g_vec[g_ax][g_ax] = 0.5 * (grid_right_edges[gi, g_ax] # <<<<<<<<<<<<<<
@@ -7474,7 +7904,7 @@
((__pyx_v_g_vec[__pyx_v_g_ax])[__pyx_v_g_ax]) = (0.5 * ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_right_edges.buf, __pyx_t_18, __pyx_bstride_0_grid_right_edges, __pyx_t_19, __pyx_bstride_1_grid_right_edges)) - (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_grid_left_edges.buf, __pyx_t_20, __pyx_bstride_0_grid_left_edges, __pyx_t_21, __pyx_bstride_1_grid_left_edges))));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":209
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":209
* g_vec[g_ax][g_ax] = 0.5 * (grid_right_edges[gi, g_ax]
* - grid_left_edges[gi, g_ax])
* for b_ax in range(15): # <<<<<<<<<<<<<<
@@ -7484,7 +7914,7 @@
for (__pyx_t_14 = 0; __pyx_t_14 < 15; __pyx_t_14+=1) {
__pyx_v_b_ax = __pyx_t_14;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":213
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":213
* if check_projected_overlap(
* sep_ax[b_ax], sep_vec, gi,
* b_vec, g_vec): # <<<<<<<<<<<<<<
@@ -7494,7 +7924,7 @@
__pyx_t_22 = __pyx_f_2yt_9amr_utils_check_projected_overlap((__pyx_v_sep_ax[__pyx_v_b_ax]), __pyx_v_sep_vec, __pyx_v_gi, __pyx_v_b_vec, __pyx_v_g_vec);
if (__pyx_t_22) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":214
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":214
* sep_ax[b_ax], sep_vec, gi,
* b_vec, g_vec):
* good[gi] = 1 # <<<<<<<<<<<<<<
@@ -7504,7 +7934,7 @@
__pyx_t_22 = __pyx_v_gi;
*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_bstruct_good.buf, __pyx_t_22, __pyx_bstride_0_good) = 1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":215
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":215
* b_vec, g_vec):
* good[gi] = 1
* break # <<<<<<<<<<<<<<
@@ -7519,7 +7949,7 @@
__pyx_L21_break:;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/PointsInVolume.pyx":216
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":216
* good[gi] = 1
* break
* return good # <<<<<<<<<<<<<<
@@ -7559,16 +7989,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":36
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":36
*
* @cython.boundscheck(False)
* def Transfer3D(np.ndarray[np.float64_t, ndim=3] i_s, # <<<<<<<<<<<<<<
@@ -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;
@@ -7842,7 +8265,7 @@
__pyx_bstride_0_a = __pyx_bstruct_a.strides[0]; __pyx_bstride_1_a = __pyx_bstruct_a.strides[1]; __pyx_bstride_2_a = __pyx_bstruct_a.strides[2]; __pyx_bstride_3_a = __pyx_bstruct_a.strides[3];
__pyx_bshape_0_a = __pyx_bstruct_a.shape[0]; __pyx_bshape_1_a = __pyx_bstruct_a.shape[1]; __pyx_bshape_2_a = __pyx_bstruct_a.shape[2]; __pyx_bshape_3_a = __pyx_bstruct_a.shape[3];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":55
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":55
* cdef int k, kk
* cdef int n, nn
* nn = o_s.shape[3] # This might be slow # <<<<<<<<<<<<<<
@@ -7851,7 +8274,7 @@
*/
__pyx_v_nn = (__pyx_v_o_s->dimensions[3]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":56
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":56
* cdef int n, nn
* nn = o_s.shape[3] # This might be slow
* cdef np.float64_t *temp = <np.float64_t *>malloc(sizeof(np.float64_t) * nn) # <<<<<<<<<<<<<<
@@ -7860,7 +8283,7 @@
*/
__pyx_v_temp = ((__pyx_t_5numpy_float64_t *)malloc(((sizeof(__pyx_t_5numpy_float64_t)) * __pyx_v_nn)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":57
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":57
* nn = o_s.shape[3] # This might be slow
* cdef np.float64_t *temp = <np.float64_t *>malloc(sizeof(np.float64_t) * nn)
* for i in range((imax-imin)*istride): # <<<<<<<<<<<<<<
@@ -7871,7 +8294,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":58
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":58
* cdef np.float64_t *temp = <np.float64_t *>malloc(sizeof(np.float64_t) * nn)
* for i in range((imax-imin)*istride):
* ii = i + imin*istride # <<<<<<<<<<<<<<
@@ -7880,7 +8303,7 @@
*/
__pyx_v_ii = (__pyx_v_i + (__pyx_v_imin * __pyx_v_istride));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":59
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":59
* for i in range((imax-imin)*istride):
* ii = i + imin*istride
* for j in range((jmax-jmin)*jstride): # <<<<<<<<<<<<<<
@@ -7891,7 +8314,7 @@
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_j = __pyx_t_4;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":60
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":60
* ii = i + imin*istride
* for j in range((jmax-jmin)*jstride):
* jj = j + jmin*jstride # <<<<<<<<<<<<<<
@@ -7900,7 +8323,7 @@
*/
__pyx_v_jj = (__pyx_v_j + (__pyx_v_jmin * __pyx_v_jstride));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":62
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":62
* jj = j + jmin*jstride
* # Not sure about the ordering of the loops here
* for n in range(nn): # <<<<<<<<<<<<<<
@@ -7911,7 +8334,7 @@
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
__pyx_v_n = __pyx_t_6;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":63
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":63
* # Not sure about the ordering of the loops here
* for n in range(nn):
* temp[n] = i_s[ii,jj,n] # <<<<<<<<<<<<<<
@@ -7927,7 +8350,7 @@
(__pyx_v_temp[__pyx_v_n]) = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_i_s.buf, __pyx_t_7, __pyx_bstride_0_i_s, __pyx_t_8, __pyx_bstride_1_i_s, __pyx_t_9, __pyx_bstride_2_i_s));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":64
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":64
* for n in range(nn):
* temp[n] = i_s[ii,jj,n]
* for k in range(kmax-kmin): # <<<<<<<<<<<<<<
@@ -7938,7 +8361,7 @@
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
__pyx_v_k = __pyx_t_6;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":65
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":65
* temp[n] = i_s[ii,jj,n]
* for k in range(kmax-kmin):
* kk = k + kmin#*kstride, which doesn't make any sense # <<<<<<<<<<<<<<
@@ -7947,7 +8370,7 @@
*/
__pyx_v_kk = (__pyx_v_k + __pyx_v_kmin);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":66
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":66
* for k in range(kmax-kmin):
* kk = k + kmin#*kstride, which doesn't make any sense
* for n in range(nn): # <<<<<<<<<<<<<<
@@ -7958,7 +8381,7 @@
for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
__pyx_v_n = __pyx_t_11;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":67
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":67
* kk = k + kmin#*kstride, which doesn't make any sense
* for n in range(nn):
* o_s[i,j,k,n] = temp[n] + dx*(e[i,j,k,n] - temp[n]*a[i,j,k,n]) # <<<<<<<<<<<<<<
@@ -7991,7 +8414,7 @@
if (__pyx_t_23 < 0) __pyx_t_23 += __pyx_bshape_3_o_s;
*__Pyx_BufPtrStrided4d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_o_s.buf, __pyx_t_20, __pyx_bstride_0_o_s, __pyx_t_21, __pyx_bstride_1_o_s, __pyx_t_22, __pyx_bstride_2_o_s, __pyx_t_23, __pyx_bstride_3_o_s) = ((__pyx_v_temp[__pyx_v_n]) + (__pyx_v_dx * ((*__Pyx_BufPtrStrided4d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_e.buf, __pyx_t_12, __pyx_bstride_0_e, __pyx_t_13, __pyx_bstride_1_e, __pyx_t_14, __pyx_bstride_2_e, __pyx_t_15, __pyx_bstride_3_e)) - ((__pyx_v_temp[__pyx_v_n]) * (*__Pyx_BufPtrStrided4d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_a.buf, __pyx_t_16, __pyx_bstride_0_a, __pyx_t_17, __pyx_bstride_1_a, __pyx_t_18, __pyx_bstride_2_a, __pyx_t_19, __pyx_bstride_3_a))))));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":68
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":68
* for n in range(nn):
* o_s[i,j,k,n] = temp[n] + dx*(e[i,j,k,n] - temp[n]*a[i,j,k,n])
* temp[n] = o_s[i,j,k,n] # <<<<<<<<<<<<<<
@@ -8010,7 +8433,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":69
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":69
* o_s[i,j,k,n] = temp[n] + dx*(e[i,j,k,n] - temp[n]*a[i,j,k,n])
* temp[n] = o_s[i,j,k,n]
* for n in range(nn): # <<<<<<<<<<<<<<
@@ -8021,7 +8444,7 @@
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
__pyx_v_n = __pyx_t_6;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":70
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":70
* temp[n] = o_s[i,j,k,n]
* for n in range(nn):
* i_s[ii,jj,n] = temp[n] # <<<<<<<<<<<<<<
@@ -8039,7 +8462,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":71
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":71
* for n in range(nn):
* i_s[ii,jj,n] = temp[n]
* free(temp) # <<<<<<<<<<<<<<
@@ -8067,16 +8490,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":74
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":74
*
* @cython.boundscheck(False)
* def TransferShells(np.ndarray[np.float64_t, ndim=3] i_s, # <<<<<<<<<<<<<<
@@ -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;
@@ -8239,7 +8656,7 @@
__pyx_bstride_0_shells = __pyx_bstruct_shells.strides[0]; __pyx_bstride_1_shells = __pyx_bstruct_shells.strides[1];
__pyx_bshape_0_shells = __pyx_bstruct_shells.shape[0]; __pyx_bshape_1_shells = __pyx_bstruct_shells.shape[1];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":86
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":86
* cdef int n, nn
* cdef np.float64_t dist
* ii = data.shape[0] # <<<<<<<<<<<<<<
@@ -8248,7 +8665,7 @@
*/
__pyx_v_ii = (__pyx_v_data->dimensions[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":87
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":87
* cdef np.float64_t dist
* ii = data.shape[0]
* jj = data.shape[1] # <<<<<<<<<<<<<<
@@ -8257,7 +8674,7 @@
*/
__pyx_v_jj = (__pyx_v_data->dimensions[1]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":88
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":88
* ii = data.shape[0]
* jj = data.shape[1]
* kk = data.shape[2] # <<<<<<<<<<<<<<
@@ -8266,7 +8683,7 @@
*/
__pyx_v_kk = (__pyx_v_data->dimensions[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":89
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":89
* jj = data.shape[1]
* kk = data.shape[2]
* nn = shells.shape[0] # <<<<<<<<<<<<<<
@@ -8275,7 +8692,7 @@
*/
__pyx_v_nn = (__pyx_v_shells->dimensions[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":92
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":92
* cdef float rgba[4]
* cdef float alpha
* for i in range(ii): # <<<<<<<<<<<<<<
@@ -8286,7 +8703,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":93
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":93
* cdef float alpha
* for i in range(ii):
* for j in range(jj): # <<<<<<<<<<<<<<
@@ -8297,7 +8714,7 @@
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_j = __pyx_t_4;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":95
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":95
* for j in range(jj):
* # Not sure about the ordering of the loops here
* for k in range(kk): # <<<<<<<<<<<<<<
@@ -8308,7 +8725,7 @@
for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
__pyx_v_k = __pyx_t_6;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":96
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":96
* # Not sure about the ordering of the loops here
* for k in range(kk):
* for n in range(nn): # <<<<<<<<<<<<<<
@@ -8319,7 +8736,7 @@
for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
__pyx_v_n = __pyx_t_8;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":97
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":97
* for k in range(kk):
* for n in range(nn):
* dist = shells[n, 0] - data[i,j,k] # <<<<<<<<<<<<<<
@@ -8338,21 +8755,21 @@
if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_bshape_2_data;
__pyx_v_dist = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_9, __pyx_bstride_0_shells, __pyx_t_10, __pyx_bstride_1_shells)) - (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_data.buf, __pyx_t_11, __pyx_bstride_0_data, __pyx_t_12, __pyx_bstride_1_data, __pyx_t_13, __pyx_bstride_2_data)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":98
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":98
* for n in range(nn):
* dist = shells[n, 0] - data[i,j,k]
* if dist < 0: dist *= -1.0 # <<<<<<<<<<<<<<
* 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;
}
__pyx_L14:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":99
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":99
* dist = shells[n, 0] - data[i,j,k]
* if dist < 0: dist *= -1.0
* if dist < shells[n,1]: # <<<<<<<<<<<<<<
@@ -8366,7 +8783,7 @@
__pyx_t_14 = (__pyx_v_dist < (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_15, __pyx_bstride_0_shells, __pyx_t_16, __pyx_bstride_1_shells)));
if (__pyx_t_14) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":100
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":100
* if dist < 0: dist *= -1.0
* if dist < shells[n,1]:
* dist = exp(-dist/8.0) # <<<<<<<<<<<<<<
@@ -8375,7 +8792,7 @@
*/
__pyx_v_dist = exp(((-__pyx_v_dist) / 8.0));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":101
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":101
* if dist < shells[n,1]:
* dist = exp(-dist/8.0)
* rgba[0] = shells[n,2] # <<<<<<<<<<<<<<
@@ -8388,7 +8805,7 @@
if (__pyx_t_18 < 0) __pyx_t_18 += __pyx_bshape_1_shells;
(__pyx_v_rgba[0]) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_17, __pyx_bstride_0_shells, __pyx_t_18, __pyx_bstride_1_shells));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":102
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":102
* dist = exp(-dist/8.0)
* rgba[0] = shells[n,2]
* rgba[1] = shells[n,3] # <<<<<<<<<<<<<<
@@ -8401,7 +8818,7 @@
if (__pyx_t_20 < 0) __pyx_t_20 += __pyx_bshape_1_shells;
(__pyx_v_rgba[1]) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_19, __pyx_bstride_0_shells, __pyx_t_20, __pyx_bstride_1_shells));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":103
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":103
* rgba[0] = shells[n,2]
* rgba[1] = shells[n,3]
* rgba[2] = shells[n,4] # <<<<<<<<<<<<<<
@@ -8414,7 +8831,7 @@
if (__pyx_t_22 < 0) __pyx_t_22 += __pyx_bshape_1_shells;
(__pyx_v_rgba[2]) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_21, __pyx_bstride_0_shells, __pyx_t_22, __pyx_bstride_1_shells));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":104
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":104
* rgba[1] = shells[n,3]
* rgba[2] = shells[n,4]
* rgba[3] = shells[n,5] # <<<<<<<<<<<<<<
@@ -8427,7 +8844,7 @@
if (__pyx_t_24 < 0) __pyx_t_24 += __pyx_bshape_1_shells;
(__pyx_v_rgba[3]) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_shells.buf, __pyx_t_23, __pyx_bstride_0_shells, __pyx_t_24, __pyx_bstride_1_shells));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":105
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":105
* rgba[2] = shells[n,4]
* rgba[3] = shells[n,5]
* alpha = i_s[i,j,3] # <<<<<<<<<<<<<<
@@ -8442,7 +8859,7 @@
if (__pyx_t_27 < 0) __pyx_t_27 += __pyx_bshape_2_i_s;
__pyx_v_alpha = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_i_s.buf, __pyx_t_25, __pyx_bstride_0_i_s, __pyx_t_26, __pyx_bstride_1_i_s, __pyx_t_27, __pyx_bstride_2_i_s));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":106
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":106
* rgba[3] = shells[n,5]
* alpha = i_s[i,j,3]
* dist *= dist # This might improve appearance # <<<<<<<<<<<<<<
@@ -8451,7 +8868,7 @@
*/
__pyx_v_dist *= __pyx_v_dist;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":107
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":107
* alpha = i_s[i,j,3]
* dist *= dist # This might improve appearance
* i_s[i,j,0] += (1.0 - alpha)*rgba[0]*dist*rgba[3] # <<<<<<<<<<<<<<
@@ -8466,7 +8883,7 @@
if (__pyx_t_30 < 0) __pyx_t_30 += __pyx_bshape_2_i_s;
*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_i_s.buf, __pyx_t_28, __pyx_bstride_0_i_s, __pyx_t_29, __pyx_bstride_1_i_s, __pyx_t_30, __pyx_bstride_2_i_s) += ((((1.0 - __pyx_v_alpha) * (__pyx_v_rgba[0])) * __pyx_v_dist) * (__pyx_v_rgba[3]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":108
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":108
* dist *= dist # This might improve appearance
* i_s[i,j,0] += (1.0 - alpha)*rgba[0]*dist*rgba[3]
* i_s[i,j,1] += (1.0 - alpha)*rgba[1]*dist*rgba[3] # <<<<<<<<<<<<<<
@@ -8481,7 +8898,7 @@
if (__pyx_t_33 < 0) __pyx_t_33 += __pyx_bshape_2_i_s;
*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_i_s.buf, __pyx_t_31, __pyx_bstride_0_i_s, __pyx_t_32, __pyx_bstride_1_i_s, __pyx_t_33, __pyx_bstride_2_i_s) += ((((1.0 - __pyx_v_alpha) * (__pyx_v_rgba[1])) * __pyx_v_dist) * (__pyx_v_rgba[3]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":109
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":109
* i_s[i,j,0] += (1.0 - alpha)*rgba[0]*dist*rgba[3]
* i_s[i,j,1] += (1.0 - alpha)*rgba[1]*dist*rgba[3]
* i_s[i,j,2] += (1.0 - alpha)*rgba[2]*dist*rgba[3] # <<<<<<<<<<<<<<
@@ -8496,7 +8913,7 @@
if (__pyx_t_36 < 0) __pyx_t_36 += __pyx_bshape_2_i_s;
*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_i_s.buf, __pyx_t_34, __pyx_bstride_0_i_s, __pyx_t_35, __pyx_bstride_1_i_s, __pyx_t_36, __pyx_bstride_2_i_s) += ((((1.0 - __pyx_v_alpha) * (__pyx_v_rgba[2])) * __pyx_v_dist) * (__pyx_v_rgba[3]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":110
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":110
* i_s[i,j,1] += (1.0 - alpha)*rgba[1]*dist*rgba[3]
* i_s[i,j,2] += (1.0 - alpha)*rgba[2]*dist*rgba[3]
* i_s[i,j,3] += (1.0 - alpha)*rgba[3]*dist*rgba[3] # <<<<<<<<<<<<<<
@@ -8511,7 +8928,7 @@
if (__pyx_t_39 < 0) __pyx_t_39 += __pyx_bshape_2_i_s;
*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_i_s.buf, __pyx_t_37, __pyx_bstride_0_i_s, __pyx_t_38, __pyx_bstride_1_i_s, __pyx_t_39, __pyx_bstride_2_i_s) += ((((1.0 - __pyx_v_alpha) * (__pyx_v_rgba[3])) * __pyx_v_dist) * (__pyx_v_rgba[3]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":111
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":111
* i_s[i,j,2] += (1.0 - alpha)*rgba[2]*dist*rgba[3]
* i_s[i,j,3] += (1.0 - alpha)*rgba[3]*dist*rgba[3]
* break # <<<<<<<<<<<<<<
@@ -8545,15 +8962,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":114
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":114
*
* @cython.boundscheck(False)
* def Transfer1D(float i_s, # <<<<<<<<<<<<<<
@@ -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;
@@ -8716,7 +9127,7 @@
__pyx_bstride_0_dx = __pyx_bstruct_dx.strides[0];
__pyx_bshape_0_dx = __pyx_bstruct_dx.shape[0];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":121
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":121
* int imin, int imax):
* cdef int i
* for i in range(imin, imax): # <<<<<<<<<<<<<<
@@ -8727,7 +9138,7 @@
for (__pyx_t_2 = __pyx_v_imin; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":122
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":122
* cdef int i
* for i in range(imin, imax):
* o_s[i] = i_s + dx[i]*(e[i] - i_s*a[i]) # <<<<<<<<<<<<<<
@@ -8744,7 +9155,7 @@
if (__pyx_t_6 < 0) __pyx_t_6 += __pyx_bshape_0_o_s;
*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_bstruct_o_s.buf, __pyx_t_6, __pyx_bstride_0_o_s) = (__pyx_v_i_s + ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_bstruct_dx.buf, __pyx_t_3, __pyx_bstride_0_dx)) * ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_bstruct_e.buf, __pyx_t_4, __pyx_bstride_0_e)) - (__pyx_v_i_s * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_bstruct_a.buf, __pyx_t_5, __pyx_bstride_0_a))))));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":123
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":123
* for i in range(imin, imax):
* o_s[i] = i_s + dx[i]*(e[i] - i_s*a[i])
* i_s = o_s[i] # <<<<<<<<<<<<<<
@@ -8756,7 +9167,7 @@
__pyx_v_i_s = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float_t *, __pyx_bstruct_o_s.buf, __pyx_t_7, __pyx_bstride_0_o_s));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":124
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":124
* o_s[i] = i_s + dx[i]*(e[i] - i_s*a[i])
* i_s = o_s[i]
* return i_s # <<<<<<<<<<<<<<
@@ -8790,16 +9201,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":128
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":128
* @cython.wraparound(False)
* @cython.boundscheck(False)
* def VoxelTraversal(np.ndarray[np.int_t, ndim=3] grid_mask, # <<<<<<<<<<<<<<
@@ -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;
@@ -9239,7 +9640,7 @@
__pyx_bstride_0_v = __pyx_bstruct_v.strides[0];
__pyx_bshape_0_v = __pyx_bstruct_v.shape[0];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":141
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":141
* cdef int i, x, y
* cdef np.float64_t tl, tr, intersect_t, enter_t, exit_t, dt_tolerance
* cdef np.ndarray[np.int64_t, ndim=1] step = np.empty((3,), dtype=np.int64) # <<<<<<<<<<<<<<
@@ -9290,7 +9691,7 @@
__pyx_v_step = ((PyArrayObject *)__pyx_t_5);
__pyx_t_5 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":142
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":142
* cdef np.float64_t tl, tr, intersect_t, enter_t, exit_t, dt_tolerance
* cdef np.ndarray[np.int64_t, ndim=1] step = np.empty((3,), dtype=np.int64)
* cdef np.ndarray[np.int64_t, ndim=1] cur_ind = np.empty((3,), dtype=np.int64) # <<<<<<<<<<<<<<
@@ -9341,7 +9742,7 @@
__pyx_v_cur_ind = ((PyArrayObject *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":143
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":143
* cdef np.ndarray[np.int64_t, ndim=1] step = np.empty((3,), dtype=np.int64)
* cdef np.ndarray[np.int64_t, ndim=1] cur_ind = np.empty((3,), dtype=np.int64)
* cdef np.ndarray[np.float64_t, ndim=1] tdelta = np.empty((3,), dtype=np.float64) # <<<<<<<<<<<<<<
@@ -9392,7 +9793,7 @@
__pyx_v_tdelta = ((PyArrayObject *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":144
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":144
* cdef np.ndarray[np.int64_t, ndim=1] cur_ind = np.empty((3,), dtype=np.int64)
* cdef np.ndarray[np.float64_t, ndim=1] tdelta = np.empty((3,), dtype=np.float64)
* cdef np.ndarray[np.float64_t, ndim=1] tmax = np.empty((3,), dtype=np.float64) # <<<<<<<<<<<<<<
@@ -9443,7 +9844,7 @@
__pyx_v_tmax = ((PyArrayObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":145
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":145
* cdef np.ndarray[np.float64_t, ndim=1] tdelta = np.empty((3,), dtype=np.float64)
* cdef np.ndarray[np.float64_t, ndim=1] tmax = np.empty((3,), dtype=np.float64)
* cdef np.ndarray[np.float64_t, ndim=1] intersect = np.empty((3,), dtype=np.float64) # <<<<<<<<<<<<<<
@@ -9494,25 +9895,25 @@
__pyx_v_intersect = ((PyArrayObject *)__pyx_t_5);
__pyx_t_5 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":146
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":146
* cdef np.ndarray[np.float64_t, ndim=1] tmax = np.empty((3,), dtype=np.float64)
* cdef np.ndarray[np.float64_t, ndim=1] intersect = np.empty((3,), dtype=np.float64)
* intersect_t = 1 # <<<<<<<<<<<<<<
* dt_tolerance = 1e-6
* # recall p = v * t + u
*/
- __pyx_v_intersect_t = 1;
+ __pyx_v_intersect_t = 1.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":147
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":147
* cdef np.ndarray[np.float64_t, ndim=1] intersect = np.empty((3,), dtype=np.float64)
* intersect_t = 1
* dt_tolerance = 1e-6 # <<<<<<<<<<<<<<
* # recall p = v * t + u
* # where p is position, v is our vector, u is the start point
*/
- __pyx_v_dt_tolerance = 9.9999999999999995e-07;
+ __pyx_v_dt_tolerance = 1e-6;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":150
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":150
* # recall p = v * t + u
* # where p is position, v is our vector, u is the start point
* for i in range(3): # <<<<<<<<<<<<<<
@@ -9522,7 +9923,7 @@
for (__pyx_t_11 = 0; __pyx_t_11 < 3; __pyx_t_11+=1) {
__pyx_v_i = __pyx_t_11;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":152
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":152
* for i in range(3):
* # As long as we're iterating, set some other stuff, too
* if(v[i] < 0): step[i] = -1 # <<<<<<<<<<<<<<
@@ -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;
@@ -9538,7 +9939,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":153
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":153
* # As long as we're iterating, set some other stuff, too
* if(v[i] < 0): step[i] = -1
* else: step[i] = 1 # <<<<<<<<<<<<<<
@@ -9550,25 +9951,25 @@
}
__pyx_L8:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":154
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":154
* if(v[i] < 0): step[i] = -1
* else: step[i] = 1
* x = (i+1)%3 # <<<<<<<<<<<<<<
* y = (i+2)%3
* tl = (left_edge[i] - u[i])/v[i]
*/
- __pyx_v_x = ((__pyx_v_i + 1) % 3);
+ __pyx_v_x = __Pyx_mod_long((__pyx_v_i + 1), 3);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":155
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":155
* else: step[i] = 1
* x = (i+1)%3
* y = (i+2)%3 # <<<<<<<<<<<<<<
* tl = (left_edge[i] - u[i])/v[i]
* tr = (right_edge[i] - u[i])/v[i]
*/
- __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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":156
* x = (i+1)%3
* y = (i+2)%3
* tl = (left_edge[i] - u[i])/v[i] # <<<<<<<<<<<<<<
@@ -9577,79 +9978,91 @@
*/
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":157
* y = (i+2)%3
* tl = (left_edge[i] - u[i])/v[i]
* tr = (right_edge[i] - u[i])/v[i] # <<<<<<<<<<<<<<
* if (left_edge[x] <= (u[x] + tl*v[x]) <= right_edge[x]) and \
* (left_edge[y] <= (u[y] + tl*v[y]) <= right_edge[y]) and \
*/
- __pyx_t_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":158
* tl = (left_edge[i] - u[i])/v[i]
* tr = (right_edge[i] - u[i])/v[i]
* if (left_edge[x] <= (u[x] + tl*v[x]) <= right_edge[x]) and \ # <<<<<<<<<<<<<<
* (left_edge[y] <= (u[y] + tl*v[y]) <= right_edge[y]) and \
* (0.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) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":159
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":159
* tr = (right_edge[i] - u[i])/v[i]
* if (left_edge[x] <= (u[x] + tl*v[x]) <= right_edge[x]) and \
* (left_edge[y] <= (u[y] + tl*v[y]) <= right_edge[y]) and \ # <<<<<<<<<<<<<<
* (0.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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":160
* if (left_edge[x] <= (u[x] + tl*v[x]) <= right_edge[x]) and \
* (left_edge[y] <= (u[y] + tl*v[y]) <= right_edge[y]) and \
* (0.0 <= tl < intersect_t): # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":161
* (left_edge[y] <= (u[y] + tl*v[y]) <= right_edge[y]) and \
* (0.0 <= tl < intersect_t):
* intersect_t = tl # <<<<<<<<<<<<<<
@@ -9661,64 +10074,64 @@
}
__pyx_L9:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":162
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":162
* (0.0 <= tl < intersect_t):
* intersect_t = tl
* if (left_edge[x] <= (u[x] + tr*v[x]) <= right_edge[x]) and \ # <<<<<<<<<<<<<<
* (left_edge[y] <= (u[y] + tr*v[y]) <= right_edge[y]) and \
* (0.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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":163
* intersect_t = tl
* if (left_edge[x] <= (u[x] + tr*v[x]) <= right_edge[x]) and \
* (left_edge[y] <= (u[y] + tr*v[y]) <= right_edge[y]) and \ # <<<<<<<<<<<<<<
* (0.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) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":164
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":164
* if (left_edge[x] <= (u[x] + tr*v[x]) <= right_edge[x]) and \
* (left_edge[y] <= (u[y] + tr*v[y]) <= right_edge[y]) and \
* (0.0 <= tr < intersect_t): # <<<<<<<<<<<<<<
* 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) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":165
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":165
* (left_edge[y] <= (u[y] + tr*v[y]) <= right_edge[y]) and \
* (0.0 <= tr < intersect_t):
* intersect_t = tr # <<<<<<<<<<<<<<
@@ -9731,66 +10144,66 @@
__pyx_L10:;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":167
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":167
* intersect_t = tr
* # if fully enclosed
* if (left_edge[0] <= u[0] <= right_edge[0]) and \ # <<<<<<<<<<<<<<
* (left_edge[1] <= u[1] <= right_edge[1]) and \
* (left_edge[2] <= u[2] <= right_edge[2]):
*/
- __pyx_t_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) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":168
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":168
* # if fully enclosed
* if (left_edge[0] <= u[0] <= right_edge[0]) and \
* (left_edge[1] <= u[1] <= right_edge[1]) and \ # <<<<<<<<<<<<<<
* (left_edge[2] <= u[2] <= right_edge[2]):
* intersect_t = 0.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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":169
* if (left_edge[0] <= u[0] <= right_edge[0]) and \
* (left_edge[1] <= u[1] <= right_edge[1]) and \
* (left_edge[2] <= u[2] <= right_edge[2]): # <<<<<<<<<<<<<<
* intersect_t = 0.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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":170
* (left_edge[1] <= u[1] <= right_edge[1]) and \
* (left_edge[2] <= u[2] <= right_edge[2]):
* intersect_t = 0.0 # <<<<<<<<<<<<<<
@@ -9802,18 +10215,18 @@
}
__pyx_L11:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":171
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":171
* (left_edge[2] <= u[2] <= right_edge[2]):
* intersect_t = 0.0
* if not (0 <= intersect_t <= 1): return # <<<<<<<<<<<<<<
* # Now get the indices of the intersection
* intersect = u + intersect_t * v
*/
- __pyx_t_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);
@@ -9822,7 +10235,7 @@
}
__pyx_L12:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":173
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":173
* if not (0 <= intersect_t <= 1): return
* # Now get the indices of the intersection
* intersect = u + intersect_t * v # <<<<<<<<<<<<<<
@@ -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];
@@ -9861,7 +10274,7 @@
__pyx_v_intersect = ((PyArrayObject *)__pyx_t_5);
__pyx_t_5 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":174
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":174
* # Now get the indices of the intersection
* intersect = u + intersect_t * v
* for i in range(3): # <<<<<<<<<<<<<<
@@ -9871,7 +10284,7 @@
for (__pyx_t_11 = 0; __pyx_t_11 < 3; __pyx_t_11+=1) {
__pyx_v_i = __pyx_t_11;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":175
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":175
* intersect = u + intersect_t * v
* for i in range(3):
* cur_ind[i] = np.floor((intersect[i] + 1e-8*dx[i] - left_edge[i])/dx[i]) # <<<<<<<<<<<<<<
@@ -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,130 +10317,154 @@
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":176
* for i in range(3):
* cur_ind[i] = np.floor((intersect[i] + 1e-8*dx[i] - left_edge[i])/dx[i])
* tmax[i] = (((cur_ind[i]+step[i])*dx[i])+left_edge[i]-u[i])/v[i] # <<<<<<<<<<<<<<
* if 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":177
* cur_ind[i] = np.floor((intersect[i] + 1e-8*dx[i] - left_edge[i])/dx[i])
* tmax[i] = (((cur_ind[i]+step[i])*dx[i])+left_edge[i]-u[i])/v[i]
* if cur_ind[i] == grid_mask.shape[i] and step[i] < 0: # <<<<<<<<<<<<<<
* cur_ind[i] = grid_mask.shape[i] - 1
* if step[i] > 0: tmax[i] = (((cur_ind[i]+1)*dx[i])+left_edge[i]-u[i])/v[i]
*/
- __pyx_t_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":178
* tmax[i] = (((cur_ind[i]+step[i])*dx[i])+left_edge[i]-u[i])/v[i]
* if cur_ind[i] == grid_mask.shape[i] and step[i] < 0:
* cur_ind[i] = grid_mask.shape[i] - 1 # <<<<<<<<<<<<<<
* if step[i] > 0: tmax[i] = (((cur_ind[i]+1)*dx[i])+left_edge[i]-u[i])/v[i]
* if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i]
*/
- __pyx_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:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":179
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":179
* if cur_ind[i] == grid_mask.shape[i] and step[i] < 0:
* cur_ind[i] = grid_mask.shape[i] - 1
* if step[i] > 0: tmax[i] = (((cur_ind[i]+1)*dx[i])+left_edge[i]-u[i])/v[i] # <<<<<<<<<<<<<<
* if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i]
* tdelta[i] = (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:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":180
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":180
* cur_ind[i] = grid_mask.shape[i] - 1
* if step[i] > 0: tmax[i] = (((cur_ind[i]+1)*dx[i])+left_edge[i]-u[i])/v[i]
* if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i] # <<<<<<<<<<<<<<
* tdelta[i] = (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:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":181
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":181
* if step[i] > 0: tmax[i] = (((cur_ind[i]+1)*dx[i])+left_edge[i]-u[i])/v[i]
* if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i]
* tdelta[i] = (dx[i]/v[i]) # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/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]
* tdelta[i] = (dx[i]/v[i])
* if tdelta[i] < 0: tdelta[i] *= -1 # <<<<<<<<<<<<<<
* # 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:;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":184
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":184
* if tdelta[i] < 0: tdelta[i] *= -1
* # The variable intersect contains the point we first pierce the grid
* enter_t = intersect_t # <<<<<<<<<<<<<<
@@ -10030,7 +10473,7 @@
*/
__pyx_v_enter_t = __pyx_v_intersect_t;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":185
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":185
* # The variable intersect contains the point we first pierce the grid
* enter_t = intersect_t
* while 1: # <<<<<<<<<<<<<<
@@ -10038,66 +10481,65 @@
* (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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":186
* enter_t = intersect_t
* while 1:
* if (not (0 <= cur_ind[0] < grid_mask.shape[0])) or \ # <<<<<<<<<<<<<<
* (not (0 <= cur_ind[1] < grid_mask.shape[1])) or \
* (not (0 <= cur_ind[2] < grid_mask.shape[2])):
*/
- __pyx_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":187
* while 1:
* if (not (0 <= cur_ind[0] < grid_mask.shape[0])) or \
* (not (0 <= cur_ind[1] < grid_mask.shape[1])) or \ # <<<<<<<<<<<<<<
* (not (0 <= cur_ind[2] < grid_mask.shape[2])):
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":188
* if (not (0 <= cur_ind[0] < grid_mask.shape[0])) or \
* (not (0 <= cur_ind[1] < grid_mask.shape[1])) or \
* (not (0 <= cur_ind[2] < grid_mask.shape[2])): # <<<<<<<<<<<<<<
* break
* # 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":189
* (not (0 <= cur_ind[1] < grid_mask.shape[1])) or \
* (not (0 <= cur_ind[2] < grid_mask.shape[2])):
* break # <<<<<<<<<<<<<<
@@ -10109,62 +10551,62 @@
}
__pyx_L21:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":193
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":193
* # values from what they should be.
* # If we've reached t = 1, we are done.
* grid_mask[cur_ind[0], cur_ind[1], cur_ind[2]] = 1 # <<<<<<<<<<<<<<
* if (tmax[0] > 1.0) and (tmax[1] > 1.0) and (tmax[2] > 1.0):
* grid_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":194
* # If we've reached t = 1, we are done.
* grid_mask[cur_ind[0], cur_ind[1], cur_ind[2]] = 1
* if (tmax[0] > 1.0) and (tmax[1] > 1.0) and (tmax[2] > 1.0): # <<<<<<<<<<<<<<
* grid_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) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":195
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":195
* grid_mask[cur_ind[0], cur_ind[1], cur_ind[2]] = 1
* if (tmax[0] > 1.0) and (tmax[1] > 1.0) and (tmax[2] > 1.0):
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = 1.0 - enter_t # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":196
* 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
* break # <<<<<<<<<<<<<<
@@ -10176,304 +10618,304 @@
}
__pyx_L22:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":197
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":197
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = 1.0 - enter_t
* break
* if tmax[0] < tmax[1]: # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":198
* break
* if tmax[0] < tmax[1]:
* if tmax[0] < tmax[2]: # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":199
* if tmax[0] < tmax[1]:
* if tmax[0] < tmax[2]:
* 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
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":200
* if tmax[0] < tmax[2]:
* 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 # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":201
* 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
* enter_t = tmax[0] # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":202
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[0] - enter_t
* enter_t = tmax[0]
* tmax[0] += tdelta[0] # <<<<<<<<<<<<<<
* cur_ind[0] += step[0]
* else:
*/
- __pyx_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":203
* enter_t = tmax[0]
* tmax[0] += tdelta[0]
* cur_ind[0] += step[0] # <<<<<<<<<<<<<<
* else:
* grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = 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*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":205
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":205
* cur_ind[0] += step[0]
* else:
* 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[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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":206
* else:
* 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[2] - enter_t # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":207
* 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[2] - enter_t
* enter_t = tmax[2] # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":208
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[2] - enter_t
* enter_t = tmax[2]
* tmax[2] += tdelta[2] # <<<<<<<<<<<<<<
* cur_ind[2] += step[2]
* else:
*/
- __pyx_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":209
* enter_t = tmax[2]
* tmax[2] += tdelta[2]
* cur_ind[2] += step[2] # <<<<<<<<<<<<<<
* 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;
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":211
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":211
* cur_ind[2] += step[2]
* else:
* if tmax[1] < tmax[2]: # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":212
* else:
* if tmax[1] < tmax[2]:
* 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
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":213
* if tmax[1] < tmax[2]:
* 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 # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":214
* 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
* enter_t = tmax[1] # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":215
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[1] - enter_t
* enter_t = tmax[1]
* tmax[1] += tdelta[1] # <<<<<<<<<<<<<<
* cur_ind[1] += step[1]
* else:
*/
- __pyx_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":216
* enter_t = tmax[1]
* tmax[1] += tdelta[1]
* cur_ind[1] += step[1] # <<<<<<<<<<<<<<
* else:
* grid_t[cur_ind[0], cur_ind[1], cur_ind[2]] = 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*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":218
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":218
* cur_ind[1] += step[1]
* else:
* 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[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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":219
* else:
* 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[2] - enter_t # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":220
* 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[2] - enter_t
* enter_t = tmax[2] # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":221
* grid_dt[cur_ind[0], cur_ind[1], cur_ind[2]] = tmax[2] - enter_t
* enter_t = tmax[2]
* tmax[2] += tdelta[2] # <<<<<<<<<<<<<<
* cur_ind[2] += step[2]
* return
*/
- __pyx_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":222
* enter_t = tmax[2]
* tmax[2] += tdelta[2]
* cur_ind[2] += step[2] # <<<<<<<<<<<<<<
* 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:;
}
@@ -10481,7 +10923,7 @@
}
__pyx_L20_break:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":223
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":223
* tmax[2] += tdelta[2]
* cur_ind[2] += step[2]
* return # <<<<<<<<<<<<<<
@@ -10539,20 +10981,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":227
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":227
* @cython.wraparound(False)
* @cython.boundscheck(False)
* def PlaneVoxelIntegration(np.ndarray[np.float64_t, ndim=1] left_edge, # <<<<<<<<<<<<<<
@@ -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;
@@ -10799,31 +11224,25 @@
__pyx_bstride_0_shells = __pyx_bstruct_shells.strides[0]; __pyx_bstride_1_shells = __pyx_bstruct_shells.strides[1];
__pyx_bshape_0_shells = __pyx_bstruct_shells.shape[0]; __pyx_bshape_1_shells = __pyx_bstruct_shells.shape[1];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":239
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":239
* # generalized to transfer functions
* cdef int i, x, y, vi
* intersect_t = 1 # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":240
* cdef int i, x, y, vi
* intersect_t = 1
* dt_tolerance = 1e-6 # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":241
* intersect_t = 1
* dt_tolerance = 1e-6
* cdef int nv = ug.shape[0] # <<<<<<<<<<<<<<
@@ -10832,7 +11251,7 @@
*/
__pyx_v_nv = (__pyx_v_ug->dimensions[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":242
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":242
* dt_tolerance = 1e-6
* cdef int nv = ug.shape[0]
* cdef int nshells = shells.shape[0] # <<<<<<<<<<<<<<
@@ -10841,7 +11260,7 @@
*/
__pyx_v_nshells = (__pyx_v_shells->dimensions[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":243
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":243
* cdef int nv = ug.shape[0]
* cdef int nshells = shells.shape[0]
* cdef np.ndarray[np.float64_t, ndim=1] u = np.empty((3,), dtype=np.float64) # <<<<<<<<<<<<<<
@@ -10892,7 +11311,7 @@
__pyx_v_u = ((PyArrayObject *)__pyx_t_5);
__pyx_t_5 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":245
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":245
* cdef np.ndarray[np.float64_t, ndim=1] u = np.empty((3,), dtype=np.float64)
* # Copy things into temporary location for passing between functions
* for vi in range(nv): # <<<<<<<<<<<<<<
@@ -10903,7 +11322,7 @@
for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
__pyx_v_vi = __pyx_t_8;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":246
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":246
* # Copy things into temporary location for passing between functions
* for vi in range(nv):
* for i in range(3): u[i] = ug[vi, i] # <<<<<<<<<<<<<<
@@ -10918,7 +11337,7 @@
*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_u.buf, __pyx_t_12, __pyx_bstride_0_u) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_ug.buf, __pyx_t_10, __pyx_bstride_0_ug, __pyx_t_11, __pyx_bstride_1_ug));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":247
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":247
* for vi in range(nv):
* for i in range(3): u[i] = ug[vi, i]
* integrate_ray(u, v, left_edge, right_edge, dx, # <<<<<<<<<<<<<<
@@ -10928,7 +11347,7 @@
__pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__integrate_ray); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":248
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":248
* for i in range(3): u[i] = ug[vi, i]
* integrate_ray(u, v, left_edge, right_edge, dx,
* nshells, vi, data, shells, image) # <<<<<<<<<<<<<<
@@ -11012,23 +11431,13 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":252
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":252
* @cython.wraparound(False)
* @cython.boundscheck(False)
* def integrate_ray(np.ndarray[np.float64_t, ndim=1] u, # <<<<<<<<<<<<<<
@@ -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;
@@ -11387,25 +11790,25 @@
__pyx_bstride_0_image = __pyx_bstruct_image.strides[0]; __pyx_bstride_1_image = __pyx_bstruct_image.strides[1];
__pyx_bshape_0_image = __pyx_bstruct_image.shape[0]; __pyx_bshape_1_image = __pyx_bstruct_image.shape[1];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":262
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":262
* np.ndarray[np.float64_t, ndim=2] image):
* cdef int step[3], x, y, i, n
* cdef np.float64_t intersect_t = 1 # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":263
* cdef int step[3], x, y, i, n
* cdef np.float64_t intersect_t = 1
* cdef np.float64_t dt_tolerance = 1e-6 # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":271
* cdef np.float64_t dt, dv
* cdef np.float64_t dist, alpha
* cdef np.float64_t one = 1.0 # <<<<<<<<<<<<<<
@@ -11414,7 +11817,7 @@
*/
__pyx_v_one = 1.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":274
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":274
* cdef int dims[3]
* cdef np.float64_t rgba[4], temp_x, temp_y
* for i in range(3): # <<<<<<<<<<<<<<
@@ -11424,7 +11827,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":276
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":276
* for i in range(3):
* # As long as we're iterating, set some other stuff, too
* dims[i] = data.shape[i] # <<<<<<<<<<<<<<
@@ -11433,7 +11836,7 @@
*/
(__pyx_v_dims[__pyx_v_i]) = (__pyx_v_data->dimensions[__pyx_v_i]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":277
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":277
* # As long as we're iterating, set some other stuff, too
* dims[i] = data.shape[i]
* if(v[i] < 0): step[i] = -1 # <<<<<<<<<<<<<<
@@ -11441,14 +11844,14 @@
* 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;
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":278
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":278
* dims[i] = data.shape[i]
* if(v[i] < 0): step[i] = -1
* else: step[i] = 1 # <<<<<<<<<<<<<<
@@ -11459,25 +11862,25 @@
}
__pyx_L8:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":279
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":279
* if(v[i] < 0): step[i] = -1
* else: step[i] = 1
* x = (i+1)%3 # <<<<<<<<<<<<<<
* y = (i+2)%3
* tl = (left_edge[i] - u[i])/v[i]
*/
- __pyx_v_x = ((__pyx_v_i + 1) % 3);
+ __pyx_v_x = __Pyx_mod_long((__pyx_v_i + 1), 3);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":280
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":280
* else: step[i] = 1
* x = (i+1)%3
* y = (i+2)%3 # <<<<<<<<<<<<<<
* tl = (left_edge[i] - u[i])/v[i]
* tr = (right_edge[i] - u[i])/v[i]
*/
- __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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":281
* x = (i+1)%3
* y = (i+2)%3
* tl = (left_edge[i] - u[i])/v[i] # <<<<<<<<<<<<<<
@@ -11486,104 +11889,116 @@
*/
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":282
* y = (i+2)%3
* tl = (left_edge[i] - u[i])/v[i]
* tr = (right_edge[i] - u[i])/v[i] # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":283
* tl = (left_edge[i] - u[i])/v[i]
* tr = (right_edge[i] - u[i])/v[i]
* temp_x = (u[x] + tl*v[x]) # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":284
* tr = (right_edge[i] - u[i])/v[i]
* temp_x = (u[x] + tl*v[x])
* temp_y = (u[y] + tl*v[y]) # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":285
* temp_x = (u[x] + tl*v[x])
* temp_y = (u[y] + tl*v[y])
* 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 \
* (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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":286
* temp_y = (u[y] + tl*v[y])
* 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 \ # <<<<<<<<<<<<<<
* (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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":287
* 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 \
* (0.0 <= tl) and (tl < intersect_t): # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":288
* (left_edge[y] <= temp_y) and (temp_y <= right_edge[y]) and \
* (0.0 <= tl) and (tl < intersect_t):
* intersect_t = tl # <<<<<<<<<<<<<<
@@ -11595,89 +12010,89 @@
}
__pyx_L9:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":289
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":289
* (0.0 <= tl) and (tl < intersect_t):
* intersect_t = tl
* temp_x = (u[x] + tr*v[x]) # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":290
* intersect_t = tl
* temp_x = (u[x] + tr*v[x])
* temp_y = (u[y] + tr*v[y]) # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":291
* temp_x = (u[x] + tr*v[x])
* temp_y = (u[y] + tr*v[y])
* 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 \
* (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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":292
* temp_y = (u[y] + tr*v[y])
* 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 \ # <<<<<<<<<<<<<<
* (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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":293
* 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 \
* (0.0 <= tr) and (tr < intersect_t): # <<<<<<<<<<<<<<
* 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) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":294
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":294
* (left_edge[y] <= temp_y) and (temp_y <= right_edge[y]) and \
* (0.0 <= tr) and (tr < intersect_t):
* intersect_t = tr # <<<<<<<<<<<<<<
@@ -11690,66 +12105,66 @@
__pyx_L10:;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":296
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":296
* intersect_t = tr
* # if fully enclosed
* if (left_edge[0] <= u[0] <= right_edge[0]) and \ # <<<<<<<<<<<<<<
* (left_edge[1] <= u[1] <= right_edge[1]) and \
* (left_edge[2] <= u[2] <= right_edge[2]):
*/
- __pyx_t_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) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":297
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":297
* # if fully enclosed
* if (left_edge[0] <= u[0] <= right_edge[0]) and \
* (left_edge[1] <= u[1] <= right_edge[1]) and \ # <<<<<<<<<<<<<<
* (left_edge[2] <= u[2] <= right_edge[2]):
* intersect_t = 0.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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":298
* if (left_edge[0] <= u[0] <= right_edge[0]) and \
* (left_edge[1] <= u[1] <= right_edge[1]) and \
* (left_edge[2] <= u[2] <= right_edge[2]): # <<<<<<<<<<<<<<
* intersect_t = 0.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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":299
* (left_edge[1] <= u[1] <= right_edge[1]) and \
* (left_edge[2] <= u[2] <= right_edge[2]):
* intersect_t = 0.0 # <<<<<<<<<<<<<<
@@ -11761,21 +12176,21 @@
}
__pyx_L11:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":300
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":300
* (left_edge[2] <= u[2] <= right_edge[2]):
* intersect_t = 0.0
* if not (0 <= intersect_t <= 1): # <<<<<<<<<<<<<<
* #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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":302
* if not (0 <= intersect_t <= 1):
* #print "Returning: intersect_t ==", intersect_t
* return # <<<<<<<<<<<<<<
@@ -11789,7 +12204,7 @@
}
__pyx_L12:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":304
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":304
* return
* # Now get the indices of the intersection
* for i in range(3): intersect[i] = u[i] + intersect_t * v[i] # <<<<<<<<<<<<<<
@@ -11798,12 +12213,12 @@
*/
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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":305
* # Now get the indices of the intersection
* for i in range(3): intersect[i] = u[i] + intersect_t * v[i]
* cdef int ncells = 0 # <<<<<<<<<<<<<<
@@ -11812,7 +12227,7 @@
*/
__pyx_v_ncells = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":306
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":306
* for i in range(3): intersect[i] = u[i] + intersect_t * v[i]
* cdef int ncells = 0
* for i in range(3): # <<<<<<<<<<<<<<
@@ -11822,50 +12237,62 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":307
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":307
* cdef int ncells = 0
* for i in range(3):
* cur_ind[i] = np.floor((intersect[i] + 1e-8*dx[i] - left_edge[i])/dx[i]) # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":308
* for i in range(3):
* cur_ind[i] = np.floor((intersect[i] + 1e-8*dx[i] - left_edge[i])/dx[i])
* tmax[i] = (((cur_ind[i]+step[i])*dx[i])+left_edge[i]-u[i])/v[i] # <<<<<<<<<<<<<<
* if 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":309
* cur_ind[i] = np.floor((intersect[i] + 1e-8*dx[i] - left_edge[i])/dx[i])
* tmax[i] = (((cur_ind[i]+step[i])*dx[i])+left_edge[i]-u[i])/v[i]
* if cur_ind[i] == dims[i] and step[i] < 0: # <<<<<<<<<<<<<<
@@ -11874,14 +12301,14 @@
*/
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":310
* 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:
* cur_ind[i] = dims[i] - 1 # <<<<<<<<<<<<<<
@@ -11893,69 +12320,87 @@
}
__pyx_L17:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":311
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":311
* if cur_ind[i] == dims[i] and step[i] < 0:
* cur_ind[i] = dims[i] - 1
* if step[i] > 0: tmax[i] = (((cur_ind[i]+1)*dx[i])+left_edge[i]-u[i])/v[i] # <<<<<<<<<<<<<<
* if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i]
* tdelta[i] = (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:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":312
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":312
* cur_ind[i] = dims[i] - 1
* if step[i] > 0: tmax[i] = (((cur_ind[i]+1)*dx[i])+left_edge[i]-u[i])/v[i]
* if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i] # <<<<<<<<<<<<<<
* tdelta[i] = (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:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":313
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":313
* if step[i] > 0: tmax[i] = (((cur_ind[i]+1)*dx[i])+left_edge[i]-u[i])/v[i]
* if step[i] < 0: tmax[i] = (((cur_ind[i]+0)*dx[i])+left_edge[i]-u[i])/v[i]
* tdelta[i] = (dx[i]/v[i]) # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/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]
* tdelta[i] = (dx[i]/v[i])
* if tdelta[i] < 0: tdelta[i] *= -1 # <<<<<<<<<<<<<<
* # 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:;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":316
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":316
* if tdelta[i] < 0: tdelta[i] *= -1
* # The variable intersect contains the point we first pierce the grid
* enter_t = intersect_t # <<<<<<<<<<<<<<
@@ -11964,60 +12409,60 @@
*/
__pyx_v_enter_t = __pyx_v_intersect_t;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":317
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":317
* # The variable intersect contains the point we first pierce the grid
* enter_t = intersect_t
* if (not (0 <= cur_ind[0] < dims[0])) or \ # <<<<<<<<<<<<<<
* (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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":318
* enter_t = intersect_t
* if (not (0 <= cur_ind[0] < dims[0])) or \
* (not (0 <= cur_ind[1] < dims[1])) or \ # <<<<<<<<<<<<<<
* (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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":319
* if (not (0 <= cur_ind[0] < dims[0])) or \
* (not (0 <= cur_ind[1] < dims[1])) or \
* (not (0 <= cur_ind[2] < dims[2])): # <<<<<<<<<<<<<<
* #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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":326
* #print " u :", u[0], u[1], u[2]
* #
* return # <<<<<<<<<<<<<<
@@ -12031,19 +12476,19 @@
}
__pyx_L21:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":328
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":328
* return
* #print cur_ind[0], dims[0], cur_ind[1], dims[1], cur_ind[2], dims[2]
* dv = data[cur_ind[0], cur_ind[1], cur_ind[2]] # <<<<<<<<<<<<<<
* #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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":330
* dv = data[cur_ind[0], cur_ind[1], cur_ind[2]]
* #dt = 1e300
* while 1: # <<<<<<<<<<<<<<
@@ -12051,10 +12496,9 @@
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":331
* #dt = 1e300
* while 1:
* if image[ind,3] >= 1.0: break # <<<<<<<<<<<<<<
@@ -12062,68 +12506,68 @@
* (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;
}
__pyx_L24:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":332
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":332
* while 1:
* if image[ind,3] >= 1.0: break
* if (not (0 <= cur_ind[0] < dims[0])) or \ # <<<<<<<<<<<<<<
* (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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":333
* if image[ind,3] >= 1.0: break
* if (not (0 <= cur_ind[0] < dims[0])) or \
* (not (0 <= cur_ind[1] < dims[1])) or \ # <<<<<<<<<<<<<<
* (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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":334
* if (not (0 <= cur_ind[0] < dims[0])) or \
* (not (0 <= cur_ind[1] < dims[1])) or \
* (not (0 <= cur_ind[2] < dims[2])): # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":335
* (not (0 <= cur_ind[1] < dims[1])) or \
* (not (0 <= cur_ind[2] < dims[2])):
* break # <<<<<<<<<<<<<<
@@ -12135,41 +12579,41 @@
}
__pyx_L25:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":337
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":337
* break
* # Do our transfer here
* for n in range(nshells): # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":338
* # Do our transfer here
* for n in range(nshells):
* dist = shells[n, 0] - dv # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":339
* for n in range(nshells):
* dist = shells[n, 0] - dv
* if dist < shells[n,1]: # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":340
* dist = shells[n, 0] - dv
* if dist < shells[n,1]:
* dist = exp(-dist/8.0) # <<<<<<<<<<<<<<
@@ -12178,72 +12622,72 @@
*/
__pyx_v_dist = exp(((-__pyx_v_dist) / 8.0));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":341
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":341
* if dist < shells[n,1]:
* dist = exp(-dist/8.0)
* alpha = (1.0 - shells[n,5])*shells[n,5]#*dt # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":342
* dist = exp(-dist/8.0)
* alpha = (1.0 - shells[n,5])*shells[n,5]#*dt
* image[ind,0] += alpha*shells[n,2]*dist # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":343
* alpha = (1.0 - shells[n,5])*shells[n,5]#*dt
* image[ind,0] += alpha*shells[n,2]*dist
* image[ind,1] += alpha*shells[n,3]*dist # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":344
* image[ind,0] += alpha*shells[n,2]*dist
* image[ind,1] += alpha*shells[n,3]*dist
* image[ind,2] += alpha*shells[n,4]*dist # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":345
* image[ind,1] += alpha*shells[n,3]*dist
* image[ind,2] += alpha*shells[n,4]*dist
* image[ind,3] += alpha*shells[n,5]*dist # <<<<<<<<<<<<<<
* #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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":348
* #image[ind,i] += rgba[i]*dist*rgba[3]/dt
* #print rgba[i], image[ind,i], dist, dt
* break # <<<<<<<<<<<<<<
@@ -12257,29 +12701,29 @@
}
__pyx_L27_break:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":349
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":349
* #print rgba[i], image[ind,i], dist, dt
* break
* if (tmax[0] > 1.0) and (tmax[1] > 1.0) and (tmax[2] > 1.0): # <<<<<<<<<<<<<<
* 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) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":350
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":350
* break
* if (tmax[0] > 1.0) and (tmax[1] > 1.0) and (tmax[2] > 1.0):
* dt = 1.0 - enter_t # <<<<<<<<<<<<<<
@@ -12288,7 +12732,7 @@
*/
__pyx_v_dt = (1.0 - __pyx_v_enter_t);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":351
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":351
* if (tmax[0] > 1.0) and (tmax[1] > 1.0) and (tmax[2] > 1.0):
* dt = 1.0 - enter_t
* break # <<<<<<<<<<<<<<
@@ -12300,7 +12744,7 @@
}
__pyx_L29:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":352
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":352
* dt = 1.0 - enter_t
* break
* if tmax[0] < tmax[1]: # <<<<<<<<<<<<<<
@@ -12310,7 +12754,7 @@
__pyx_t_3 = ((__pyx_v_tmax[0]) < (__pyx_v_tmax[1]));
if (__pyx_t_3) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":353
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":353
* break
* if tmax[0] < tmax[1]:
* if tmax[0] < tmax[2]: # <<<<<<<<<<<<<<
@@ -12320,7 +12764,7 @@
__pyx_t_3 = ((__pyx_v_tmax[0]) < (__pyx_v_tmax[2]));
if (__pyx_t_3) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":354
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":354
* if tmax[0] < tmax[1]:
* if tmax[0] < tmax[2]:
* dt = tmax[0] - enter_t # <<<<<<<<<<<<<<
@@ -12329,7 +12773,7 @@
*/
__pyx_v_dt = ((__pyx_v_tmax[0]) - __pyx_v_enter_t);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":355
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":355
* if tmax[0] < tmax[2]:
* dt = tmax[0] - enter_t
* enter_t = tmax[0] # <<<<<<<<<<<<<<
@@ -12338,7 +12782,7 @@
*/
__pyx_v_enter_t = (__pyx_v_tmax[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":356
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":356
* dt = tmax[0] - enter_t
* enter_t = tmax[0]
* tmax[0] += tdelta[0] # <<<<<<<<<<<<<<
@@ -12347,7 +12791,7 @@
*/
(__pyx_v_tmax[0]) += (__pyx_v_tdelta[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":357
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":357
* enter_t = tmax[0]
* tmax[0] += tdelta[0]
* cur_ind[0] += step[0] # <<<<<<<<<<<<<<
@@ -12359,7 +12803,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":359
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":359
* cur_ind[0] += step[0]
* else:
* dt = tmax[2] - enter_t # <<<<<<<<<<<<<<
@@ -12368,7 +12812,7 @@
*/
__pyx_v_dt = ((__pyx_v_tmax[2]) - __pyx_v_enter_t);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":360
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":360
* else:
* dt = tmax[2] - enter_t
* enter_t = tmax[2] # <<<<<<<<<<<<<<
@@ -12377,7 +12821,7 @@
*/
__pyx_v_enter_t = (__pyx_v_tmax[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":361
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":361
* dt = tmax[2] - enter_t
* enter_t = tmax[2]
* tmax[2] += tdelta[2] # <<<<<<<<<<<<<<
@@ -12386,7 +12830,7 @@
*/
(__pyx_v_tmax[2]) += (__pyx_v_tdelta[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":362
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":362
* enter_t = tmax[2]
* tmax[2] += tdelta[2]
* cur_ind[2] += step[2] # <<<<<<<<<<<<<<
@@ -12400,7 +12844,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":364
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":364
* cur_ind[2] += step[2]
* else:
* if tmax[1] < tmax[2]: # <<<<<<<<<<<<<<
@@ -12410,7 +12854,7 @@
__pyx_t_3 = ((__pyx_v_tmax[1]) < (__pyx_v_tmax[2]));
if (__pyx_t_3) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":365
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":365
* else:
* if tmax[1] < tmax[2]:
* dt = tmax[1] - enter_t # <<<<<<<<<<<<<<
@@ -12419,7 +12863,7 @@
*/
__pyx_v_dt = ((__pyx_v_tmax[1]) - __pyx_v_enter_t);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":366
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":366
* if tmax[1] < tmax[2]:
* dt = tmax[1] - enter_t
* enter_t = tmax[1] # <<<<<<<<<<<<<<
@@ -12428,7 +12872,7 @@
*/
__pyx_v_enter_t = (__pyx_v_tmax[1]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":367
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":367
* dt = tmax[1] - enter_t
* enter_t = tmax[1]
* tmax[1] += tdelta[1] # <<<<<<<<<<<<<<
@@ -12437,7 +12881,7 @@
*/
(__pyx_v_tmax[1]) += (__pyx_v_tdelta[1]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":368
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":368
* enter_t = tmax[1]
* tmax[1] += tdelta[1]
* cur_ind[1] += step[1] # <<<<<<<<<<<<<<
@@ -12449,7 +12893,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":370
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":370
* cur_ind[1] += step[1]
* else:
* dt = tmax[2] - enter_t # <<<<<<<<<<<<<<
@@ -12458,7 +12902,7 @@
*/
__pyx_v_dt = ((__pyx_v_tmax[2]) - __pyx_v_enter_t);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":371
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":371
* else:
* dt = tmax[2] - enter_t
* enter_t = tmax[2] # <<<<<<<<<<<<<<
@@ -12467,7 +12911,7 @@
*/
__pyx_v_enter_t = (__pyx_v_tmax[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":372
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":372
* dt = tmax[2] - enter_t
* enter_t = tmax[2]
* tmax[2] += tdelta[2] # <<<<<<<<<<<<<<
@@ -12476,7 +12920,7 @@
*/
(__pyx_v_tmax[2]) += (__pyx_v_tdelta[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":373
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":373
* enter_t = tmax[2]
* tmax[2] += tdelta[2]
* cur_ind[2] += step[2] # <<<<<<<<<<<<<<
@@ -12488,24 +12932,24 @@
}
__pyx_L30:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/RayIntegrators.pyx":374
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":374
* tmax[2] += tdelta[2]
* 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,20 +12974,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":31
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":31
* from stdlib cimport malloc, free, abs
*
* cdef inline int imax(int i0, int i1): # <<<<<<<<<<<<<<
@@ -12556,7 +12992,7 @@
int __pyx_t_1;
__Pyx_RefNannySetupContext("imax");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":32
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":32
*
* cdef inline int imax(int i0, int i1):
* if i0 > i1: return i0 # <<<<<<<<<<<<<<
@@ -12571,7 +13007,7 @@
}
__pyx_L3:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":33
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":33
* cdef inline int imax(int i0, int i1):
* if i0 > i1: return i0
* return i1 # <<<<<<<<<<<<<<
@@ -12587,7 +13023,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":35
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":35
* return i1
*
* cdef inline np.float64_t fmax(np.float64_t f0, np.float64_t f1): # <<<<<<<<<<<<<<
@@ -12600,7 +13036,7 @@
int __pyx_t_1;
__Pyx_RefNannySetupContext("fmax");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":36
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":36
*
* cdef inline np.float64_t fmax(np.float64_t f0, np.float64_t f1):
* if f0 > f1: return f0 # <<<<<<<<<<<<<<
@@ -12615,7 +13051,7 @@
}
__pyx_L3:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":37
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":37
* cdef inline np.float64_t fmax(np.float64_t f0, np.float64_t f1):
* if f0 > f1: return f0
* return f1 # <<<<<<<<<<<<<<
@@ -12631,7 +13067,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":39
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":39
* return f1
*
* cdef inline int imin(int i0, int i1): # <<<<<<<<<<<<<<
@@ -12644,7 +13080,7 @@
int __pyx_t_1;
__Pyx_RefNannySetupContext("imin");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":40
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":40
*
* cdef inline int imin(int i0, int i1):
* if i0 < i1: return i0 # <<<<<<<<<<<<<<
@@ -12659,7 +13095,7 @@
}
__pyx_L3:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":41
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":41
* cdef inline int imin(int i0, int i1):
* if i0 < i1: return i0
* return i1 # <<<<<<<<<<<<<<
@@ -12675,7 +13111,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":43
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":43
* return i1
*
* cdef inline np.float64_t fmin(np.float64_t f0, np.float64_t f1): # <<<<<<<<<<<<<<
@@ -12688,7 +13124,7 @@
int __pyx_t_1;
__Pyx_RefNannySetupContext("fmin");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":44
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":44
*
* cdef inline np.float64_t fmin(np.float64_t f0, np.float64_t f1):
* if f0 < f1: return f0 # <<<<<<<<<<<<<<
@@ -12703,7 +13139,7 @@
}
__pyx_L3:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":45
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":45
* cdef inline np.float64_t fmin(np.float64_t f0, np.float64_t f1):
* if f0 < f1: return f0
* return f1 # <<<<<<<<<<<<<<
@@ -12719,7 +13155,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":47
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":47
* return f1
*
* cdef inline int iclip(int i, int a, int b): # <<<<<<<<<<<<<<
@@ -12732,7 +13168,7 @@
int __pyx_t_1;
__Pyx_RefNannySetupContext("iclip");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":48
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":48
*
* cdef inline int iclip(int i, int a, int b):
* if i < a: return a # <<<<<<<<<<<<<<
@@ -12747,7 +13183,7 @@
}
__pyx_L3:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":49
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":49
* cdef inline int iclip(int i, int a, int b):
* if i < a: return a
* if i > b: return b # <<<<<<<<<<<<<<
@@ -12762,7 +13198,7 @@
}
__pyx_L4:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":50
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":50
* if i < a: return a
* if i > b: return b
* return i # <<<<<<<<<<<<<<
@@ -12778,7 +13214,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":52
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":52
* return i
*
* cdef inline np.float64_t fclip(np.float64_t f, # <<<<<<<<<<<<<<
@@ -12790,7 +13226,7 @@
__pyx_t_5numpy_float64_t __pyx_r;
__Pyx_RefNannySetupContext("fclip");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":54
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":54
* cdef inline np.float64_t fclip(np.float64_t f,
* np.float64_t a, np.float64_t b):
* return fmin(fmax(f, a), b) # <<<<<<<<<<<<<<
@@ -12806,7 +13242,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":89
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":89
* int pass_through
*
* cdef void FIT_initialize_table(FieldInterpolationTable *fit, int nbins, # <<<<<<<<<<<<<<
@@ -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) {
@@ -12831,7 +13268,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":93
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":93
* int field_id, int weight_field_id = -1, int weight_table_id = -1,
* int pass_through = 0):
* fit.bounds[0] = bounds1; fit.bounds[1] = bounds2 # <<<<<<<<<<<<<<
@@ -12841,7 +13278,7 @@
(__pyx_v_fit->bounds[0]) = __pyx_v_bounds1;
(__pyx_v_fit->bounds[1]) = __pyx_v_bounds2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":94
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":94
* int pass_through = 0):
* fit.bounds[0] = bounds1; fit.bounds[1] = bounds2
* fit.nbins = nbins # <<<<<<<<<<<<<<
@@ -12850,25 +13287,34 @@
*/
__pyx_v_fit->nbins = __pyx_v_nbins;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":95
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":95
* fit.bounds[0] = bounds1; fit.bounds[1] = bounds2
* fit.nbins = nbins
* fit.dbin = (fit.bounds[1] - fit.bounds[0])/fit.nbins # <<<<<<<<<<<<<<
* fit.idbin = 1.0/fit.dbin
* # Better not pull this out from under us, yo
*/
- __pyx_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":96
* fit.nbins = nbins
* fit.dbin = (fit.bounds[1] - fit.bounds[0])/fit.nbins
* fit.idbin = 1.0/fit.dbin # <<<<<<<<<<<<<<
* # Better not pull this out from under us, yo
* fit.values = values
*/
+ if (unlikely(__pyx_v_fit->dbin == 0)) {
+ PyErr_Format(PyExc_ZeroDivisionError, "float division");
+ {__pyx_filename = __pyx_f[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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":98
* fit.idbin = 1.0/fit.dbin
* # Better not pull this out from under us, yo
* fit.values = values # <<<<<<<<<<<<<<
@@ -12877,7 +13323,7 @@
*/
__pyx_v_fit->values = __pyx_v_values;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":99
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":99
* # Better not pull this out from under us, yo
* fit.values = values
* fit.field_id = field_id # <<<<<<<<<<<<<<
@@ -12886,7 +13332,7 @@
*/
__pyx_v_fit->field_id = __pyx_v_field_id;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":100
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":100
* fit.values = values
* fit.field_id = field_id
* fit.weight_field_id = weight_field_id # <<<<<<<<<<<<<<
@@ -12895,7 +13341,7 @@
*/
__pyx_v_fit->weight_field_id = __pyx_v_weight_field_id;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":101
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":101
* fit.field_id = field_id
* fit.weight_field_id = weight_field_id
* fit.weight_table_id = weight_table_id # <<<<<<<<<<<<<<
@@ -12904,7 +13350,7 @@
*/
__pyx_v_fit->weight_table_id = __pyx_v_weight_table_id;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":102
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":102
* fit.weight_field_id = weight_field_id
* fit.weight_table_id = weight_table_id
* fit.pass_through = pass_through # <<<<<<<<<<<<<<
@@ -12913,10 +13359,14 @@
*/
__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();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":104
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":104
* fit.pass_through = pass_through
*
* cdef np.float64_t FIT_get_value(FieldInterpolationTable *fit, # <<<<<<<<<<<<<<
@@ -12935,7 +13385,7 @@
int __pyx_t_3;
__Pyx_RefNannySetupContext("FIT_get_value");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":108
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":108
* cdef np.float64_t bv, dy, dd, tf
* cdef int bin_id
* if fit.pass_through == 1: return dvs[fit.field_id] # <<<<<<<<<<<<<<
@@ -12950,7 +13400,7 @@
}
__pyx_L3:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":109
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":109
* cdef int bin_id
* if fit.pass_through == 1: return dvs[fit.field_id]
* bin_id = <int> ((dvs[fit.field_id] - fit.bounds[0]) * fit.idbin) # <<<<<<<<<<<<<<
@@ -12959,7 +13409,7 @@
*/
__pyx_v_bin_id = ((int)(((__pyx_v_dvs[__pyx_v_fit->field_id]) - (__pyx_v_fit->bounds[0])) * __pyx_v_fit->idbin));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":110
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":110
* if fit.pass_through == 1: return dvs[fit.field_id]
* bin_id = <int> ((dvs[fit.field_id] - fit.bounds[0]) * fit.idbin)
* dd = dvs[fit.field_id] - (fit.bounds[0] + bin_id * fit.dbin) # x - x0 # <<<<<<<<<<<<<<
@@ -12968,7 +13418,7 @@
*/
__pyx_v_dd = ((__pyx_v_dvs[__pyx_v_fit->field_id]) - ((__pyx_v_fit->bounds[0]) + (__pyx_v_bin_id * __pyx_v_fit->dbin)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":111
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":111
* bin_id = <int> ((dvs[fit.field_id] - fit.bounds[0]) * fit.idbin)
* dd = dvs[fit.field_id] - (fit.bounds[0] + bin_id * fit.dbin) # x - x0
* if bin_id > fit.nbins - 2 or bin_id < 0: return 0.0 # <<<<<<<<<<<<<<
@@ -12989,7 +13439,7 @@
}
__pyx_L4:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":112
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":112
* dd = dvs[fit.field_id] - (fit.bounds[0] + bin_id * fit.dbin) # x - x0
* if bin_id > fit.nbins - 2 or bin_id < 0: return 0.0
* bv = fit.values[bin_id] # <<<<<<<<<<<<<<
@@ -12998,7 +13448,7 @@
*/
__pyx_v_bv = (__pyx_v_fit->values[__pyx_v_bin_id]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":113
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":113
* if bin_id > fit.nbins - 2 or bin_id < 0: return 0.0
* bv = fit.values[bin_id]
* dy = fit.values[bin_id + 1] - bv # <<<<<<<<<<<<<<
@@ -13007,7 +13457,7 @@
*/
__pyx_v_dy = ((__pyx_v_fit->values[(__pyx_v_bin_id + 1)]) - __pyx_v_bv);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":114
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":114
* bv = fit.values[bin_id]
* dy = fit.values[bin_id + 1] - bv
* if fit.weight_field_id != -1: # <<<<<<<<<<<<<<
@@ -13017,7 +13467,7 @@
__pyx_t_3 = (__pyx_v_fit->weight_field_id != -1);
if (__pyx_t_3) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":115
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":115
* dy = fit.values[bin_id + 1] - bv
* if fit.weight_field_id != -1:
* return dvs[fit.weight_field_id] * (bv + dd*dy*fit.idbin) # <<<<<<<<<<<<<<
@@ -13030,7 +13480,7 @@
}
__pyx_L5:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":116
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":116
* if fit.weight_field_id != -1:
* return dvs[fit.weight_field_id] * (bv + dd*dy*fit.idbin)
* return (bv + dd*dy*fit.idbin) # <<<<<<<<<<<<<<
@@ -13046,7 +13496,165 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":139
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/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/branches/yt-1.7/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/branches/yt-1.7/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/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":139
* cdef public object my_field_tables
*
* def __cinit__(self, tf_obj): # <<<<<<<<<<<<<<
@@ -13109,14 +13717,13 @@
__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;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":150
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":150
* cdef FieldInterpolationTable fit
*
* self.tf_obj = tf_obj # <<<<<<<<<<<<<<
@@ -13129,7 +13736,7 @@
__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_tf_obj;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":152
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":152
* self.tf_obj = tf_obj
*
* self.n_field_tables = tf_obj.n_field_tables # <<<<<<<<<<<<<<
@@ -13142,7 +13749,7 @@
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->n_field_tables = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":153
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":153
*
* self.n_field_tables = tf_obj.n_field_tables
* for i in range(6): self.istorage[i] = 0.0 # <<<<<<<<<<<<<<
@@ -13154,7 +13761,7 @@
(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->istorage[__pyx_v_i]) = 0.0;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":155
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":155
* for i in range(6): self.istorage[i] = 0.0
*
* self.my_field_tables = [] # <<<<<<<<<<<<<<
@@ -13169,7 +13776,7 @@
((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->my_field_tables = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":156
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":156
*
* self.my_field_tables = []
* for i in range(self.n_field_tables): # <<<<<<<<<<<<<<
@@ -13180,7 +13787,7 @@
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_i = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":157
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":157
* self.my_field_tables = []
* for i in range(self.n_field_tables):
* temp = tf_obj.tables[i].y # <<<<<<<<<<<<<<
@@ -13219,7 +13826,7 @@
__pyx_v_temp = ((PyArrayObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":161
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":161
* temp.shape[0],
* <np.float64_t *> temp.data,
* tf_obj.tables[i].x_bounds[0], # <<<<<<<<<<<<<<
@@ -13240,7 +13847,7 @@
__pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 161; __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":162
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":162
* <np.float64_t *> temp.data,
* tf_obj.tables[i].x_bounds[0],
* tf_obj.tables[i].x_bounds[1], # <<<<<<<<<<<<<<
@@ -13261,7 +13868,7 @@
__pyx_t_11 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_11 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":163
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":163
* tf_obj.tables[i].x_bounds[0],
* tf_obj.tables[i].x_bounds[1],
* tf_obj.field_ids[i], tf_obj.weight_field_ids[i], # <<<<<<<<<<<<<<
@@ -13283,7 +13890,7 @@
__pyx_t_12 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":164
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":164
* tf_obj.tables[i].x_bounds[1],
* tf_obj.field_ids[i], tf_obj.weight_field_ids[i],
* tf_obj.weight_table_ids[i], # <<<<<<<<<<<<<<
@@ -13298,7 +13905,7 @@
__pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 164; __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":165
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":165
* tf_obj.field_ids[i], tf_obj.weight_field_ids[i],
* tf_obj.weight_table_ids[i],
* tf_obj.tables[i].pass_through) # <<<<<<<<<<<<<<
@@ -13321,7 +13928,7 @@
__pyx_t_15.pass_through = __pyx_t_14;
__pyx_f_2yt_9amr_utils_FIT_initialize_table((&(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->field_tables[__pyx_v_i])), (__pyx_v_temp->dimensions[0]), ((__pyx_t_5numpy_float64_t *)__pyx_v_temp->data), __pyx_t_10, __pyx_t_11, __pyx_t_6, &__pyx_t_15);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":166
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":166
* tf_obj.weight_table_ids[i],
* tf_obj.tables[i].pass_through)
* self.my_field_tables.append((tf_obj.tables[i], # <<<<<<<<<<<<<<
@@ -13334,7 +13941,7 @@
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":167
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":167
* tf_obj.tables[i].pass_through)
* self.my_field_tables.append((tf_obj.tables[i],
* tf_obj.tables[i].y)) # <<<<<<<<<<<<<<
@@ -13362,7 +13969,7 @@
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":168
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":168
* self.my_field_tables.append((tf_obj.tables[i],
* tf_obj.tables[i].y))
* self.field_tables[i].field_id = tf_obj.field_ids[i] # <<<<<<<<<<<<<<
@@ -13378,7 +13985,7 @@
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->field_tables[__pyx_v_i]).field_id = __pyx_t_14;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":169
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":169
* tf_obj.tables[i].y))
* self.field_tables[i].field_id = tf_obj.field_ids[i]
* self.field_tables[i].weight_field_id = tf_obj.weight_field_ids[i] # <<<<<<<<<<<<<<
@@ -13394,7 +14001,7 @@
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->field_tables[__pyx_v_i]).weight_field_id = __pyx_t_14;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":170
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":170
* self.field_tables[i].field_id = tf_obj.field_ids[i]
* self.field_tables[i].weight_field_id = tf_obj.weight_field_ids[i]
* print "Field table", i, "corresponds to", # <<<<<<<<<<<<<<
@@ -13414,10 +14021,10 @@
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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":171
* self.field_tables[i].weight_field_id = tf_obj.weight_field_ids[i]
* print "Field table", i, "corresponds to",
* print self.field_tables[i].field_id, # <<<<<<<<<<<<<<
@@ -13431,10 +14038,10 @@
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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":172
* print "Field table", i, "corresponds to",
* print self.field_tables[i].field_id,
* print "(Weighted with ", self.field_tables[i].weight_field_id, # <<<<<<<<<<<<<<
@@ -13451,20 +14058,20 @@
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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":173
* print self.field_tables[i].field_id,
* print "(Weighted with ", self.field_tables[i].weight_field_id,
* print ")" # <<<<<<<<<<<<<<
*
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":175
* print ")"
*
* for i in range(6): # <<<<<<<<<<<<<<
@@ -13474,7 +14081,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < 6; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":176
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":176
*
* for i in range(6):
* self.field_table_ids[i] = tf_obj.field_table_ids[i] # <<<<<<<<<<<<<<
@@ -13490,7 +14097,7 @@
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
(((struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *)__pyx_v_self)->field_table_ids[__pyx_v_i]) = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":177
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":177
* for i in range(6):
* self.field_table_ids[i] = tf_obj.field_table_ids[i]
* print "Channel", i, "corresponds to", self.field_table_ids[i] # <<<<<<<<<<<<<<
@@ -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,13 +14143,11 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":181
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":181
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef void eval_transfer(self, np.float64_t dt, np.float64_t *dvs, # <<<<<<<<<<<<<<
@@ -13559,9 +14164,8 @@
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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":194
* # use = 1
* # break
* for i in range(self.n_field_tables): # <<<<<<<<<<<<<<
@@ -13572,7 +14176,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":195
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":195
* # break
* for i in range(self.n_field_tables):
* self.istorage[i] = FIT_get_value(&self.field_tables[i], dvs) # <<<<<<<<<<<<<<
@@ -13582,7 +14186,7 @@
(__pyx_v_self->istorage[__pyx_v_i]) = __pyx_f_2yt_9amr_utils_FIT_get_value((&(__pyx_v_self->field_tables[__pyx_v_i])), __pyx_v_dvs);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":197
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":197
* self.istorage[i] = FIT_get_value(&self.field_tables[i], dvs)
* # We have to do this after the interpolation
* for i in range(self.n_field_tables): # <<<<<<<<<<<<<<
@@ -13593,7 +14197,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":198
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":198
* # We have to do this after the interpolation
* for i in range(self.n_field_tables):
* fid = self.field_tables[i].weight_table_id # <<<<<<<<<<<<<<
@@ -13602,7 +14206,7 @@
*/
__pyx_v_fid = (__pyx_v_self->field_tables[__pyx_v_i]).weight_table_id;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":199
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":199
* for i in range(self.n_field_tables):
* fid = self.field_tables[i].weight_table_id
* if fid != -1: self.istorage[i] *= self.istorage[fid] # <<<<<<<<<<<<<<
@@ -13617,7 +14221,7 @@
__pyx_L7:;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":200
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":200
* fid = self.field_tables[i].weight_table_id
* if fid != -1: self.istorage[i] *= self.istorage[fid]
* for i in range(6): # <<<<<<<<<<<<<<
@@ -13627,7 +14231,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 6; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":201
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":201
* if fid != -1: self.istorage[i] *= self.istorage[fid]
* for i in range(6):
* trgba[i] = self.istorage[self.field_table_ids[i]] # <<<<<<<<<<<<<<
@@ -13637,7 +14241,7 @@
(__pyx_v_trgba[__pyx_v_i]) = (__pyx_v_self->istorage[(__pyx_v_self->field_table_ids[__pyx_v_i])]);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":211
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":211
* # integration here:
* # I_{i+1} = ds * C_i + (1.0 - ds*alpha_i) * I_i
* for i in range(3): # <<<<<<<<<<<<<<
@@ -13647,7 +14251,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":215
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":215
* # slice. Previously it was ill-defined, but represented some
* # measure of emissivity.
* ta = fmax((1.0 - dt*trgba[i+3]), 0.0) # <<<<<<<<<<<<<<
@@ -13656,7 +14260,7 @@
*/
__pyx_v_ta = __pyx_f_2yt_9amr_utils_fmax((1.0 - (__pyx_v_dt * (__pyx_v_trgba[(__pyx_v_i + 3)]))), 0.0);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":216
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":216
* # measure of emissivity.
* ta = fmax((1.0 - dt*trgba[i+3]), 0.0)
* rgba[i ] = dt*trgba[i ] + ta * rgba[i ] # <<<<<<<<<<<<<<
@@ -13666,152 +14270,436 @@
(__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/branches/yt-1.7/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_bstruct_center.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/branches/yt-1.7/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/branches/yt-1.7/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;
__pyx_bstruct_y_vec.buf = NULL;
@@ -13852,7 +14740,7 @@
__pyx_bstride_0_y_vec = __pyx_bstruct_y_vec.strides[0];
__pyx_bshape_0_y_vec = __pyx_bstruct_y_vec.shape[0];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":242
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":242
* np.ndarray[np.float64_t, ndim=1] y_vec):
* cdef int i, j
* self.avp_pos = vp_pos # <<<<<<<<<<<<<<
@@ -13865,7 +14753,7 @@
__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 = ((PyObject *)__pyx_v_vp_pos);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":243
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":243
* cdef int i, j
* self.avp_pos = vp_pos
* self.avp_dir = vp_dir # <<<<<<<<<<<<<<
@@ -13878,7 +14766,7 @@
__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 = ((PyObject *)__pyx_v_vp_dir);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":244
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":244
* self.avp_pos = vp_pos
* self.avp_dir = vp_dir
* self.acenter = center # <<<<<<<<<<<<<<
@@ -13891,7 +14779,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->acenter);
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->acenter = ((PyObject *)__pyx_v_center);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":245
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":245
* self.avp_dir = vp_dir
* self.acenter = center
* self.aimage = image # <<<<<<<<<<<<<<
@@ -13904,7 +14792,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->aimage);
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->aimage = ((PyObject *)__pyx_v_image);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":246
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":246
* self.acenter = center
* self.aimage = image
* self.ax_vec = x_vec # <<<<<<<<<<<<<<
@@ -13917,7 +14805,7 @@
__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 = ((PyObject *)__pyx_v_x_vec);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":247
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":247
* self.aimage = image
* self.ax_vec = x_vec
* self.ay_vec = y_vec # <<<<<<<<<<<<<<
@@ -13930,7 +14818,7 @@
__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 = ((PyObject *)__pyx_v_y_vec);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":248
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":248
* self.ax_vec = x_vec
* self.ay_vec = y_vec
* self.vp_pos = <np.float64_t *> vp_pos.data # <<<<<<<<<<<<<<
@@ -13939,7 +14827,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->vp_pos = ((__pyx_t_5numpy_float64_t *)__pyx_v_vp_pos->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":249
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":249
* self.ay_vec = y_vec
* self.vp_pos = <np.float64_t *> vp_pos.data
* self.vp_dir = <np.float64_t *> vp_dir.data # <<<<<<<<<<<<<<
@@ -13948,7 +14836,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->vp_dir = ((__pyx_t_5numpy_float64_t *)__pyx_v_vp_dir->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":250
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":250
* self.vp_pos = <np.float64_t *> vp_pos.data
* self.vp_dir = <np.float64_t *> vp_dir.data
* self.center = <np.float64_t *> center.data # <<<<<<<<<<<<<<
@@ -13957,7 +14845,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->center = ((__pyx_t_5numpy_float64_t *)__pyx_v_center->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":251
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":251
* self.vp_dir = <np.float64_t *> vp_dir.data
* self.center = <np.float64_t *> center.data
* self.image = <np.float64_t *> image.data # <<<<<<<<<<<<<<
@@ -13966,7 +14854,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->image = ((__pyx_t_5numpy_float64_t *)__pyx_v_image->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":252
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":252
* self.center = <np.float64_t *> center.data
* self.image = <np.float64_t *> image.data
* self.x_vec = <np.float64_t *> x_vec.data # <<<<<<<<<<<<<<
@@ -13975,7 +14863,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->x_vec = ((__pyx_t_5numpy_float64_t *)__pyx_v_x_vec->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":253
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":253
* self.image = <np.float64_t *> image.data
* self.x_vec = <np.float64_t *> x_vec.data
* self.y_vec = <np.float64_t *> y_vec.data # <<<<<<<<<<<<<<
@@ -13984,7 +14872,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->y_vec = ((__pyx_t_5numpy_float64_t *)__pyx_v_y_vec->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":254
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":254
* self.x_vec = <np.float64_t *> x_vec.data
* self.y_vec = <np.float64_t *> y_vec.data
* self.nv[0] = vp_pos.shape[0] # <<<<<<<<<<<<<<
@@ -13993,7 +14881,7 @@
*/
(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->nv[0]) = (__pyx_v_vp_pos->dimensions[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":255
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":255
* self.y_vec = <np.float64_t *> y_vec.data
* self.nv[0] = vp_pos.shape[0]
* self.nv[1] = vp_pos.shape[1] # <<<<<<<<<<<<<<
@@ -14002,7 +14890,7 @@
*/
(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->nv[1]) = (__pyx_v_vp_pos->dimensions[1]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":256
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":256
* self.nv[0] = vp_pos.shape[0]
* self.nv[1] = vp_pos.shape[1]
* for i in range(4): self.bounds[i] = bounds[i] # <<<<<<<<<<<<<<
@@ -14018,25 +14906,37 @@
(((struct __pyx_obj_2yt_9amr_utils_VectorPlane *)__pyx_v_self)->bounds[__pyx_v_i]) = __pyx_t_3;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":257
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":257
* self.nv[1] = vp_pos.shape[1]
* for i in range(4): self.bounds[i] = bounds[i]
* self.pdx = (self.bounds[1] - self.bounds[0])/self.nv[0] # <<<<<<<<<<<<<<
* self.pdy = (self.bounds[3] - self.bounds[2])/self.nv[1]
* for i in range(3):
*/
- ((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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":258
* for i in range(4): self.bounds[i] = bounds[i]
* self.pdx = (self.bounds[1] - self.bounds[0])/self.nv[0]
* self.pdy = (self.bounds[3] - self.bounds[2])/self.nv[1] # <<<<<<<<<<<<<<
* for i in range(3):
* self.vp_strides[i] = vp_pos.strides[i] / 8
*/
- ((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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":259
* self.pdx = (self.bounds[1] - self.bounds[0])/self.nv[0]
* self.pdy = (self.bounds[3] - self.bounds[2])/self.nv[1]
* for i in range(3): # <<<<<<<<<<<<<<
@@ -14046,26 +14946,26 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":260
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":260
* self.pdy = (self.bounds[3] - self.bounds[2])/self.nv[1]
* for i in range(3):
* self.vp_strides[i] = vp_pos.strides[i] / 8 # <<<<<<<<<<<<<<
* self.im_strides[i] = image.strides[i] / 8
* if vp_dir.ndim > 1:
*/
- (((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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":261
* for i in range(3):
* self.vp_strides[i] = vp_pos.strides[i] / 8
* self.im_strides[i] = image.strides[i] / 8 # <<<<<<<<<<<<<<
* if vp_dir.ndim > 1:
* for i in range(3):
*/
- (((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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":262
* self.vp_strides[i] = vp_pos.strides[i] / 8
* self.im_strides[i] = image.strides[i] / 8
* if vp_dir.ndim > 1: # <<<<<<<<<<<<<<
@@ -14075,7 +14975,7 @@
__pyx_t_4 = (__pyx_v_vp_dir->nd > 1);
if (__pyx_t_4) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":263
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":263
* self.im_strides[i] = image.strides[i] / 8
* if vp_dir.ndim > 1:
* for i in range(3): # <<<<<<<<<<<<<<
@@ -14085,20 +14985,20 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":264
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":264
* if vp_dir.ndim > 1:
* for i in range(3):
* self.vd_strides[i] = vp_dir.strides[i] / 8 # <<<<<<<<<<<<<<
* else:
* self.vd_strides[0] = self.vd_strides[1] = self.vd_strides[2] = -1
*/
- (((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;
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":266
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":266
* self.vd_strides[i] = vp_dir.strides[i] / 8
* else:
* self.vd_strides[0] = self.vd_strides[1] = self.vd_strides[2] = -1 # <<<<<<<<<<<<<<
@@ -14133,19 +15033,11 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":270
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":270
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef void get_start_stop(self, np.float64_t *ex, int *rv): # <<<<<<<<<<<<<<
@@ -14158,10 +15050,10 @@
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":274
* cdef np.float64_t cx, cy
* cdef int i
* cx = cy = 0.0 # <<<<<<<<<<<<<<
@@ -14171,7 +15063,7 @@
__pyx_v_cx = 0.0;
__pyx_v_cy = 0.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":275
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":275
* cdef int i
* cx = cy = 0.0
* for i in range(3): # <<<<<<<<<<<<<<
@@ -14181,7 +15073,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":276
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":276
* cx = cy = 0.0
* for i in range(3):
* cx += self.center[i] * self.x_vec[i] # <<<<<<<<<<<<<<
@@ -14190,7 +15082,7 @@
*/
__pyx_v_cx += ((__pyx_v_self->center[__pyx_v_i]) * (__pyx_v_self->x_vec[__pyx_v_i]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":277
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":277
* for i in range(3):
* cx += self.center[i] * self.x_vec[i]
* cy += self.center[i] * self.y_vec[i] # <<<<<<<<<<<<<<
@@ -14200,147 +15092,428 @@
__pyx_v_cy += ((__pyx_v_self->center[__pyx_v_i]) * (__pyx_v_self->y_vec[__pyx_v_i]));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":278
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":278
* cx += self.center[i] * self.x_vec[i]
* cy += self.center[i] * self.y_vec[i]
* rv[0] = lrint((ex[0] - cx - self.bounds[0])/self.pdx) # <<<<<<<<<<<<<<
* rv[1] = rv[0] + lrint((ex[1] - ex[0])/self.pdx)
* rv[2] = lrint((ex[2] - cy - self.bounds[2])/self.pdy)
*/
- (__pyx_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":279
* cy += self.center[i] * self.y_vec[i]
* rv[0] = lrint((ex[0] - cx - self.bounds[0])/self.pdx)
* rv[1] = rv[0] + lrint((ex[1] - ex[0])/self.pdx) # <<<<<<<<<<<<<<
* rv[2] = lrint((ex[2] - cy - self.bounds[2])/self.pdy)
* rv[3] = rv[2] + lrint((ex[3] - ex[2])/self.pdy)
*/
- (__pyx_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":280
* rv[0] = lrint((ex[0] - cx - self.bounds[0])/self.pdx)
* rv[1] = rv[0] + lrint((ex[1] - ex[0])/self.pdx)
* rv[2] = lrint((ex[2] - cy - self.bounds[2])/self.pdy) # <<<<<<<<<<<<<<
* rv[3] = rv[2] + lrint((ex[3] - ex[2])/self.pdy)
*
*/
- (__pyx_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":281
* rv[1] = rv[0] + lrint((ex[1] - ex[0])/self.pdx)
* rv[2] = lrint((ex[2] - cy - self.bounds[2])/self.pdy)
* rv[3] = rv[2] + lrint((ex[3] - ex[2])/self.pdy) # <<<<<<<<<<<<<<
*
* cdef inline void copy_into(self, np.float64_t *fv, np.float64_t *tv,
*/
- (__pyx_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/branches/yt-1.7/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/branches/yt-1.7/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/branches/yt-1.7/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/branches/yt-1.7/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/branches/yt-1.7/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/branches/yt-1.7/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/branches/yt-1.7/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/branches/yt-1.7/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/branches/yt-1.7/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/branches/yt-1.7/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/branches/yt-1.7/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_DECREF((PyObject *)__pyx_v_self);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
__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 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;
-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);
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
- /* "/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));
+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":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;
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
- /* "/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] # <<<<<<<<<<<<<<
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/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
*
- * 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_DECREF((PyObject *)__pyx_v_self);
+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_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/branches/yt-1.7/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
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":315
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def __cinit__(self, # <<<<<<<<<<<<<<
@@ -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;
@@ -14496,7 +15667,7 @@
__pyx_bstride_0_dims = __pyx_bstruct_dims.strides[0];
__pyx_bshape_0_dims = __pyx_bstruct_dims.shape[0];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":323
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":323
* cdef int i, j, k, size
* cdef np.ndarray[np.float64_t, ndim=3] tdata
* self.parent_grid_id = parent_grid_id # <<<<<<<<<<<<<<
@@ -14505,7 +15676,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->parent_grid_id = __pyx_v_parent_grid_id;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":324
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":324
* cdef np.ndarray[np.float64_t, ndim=3] tdata
* self.parent_grid_id = parent_grid_id
* self.LeftEdge = left_edge # <<<<<<<<<<<<<<
@@ -14518,7 +15689,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->LeftEdge);
((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->LeftEdge = ((PyObject *)__pyx_v_left_edge);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":325
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":325
* self.parent_grid_id = parent_grid_id
* self.LeftEdge = left_edge
* self.RightEdge = right_edge # <<<<<<<<<<<<<<
@@ -14531,7 +15702,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->RightEdge);
((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->RightEdge = ((PyObject *)__pyx_v_right_edge);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":326
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":326
* self.LeftEdge = left_edge
* self.RightEdge = right_edge
* for i in range(3): # <<<<<<<<<<<<<<
@@ -14541,7 +15712,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":327
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":327
* self.RightEdge = right_edge
* for i in range(3):
* self.left_edge[i] = left_edge[i] # <<<<<<<<<<<<<<
@@ -14551,7 +15722,7 @@
__pyx_t_2 = __pyx_v_i;
(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->left_edge[__pyx_v_i]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_2, __pyx_bstride_0_left_edge));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":328
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":328
* for i in range(3):
* self.left_edge[i] = left_edge[i]
* self.right_edge[i] = right_edge[i] # <<<<<<<<<<<<<<
@@ -14561,7 +15732,7 @@
__pyx_t_3 = __pyx_v_i;
(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->right_edge[__pyx_v_i]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_3, __pyx_bstride_0_right_edge));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":329
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":329
* self.left_edge[i] = left_edge[i]
* self.right_edge[i] = right_edge[i]
* self.dims[i] = dims[i] # <<<<<<<<<<<<<<
@@ -14571,27 +15742,38 @@
__pyx_t_4 = __pyx_v_i;
(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->dims[__pyx_v_i]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_dims.buf, __pyx_t_4, __pyx_bstride_0_dims));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":330
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":330
* self.right_edge[i] = right_edge[i]
* self.dims[i] = dims[i]
* self.dds[i] = (self.right_edge[i] - self.left_edge[i])/dims[i] # <<<<<<<<<<<<<<
* self.idds[i] = 1.0/self.dds[i]
* self.my_data = data
*/
- __pyx_t_5 = __pyx_v_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":331
* self.dims[i] = dims[i]
* self.dds[i] = (self.right_edge[i] - self.left_edge[i])/dims[i]
* self.idds[i] = 1.0/self.dds[i] # <<<<<<<<<<<<<<
* self.my_data = data
* self.n_fields = n_fields
*/
- (((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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":332
* self.dds[i] = (self.right_edge[i] - self.left_edge[i])/dims[i]
* self.idds[i] = 1.0/self.dds[i]
* self.my_data = data # <<<<<<<<<<<<<<
@@ -14604,7 +15786,7 @@
__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_data;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":333
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":333
* self.idds[i] = 1.0/self.dds[i]
* self.my_data = data
* self.n_fields = n_fields # <<<<<<<<<<<<<<
@@ -14613,7 +15795,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->n_fields = __pyx_v_n_fields;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":334
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":334
* self.my_data = data
* self.n_fields = n_fields
* for i in range(n_fields): # <<<<<<<<<<<<<<
@@ -14621,43 +15803,43 @@
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":335
* self.n_fields = n_fields
* for i in range(n_fields):
* tdata = data[i] # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":336
* for i in range(n_fields):
* tdata = data[i]
* self.data[i] = <np.float64_t *> tdata.data # <<<<<<<<<<<<<<
@@ -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,16 +15870,11 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":340
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":340
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def cast_plane(self, TransferFunctionProxy tf, VectorPlane vp): # <<<<<<<<<<<<<<
@@ -14763,15 +15940,13 @@
__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;}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":347
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":347
* cdef int iter[4]
* cdef np.float64_t v_pos[3], v_dir[3], rgba[6], extrema[4]
* hit = 0 # <<<<<<<<<<<<<<
@@ -14780,7 +15955,7 @@
*/
__pyx_v_hit = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":348
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":348
* cdef np.float64_t v_pos[3], v_dir[3], rgba[6], extrema[4]
* hit = 0
* self.calculate_extent(vp, extrema) # <<<<<<<<<<<<<<
@@ -14789,7 +15964,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_PartitionedGrid *)((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->__pyx_vtab)->calculate_extent(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self), __pyx_v_vp, __pyx_v_extrema);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":349
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":349
* hit = 0
* self.calculate_extent(vp, extrema)
* vp.get_start_stop(extrema, iter) # <<<<<<<<<<<<<<
@@ -14798,7 +15973,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *)__pyx_v_vp->__pyx_vtab)->get_start_stop(__pyx_v_vp, __pyx_v_extrema, __pyx_v_iter);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":350
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":350
* self.calculate_extent(vp, extrema)
* vp.get_start_stop(extrema, iter)
* iter[0] = iclip(iter[0], 0, vp.nv[0]) # <<<<<<<<<<<<<<
@@ -14807,7 +15982,7 @@
*/
(__pyx_v_iter[0]) = __pyx_f_2yt_9amr_utils_iclip((__pyx_v_iter[0]), 0, (__pyx_v_vp->nv[0]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":351
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":351
* vp.get_start_stop(extrema, iter)
* iter[0] = iclip(iter[0], 0, vp.nv[0])
* iter[1] = iclip(iter[1], 0, vp.nv[0]) # <<<<<<<<<<<<<<
@@ -14816,7 +15991,7 @@
*/
(__pyx_v_iter[1]) = __pyx_f_2yt_9amr_utils_iclip((__pyx_v_iter[1]), 0, (__pyx_v_vp->nv[0]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":352
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":352
* iter[0] = iclip(iter[0], 0, vp.nv[0])
* iter[1] = iclip(iter[1], 0, vp.nv[0])
* iter[2] = iclip(iter[2], 0, vp.nv[1]) # <<<<<<<<<<<<<<
@@ -14825,7 +16000,7 @@
*/
(__pyx_v_iter[2]) = __pyx_f_2yt_9amr_utils_iclip((__pyx_v_iter[2]), 0, (__pyx_v_vp->nv[1]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":353
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":353
* iter[1] = iclip(iter[1], 0, vp.nv[0])
* iter[2] = iclip(iter[2], 0, vp.nv[1])
* iter[3] = iclip(iter[3], 0, vp.nv[1]) # <<<<<<<<<<<<<<
@@ -14834,7 +16009,7 @@
*/
(__pyx_v_iter[3]) = __pyx_f_2yt_9amr_utils_iclip((__pyx_v_iter[3]), 0, (__pyx_v_vp->nv[1]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":354
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":354
* iter[2] = iclip(iter[2], 0, vp.nv[1])
* iter[3] = iclip(iter[3], 0, vp.nv[1])
* if vp.vd_strides[0] == -1: # <<<<<<<<<<<<<<
@@ -14844,7 +16019,7 @@
__pyx_t_1 = ((__pyx_v_vp->vd_strides[0]) == -1);
if (__pyx_t_1) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":355
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":355
* iter[3] = iclip(iter[3], 0, vp.nv[1])
* if vp.vd_strides[0] == -1:
* for vi in range(iter[0], iter[1]): # <<<<<<<<<<<<<<
@@ -14855,7 +16030,7 @@
for (__pyx_t_3 = (__pyx_v_iter[0]); __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_vi = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":356
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":356
* if vp.vd_strides[0] == -1:
* for vi in range(iter[0], iter[1]):
* for vj in range(iter[2], iter[3]): # <<<<<<<<<<<<<<
@@ -14866,7 +16041,7 @@
for (__pyx_t_5 = (__pyx_v_iter[2]); __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
__pyx_v_vj = __pyx_t_5;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":357
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":357
* for vi in range(iter[0], iter[1]):
* for vj in range(iter[2], iter[3]):
* vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides) # <<<<<<<<<<<<<<
@@ -14875,7 +16050,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *)__pyx_v_vp->__pyx_vtab)->copy_into(__pyx_v_vp, __pyx_v_vp->vp_pos, __pyx_v_v_pos, __pyx_v_vi, __pyx_v_vj, 3, __pyx_v_vp->vp_strides);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":358
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":358
* for vj in range(iter[2], iter[3]):
* vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
* vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides) # <<<<<<<<<<<<<<
@@ -14884,7 +16059,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *)__pyx_v_vp->__pyx_vtab)->copy_into(__pyx_v_vp, __pyx_v_vp->image, __pyx_v_rgba, __pyx_v_vi, __pyx_v_vj, 3, __pyx_v_vp->im_strides);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":359
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":359
* vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
* vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
* self.integrate_ray(v_pos, vp.vp_dir, rgba, tf) # <<<<<<<<<<<<<<
@@ -14893,7 +16068,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_PartitionedGrid *)((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->__pyx_vtab)->integrate_ray(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self), __pyx_v_v_pos, __pyx_v_vp->vp_dir, __pyx_v_rgba, __pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":360
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":360
* vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
* self.integrate_ray(v_pos, vp.vp_dir, rgba, tf)
* vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides) # <<<<<<<<<<<<<<
@@ -14907,7 +16082,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":364
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":364
* # If we do not have an orthographic projection, we have to cast all
* # our rays (until we can get an extrema calculation...)
* for vi in range(vp.nv[0]): # <<<<<<<<<<<<<<
@@ -14918,7 +16093,7 @@
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_vi = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":365
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":365
* # our rays (until we can get an extrema calculation...)
* for vi in range(vp.nv[0]):
* for vj in range(vp.nv[1]): # <<<<<<<<<<<<<<
@@ -14929,7 +16104,7 @@
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
__pyx_v_vj = __pyx_t_5;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":366
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":366
* for vi in range(vp.nv[0]):
* for vj in range(vp.nv[1]):
* vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides) # <<<<<<<<<<<<<<
@@ -14938,7 +16113,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *)__pyx_v_vp->__pyx_vtab)->copy_into(__pyx_v_vp, __pyx_v_vp->vp_pos, __pyx_v_v_pos, __pyx_v_vi, __pyx_v_vj, 3, __pyx_v_vp->vp_strides);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":367
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":367
* for vj in range(vp.nv[1]):
* vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
* vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides) # <<<<<<<<<<<<<<
@@ -14947,7 +16122,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *)__pyx_v_vp->__pyx_vtab)->copy_into(__pyx_v_vp, __pyx_v_vp->image, __pyx_v_rgba, __pyx_v_vi, __pyx_v_vj, 3, __pyx_v_vp->im_strides);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":368
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":368
* vp.copy_into(vp.vp_pos, v_pos, vi, vj, 3, vp.vp_strides)
* vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
* vp.copy_into(vp.vp_dir, v_dir, vi, vj, 3, vp.vd_strides) # <<<<<<<<<<<<<<
@@ -14956,7 +16131,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *)__pyx_v_vp->__pyx_vtab)->copy_into(__pyx_v_vp, __pyx_v_vp->vp_dir, __pyx_v_v_dir, __pyx_v_vi, __pyx_v_vj, 3, __pyx_v_vp->vd_strides);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":369
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":369
* vp.copy_into(vp.image, rgba, vi, vj, 3, vp.im_strides)
* vp.copy_into(vp.vp_dir, v_dir, vi, vj, 3, vp.vd_strides)
* self.integrate_ray(v_pos, v_dir, rgba, tf) # <<<<<<<<<<<<<<
@@ -14965,7 +16140,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_PartitionedGrid *)((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self)->__pyx_vtab)->integrate_ray(((struct __pyx_obj_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self), __pyx_v_v_pos, __pyx_v_v_dir, __pyx_v_rgba, __pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":370
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":370
* vp.copy_into(vp.vp_dir, v_dir, vi, vj, 3, vp.vd_strides)
* self.integrate_ray(v_pos, v_dir, rgba, tf)
* vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides) # <<<<<<<<<<<<<<
@@ -14978,7 +16153,7 @@
}
__pyx_L6:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":371
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":371
* self.integrate_ray(v_pos, v_dir, rgba, tf)
* vp.copy_back(rgba, vp.image, vi, vj, 3, vp.im_strides)
* return hit # <<<<<<<<<<<<<<
@@ -14999,15 +16174,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":375
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":375
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef void calculate_extent(self, VectorPlane vp, # <<<<<<<<<<<<<<
@@ -15027,10 +16199,8 @@
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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":379
* # We do this for all eight corners
* cdef np.float64_t *edges[2], temp
* edges[0] = self.left_edge # <<<<<<<<<<<<<<
@@ -15039,7 +16209,7 @@
*/
(__pyx_v_edges[0]) = __pyx_v_self->left_edge;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":380
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":380
* cdef np.float64_t *edges[2], temp
* edges[0] = self.left_edge
* edges[1] = self.right_edge # <<<<<<<<<<<<<<
@@ -15048,20 +16218,20 @@
*/
(__pyx_v_edges[1]) = __pyx_v_self->right_edge;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":381
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":381
* edges[0] = self.left_edge
* edges[1] = self.right_edge
* extrema[0] = extrema[2] = 1e300; extrema[1] = extrema[3] = -1e300 # <<<<<<<<<<<<<<
* cdef int i, j, k
* for i in range(2):
*/
- (__pyx_v_extrema[0]) = 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;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":383
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":383
* extrema[0] = extrema[2] = 1e300; extrema[1] = extrema[3] = -1e300
* cdef int i, j, k
* for i in range(2): # <<<<<<<<<<<<<<
@@ -15071,7 +16241,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < 2; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":384
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":384
* cdef int i, j, k
* for i in range(2):
* for j in range(2): # <<<<<<<<<<<<<<
@@ -15081,7 +16251,7 @@
for (__pyx_t_3 = 0; __pyx_t_3 < 2; __pyx_t_3+=1) {
__pyx_v_j = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":385
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":385
* for i in range(2):
* for j in range(2):
* for k in range(2): # <<<<<<<<<<<<<<
@@ -15091,7 +16261,7 @@
for (__pyx_t_4 = 0; __pyx_t_4 < 2; __pyx_t_4+=1) {
__pyx_v_k = __pyx_t_4;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":387
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":387
* for k in range(2):
* # This should rotate it into the vector plane
* temp = edges[i][0] * vp.x_vec[0] # <<<<<<<<<<<<<<
@@ -15100,7 +16270,7 @@
*/
__pyx_v_temp = (((__pyx_v_edges[__pyx_v_i])[0]) * (__pyx_v_vp->x_vec[0]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":388
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":388
* # This should rotate it into the vector plane
* temp = edges[i][0] * vp.x_vec[0]
* temp += edges[j][1] * vp.x_vec[1] # <<<<<<<<<<<<<<
@@ -15109,7 +16279,7 @@
*/
__pyx_v_temp += (((__pyx_v_edges[__pyx_v_j])[1]) * (__pyx_v_vp->x_vec[1]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":389
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":389
* temp = edges[i][0] * vp.x_vec[0]
* temp += edges[j][1] * vp.x_vec[1]
* temp += edges[k][2] * vp.x_vec[2] # <<<<<<<<<<<<<<
@@ -15118,7 +16288,7 @@
*/
__pyx_v_temp += (((__pyx_v_edges[__pyx_v_k])[2]) * (__pyx_v_vp->x_vec[2]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":390
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":390
* temp += edges[j][1] * vp.x_vec[1]
* temp += edges[k][2] * vp.x_vec[2]
* if temp < extrema[0]: extrema[0] = temp # <<<<<<<<<<<<<<
@@ -15132,7 +16302,7 @@
}
__pyx_L9:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":391
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":391
* temp += edges[k][2] * vp.x_vec[2]
* if temp < extrema[0]: extrema[0] = temp
* if temp > extrema[1]: extrema[1] = temp # <<<<<<<<<<<<<<
@@ -15146,7 +16316,7 @@
}
__pyx_L10:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":392
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":392
* if temp < extrema[0]: extrema[0] = temp
* if temp > extrema[1]: extrema[1] = temp
* temp = edges[i][0] * vp.y_vec[0] # <<<<<<<<<<<<<<
@@ -15155,7 +16325,7 @@
*/
__pyx_v_temp = (((__pyx_v_edges[__pyx_v_i])[0]) * (__pyx_v_vp->y_vec[0]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":393
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":393
* if temp > extrema[1]: extrema[1] = temp
* temp = edges[i][0] * vp.y_vec[0]
* temp += edges[j][1] * vp.y_vec[1] # <<<<<<<<<<<<<<
@@ -15164,7 +16334,7 @@
*/
__pyx_v_temp += (((__pyx_v_edges[__pyx_v_j])[1]) * (__pyx_v_vp->y_vec[1]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":394
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":394
* temp = edges[i][0] * vp.y_vec[0]
* temp += edges[j][1] * vp.y_vec[1]
* temp += edges[k][2] * vp.y_vec[2] # <<<<<<<<<<<<<<
@@ -15173,7 +16343,7 @@
*/
__pyx_v_temp += (((__pyx_v_edges[__pyx_v_k])[2]) * (__pyx_v_vp->y_vec[2]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":395
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":395
* temp += edges[j][1] * vp.y_vec[1]
* temp += edges[k][2] * vp.y_vec[2]
* if temp < extrema[2]: extrema[2] = temp # <<<<<<<<<<<<<<
@@ -15187,7 +16357,7 @@
}
__pyx_L11:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":396
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":396
* temp += edges[k][2] * vp.y_vec[2]
* if temp < extrema[2]: extrema[2] = temp
* if temp > extrema[3]: extrema[3] = temp # <<<<<<<<<<<<<<
@@ -15204,12 +16374,10 @@
}
}
- __Pyx_DECREF((PyObject *)__pyx_v_self);
- __Pyx_DECREF((PyObject *)__pyx_v_vp);
__Pyx_RefNannyFinishContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":401
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":401
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef int integrate_ray(self, np.float64_t v_pos[3], # <<<<<<<<<<<<<<
@@ -15239,17 +16407,16 @@
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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":406
* TransferFunctionProxy tf):
* cdef int cur_ind[3], step[3], x, y, i, n, flat_ind, hit, direction
* cdef np.float64_t intersect_t = 1.0 # <<<<<<<<<<<<<<
@@ -15258,7 +16425,7 @@
*/
__pyx_v_intersect_t = 1.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":411
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":411
* cdef np.float64_t enter_t, dist, alpha, dt, exit_t
* cdef np.float64_t tr, tl, temp_x, temp_y, dv
* for i in range(3): # <<<<<<<<<<<<<<
@@ -15268,17 +16435,17 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":412
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":412
* cdef np.float64_t tr, tl, temp_x, temp_y, dv
* for i in range(3):
* if (v_dir[i] < 0): # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":413
* for i in range(3):
* if (v_dir[i] < 0):
* step[i] = -1 # <<<<<<<<<<<<<<
@@ -15290,7 +16457,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":415
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":415
* step[i] = -1
* else:
* step[i] = 1 # <<<<<<<<<<<<<<
@@ -15301,44 +16468,49 @@
}
__pyx_L5:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":416
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":416
* else:
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/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])
*/
__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]
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":420
+ * 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])
@@ -15346,7 +16518,7 @@
*/
__pyx_v_temp_x = ((__pyx_v_v_pos[__pyx_v_x]) + (__pyx_v_tl * (__pyx_v_v_dir[__pyx_v_x])));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":421
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":421
* 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]) # <<<<<<<<<<<<<<
@@ -15355,7 +16527,7 @@
*/
__pyx_v_temp_y = ((__pyx_v_v_pos[__pyx_v_y]) + (__pyx_v_tl * (__pyx_v_v_dir[__pyx_v_y])));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":422
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":422
* temp_x = (v_pos[x] + tl*v_dir[x])
* temp_y = (v_pos[y] + tl*v_dir[y])
* if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \ # <<<<<<<<<<<<<<
@@ -15364,54 +16536,54 @@
*/
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":423
* temp_y = (v_pos[y] + tl*v_dir[y])
* if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
* self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \ # <<<<<<<<<<<<<<
* 0.0 <= tl and tl < intersect_t:
* direction = i
*/
- __pyx_t_4 = ((__pyx_v_self->left_edge[__pyx_v_y]) <= __pyx_v_temp_y);
- if (__pyx_t_4) {
- __pyx_t_5 = (__pyx_v_temp_y <= (__pyx_v_self->right_edge[__pyx_v_y]));
- if (__pyx_t_5) {
+ __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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":424
* if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
* self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
* 0.0 <= tl and tl < intersect_t: # <<<<<<<<<<<<<<
* direction = i
* intersect_t = tl
*/
- __pyx_t_6 = (0.0 <= __pyx_v_tl);
- if (__pyx_t_6) {
- __pyx_t_7 = (__pyx_v_tl < __pyx_v_intersect_t);
- __pyx_t_8 = __pyx_t_7;
+ __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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":425
* self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
* 0.0 <= tl and tl < intersect_t:
* direction = i # <<<<<<<<<<<<<<
@@ -15420,7 +16592,7 @@
*/
__pyx_v_direction = __pyx_v_i;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":426
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":426
* 0.0 <= tl and tl < intersect_t:
* direction = i
* intersect_t = tl # <<<<<<<<<<<<<<
@@ -15432,7 +16604,7 @@
}
__pyx_L6:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":427
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":427
* direction = i
* intersect_t = tl
* tr = (self.right_edge[i] - v_pos[i])*iv_dir[i] # <<<<<<<<<<<<<<
@@ -15441,7 +16613,7 @@
*/
__pyx_v_tr = (((__pyx_v_self->right_edge[__pyx_v_i]) - (__pyx_v_v_pos[__pyx_v_i])) * (__pyx_v_iv_dir[__pyx_v_i]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":428
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":428
* intersect_t = tl
* tr = (self.right_edge[i] - v_pos[i])*iv_dir[i]
* temp_x = (v_pos[x] + tr*v_dir[x]) # <<<<<<<<<<<<<<
@@ -15450,7 +16622,7 @@
*/
__pyx_v_temp_x = ((__pyx_v_v_pos[__pyx_v_x]) + (__pyx_v_tr * (__pyx_v_v_dir[__pyx_v_x])));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":429
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":429
* tr = (self.right_edge[i] - v_pos[i])*iv_dir[i]
* temp_x = (v_pos[x] + tr*v_dir[x])
* temp_y = (v_pos[y] + tr*v_dir[y]) # <<<<<<<<<<<<<<
@@ -15459,63 +16631,63 @@
*/
__pyx_v_temp_y = ((__pyx_v_v_pos[__pyx_v_y]) + (__pyx_v_tr * (__pyx_v_v_dir[__pyx_v_y])));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":430
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":430
* temp_x = (v_pos[x] + tr*v_dir[x])
* temp_y = (v_pos[y] + tr*v_dir[y])
* if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \ # <<<<<<<<<<<<<<
* self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
* 0.0 <= tr and tr < intersect_t:
*/
- __pyx_t_3 = ((__pyx_v_self->left_edge[__pyx_v_x]) <= __pyx_v_temp_x);
- if (__pyx_t_3) {
+ __pyx_t_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) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":431
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":431
* temp_y = (v_pos[y] + tr*v_dir[y])
* if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
* self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \ # <<<<<<<<<<<<<<
* 0.0 <= tr and tr < intersect_t:
* direction = i
*/
- __pyx_t_4 = ((__pyx_v_self->left_edge[__pyx_v_y]) <= __pyx_v_temp_y);
- if (__pyx_t_4) {
- __pyx_t_5 = (__pyx_v_temp_y <= (__pyx_v_self->right_edge[__pyx_v_y]));
- if (__pyx_t_5) {
+ __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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":432
* if self.left_edge[x] <= temp_x and temp_x <= self.right_edge[x] and \
* self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
* 0.0 <= tr and tr < intersect_t: # <<<<<<<<<<<<<<
* direction = i
* intersect_t = tr
*/
- __pyx_t_6 = (0.0 <= __pyx_v_tr);
- if (__pyx_t_6) {
- __pyx_t_8 = (__pyx_v_tr < __pyx_v_intersect_t);
- __pyx_t_7 = __pyx_t_8;
+ __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) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":433
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":433
* self.left_edge[y] <= temp_y and temp_y <= self.right_edge[y] and \
* 0.0 <= tr and tr < intersect_t:
* direction = i # <<<<<<<<<<<<<<
@@ -15524,7 +16696,7 @@
*/
__pyx_v_direction = __pyx_v_i;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":434
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":434
* 0.0 <= tr and tr < intersect_t:
* direction = i
* intersect_t = tr # <<<<<<<<<<<<<<
@@ -15537,7 +16709,7 @@
__pyx_L7:;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":435
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":435
* direction = i
* intersect_t = tr
* if self.left_edge[0] <= v_pos[0] and v_pos[0] <= self.right_edge[0] and \ # <<<<<<<<<<<<<<
@@ -15546,54 +16718,54 @@
*/
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":436
* intersect_t = tr
* if self.left_edge[0] <= v_pos[0] and v_pos[0] <= self.right_edge[0] and \
* self.left_edge[1] <= v_pos[1] and v_pos[1] <= self.right_edge[1] and \ # <<<<<<<<<<<<<<
* self.left_edge[2] <= v_pos[2] and v_pos[2] <= self.right_edge[2]:
* intersect_t = 0.0
*/
- __pyx_t_4 = ((__pyx_v_self->left_edge[1]) <= (__pyx_v_v_pos[1]));
- if (__pyx_t_4) {
- __pyx_t_5 = ((__pyx_v_v_pos[1]) <= (__pyx_v_self->right_edge[1]));
- if (__pyx_t_5) {
+ __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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":437
* if self.left_edge[0] <= v_pos[0] and v_pos[0] <= self.right_edge[0] and \
* self.left_edge[1] <= v_pos[1] and v_pos[1] <= self.right_edge[1] and \
* self.left_edge[2] <= v_pos[2] and v_pos[2] <= self.right_edge[2]: # <<<<<<<<<<<<<<
* intersect_t = 0.0
* if 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":438
* self.left_edge[1] <= v_pos[1] and v_pos[1] <= self.right_edge[1] and \
* self.left_edge[2] <= v_pos[2] and v_pos[2] <= self.right_edge[2]:
* intersect_t = 0.0 # <<<<<<<<<<<<<<
@@ -15605,29 +16777,29 @@
}
__pyx_L8:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":439
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":439
* self.left_edge[2] <= v_pos[2] and v_pos[2] <= self.right_edge[2]:
* intersect_t = 0.0
* if not ((0.0 <= intersect_t) and (intersect_t < 1.0)): return 0 # <<<<<<<<<<<<<<
* for i in range(3):
* intersect[i] = v_pos[i] + intersect_t * v_dir[i]
*/
- __pyx_t_3 = (0.0 <= __pyx_v_intersect_t);
- if (__pyx_t_3) {
+ __pyx_t_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;
}
__pyx_L9:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":440
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":440
* intersect_t = 0.0
* if not ((0.0 <= intersect_t) and (intersect_t < 1.0)): return 0
* for i in range(3): # <<<<<<<<<<<<<<
@@ -15637,7 +16809,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":441
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":441
* if not ((0.0 <= intersect_t) and (intersect_t < 1.0)): return 0
* for i in range(3):
* intersect[i] = v_pos[i] + intersect_t * v_dir[i] # <<<<<<<<<<<<<<
@@ -15646,16 +16818,16 @@
*/
(__pyx_v_intersect[__pyx_v_i]) = ((__pyx_v_v_pos[__pyx_v_i]) + (__pyx_v_intersect_t * (__pyx_v_v_dir[__pyx_v_i])));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":442
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":442
* for i in range(3):
* intersect[i] = v_pos[i] + intersect_t * v_dir[i]
* cur_ind[i] = <int> floor((intersect[i] + # <<<<<<<<<<<<<<
* step[i]*1e-8*self.dds[i] -
* self.left_edge[i])*self.idds[i])
*/
- (__pyx_v_cur_ind[__pyx_v_i]) = ((int)floor(((((__pyx_v_intersect[__pyx_v_i]) + (((__pyx_v_step[__pyx_v_i]) * 1e-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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":445
* step[i]*1e-8*self.dds[i] -
* self.left_edge[i])*self.idds[i])
* tmax[i] = (((cur_ind[i]+step[i])*self.dds[i])+ # <<<<<<<<<<<<<<
@@ -15664,23 +16836,23 @@
*/
(__pyx_v_tmax[__pyx_v_i]) = ((((((__pyx_v_cur_ind[__pyx_v_i]) + (__pyx_v_step[__pyx_v_i])) * (__pyx_v_self->dds[__pyx_v_i])) + (__pyx_v_self->left_edge[__pyx_v_i])) - (__pyx_v_v_pos[__pyx_v_i])) * (__pyx_v_iv_dir[__pyx_v_i]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":450
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":450
* # left edge of a cell, but the right edge of the brick being one
* # extra zone out.
* if cur_ind[i] == self.dims[i] and step[i] < 0: # <<<<<<<<<<<<<<
* cur_ind[i] = self.dims[i] - 1
* if cur_ind[i] < 0 or cur_ind[i] >= self.dims[i]: return 0
*/
- __pyx_t_3 = ((__pyx_v_cur_ind[__pyx_v_i]) == (__pyx_v_self->dims[__pyx_v_i]));
- if (__pyx_t_3) {
- __pyx_t_4 = ((__pyx_v_step[__pyx_v_i]) < 0);
- __pyx_t_2 = __pyx_t_4;
+ __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) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":451
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":451
* # extra zone out.
* if cur_ind[i] == self.dims[i] and step[i] < 0:
* cur_ind[i] = self.dims[i] - 1 # <<<<<<<<<<<<<<
@@ -15692,7 +16864,7 @@
}
__pyx_L12:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":452
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":452
* if cur_ind[i] == self.dims[i] and step[i] < 0:
* cur_ind[i] = self.dims[i] - 1
* if cur_ind[i] < 0 or cur_ind[i] >= self.dims[i]: return 0 # <<<<<<<<<<<<<<
@@ -15701,29 +16873,29 @@
*/
__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;
}
__pyx_L13:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":453
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":453
* cur_ind[i] = self.dims[i] - 1
* if cur_ind[i] < 0 or cur_ind[i] >= self.dims[i]: return 0
* if step[i] > 0: # <<<<<<<<<<<<<<
* tmax[i] = (((cur_ind[i]+1)*self.dds[i])
* +self.left_edge[i]-v_pos[i])*iv_dir[i]
*/
- __pyx_t_4 = ((__pyx_v_step[__pyx_v_i]) > 0);
- if (__pyx_t_4) {
+ __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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":454
* if cur_ind[i] < 0 or cur_ind[i] >= self.dims[i]: return 0
* if step[i] > 0:
* tmax[i] = (((cur_ind[i]+1)*self.dds[i]) # <<<<<<<<<<<<<<
@@ -15735,17 +16907,17 @@
}
__pyx_L14:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":456
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":456
* tmax[i] = (((cur_ind[i]+1)*self.dds[i])
* +self.left_edge[i]-v_pos[i])*iv_dir[i]
* if step[i] < 0: # <<<<<<<<<<<<<<
* tmax[i] = (((cur_ind[i]+0)*self.dds[i])
* +self.left_edge[i]-v_pos[i])*iv_dir[i]
*/
- __pyx_t_4 = ((__pyx_v_step[__pyx_v_i]) < 0);
- if (__pyx_t_4) {
+ __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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":457
* +self.left_edge[i]-v_pos[i])*iv_dir[i]
* if step[i] < 0:
* tmax[i] = (((cur_ind[i]+0)*self.dds[i]) # <<<<<<<<<<<<<<
@@ -15757,7 +16929,7 @@
}
__pyx_L15:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":459
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":459
* tmax[i] = (((cur_ind[i]+0)*self.dds[i])
* +self.left_edge[i]-v_pos[i])*iv_dir[i]
* tdelta[i] = (self.dds[i]*iv_dir[i]) # <<<<<<<<<<<<<<
@@ -15766,22 +16938,22 @@
*/
(__pyx_v_tdelta[__pyx_v_i]) = ((__pyx_v_self->dds[__pyx_v_i]) * (__pyx_v_iv_dir[__pyx_v_i]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":460
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":460
* +self.left_edge[i]-v_pos[i])*iv_dir[i]
* tdelta[i] = (self.dds[i]*iv_dir[i])
* if tdelta[i] < 0: tdelta[i] *= -1 # <<<<<<<<<<<<<<
* # We have to jumpstart our calculation
* enter_t = intersect_t
*/
- __pyx_t_4 = ((__pyx_v_tdelta[__pyx_v_i]) < 0);
- 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:;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":462
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":462
* if tdelta[i] < 0: tdelta[i] *= -1
* # We have to jumpstart our calculation
* enter_t = intersect_t # <<<<<<<<<<<<<<
@@ -15790,7 +16962,7 @@
*/
__pyx_v_enter_t = __pyx_v_intersect_t;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":463
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":463
* # We have to jumpstart our calculation
* enter_t = intersect_t
* while 1: # <<<<<<<<<<<<<<
@@ -15798,10 +16970,9 @@
* # 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":466
* # dims here is one less than the dimensions of the data,
* # but we are tracing on the grid, not on the data...
* if (not (0 <= cur_ind[0] < self.dims[0])) or \ # <<<<<<<<<<<<<<
@@ -15809,14 +16980,14 @@
* (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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":467
* # but we are tracing on the grid, not on the data...
* if (not (0 <= cur_ind[0] < self.dims[0])) or \
* (not (0 <= cur_ind[1] < self.dims[1])) or \ # <<<<<<<<<<<<<<
@@ -15824,14 +16995,14 @@
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":468
* if (not (0 <= cur_ind[0] < self.dims[0])) or \
* (not (0 <= cur_ind[1] < self.dims[1])) or \
* (not (0 <= cur_ind[2] < self.dims[2])): # <<<<<<<<<<<<<<
@@ -15839,22 +17010,22 @@
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":469
* (not (0 <= cur_ind[1] < self.dims[1])) or \
* (not (0 <= cur_ind[2] < self.dims[2])):
* break # <<<<<<<<<<<<<<
@@ -15866,7 +17037,7 @@
}
__pyx_L19:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":470
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":470
* (not (0 <= cur_ind[2] < self.dims[2])):
* break
* hit += 1 # <<<<<<<<<<<<<<
@@ -15875,27 +17046,27 @@
*/
__pyx_v_hit += 1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":471
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":471
* break
* hit += 1
* if tmax[0] < tmax[1]: # <<<<<<<<<<<<<<
* if tmax[0] < tmax[2]:
* exit_t = fmin(tmax[0], 1.0)
*/
- __pyx_t_3 = ((__pyx_v_tmax[0]) < (__pyx_v_tmax[1]));
- if (__pyx_t_3) {
+ __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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":472
* hit += 1
* if tmax[0] < tmax[1]:
* if tmax[0] < tmax[2]: # <<<<<<<<<<<<<<
* exit_t = fmin(tmax[0], 1.0)
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
*/
- __pyx_t_3 = ((__pyx_v_tmax[0]) < (__pyx_v_tmax[2]));
- if (__pyx_t_3) {
+ __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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":473
* if tmax[0] < tmax[1]:
* if tmax[0] < tmax[2]:
* exit_t = fmin(tmax[0], 1.0) # <<<<<<<<<<<<<<
@@ -15904,7 +17075,7 @@
*/
__pyx_v_exit_t = __pyx_f_2yt_9amr_utils_fmin((__pyx_v_tmax[0]), 1.0);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":475
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":475
* exit_t = fmin(tmax[0], 1.0)
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
* rgba, tf) # <<<<<<<<<<<<<<
@@ -15913,7 +17084,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->sample_values(__pyx_v_self, __pyx_v_v_pos, __pyx_v_v_dir, __pyx_v_enter_t, __pyx_v_exit_t, __pyx_v_cur_ind, __pyx_v_rgba, __pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":476
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":476
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
* rgba, tf)
* cur_ind[0] += step[0] # <<<<<<<<<<<<<<
@@ -15922,7 +17093,7 @@
*/
(__pyx_v_cur_ind[0]) += (__pyx_v_step[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":477
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":477
* rgba, tf)
* cur_ind[0] += step[0]
* enter_t = tmax[0] # <<<<<<<<<<<<<<
@@ -15931,7 +17102,7 @@
*/
__pyx_v_enter_t = (__pyx_v_tmax[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":478
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":478
* cur_ind[0] += step[0]
* enter_t = tmax[0]
* tmax[0] += tdelta[0] # <<<<<<<<<<<<<<
@@ -15943,7 +17114,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":480
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":480
* tmax[0] += tdelta[0]
* else:
* exit_t = fmin(tmax[2], 1.0) # <<<<<<<<<<<<<<
@@ -15952,7 +17123,7 @@
*/
__pyx_v_exit_t = __pyx_f_2yt_9amr_utils_fmin((__pyx_v_tmax[2]), 1.0);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":482
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":482
* exit_t = fmin(tmax[2], 1.0)
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
* rgba, tf) # <<<<<<<<<<<<<<
@@ -15961,7 +17132,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->sample_values(__pyx_v_self, __pyx_v_v_pos, __pyx_v_v_dir, __pyx_v_enter_t, __pyx_v_exit_t, __pyx_v_cur_ind, __pyx_v_rgba, __pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":483
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":483
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
* rgba, tf)
* cur_ind[2] += step[2] # <<<<<<<<<<<<<<
@@ -15970,7 +17141,7 @@
*/
(__pyx_v_cur_ind[2]) += (__pyx_v_step[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":484
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":484
* rgba, tf)
* cur_ind[2] += step[2]
* enter_t = tmax[2] # <<<<<<<<<<<<<<
@@ -15979,7 +17150,7 @@
*/
__pyx_v_enter_t = (__pyx_v_tmax[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":485
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":485
* cur_ind[2] += step[2]
* enter_t = tmax[2]
* tmax[2] += tdelta[2] # <<<<<<<<<<<<<<
@@ -15993,17 +17164,17 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":487
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":487
* tmax[2] += tdelta[2]
* else:
* if tmax[1] < tmax[2]: # <<<<<<<<<<<<<<
* exit_t = fmin(tmax[1], 1.0)
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
*/
- __pyx_t_3 = ((__pyx_v_tmax[1]) < (__pyx_v_tmax[2]));
- if (__pyx_t_3) {
+ __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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":488
* else:
* if tmax[1] < tmax[2]:
* exit_t = fmin(tmax[1], 1.0) # <<<<<<<<<<<<<<
@@ -16012,7 +17183,7 @@
*/
__pyx_v_exit_t = __pyx_f_2yt_9amr_utils_fmin((__pyx_v_tmax[1]), 1.0);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":490
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":490
* exit_t = fmin(tmax[1], 1.0)
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
* rgba, tf) # <<<<<<<<<<<<<<
@@ -16021,7 +17192,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->sample_values(__pyx_v_self, __pyx_v_v_pos, __pyx_v_v_dir, __pyx_v_enter_t, __pyx_v_exit_t, __pyx_v_cur_ind, __pyx_v_rgba, __pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":491
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":491
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
* rgba, tf)
* cur_ind[1] += step[1] # <<<<<<<<<<<<<<
@@ -16030,7 +17201,7 @@
*/
(__pyx_v_cur_ind[1]) += (__pyx_v_step[1]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":492
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":492
* rgba, tf)
* cur_ind[1] += step[1]
* enter_t = tmax[1] # <<<<<<<<<<<<<<
@@ -16039,7 +17210,7 @@
*/
__pyx_v_enter_t = (__pyx_v_tmax[1]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":493
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":493
* cur_ind[1] += step[1]
* enter_t = tmax[1]
* tmax[1] += tdelta[1] # <<<<<<<<<<<<<<
@@ -16051,7 +17222,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":495
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":495
* tmax[1] += tdelta[1]
* else:
* exit_t = fmin(tmax[2], 1.0) # <<<<<<<<<<<<<<
@@ -16060,7 +17231,7 @@
*/
__pyx_v_exit_t = __pyx_f_2yt_9amr_utils_fmin((__pyx_v_tmax[2]), 1.0);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":497
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":497
* exit_t = fmin(tmax[2], 1.0)
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
* rgba, tf) # <<<<<<<<<<<<<<
@@ -16069,7 +17240,7 @@
*/
((struct __pyx_vtabstruct_2yt_9amr_utils_PartitionedGrid *)__pyx_v_self->__pyx_vtab)->sample_values(__pyx_v_self, __pyx_v_v_pos, __pyx_v_v_dir, __pyx_v_enter_t, __pyx_v_exit_t, __pyx_v_cur_ind, __pyx_v_rgba, __pyx_v_tf);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":498
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":498
* self.sample_values(v_pos, v_dir, enter_t, exit_t, cur_ind,
* rgba, tf)
* cur_ind[2] += step[2] # <<<<<<<<<<<<<<
@@ -16078,7 +17249,7 @@
*/
(__pyx_v_cur_ind[2]) += (__pyx_v_step[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":499
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":499
* rgba, tf)
* cur_ind[2] += step[2]
* enter_t = tmax[2] # <<<<<<<<<<<<<<
@@ -16087,7 +17258,7 @@
*/
__pyx_v_enter_t = (__pyx_v_tmax[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":500
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":500
* cur_ind[2] += step[2]
* enter_t = tmax[2]
* tmax[2] += tdelta[2] # <<<<<<<<<<<<<<
@@ -16100,15 +17271,15 @@
}
__pyx_L20:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":501
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":501
* enter_t = tmax[2]
* tmax[2] += tdelta[2]
* if enter_t > 1.0: break # <<<<<<<<<<<<<<
* 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;
}
@@ -16116,7 +17287,7 @@
}
__pyx_L18_break:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":502
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":502
* tmax[2] += tdelta[2]
* if enter_t > 1.0: break
* return hit # <<<<<<<<<<<<<<
@@ -16125,16 +17296,18 @@
*/
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":506
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":506
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef void sample_values(self, # <<<<<<<<<<<<<<
@@ -16151,15 +17324,14 @@
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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":516
* cdef np.float64_t cp[3], dp[3], temp, dt, t, dv
* cdef np.float64_t grad[3], ds[3]
* grad[0] = grad[1] = grad[2] = 0.0 # <<<<<<<<<<<<<<
@@ -16170,16 +17342,21 @@
(__pyx_v_grad[1]) = 0.0;
(__pyx_v_grad[2]) = 0.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":518
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":518
* grad[0] = grad[1] = grad[2] = 0.0
* cdef int dti, i
* dt = (exit_t - enter_t) / tf.ns # 4 samples should be dt=0.25 # <<<<<<<<<<<<<<
* cdef int offset = ci[0] * (self.dims[1] + 1) * (self.dims[2] + 1) \
* + ci[1] * (self.dims[2] + 1) + ci[2]
*/
- __pyx_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":520
* dt = (exit_t - enter_t) / tf.ns # 4 samples should be dt=0.25
* cdef int offset = ci[0] * (self.dims[1] + 1) * (self.dims[2] + 1) \
* + ci[1] * (self.dims[2] + 1) + ci[2] # <<<<<<<<<<<<<<
@@ -16188,17 +17365,17 @@
*/
__pyx_v_offset = (((((__pyx_v_ci[0]) * ((__pyx_v_self->dims[1]) + 1)) * ((__pyx_v_self->dims[2]) + 1)) + ((__pyx_v_ci[1]) * ((__pyx_v_self->dims[2]) + 1))) + (__pyx_v_ci[2]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":521
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":521
* cdef int offset = ci[0] * (self.dims[1] + 1) * (self.dims[2] + 1) \
* + ci[1] * (self.dims[2] + 1) + ci[2]
* for i in range(3): # <<<<<<<<<<<<<<
* # 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":523
* for i in range(3):
* # temp is the left edge of the current cell
* temp = ci[i] * self.dds[i] + self.left_edge[i] # <<<<<<<<<<<<<<
@@ -16207,7 +17384,7 @@
*/
__pyx_v_temp = (((__pyx_v_ci[__pyx_v_i]) * (__pyx_v_self->dds[__pyx_v_i])) + (__pyx_v_self->left_edge[__pyx_v_i]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":525
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":525
* temp = ci[i] * self.dds[i] + self.left_edge[i]
* # this gets us dp as the current first sample position
* dp[i] = (enter_t + 0.5 * dt) * v_dir[i] + v_pos[i] - temp # <<<<<<<<<<<<<<
@@ -16216,7 +17393,7 @@
*/
(__pyx_v_dp[__pyx_v_i]) = ((((__pyx_v_enter_t + (0.5 * __pyx_v_dt)) * (__pyx_v_v_dir[__pyx_v_i])) + (__pyx_v_v_pos[__pyx_v_i])) - __pyx_v_temp);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":526
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":526
* # this gets us dp as the current first sample position
* dp[i] = (enter_t + 0.5 * dt) * v_dir[i] + v_pos[i] - temp
* dp[i] *= self.idds[i] # <<<<<<<<<<<<<<
@@ -16225,7 +17402,7 @@
*/
(__pyx_v_dp[__pyx_v_i]) *= (__pyx_v_self->idds[__pyx_v_i]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":527
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":527
* dp[i] = (enter_t + 0.5 * dt) * v_dir[i] + v_pos[i] - temp
* dp[i] *= self.idds[i]
* ds[i] = v_dir[i] * self.idds[i] * dt # <<<<<<<<<<<<<<
@@ -16235,29 +17412,29 @@
(__pyx_v_ds[__pyx_v_i]) = (((__pyx_v_v_dir[__pyx_v_i]) * (__pyx_v_self->idds[__pyx_v_i])) * __pyx_v_dt);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":528
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":528
* dp[i] *= self.idds[i]
* ds[i] = v_dir[i] * self.idds[i] * dt
* for dti in range(tf.ns): # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":529
* ds[i] = v_dir[i] * self.idds[i] * dt
* for dti in range(tf.ns):
* for i in range(self.n_fields): # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":530
* for dti in range(tf.ns):
* for i in range(self.n_fields):
* self.dvs[i] = offset_interpolate(self.dims, dp, self.data[i] + offset) # <<<<<<<<<<<<<<
@@ -16267,17 +17444,17 @@
(__pyx_v_self->dvs[__pyx_v_i]) = offset_interpolate(__pyx_v_self->dims, __pyx_v_dp, ((__pyx_v_self->data[__pyx_v_i]) + __pyx_v_offset));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":533
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":533
* #if (dv < tf.x_bounds[0]) or (dv > tf.x_bounds[1]):
* # continue
* for i in range(3): # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":534
* # continue
* for i in range(3):
* dp[i] += ds[i] # <<<<<<<<<<<<<<
@@ -16287,7 +17464,7 @@
(__pyx_v_dp[__pyx_v_i]) += (__pyx_v_ds[__pyx_v_i]);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":535
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":535
* for i in range(3):
* dp[i] += ds[i]
* tf.eval_transfer(dt, self.dvs, rgba, grad) # <<<<<<<<<<<<<<
@@ -16297,12 +17474,64 @@
((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/branches/yt-1.7/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
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":545
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def __init__(self, grid, int direction, int left): # <<<<<<<<<<<<<<
@@ -16370,12 +17599,11 @@
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":546
* @cython.wraparound(False)
* def __init__(self, grid, int direction, int left):
* self.direction = direction # <<<<<<<<<<<<<<
@@ -16384,7 +17612,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_GridFace *)__pyx_v_self)->direction = __pyx_v_direction;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":547
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":547
* def __init__(self, grid, int direction, int left):
* self.direction = direction
* if left == 1: # <<<<<<<<<<<<<<
@@ -16394,7 +17622,7 @@
__pyx_t_1 = (__pyx_v_left == 1);
if (__pyx_t_1) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":548
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":548
* self.direction = direction
* if left == 1:
* self.coord = grid.LeftEdge[direction] # <<<<<<<<<<<<<<
@@ -16413,7 +17641,7 @@
}
/*else*/ {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":550
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":550
* self.coord = grid.LeftEdge[direction]
* else:
* self.coord = grid.RightEdge[direction] # <<<<<<<<<<<<<<
@@ -16431,7 +17659,7 @@
}
__pyx_L6:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":552
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":552
* self.coord = grid.RightEdge[direction]
* cdef int i
* for i in range(3): # <<<<<<<<<<<<<<
@@ -16441,7 +17669,7 @@
for (__pyx_t_5 = 0; __pyx_t_5 < 3; __pyx_t_5+=1) {
__pyx_v_i = __pyx_t_5;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":553
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":553
* cdef int i
* for i in range(3):
* self.left_edge[i] = grid.LeftEdge[i] # <<<<<<<<<<<<<<
@@ -16457,7 +17685,7 @@
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
(((struct __pyx_obj_2yt_9amr_utils_GridFace *)__pyx_v_self)->left_edge[__pyx_v_i]) = __pyx_t_4;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":554
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":554
* for i in range(3):
* self.left_edge[i] = grid.LeftEdge[i]
* self.right_edge[i] = grid.RightEdge[i] # <<<<<<<<<<<<<<
@@ -16474,7 +17702,7 @@
(((struct __pyx_obj_2yt_9amr_utils_GridFace *)__pyx_v_self)->right_edge[__pyx_v_i]) = __pyx_t_4;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":555
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":555
* self.left_edge[i] = grid.LeftEdge[i]
* self.right_edge[i] = grid.RightEdge[i]
* self.left_edge[direction] = self.right_edge[direction] = self.coord # <<<<<<<<<<<<<<
@@ -16492,13 +17720,11 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":559
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":559
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef int proj_overlap(self, np.float64_t *left_edge, np.float64_t *right_edge): # <<<<<<<<<<<<<<
@@ -16512,27 +17738,26 @@
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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":561
* cdef int proj_overlap(self, np.float64_t *left_edge, np.float64_t *right_edge):
* cdef int xax, yax
* xax = (self.direction + 1) % 3 # <<<<<<<<<<<<<<
* yax = (self.direction + 2) % 3
* if left_edge[xax] >= self.right_edge[xax]: return 0
*/
- __pyx_v_xax = ((__pyx_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":562
* cdef int xax, yax
* xax = (self.direction + 1) % 3
* yax = (self.direction + 2) % 3 # <<<<<<<<<<<<<<
* if left_edge[xax] >= self.right_edge[xax]: return 0
* if right_edge[xax] <= self.left_edge[xax]: return 0
*/
- __pyx_v_yax = ((__pyx_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":563
* xax = (self.direction + 1) % 3
* yax = (self.direction + 2) % 3
* if left_edge[xax] >= self.right_edge[xax]: return 0 # <<<<<<<<<<<<<<
@@ -16547,7 +17772,7 @@
}
__pyx_L3:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":564
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":564
* yax = (self.direction + 2) % 3
* if left_edge[xax] >= self.right_edge[xax]: return 0
* if right_edge[xax] <= self.left_edge[xax]: return 0 # <<<<<<<<<<<<<<
@@ -16562,7 +17787,7 @@
}
__pyx_L4:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":565
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":565
* if left_edge[xax] >= self.right_edge[xax]: return 0
* if right_edge[xax] <= self.left_edge[xax]: return 0
* if left_edge[yax] >= self.right_edge[yax]: return 0 # <<<<<<<<<<<<<<
@@ -16577,7 +17802,7 @@
}
__pyx_L5:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":566
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":566
* if right_edge[xax] <= self.left_edge[xax]: return 0
* if left_edge[yax] >= self.right_edge[yax]: return 0
* if right_edge[yax] <= self.left_edge[yax]: return 0 # <<<<<<<<<<<<<<
@@ -16592,7 +17817,7 @@
}
__pyx_L6:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":567
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":567
* if left_edge[yax] >= self.right_edge[yax]: return 0
* if right_edge[yax] <= self.left_edge[yax]: return 0
* return 1 # <<<<<<<<<<<<<<
@@ -16604,12 +17829,223 @@
__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":576
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/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/branches/yt-1.7/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/branches/yt-1.7/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/branches/yt-1.7/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;
+}
+
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":576
* cdef public object subgrid_faces
* cdef public int parent_grid_id
* def __cinit__(self, int parent_grid_id, # <<<<<<<<<<<<<<
@@ -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;}
@@ -16715,7 +18148,7 @@
__pyx_bstride_0_right_edge = __pyx_bstruct_right_edge.strides[0];
__pyx_bshape_0_right_edge = __pyx_bstruct_right_edge.shape[0];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":580
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":580
* np.ndarray[np.float64_t, ndim=1] right_edge,
* subgrid_faces):
* self.parent_grid_id = parent_grid_id # <<<<<<<<<<<<<<
@@ -16724,7 +18157,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->parent_grid_id = __pyx_v_parent_grid_id;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":582
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":582
* self.parent_grid_id = parent_grid_id
* cdef int i
* self.LeftEdge = left_edge # <<<<<<<<<<<<<<
@@ -16737,7 +18170,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->LeftEdge);
((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->LeftEdge = ((PyObject *)__pyx_v_left_edge);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":583
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":583
* cdef int i
* self.LeftEdge = left_edge
* self.RightEdge = right_edge # <<<<<<<<<<<<<<
@@ -16750,7 +18183,7 @@
__Pyx_DECREF(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->RightEdge);
((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->RightEdge = ((PyObject *)__pyx_v_right_edge);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":584
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":584
* self.LeftEdge = left_edge
* self.RightEdge = right_edge
* for i in range(3): # <<<<<<<<<<<<<<
@@ -16760,7 +18193,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":585
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":585
* self.RightEdge = right_edge
* for i in range(3):
* self.left_edge[i] = left_edge[i] # <<<<<<<<<<<<<<
@@ -16779,7 +18212,7 @@
}
(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->left_edge[__pyx_v_i]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_left_edge.buf, __pyx_t_2, __pyx_bstride_0_left_edge));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":586
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":586
* for i in range(3):
* self.left_edge[i] = left_edge[i]
* self.right_edge[i] = right_edge[i] # <<<<<<<<<<<<<<
@@ -16799,7 +18232,7 @@
(((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->right_edge[__pyx_v_i]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_right_edge.buf, __pyx_t_3, __pyx_bstride_0_right_edge));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":587
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":587
* self.left_edge[i] = left_edge[i]
* self.right_edge[i] = right_edge[i]
* self.subgrid_faces = subgrid_faces # <<<<<<<<<<<<<<
@@ -16827,15 +18260,11 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":591
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":591
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def sweep(self, int direction = 0, int stack = 0): # <<<<<<<<<<<<<<
@@ -16914,16 +18343,16 @@
__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);
__pyx_v_LC = Py_None; __Pyx_INCREF(Py_None);
__pyx_v_RC = Py_None; __Pyx_INCREF(Py_None);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":595
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":595
* cdef GridFace face
* cdef np.float64_t proto_split[3]
* for i in range(3): proto_split[i] = self.right_edge[i] # <<<<<<<<<<<<<<
@@ -16935,7 +18364,7 @@
(__pyx_v_proto_split[__pyx_v_i]) = (((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->right_edge[__pyx_v_i]);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":596
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":596
* cdef np.float64_t proto_split[3]
* for i in range(3): proto_split[i] = self.right_edge[i]
* for face in self.subgrid_faces[direction]: # <<<<<<<<<<<<<<
@@ -16971,7 +18400,7 @@
__pyx_v_face = ((struct __pyx_obj_2yt_9amr_utils_GridFace *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":597
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":597
* for i in range(3): proto_split[i] = self.right_edge[i]
* for face in self.subgrid_faces[direction]:
* proto_split[direction] = face.coord # <<<<<<<<<<<<<<
@@ -16980,7 +18409,7 @@
*/
(__pyx_v_proto_split[__pyx_v_direction]) = __pyx_v_face->coord;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":598
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":598
* for face in self.subgrid_faces[direction]:
* proto_split[direction] = face.coord
* if proto_split[direction] <= self.left_edge[direction]: # <<<<<<<<<<<<<<
@@ -16990,7 +18419,7 @@
__pyx_t_5 = ((__pyx_v_proto_split[__pyx_v_direction]) <= (((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->left_edge[__pyx_v_direction]));
if (__pyx_t_5) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":599
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":599
* proto_split[direction] = face.coord
* if proto_split[direction] <= self.left_edge[direction]:
* continue # <<<<<<<<<<<<<<
@@ -17002,7 +18431,7 @@
}
__pyx_L10:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":600
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":600
* if proto_split[direction] <= self.left_edge[direction]:
* continue
* if proto_split[direction] == self.right_edge[direction]: # <<<<<<<<<<<<<<
@@ -17012,7 +18441,7 @@
__pyx_t_5 = ((__pyx_v_proto_split[__pyx_v_direction]) == (((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->right_edge[__pyx_v_direction]));
if (__pyx_t_5) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":601
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":601
* continue
* if proto_split[direction] == self.right_edge[direction]:
* if stack == 2: return [self] # <<<<<<<<<<<<<<
@@ -17035,7 +18464,7 @@
}
__pyx_L12:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":602
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":602
* if proto_split[direction] == self.right_edge[direction]:
* if stack == 2: return [self]
* return self.sweep((direction + 1) % 3, stack + 1) # <<<<<<<<<<<<<<
@@ -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);
@@ -17069,7 +18498,7 @@
}
__pyx_L11:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":603
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":603
* if stack == 2: return [self]
* return self.sweep((direction + 1) % 3, stack + 1)
* if face.proj_overlap(self.left_edge, proto_split) == 1: # <<<<<<<<<<<<<<
@@ -17079,7 +18508,7 @@
__pyx_t_5 = (((struct __pyx_vtabstruct_2yt_9amr_utils_GridFace *)__pyx_v_face->__pyx_vtab)->proj_overlap(__pyx_v_face, ((struct __pyx_obj_2yt_9amr_utils_ProtoPrism *)__pyx_v_self)->left_edge, __pyx_v_proto_split) == 1);
if (__pyx_t_5) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":604
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":604
* return self.sweep((direction + 1) % 3, stack + 1)
* if face.proj_overlap(self.left_edge, proto_split) == 1:
* left, right = self.split(proto_split, direction) # <<<<<<<<<<<<<<
@@ -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;
@@ -17117,7 +18546,7 @@
__pyx_t_3 = 0;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":605
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":605
* if face.proj_overlap(self.left_edge, proto_split) == 1:
* left, right = self.split(proto_split, direction)
* LC = left.sweep((direction + 1) % 3) # <<<<<<<<<<<<<<
@@ -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);
@@ -17141,7 +18570,7 @@
__pyx_v_LC = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":606
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":606
* left, right = self.split(proto_split, direction)
* LC = left.sweep((direction + 1) % 3)
* RC = right.sweep(direction) # <<<<<<<<<<<<<<
@@ -17165,7 +18594,7 @@
__pyx_v_RC = __pyx_t_8;
__pyx_t_8 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":607
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":607
* LC = left.sweep((direction + 1) % 3)
* RC = right.sweep(direction)
* return LC + RC # <<<<<<<<<<<<<<
@@ -17186,7 +18615,7 @@
}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":608
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":608
* RC = right.sweep(direction)
* return LC + RC
* raise RuntimeError # <<<<<<<<<<<<<<
@@ -17212,13 +18641,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":612
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":612
* @cython.boundscheck(False)
* @cython.wraparound(False)
* cdef object split(self, np.float64_t *sp, int direction): # <<<<<<<<<<<<<<
@@ -17230,18 +18658,17 @@
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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":614
* cdef object split(self, np.float64_t *sp, int direction):
* cdef int i
* cdef np.ndarray split_left = self.LeftEdge.copy() # <<<<<<<<<<<<<<
@@ -17257,7 +18684,7 @@
__pyx_v_split_left = ((PyArrayObject *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":615
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":615
* cdef int i
* cdef np.ndarray split_left = self.LeftEdge.copy()
* cdef np.ndarray split_right = self.RightEdge.copy() # <<<<<<<<<<<<<<
@@ -17273,7 +18700,7 @@
__pyx_v_split_right = ((PyArrayObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":617
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":617
* cdef np.ndarray split_right = self.RightEdge.copy()
*
* for i in range(3): split_left[i] = self.right_edge[i] # <<<<<<<<<<<<<<
@@ -17288,7 +18715,7 @@
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":618
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":618
*
* for i in range(3): split_left[i] = self.right_edge[i]
* split_left[direction] = sp[direction] # <<<<<<<<<<<<<<
@@ -17300,7 +18727,7 @@
if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_left), __pyx_v_direction, __pyx_t_1, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":619
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":619
* for i in range(3): split_left[i] = self.right_edge[i]
* split_left[direction] = sp[direction]
* left = ProtoPrism(self.parent_grid_id, self.LeftEdge, split_left, # <<<<<<<<<<<<<<
@@ -17310,7 +18737,7 @@
__pyx_t_1 = PyInt_FromLong(__pyx_v_self->parent_grid_id); 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);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":620
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":620
* split_left[direction] = sp[direction]
* left = ProtoPrism(self.parent_grid_id, self.LeftEdge, split_left,
* self.subgrid_faces) # <<<<<<<<<<<<<<
@@ -17334,11 +18761,11 @@
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":622
* self.subgrid_faces)
*
* for i in range(3): split_right[i] = self.left_edge[i] # <<<<<<<<<<<<<<
@@ -17353,7 +18780,7 @@
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":623
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":623
*
* for i in range(3): split_right[i] = self.left_edge[i]
* split_right[direction] = sp[direction] # <<<<<<<<<<<<<<
@@ -17365,7 +18792,7 @@
if (__Pyx_SetItemInt(((PyObject *)__pyx_v_split_right), __pyx_v_direction, __pyx_t_1, sizeof(int), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":624
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":624
* for i in range(3): split_right[i] = self.left_edge[i]
* split_right[direction] = sp[direction]
* right = ProtoPrism(self.parent_grid_id, split_right, self.RightEdge, # <<<<<<<<<<<<<<
@@ -17375,7 +18802,7 @@
__pyx_t_1 = PyInt_FromLong(__pyx_v_self->parent_grid_id); 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);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":625
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":625
* split_right[direction] = sp[direction]
* right = ProtoPrism(self.parent_grid_id, split_right, self.RightEdge,
* self.subgrid_faces) # <<<<<<<<<<<<<<
@@ -17399,11 +18826,11 @@
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":627
* self.subgrid_faces)
*
* return (left, right) # <<<<<<<<<<<<<<
@@ -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,15 +18860,14 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":631
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":631
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def get_brick(self, np.ndarray[np.float64_t, ndim=1] grid_left_edge, # <<<<<<<<<<<<<<
@@ -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;
@@ -17554,7 +18979,7 @@
__pyx_bstride_0_grid_dds = __pyx_bstruct_grid_dds.strides[0];
__pyx_bshape_0_grid_dds = __pyx_bstruct_grid_dds.shape[0];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":638
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":638
* cdef PartitionedGrid PG
* cdef int li[3], ri[3], idims[3], i
* for i in range(3): # <<<<<<<<<<<<<<
@@ -17564,7 +18989,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":639
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":639
* cdef int li[3], ri[3], idims[3], i
* for i in range(3):
* li[i] = lrint((self.left_edge[i] - grid_left_edge[i])/grid_dds[i]) # <<<<<<<<<<<<<<
@@ -17572,21 +18997,33 @@
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":640
* for i in range(3):
* li[i] = lrint((self.left_edge[i] - grid_left_edge[i])/grid_dds[i])
* ri[i] = lrint((self.right_edge[i] - grid_left_edge[i])/grid_dds[i]) # <<<<<<<<<<<<<<
* idims[i] = ri[i] - li[i]
* if child_mask[li[0], li[1], li[2]] == 0: return []
*/
- __pyx_t_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":641
* li[i] = lrint((self.left_edge[i] - grid_left_edge[i])/grid_dds[i])
* ri[i] = lrint((self.right_edge[i] - grid_left_edge[i])/grid_dds[i])
* idims[i] = ri[i] - li[i] # <<<<<<<<<<<<<<
@@ -17596,90 +19033,90 @@
(__pyx_v_idims[__pyx_v_i]) = ((__pyx_v_ri[__pyx_v_i]) - (__pyx_v_li[__pyx_v_i]));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":642
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":642
* ri[i] = lrint((self.right_edge[i] - grid_left_edge[i])/grid_dds[i])
* idims[i] = ri[i] - li[i]
* if child_mask[li[0], li[1], li[2]] == 0: return [] # <<<<<<<<<<<<<<
* cdef np.ndarray[np.int64_t, ndim=1] dims = np.empty(3, dtype='int64')
* for i in range(3):
*/
- __pyx_t_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;
}
__pyx_L8:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":643
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":643
* idims[i] = ri[i] - li[i]
* if child_mask[li[0], li[1], li[2]] == 0: return []
* cdef np.ndarray[np.int64_t, ndim=1] dims = np.empty(3, dtype='int64') # <<<<<<<<<<<<<<
* for i in range(3):
* dims[i] = idims[i]
*/
- __pyx_t_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":644
* if child_mask[li[0], li[1], li[2]] == 0: return []
* cdef np.ndarray[np.int64_t, ndim=1] dims = np.empty(3, dtype='int64')
* for i in range(3): # <<<<<<<<<<<<<<
@@ -17689,85 +19126,85 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/VolumeIntegrator.pyx":645
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":645
* cdef np.ndarray[np.int64_t, ndim=1] dims = np.empty(3, dtype='int64')
* for i in range(3):
* dims[i] = idims[i] # <<<<<<<<<<<<<<
* #cdef np.ndarray[np.float64_t, ndim=3] new_data
* #new_data = data[li[0]:ri[0]+1,li[1]:ri[1]+1,li[2]:ri[2]+1].copy()
*/
- __pyx_t_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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":650
* #PG = PartitionedGrid(self.parent_grid_id, new_data,
* # self.LeftEdge, self.RightEdge, dims)
* return ((li[0], ri[0]), (li[1], ri[1]), (li[2], ri[2]), dims) # <<<<<<<<<<<<<<
*/
__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,16 +19220,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":28
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":28
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def CICDeposit_3(np.ndarray[np.float64_t, ndim=1] posx, # <<<<<<<<<<<<<<
@@ -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;
@@ -18069,7 +19496,7 @@
__pyx_bstride_0_gridDimension = __pyx_bstruct_gridDimension.strides[0];
__pyx_bshape_0_gridDimension = __pyx_bstruct_gridDimension.shape[0];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":44
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":44
* cdef float dx, dy, dz, dx2, dy2, dz2
*
* edge0 = (<float> gridDimension[0]) - 0.5001 # <<<<<<<<<<<<<<
@@ -18077,9 +19504,9 @@
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":45
*
* edge0 = (<float> gridDimension[0]) - 0.5001
* edge1 = (<float> gridDimension[1]) - 0.5001 # <<<<<<<<<<<<<<
@@ -18087,9 +19514,9 @@
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":46
* edge0 = (<float> gridDimension[0]) - 0.5001
* edge1 = (<float> gridDimension[1]) - 0.5001
* edge2 = (<float> gridDimension[2]) - 0.5001 # <<<<<<<<<<<<<<
@@ -18097,18 +19524,22 @@
*
*/
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":47
* edge1 = (<float> gridDimension[1]) - 0.5001
* edge2 = (<float> gridDimension[2]) - 0.5001
* fact = 1.0 / cellSize # <<<<<<<<<<<<<<
*
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":49
* fact = 1.0 / cellSize
*
* le0 = leftEdge[0] # <<<<<<<<<<<<<<
@@ -18118,7 +19549,7 @@
__pyx_t_4 = 0;
__pyx_v_le0 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_leftEdge.buf, __pyx_t_4, __pyx_bstride_0_leftEdge));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":50
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":50
*
* le0 = leftEdge[0]
* le1 = leftEdge[1] # <<<<<<<<<<<<<<
@@ -18128,7 +19559,7 @@
__pyx_t_5 = 1;
__pyx_v_le1 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_leftEdge.buf, __pyx_t_5, __pyx_bstride_0_leftEdge));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":51
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":51
* le0 = leftEdge[0]
* le1 = leftEdge[1]
* le2 = leftEdge[2] # <<<<<<<<<<<<<<
@@ -18138,7 +19569,7 @@
__pyx_t_6 = 2;
__pyx_v_le2 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_leftEdge.buf, __pyx_t_6, __pyx_bstride_0_leftEdge));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":53
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":53
* le2 = leftEdge[2]
*
* for n in range(npositions): # <<<<<<<<<<<<<<
@@ -18149,7 +19580,7 @@
for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
__pyx_v_n = __pyx_t_8;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":56
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":56
*
* # Compute the position of the central cell
* xpos = fmin(fmax((posx[n] - le0)*fact, 0.5001), edge0) # <<<<<<<<<<<<<<
@@ -18157,9 +19588,9 @@
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":57
* # Compute the position of the central cell
* xpos = fmin(fmax((posx[n] - le0)*fact, 0.5001), edge0)
* ypos = fmin(fmax((posy[n] - le1)*fact, 0.5001), edge1) # <<<<<<<<<<<<<<
@@ -18167,9 +19598,9 @@
*
*/
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":58
* xpos = fmin(fmax((posx[n] - le0)*fact, 0.5001), edge0)
* ypos = fmin(fmax((posy[n] - le1)*fact, 0.5001), edge1)
* zpos = fmin(fmax((posz[n] - le2)*fact, 0.5001), edge2) # <<<<<<<<<<<<<<
@@ -18177,9 +19608,9 @@
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":60
* zpos = fmin(fmax((posz[n] - le2)*fact, 0.5001), edge2)
*
* i1 = <int> (xpos + 0.5) # <<<<<<<<<<<<<<
@@ -18188,7 +19619,7 @@
*/
__pyx_v_i1 = ((int)(__pyx_v_xpos + 0.5));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":61
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":61
*
* i1 = <int> (xpos + 0.5)
* j1 = <int> (ypos + 0.5) # <<<<<<<<<<<<<<
@@ -18197,7 +19628,7 @@
*/
__pyx_v_j1 = ((int)(__pyx_v_ypos + 0.5));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":62
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":62
* i1 = <int> (xpos + 0.5)
* j1 = <int> (ypos + 0.5)
* k1 = <int> (zpos + 0.5) # <<<<<<<<<<<<<<
@@ -18206,7 +19637,7 @@
*/
__pyx_v_k1 = ((int)(__pyx_v_zpos + 0.5));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":65
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":65
*
* # Compute the weights
* dx = (<float> i1) + 0.5 - xpos # <<<<<<<<<<<<<<
@@ -18215,7 +19646,7 @@
*/
__pyx_v_dx = ((((float)__pyx_v_i1) + 0.5) - __pyx_v_xpos);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":66
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":66
* # Compute the weights
* dx = (<float> i1) + 0.5 - xpos
* dy = (<float> j1) + 0.5 - ypos # <<<<<<<<<<<<<<
@@ -18224,7 +19655,7 @@
*/
__pyx_v_dy = ((((float)__pyx_v_j1) + 0.5) - __pyx_v_ypos);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":67
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":67
* dx = (<float> i1) + 0.5 - xpos
* dy = (<float> j1) + 0.5 - ypos
* dz = (<float> k1) + 0.5 - zpos # <<<<<<<<<<<<<<
@@ -18233,7 +19664,7 @@
*/
__pyx_v_dz = ((((float)__pyx_v_k1) + 0.5) - __pyx_v_zpos);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":68
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":68
* dy = (<float> j1) + 0.5 - ypos
* dz = (<float> k1) + 0.5 - zpos
* dx2 = 1.0 - dx # <<<<<<<<<<<<<<
@@ -18242,7 +19673,7 @@
*/
__pyx_v_dx2 = (1.0 - __pyx_v_dx);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":69
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":69
* dz = (<float> k1) + 0.5 - zpos
* dx2 = 1.0 - dx
* dy2 = 1.0 - dy # <<<<<<<<<<<<<<
@@ -18251,7 +19682,7 @@
*/
__pyx_v_dy2 = (1.0 - __pyx_v_dy);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":70
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":70
* dx2 = 1.0 - dx
* dy2 = 1.0 - dy
* dz2 = 1.0 - dz # <<<<<<<<<<<<<<
@@ -18260,7 +19691,7 @@
*/
__pyx_v_dz2 = (1.0 - __pyx_v_dz);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":73
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":73
*
* # Interpolate from field into sumfield
* field[i1-1,j1-1,k1-1] += mass[n] * dx * dy * dz # <<<<<<<<<<<<<<
@@ -18273,7 +19704,7 @@
__pyx_t_15 = (__pyx_v_k1 - 1);
*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float32_t *, __pyx_bstruct_field.buf, __pyx_t_13, __pyx_bstride_0_field, __pyx_t_14, __pyx_bstride_1_field, __pyx_t_15, __pyx_bstride_2_field) += ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_bstruct_mass.buf, __pyx_t_12, __pyx_bstride_0_mass)) * __pyx_v_dx) * __pyx_v_dy) * __pyx_v_dz);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":74
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":74
* # Interpolate from field into sumfield
* field[i1-1,j1-1,k1-1] += mass[n] * dx * dy * dz
* field[i1 ,j1-1,k1-1] += mass[n] * dx2 * dy * dz # <<<<<<<<<<<<<<
@@ -18286,7 +19717,7 @@
__pyx_t_19 = (__pyx_v_k1 - 1);
*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float32_t *, __pyx_bstruct_field.buf, __pyx_t_17, __pyx_bstride_0_field, __pyx_t_18, __pyx_bstride_1_field, __pyx_t_19, __pyx_bstride_2_field) += ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_bstruct_mass.buf, __pyx_t_16, __pyx_bstride_0_mass)) * __pyx_v_dx2) * __pyx_v_dy) * __pyx_v_dz);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":75
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":75
* field[i1-1,j1-1,k1-1] += mass[n] * dx * dy * dz
* field[i1 ,j1-1,k1-1] += mass[n] * dx2 * dy * dz
* field[i1-1,j1 ,k1-1] += mass[n] * dx * dy2 * dz # <<<<<<<<<<<<<<
@@ -18299,7 +19730,7 @@
__pyx_t_23 = (__pyx_v_k1 - 1);
*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float32_t *, __pyx_bstruct_field.buf, __pyx_t_21, __pyx_bstride_0_field, __pyx_t_22, __pyx_bstride_1_field, __pyx_t_23, __pyx_bstride_2_field) += ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_bstruct_mass.buf, __pyx_t_20, __pyx_bstride_0_mass)) * __pyx_v_dx) * __pyx_v_dy2) * __pyx_v_dz);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":76
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":76
* field[i1 ,j1-1,k1-1] += mass[n] * dx2 * dy * dz
* field[i1-1,j1 ,k1-1] += mass[n] * dx * dy2 * dz
* field[i1 ,j1 ,k1-1] += mass[n] * dx2 * dy2 * dz # <<<<<<<<<<<<<<
@@ -18312,7 +19743,7 @@
__pyx_t_27 = (__pyx_v_k1 - 1);
*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float32_t *, __pyx_bstruct_field.buf, __pyx_t_25, __pyx_bstride_0_field, __pyx_t_26, __pyx_bstride_1_field, __pyx_t_27, __pyx_bstride_2_field) += ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_bstruct_mass.buf, __pyx_t_24, __pyx_bstride_0_mass)) * __pyx_v_dx2) * __pyx_v_dy2) * __pyx_v_dz);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":77
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":77
* field[i1-1,j1 ,k1-1] += mass[n] * dx * dy2 * dz
* field[i1 ,j1 ,k1-1] += mass[n] * dx2 * dy2 * dz
* field[i1-1,j1-1,k1 ] += mass[n] * dx * dy * dz2 # <<<<<<<<<<<<<<
@@ -18325,7 +19756,7 @@
__pyx_t_31 = __pyx_v_k1;
*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float32_t *, __pyx_bstruct_field.buf, __pyx_t_29, __pyx_bstride_0_field, __pyx_t_30, __pyx_bstride_1_field, __pyx_t_31, __pyx_bstride_2_field) += ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_bstruct_mass.buf, __pyx_t_28, __pyx_bstride_0_mass)) * __pyx_v_dx) * __pyx_v_dy) * __pyx_v_dz2);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":78
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":78
* field[i1 ,j1 ,k1-1] += mass[n] * dx2 * dy2 * dz
* field[i1-1,j1-1,k1 ] += mass[n] * dx * dy * dz2
* field[i1 ,j1-1,k1 ] += mass[n] * dx2 * dy * dz2 # <<<<<<<<<<<<<<
@@ -18338,7 +19769,7 @@
__pyx_t_35 = __pyx_v_k1;
*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float32_t *, __pyx_bstruct_field.buf, __pyx_t_33, __pyx_bstride_0_field, __pyx_t_34, __pyx_bstride_1_field, __pyx_t_35, __pyx_bstride_2_field) += ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_bstruct_mass.buf, __pyx_t_32, __pyx_bstride_0_mass)) * __pyx_v_dx2) * __pyx_v_dy) * __pyx_v_dz2);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":79
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":79
* field[i1-1,j1-1,k1 ] += mass[n] * dx * dy * dz2
* field[i1 ,j1-1,k1 ] += mass[n] * dx2 * dy * dz2
* field[i1-1,j1 ,k1 ] += mass[n] * dx * dy2 * dz2 # <<<<<<<<<<<<<<
@@ -18350,7 +19781,7 @@
__pyx_t_39 = __pyx_v_k1;
*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_float32_t *, __pyx_bstruct_field.buf, __pyx_t_37, __pyx_bstride_0_field, __pyx_t_38, __pyx_bstride_1_field, __pyx_t_39, __pyx_bstride_2_field) += ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_bstruct_mass.buf, __pyx_t_36, __pyx_bstride_0_mass)) * __pyx_v_dx) * __pyx_v_dy2) * __pyx_v_dz2);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/CICDeposit.pyx":80
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/CICDeposit.pyx":80
* field[i1 ,j1-1,k1 ] += mass[n] * dx2 * dy * dz2
* field[i1-1,j1 ,k1 ] += mass[n] * dx * dy2 * dz2
* field[i1 ,j1 ,k1 ] += mass[n] * dx2 * dy2 * dz2 # <<<<<<<<<<<<<<
@@ -18387,19 +19818,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":33
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":33
* double fabs(double x)
*
* cdef inline np.int64_t i64max(np.int64_t i0, np.int64_t i1): # <<<<<<<<<<<<<<
@@ -18412,7 +19836,7 @@
int __pyx_t_1;
__Pyx_RefNannySetupContext("i64max");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":34
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":34
*
* cdef inline np.int64_t i64max(np.int64_t i0, np.int64_t i1):
* if i0 > i1: return i0 # <<<<<<<<<<<<<<
@@ -18427,7 +19851,7 @@
}
__pyx_L3:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":35
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":35
* cdef inline np.int64_t i64max(np.int64_t i0, np.int64_t i1):
* if i0 > i1: return i0
* return i1 # <<<<<<<<<<<<<<
@@ -18443,7 +19867,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":37
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":37
* return i1
*
* cdef inline np.int64_t i64min(np.int64_t i0, np.int64_t i1): # <<<<<<<<<<<<<<
@@ -18456,7 +19880,7 @@
int __pyx_t_1;
__Pyx_RefNannySetupContext("i64min");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":38
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":38
*
* cdef inline np.int64_t i64min(np.int64_t i0, np.int64_t i1):
* if i0 < i1: return i0 # <<<<<<<<<<<<<<
@@ -18471,7 +19895,7 @@
}
__pyx_L3:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":39
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":39
* cdef inline np.int64_t i64min(np.int64_t i0, np.int64_t i1):
* if i0 < i1: return i0
* return i1 # <<<<<<<<<<<<<<
@@ -18487,7 +19911,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":42
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":42
*
* @cython.boundscheck(False)
* def construct_boundary_relationships( # <<<<<<<<<<<<<<
@@ -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;}
{
@@ -18578,7 +20002,7 @@
__pyx_bstride_0_contour_ids = __pyx_bstruct_contour_ids.strides[0]; __pyx_bstride_1_contour_ids = __pyx_bstruct_contour_ids.strides[1]; __pyx_bstride_2_contour_ids = __pyx_bstruct_contour_ids.strides[2];
__pyx_bshape_0_contour_ids = __pyx_bstruct_contour_ids.shape[0]; __pyx_bshape_1_contour_ids = __pyx_bstruct_contour_ids.shape[1]; __pyx_bshape_2_contour_ids = __pyx_bstruct_contour_ids.shape[2];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":47
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":47
* cdef int i, j, nx, ny, nz, offset_i, offset_j, oi, oj
* cdef np.int64_t c1, c2
* tree = [] # <<<<<<<<<<<<<<
@@ -18587,11 +20011,11 @@
*/
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":48
* cdef np.int64_t c1, c2
* tree = []
* nx = contour_ids.shape[0] # <<<<<<<<<<<<<<
@@ -18600,7 +20024,7 @@
*/
__pyx_v_nx = (((PyArrayObject *)__pyx_v_contour_ids)->dimensions[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":49
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":49
* tree = []
* nx = contour_ids.shape[0]
* ny = contour_ids.shape[1] # <<<<<<<<<<<<<<
@@ -18609,7 +20033,7 @@
*/
__pyx_v_ny = (((PyArrayObject *)__pyx_v_contour_ids)->dimensions[1]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":50
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":50
* nx = contour_ids.shape[0]
* ny = contour_ids.shape[1]
* nz = contour_ids.shape[2] # <<<<<<<<<<<<<<
@@ -18618,7 +20042,7 @@
*/
__pyx_v_nz = (((PyArrayObject *)__pyx_v_contour_ids)->dimensions[2]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":52
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":52
* nz = contour_ids.shape[2]
* # First x-pass
* for i in range(ny): # <<<<<<<<<<<<<<
@@ -18629,7 +20053,7 @@
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_i = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":53
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":53
* # First x-pass
* for i in range(ny):
* for j in range(nz): # <<<<<<<<<<<<<<
@@ -18640,7 +20064,7 @@
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
__pyx_v_j = __pyx_t_5;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":54
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":54
* for i in range(ny):
* for j in range(nz):
* for offset_i in range(3): # <<<<<<<<<<<<<<
@@ -18650,7 +20074,7 @@
for (__pyx_t_6 = 0; __pyx_t_6 < 3; __pyx_t_6+=1) {
__pyx_v_offset_i = __pyx_t_6;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":55
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":55
* for j in range(nz):
* for offset_i in range(3):
* oi = offset_i - 1 # <<<<<<<<<<<<<<
@@ -18659,7 +20083,7 @@
*/
__pyx_v_oi = (__pyx_v_offset_i - 1);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":56
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":56
* for offset_i in range(3):
* oi = offset_i - 1
* if i == 0 and oi == -1: continue # <<<<<<<<<<<<<<
@@ -18679,7 +20103,7 @@
}
__pyx_L11:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":57
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":57
* oi = offset_i - 1
* if i == 0 and oi == -1: continue
* if i == ny - 1 and oj == 1: continue # <<<<<<<<<<<<<<
@@ -18699,7 +20123,7 @@
}
__pyx_L12:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":58
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":58
* if i == 0 and oi == -1: continue
* if i == ny - 1 and oj == 1: continue
* for offset_j in range(3): # <<<<<<<<<<<<<<
@@ -18709,7 +20133,7 @@
for (__pyx_t_10 = 0; __pyx_t_10 < 3; __pyx_t_10+=1) {
__pyx_v_offset_j = __pyx_t_10;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":59
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":59
* if i == ny - 1 and oj == 1: continue
* for offset_j in range(3):
* oj = offset_j - 1 # <<<<<<<<<<<<<<
@@ -18718,7 +20142,7 @@
*/
__pyx_v_oj = (__pyx_v_offset_j - 1);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":60
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":60
* for offset_j in range(3):
* oj = offset_j - 1
* if j == 0 and oj == -1: continue # <<<<<<<<<<<<<<
@@ -18738,7 +20162,7 @@
}
__pyx_L15:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":61
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":61
* oj = offset_j - 1
* if j == 0 and oj == -1: continue
* if j == nz - 1 and oj == 1: continue # <<<<<<<<<<<<<<
@@ -18758,7 +20182,7 @@
}
__pyx_L16:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":62
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":62
* if j == 0 and oj == -1: continue
* if j == nz - 1 and oj == 1: continue
* c1 = contour_ids[0, i, j] # <<<<<<<<<<<<<<
@@ -18773,7 +20197,7 @@
if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_bshape_2_contour_ids;
__pyx_v_c1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_11, __pyx_bstride_0_contour_ids, __pyx_t_12, __pyx_bstride_1_contour_ids, __pyx_t_13, __pyx_bstride_2_contour_ids));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":63
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":63
* if j == nz - 1 and oj == 1: continue
* c1 = contour_ids[0, i, j]
* c2 = contour_ids[1, i + oi, j + oj] # <<<<<<<<<<<<<<
@@ -18788,7 +20212,7 @@
if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_bshape_2_contour_ids;
__pyx_v_c2 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_14, __pyx_bstride_0_contour_ids, __pyx_t_15, __pyx_bstride_1_contour_ids, __pyx_t_16, __pyx_bstride_2_contour_ids));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":64
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":64
* c1 = contour_ids[0, i, j]
* c2 = contour_ids[1, i + oi, j + oj]
* if c1 > -1 and c2 > -1: # <<<<<<<<<<<<<<
@@ -18804,13 +20228,16 @@
}
if (__pyx_t_8) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":65
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":65
* c2 = contour_ids[1, i + oi, j + oj]
* if c1 > -1 and c2 > -1:
* tree.append((i64max(c1,c2), i64min(c1,c2))) # <<<<<<<<<<<<<<
* 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,30 +20250,28 @@
__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:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":66
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":66
* if c1 > -1 and c2 > -1:
* tree.append((i64max(c1,c2), i64min(c1,c2)))
* c1 = contour_ids[nx-1, i, j] # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":67
* tree.append((i64max(c1,c2), i64min(c1,c2)))
* c1 = contour_ids[nx-1, i, j]
* c2 = contour_ids[nx-2, i + oi, j + oj] # <<<<<<<<<<<<<<
@@ -18861,7 +20286,7 @@
if (__pyx_t_24 < 0) __pyx_t_24 += __pyx_bshape_2_contour_ids;
__pyx_v_c2 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_22, __pyx_bstride_0_contour_ids, __pyx_t_23, __pyx_bstride_1_contour_ids, __pyx_t_24, __pyx_bstride_2_contour_ids));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":68
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":68
* c1 = contour_ids[nx-1, i, j]
* c2 = contour_ids[nx-2, i + oi, j + oj]
* if c1 > -1 and c2 > -1: # <<<<<<<<<<<<<<
@@ -18877,29 +20302,30 @@
}
if (__pyx_t_7) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":69
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":69
* c2 = contour_ids[nx-2, i + oi, j + oj]
* if c1 > -1 and c2 > -1:
* tree.append((i64max(c1,c2), i64min(c1,c2))) # <<<<<<<<<<<<<<
* # 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:;
@@ -18910,7 +20336,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":71
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":71
* tree.append((i64max(c1,c2), i64min(c1,c2)))
* # Now y-pass
* for i in range(nx): # <<<<<<<<<<<<<<
@@ -18921,7 +20347,7 @@
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_i = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":72
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":72
* # Now y-pass
* for i in range(nx):
* for j in range(nz): # <<<<<<<<<<<<<<
@@ -18932,7 +20358,7 @@
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
__pyx_v_j = __pyx_t_5;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":73
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":73
* for i in range(nx):
* for j in range(nz):
* for offset_i in range(3): # <<<<<<<<<<<<<<
@@ -18942,7 +20368,7 @@
for (__pyx_t_6 = 0; __pyx_t_6 < 3; __pyx_t_6+=1) {
__pyx_v_offset_i = __pyx_t_6;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":74
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":74
* for j in range(nz):
* for offset_i in range(3):
* oi = offset_i - 1 # <<<<<<<<<<<<<<
@@ -18951,7 +20377,7 @@
*/
__pyx_v_oi = (__pyx_v_offset_i - 1);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":75
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":75
* for offset_i in range(3):
* oi = offset_i - 1
* if i == 0 and oi == -1: continue # <<<<<<<<<<<<<<
@@ -18971,7 +20397,7 @@
}
__pyx_L25:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":76
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":76
* oi = offset_i - 1
* if i == 0 and oi == -1: continue
* if i == nx - 1 and oj == 1: continue # <<<<<<<<<<<<<<
@@ -18991,7 +20417,7 @@
}
__pyx_L26:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":77
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":77
* if i == 0 and oi == -1: continue
* if i == nx - 1 and oj == 1: continue
* for offset_j in range(3): # <<<<<<<<<<<<<<
@@ -19001,7 +20427,7 @@
for (__pyx_t_10 = 0; __pyx_t_10 < 3; __pyx_t_10+=1) {
__pyx_v_offset_j = __pyx_t_10;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":78
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":78
* if i == nx - 1 and oj == 1: continue
* for offset_j in range(3):
* oj = offset_j - 1 # <<<<<<<<<<<<<<
@@ -19010,7 +20436,7 @@
*/
__pyx_v_oj = (__pyx_v_offset_j - 1);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":79
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":79
* for offset_j in range(3):
* oj = offset_j - 1
* if j == 0 and oj == -1: continue # <<<<<<<<<<<<<<
@@ -19030,7 +20456,7 @@
}
__pyx_L29:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":80
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":80
* oj = offset_j - 1
* if j == 0 and oj == -1: continue
* if j == nz - 1 and oj == 1: continue # <<<<<<<<<<<<<<
@@ -19050,7 +20476,7 @@
}
__pyx_L30:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":81
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":81
* if j == 0 and oj == -1: continue
* if j == nz - 1 and oj == 1: continue
* c1 = contour_ids[i, 0, j] # <<<<<<<<<<<<<<
@@ -19065,7 +20491,7 @@
if (__pyx_t_27 < 0) __pyx_t_27 += __pyx_bshape_2_contour_ids;
__pyx_v_c1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_25, __pyx_bstride_0_contour_ids, __pyx_t_26, __pyx_bstride_1_contour_ids, __pyx_t_27, __pyx_bstride_2_contour_ids));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":82
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":82
* if j == nz - 1 and oj == 1: continue
* c1 = contour_ids[i, 0, j]
* c2 = contour_ids[i + oi, 1, j + oj] # <<<<<<<<<<<<<<
@@ -19080,7 +20506,7 @@
if (__pyx_t_30 < 0) __pyx_t_30 += __pyx_bshape_2_contour_ids;
__pyx_v_c2 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_28, __pyx_bstride_0_contour_ids, __pyx_t_29, __pyx_bstride_1_contour_ids, __pyx_t_30, __pyx_bstride_2_contour_ids));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":83
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":83
* c1 = contour_ids[i, 0, j]
* c2 = contour_ids[i + oi, 1, j + oj]
* if c1 > -1 and c2 > -1: # <<<<<<<<<<<<<<
@@ -19096,34 +20522,35 @@
}
if (__pyx_t_8) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":84
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":84
* c2 = contour_ids[i + oi, 1, j + oj]
* if c1 > -1 and c2 > -1:
* tree.append((i64max(c1,c2), i64min(c1,c2))) # <<<<<<<<<<<<<<
* 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:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":85
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":85
* if c1 > -1 and c2 > -1:
* tree.append((i64max(c1,c2), i64min(c1,c2)))
* c1 = contour_ids[i, ny-1, j] # <<<<<<<<<<<<<<
@@ -19138,7 +20565,7 @@
if (__pyx_t_33 < 0) __pyx_t_33 += __pyx_bshape_2_contour_ids;
__pyx_v_c1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_31, __pyx_bstride_0_contour_ids, __pyx_t_32, __pyx_bstride_1_contour_ids, __pyx_t_33, __pyx_bstride_2_contour_ids));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":86
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":86
* tree.append((i64max(c1,c2), i64min(c1,c2)))
* c1 = contour_ids[i, ny-1, j]
* c2 = contour_ids[i + oi, ny-2, j + oj] # <<<<<<<<<<<<<<
@@ -19153,7 +20580,7 @@
if (__pyx_t_36 < 0) __pyx_t_36 += __pyx_bshape_2_contour_ids;
__pyx_v_c2 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_34, __pyx_bstride_0_contour_ids, __pyx_t_35, __pyx_bstride_1_contour_ids, __pyx_t_36, __pyx_bstride_2_contour_ids));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":87
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":87
* c1 = contour_ids[i, ny-1, j]
* c2 = contour_ids[i + oi, ny-2, j + oj]
* if c1 > -1 and c2 > -1: # <<<<<<<<<<<<<<
@@ -19169,29 +20596,30 @@
}
if (__pyx_t_7) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":88
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":88
* c2 = contour_ids[i + oi, ny-2, j + oj]
* if c1 > -1 and c2 > -1:
* tree.append((i64max(c1,c2), i64min(c1,c2))) # <<<<<<<<<<<<<<
* 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:;
@@ -19202,7 +20630,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":89
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":89
* if c1 > -1 and c2 > -1:
* tree.append((i64max(c1,c2), i64min(c1,c2)))
* for i in range(nx): # <<<<<<<<<<<<<<
@@ -19213,7 +20641,7 @@
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_i = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":90
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":90
* tree.append((i64max(c1,c2), i64min(c1,c2)))
* for i in range(nx):
* for j in range(ny): # <<<<<<<<<<<<<<
@@ -19224,7 +20652,7 @@
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
__pyx_v_j = __pyx_t_5;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":91
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":91
* for i in range(nx):
* for j in range(ny):
* for offset_i in range(3): # <<<<<<<<<<<<<<
@@ -19234,7 +20662,7 @@
for (__pyx_t_6 = 0; __pyx_t_6 < 3; __pyx_t_6+=1) {
__pyx_v_offset_i = __pyx_t_6;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":92
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":92
* for j in range(ny):
* for offset_i in range(3):
* oi = offset_i - 1 # <<<<<<<<<<<<<<
@@ -19243,7 +20671,7 @@
*/
__pyx_v_oi = (__pyx_v_offset_i - 1);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":93
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":93
* for offset_i in range(3):
* oi = offset_i - 1
* if i == 0 and oi == -1: continue # <<<<<<<<<<<<<<
@@ -19263,7 +20691,7 @@
}
__pyx_L39:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":94
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":94
* oi = offset_i - 1
* if i == 0 and oi == -1: continue
* if i == nx - 1 and oj == 1: continue # <<<<<<<<<<<<<<
@@ -19283,7 +20711,7 @@
}
__pyx_L40:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":95
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":95
* if i == 0 and oi == -1: continue
* if i == nx - 1 and oj == 1: continue
* for offset_j in range(3): # <<<<<<<<<<<<<<
@@ -19293,7 +20721,7 @@
for (__pyx_t_10 = 0; __pyx_t_10 < 3; __pyx_t_10+=1) {
__pyx_v_offset_j = __pyx_t_10;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":96
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":96
* if i == nx - 1 and oj == 1: continue
* for offset_j in range(3):
* oj = offset_j - 1 # <<<<<<<<<<<<<<
@@ -19302,7 +20730,7 @@
*/
__pyx_v_oj = (__pyx_v_offset_j - 1);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":97
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":97
* for offset_j in range(3):
* oj = offset_j - 1
* if j == 0 and oj == -1: continue # <<<<<<<<<<<<<<
@@ -19322,7 +20750,7 @@
}
__pyx_L43:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":98
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":98
* oj = offset_j - 1
* if j == 0 and oj == -1: continue
* if j == ny - 1 and oj == 1: continue # <<<<<<<<<<<<<<
@@ -19342,7 +20770,7 @@
}
__pyx_L44:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":99
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":99
* if j == 0 and oj == -1: continue
* if j == ny - 1 and oj == 1: continue
* c1 = contour_ids[i, j, 0] # <<<<<<<<<<<<<<
@@ -19357,7 +20785,7 @@
if (__pyx_t_39 < 0) __pyx_t_39 += __pyx_bshape_2_contour_ids;
__pyx_v_c1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_37, __pyx_bstride_0_contour_ids, __pyx_t_38, __pyx_bstride_1_contour_ids, __pyx_t_39, __pyx_bstride_2_contour_ids));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":100
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":100
* if j == ny - 1 and oj == 1: continue
* c1 = contour_ids[i, j, 0]
* c2 = contour_ids[i + oi, j + oj, 1] # <<<<<<<<<<<<<<
@@ -19372,7 +20800,7 @@
if (__pyx_t_42 < 0) __pyx_t_42 += __pyx_bshape_2_contour_ids;
__pyx_v_c2 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_40, __pyx_bstride_0_contour_ids, __pyx_t_41, __pyx_bstride_1_contour_ids, __pyx_t_42, __pyx_bstride_2_contour_ids));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":101
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":101
* c1 = contour_ids[i, j, 0]
* c2 = contour_ids[i + oi, j + oj, 1]
* if c1 > -1 and c2 > -1: # <<<<<<<<<<<<<<
@@ -19388,34 +20816,35 @@
}
if (__pyx_t_8) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":102
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":102
* c2 = contour_ids[i + oi, j + oj, 1]
* if c1 > -1 and c2 > -1:
* tree.append((i64max(c1,c2), i64min(c1,c2))) # <<<<<<<<<<<<<<
* 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;
}
__pyx_L45:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":103
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":103
* if c1 > -1 and c2 > -1:
* tree.append((i64max(c1,c2), i64min(c1,c2)))
* c1 = contour_ids[i, j, nz-1] # <<<<<<<<<<<<<<
@@ -19430,7 +20859,7 @@
if (__pyx_t_45 < 0) __pyx_t_45 += __pyx_bshape_2_contour_ids;
__pyx_v_c1 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_43, __pyx_bstride_0_contour_ids, __pyx_t_44, __pyx_bstride_1_contour_ids, __pyx_t_45, __pyx_bstride_2_contour_ids));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":104
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":104
* tree.append((i64max(c1,c2), i64min(c1,c2)))
* c1 = contour_ids[i, j, nz-1]
* c2 = contour_ids[i + oi, j + oj, nz-2] # <<<<<<<<<<<<<<
@@ -19445,7 +20874,7 @@
if (__pyx_t_48 < 0) __pyx_t_48 += __pyx_bshape_2_contour_ids;
__pyx_v_c2 = (*__Pyx_BufPtrStrided3d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_contour_ids.buf, __pyx_t_46, __pyx_bstride_0_contour_ids, __pyx_t_47, __pyx_bstride_1_contour_ids, __pyx_t_48, __pyx_bstride_2_contour_ids));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":105
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":105
* c1 = contour_ids[i, j, nz-1]
* c2 = contour_ids[i + oi, j + oj, nz-2]
* if c1 > -1 and c2 > -1: # <<<<<<<<<<<<<<
@@ -19461,28 +20890,29 @@
}
if (__pyx_t_7) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":106
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":106
* c2 = contour_ids[i + oi, j + oj, nz-2]
* if c1 > -1 and c2 > -1:
* tree.append((i64max(c1,c2), i64min(c1,c2))) # <<<<<<<<<<<<<<
* 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;
}
@@ -19494,7 +20924,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":107
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":107
* if c1 > -1 and c2 > -1:
* tree.append((i64max(c1,c2), i64min(c1,c2)))
* return tree # <<<<<<<<<<<<<<
@@ -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,13 +20953,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":109
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":109
* return tree
*
* cdef inline int are_neighbors( # <<<<<<<<<<<<<<
@@ -19542,7 +20971,7 @@
int __pyx_t_1;
__Pyx_RefNannySetupContext("are_neighbors");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":116
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":116
* ):
* # We assume an epsilon of 1e-15
* if fabs(x1-x2) > 0.5*(dx1+dx2): return 0 # <<<<<<<<<<<<<<
@@ -19557,7 +20986,7 @@
}
__pyx_L3:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":117
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":117
* # We assume an epsilon of 1e-15
* if fabs(x1-x2) > 0.5*(dx1+dx2): return 0
* if fabs(y1-y2) > 0.5*(dy1+dy2): return 0 # <<<<<<<<<<<<<<
@@ -19572,7 +21001,7 @@
}
__pyx_L4:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":118
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":118
* if fabs(x1-x2) > 0.5*(dx1+dx2): return 0
* if fabs(y1-y2) > 0.5*(dy1+dy2): return 0
* if fabs(z1-z2) > 0.5*(dz1+dz2): return 0 # <<<<<<<<<<<<<<
@@ -19587,7 +21016,7 @@
}
__pyx_L5:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":119
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":119
* if fabs(y1-y2) > 0.5*(dy1+dy2): return 0
* if fabs(z1-z2) > 0.5*(dz1+dz2): return 0
* return 1 # <<<<<<<<<<<<<<
@@ -19603,7 +21032,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":123
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":123
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def identify_field_neighbors( # <<<<<<<<<<<<<<
@@ -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;
@@ -19826,7 +21249,7 @@
__pyx_bstride_0_dz = __pyx_bstruct_dz.strides[0];
__pyx_bshape_0_dz = __pyx_bstruct_dz.shape[0];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":135
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":135
* cdef int outer, inner, N, added
* cdef np.float64_t x1, y1, z1, dx1, dy1, dz1
* N = field.shape[0] # <<<<<<<<<<<<<<
@@ -19835,7 +21258,7 @@
*/
__pyx_v_N = (__pyx_v_field->dimensions[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":137
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":137
* N = field.shape[0]
* #cdef np.ndarray[dtype=np.object_t] joins
* joins = [[] for outer in range(N)] # <<<<<<<<<<<<<<
@@ -19849,15 +21272,15 @@
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":139
* joins = [[] for outer in range(N)]
* #joins = np.empty(N, dtype='object')
* for outer in range(N): # <<<<<<<<<<<<<<
@@ -19868,44 +21291,44 @@
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_outer = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":140
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":140
* #joins = np.empty(N, dtype='object')
* for outer in range(N):
* if (outer % 10000) == 0: print outer, N # <<<<<<<<<<<<<<
* 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:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":141
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":141
* for outer in range(N):
* if (outer % 10000) == 0: print outer, N
* x1 = x[outer] # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":142
* if (outer % 10000) == 0: print outer, N
* x1 = x[outer]
* y1 = y[outer] # <<<<<<<<<<<<<<
@@ -19915,7 +21338,7 @@
__pyx_t_8 = __pyx_v_outer;
__pyx_v_y1 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_y.buf, __pyx_t_8, __pyx_bstride_0_y));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":143
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":143
* x1 = x[outer]
* y1 = y[outer]
* z1 = z[outer] # <<<<<<<<<<<<<<
@@ -19925,7 +21348,7 @@
__pyx_t_9 = __pyx_v_outer;
__pyx_v_z1 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_z.buf, __pyx_t_9, __pyx_bstride_0_z));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":144
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":144
* y1 = y[outer]
* z1 = z[outer]
* dx1 = dx[outer] # <<<<<<<<<<<<<<
@@ -19935,7 +21358,7 @@
__pyx_t_10 = __pyx_v_outer;
__pyx_v_dx1 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dx.buf, __pyx_t_10, __pyx_bstride_0_dx));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":145
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":145
* z1 = z[outer]
* dx1 = dx[outer]
* dy1 = dy[outer] # <<<<<<<<<<<<<<
@@ -19945,7 +21368,7 @@
__pyx_t_11 = __pyx_v_outer;
__pyx_v_dy1 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dy.buf, __pyx_t_11, __pyx_bstride_0_dy));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":146
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":146
* dx1 = dx[outer]
* dy1 = dy[outer]
* dz1 = dz[outer] # <<<<<<<<<<<<<<
@@ -19955,20 +21378,20 @@
__pyx_t_12 = __pyx_v_outer;
__pyx_v_dz1 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_dz.buf, __pyx_t_12, __pyx_bstride_0_dz));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":147
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":147
* dy1 = dy[outer]
* dz1 = dz[outer]
* this_joins = joins[outer] # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":148
* dz1 = dz[outer]
* this_joins = joins[outer]
* added = 0 # <<<<<<<<<<<<<<
@@ -19977,56 +21400,17 @@
*/
__pyx_v_added = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":150
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":150
* added = 0
* # Go in reverse order
* for inner in range(outer, 0, -1): # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":152
* for inner in range(outer, 0, -1):
* if not are_neighbors(x1, y1, z1, dx1, dy1, dz1,
* x[inner], y[inner], z[inner], # <<<<<<<<<<<<<<
@@ -20037,7 +21421,7 @@
__pyx_t_15 = __pyx_v_inner;
__pyx_t_16 = __pyx_v_inner;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":153
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":153
* if not are_neighbors(x1, y1, z1, dx1, dy1, dz1,
* x[inner], y[inner], z[inner],
* dx[inner], dy[inner], dz[inner]): # <<<<<<<<<<<<<<
@@ -20047,10 +21431,10 @@
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":154
* x[inner], y[inner], z[inner],
* dx[inner], dy[inner], dz[inner]):
* continue # <<<<<<<<<<<<<<
@@ -20062,21 +21446,21 @@
}
__pyx_L13:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":156
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":156
* continue
* # Hot dog, we have a weiner!
* this_joins.append(inner) # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":157
* # Hot dog, we have a weiner!
* this_joins.append(inner)
* added += 1 # <<<<<<<<<<<<<<
@@ -20085,15 +21469,15 @@
*/
__pyx_v_added += 1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":158
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":158
* this_joins.append(inner)
* added += 1
* if added == 26: break # <<<<<<<<<<<<<<
* 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,10 +21485,9 @@
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":159
* added += 1
* if added == 26: break
* return joins # <<<<<<<<<<<<<<
@@ -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,19 +21529,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":163
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":163
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def extract_identified_contours(int max_ind, joins): # <<<<<<<<<<<<<<
@@ -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,14 +21599,14 @@
__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);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":165
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":165
* def extract_identified_contours(int max_ind, joins):
* cdef int i
* contours = [] # <<<<<<<<<<<<<<
@@ -20238,11 +21615,11 @@
*/
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":166
* cdef int i
* contours = []
* for i in range(max_ind + 1): # +1 to get to the max_ind itself # <<<<<<<<<<<<<<
@@ -20253,25 +21630,35 @@
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_i = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":167
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":167
* contours = []
* for i in range(max_ind + 1): # +1 to get to the max_ind itself
* contours.append(set([i])) # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":168
* for i in range(max_ind + 1): # +1 to get to the max_ind itself
* contours.append(set([i]))
* if len(joins[i]) == 0: # <<<<<<<<<<<<<<
@@ -20280,12 +21667,12 @@
*/
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":169
* contours.append(set([i]))
* if len(joins[i]) == 0:
* continue # <<<<<<<<<<<<<<
@@ -20297,7 +21684,7 @@
}
__pyx_L8:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":170
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":170
* if len(joins[i]) == 0:
* continue
* proto_contour = [i] # <<<<<<<<<<<<<<
@@ -20315,7 +21702,7 @@
__pyx_v_proto_contour = ((PyObject *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":171
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":171
* continue
* proto_contour = [i]
* for j in joins[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) {
@@ -20350,25 +21737,25 @@
__pyx_v_j = __pyx_t_1;
__pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":172
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":172
* proto_contour = [i]
* for j in joins[i]:
* proto_contour += contours[j] # <<<<<<<<<<<<<<
* 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;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":173
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":173
* for j in joins[i]:
* proto_contour += contours[j]
* proto_contour = set(proto_contour) # <<<<<<<<<<<<<<
@@ -20380,14 +21767,14 @@
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":174
* proto_contour += contours[j]
* proto_contour = set(proto_contour)
* for j in proto_contour: # <<<<<<<<<<<<<<
@@ -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;
@@ -20419,26 +21806,26 @@
__pyx_v_j = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":175
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":175
* proto_contour = set(proto_contour)
* for j in proto_contour:
* 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:;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/ContourFinding.pyx":176
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":176
* for j in proto_contour:
* contours[j] = proto_contour
* 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,20 +21833,19 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":102
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":102
* png_structp *png_ptr_ptr, png_infop *info_ptr_ptr)
*
* def write_png(np.ndarray[np.uint8_t, ndim=3] buffer, # <<<<<<<<<<<<<<
@@ -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,22 +21932,22 @@
}
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];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":106
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":106
*
* # This is something of a translation of the matplotlib _png module
* cdef png_byte *pix_buffer = <png_byte *> buffer.data # <<<<<<<<<<<<<<
@@ -20570,7 +21956,7 @@
*/
__pyx_v_pix_buffer = ((png_byte *)__pyx_v_buffer->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":107
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":107
* # This is something of a translation of the matplotlib _png module
* cdef png_byte *pix_buffer = <png_byte *> buffer.data
* cdef int width = buffer.shape[1] # <<<<<<<<<<<<<<
@@ -20579,7 +21965,7 @@
*/
__pyx_v_width = (__pyx_v_buffer->dimensions[1]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":108
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":108
* cdef png_byte *pix_buffer = <png_byte *> buffer.data
* cdef int width = buffer.shape[1]
* cdef int height = buffer.shape[0] # <<<<<<<<<<<<<<
@@ -20588,7 +21974,7 @@
*/
__pyx_v_height = (__pyx_v_buffer->dimensions[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":110
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":110
* cdef int height = buffer.shape[0]
*
* cdef FILE* fileobj = fopen(filename, "wb") # <<<<<<<<<<<<<<
@@ -20597,7 +21983,7 @@
*/
__pyx_v_fileobj = fopen(__pyx_v_filename, __pyx_k__wb);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":118
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":118
* cdef png_uint_32 row
*
* row_pointers = <png_bytep *> alloca(sizeof(png_bytep) * height) # <<<<<<<<<<<<<<
@@ -20606,7 +21992,7 @@
*/
__pyx_v_row_pointers = ((png_bytep *)alloca(((sizeof(png_bytep)) * __pyx_v_height)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":120
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":120
* row_pointers = <png_bytep *> alloca(sizeof(png_bytep) * height)
*
* for row in range(height): # <<<<<<<<<<<<<<
@@ -20617,7 +22003,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_row = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":121
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":121
*
* for row in range(height):
* row_pointers[row] = pix_buffer + row * width * 4 # <<<<<<<<<<<<<<
@@ -20627,7 +22013,7 @@
(__pyx_v_row_pointers[__pyx_v_row]) = (__pyx_v_pix_buffer + ((__pyx_v_row * __pyx_v_width) * 4));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":122
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":122
* for row in range(height):
* row_pointers[row] = pix_buffer + row * width * 4
* png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL) # <<<<<<<<<<<<<<
@@ -20636,7 +22022,7 @@
*/
__pyx_v_png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":123
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":123
* row_pointers[row] = pix_buffer + row * width * 4
* png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL)
* info_ptr = png_create_info_struct(png_ptr) # <<<<<<<<<<<<<<
@@ -20645,7 +22031,7 @@
*/
__pyx_v_info_ptr = png_create_info_struct(__pyx_v_png_ptr);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":127
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":127
* # Um we are ignoring setjmp sorry guys
*
* png_init_io(png_ptr, fileobj) # <<<<<<<<<<<<<<
@@ -20654,7 +22040,7 @@
*/
png_init_io(__pyx_v_png_ptr, __pyx_v_fileobj);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":131
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":131
* png_set_IHDR(png_ptr, info_ptr, width, height, 8,
* PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE,
* PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE) # <<<<<<<<<<<<<<
@@ -20663,7 +22049,7 @@
*/
png_set_IHDR(__pyx_v_png_ptr, __pyx_v_info_ptr, __pyx_v_width, __pyx_v_height, 8, PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":133
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":133
* PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE)
*
* cdef size_t dots_per_meter = <size_t> (dpi / (2.54 / 100.0)) # <<<<<<<<<<<<<<
@@ -20672,7 +22058,7 @@
*/
__pyx_v_dots_per_meter = ((size_t)(__pyx_v_dpi / (2.54 / 100.0)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":135
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":135
* cdef size_t dots_per_meter = <size_t> (dpi / (2.54 / 100.0))
* png_set_pHYs(png_ptr, info_ptr, dots_per_meter, dots_per_meter,
* PNG_RESOLUTION_METER) # <<<<<<<<<<<<<<
@@ -20681,7 +22067,7 @@
*/
png_set_pHYs(__pyx_v_png_ptr, __pyx_v_info_ptr, __pyx_v_dots_per_meter, __pyx_v_dots_per_meter, PNG_RESOLUTION_METER);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":137
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":137
* PNG_RESOLUTION_METER)
*
* sig_bit.gray = 0 # <<<<<<<<<<<<<<
@@ -20690,7 +22076,7 @@
*/
__pyx_v_sig_bit.gray = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":138
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":138
*
* sig_bit.gray = 0
* sig_bit.red = sig_bit.green = sig_bit.blue = sig_bit.alpha = 8 # <<<<<<<<<<<<<<
@@ -20702,7 +22088,7 @@
__pyx_v_sig_bit.blue = 8;
__pyx_v_sig_bit.alpha = 8;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":140
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":140
* sig_bit.red = sig_bit.green = sig_bit.blue = sig_bit.alpha = 8
*
* png_set_sBIT(png_ptr, info_ptr, &sig_bit) # <<<<<<<<<<<<<<
@@ -20711,7 +22097,7 @@
*/
png_set_sBIT(__pyx_v_png_ptr, __pyx_v_info_ptr, (&__pyx_v_sig_bit));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":142
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":142
* png_set_sBIT(png_ptr, info_ptr, &sig_bit)
*
* png_write_info(png_ptr, info_ptr) # <<<<<<<<<<<<<<
@@ -20720,7 +22106,7 @@
*/
png_write_info(__pyx_v_png_ptr, __pyx_v_info_ptr);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":143
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":143
*
* png_write_info(png_ptr, info_ptr)
* png_write_image(png_ptr, row_pointers) # <<<<<<<<<<<<<<
@@ -20729,7 +22115,7 @@
*/
png_write_image(__pyx_v_png_ptr, __pyx_v_row_pointers);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":144
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":144
* png_write_info(png_ptr, info_ptr)
* png_write_image(png_ptr, row_pointers)
* png_write_end(png_ptr, info_ptr) # <<<<<<<<<<<<<<
@@ -20738,7 +22124,7 @@
*/
png_write_end(__pyx_v_png_ptr, __pyx_v_info_ptr);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":146
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":146
* png_write_end(png_ptr, info_ptr)
*
* fclose(fileobj) # <<<<<<<<<<<<<<
@@ -20747,7 +22133,7 @@
*/
fclose(__pyx_v_fileobj);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":147
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":147
*
* fclose(fileobj)
* png_destroy_write_struct(&png_ptr, &info_ptr) # <<<<<<<<<<<<<<
@@ -20769,13 +22155,12 @@
__pyx_L0:;
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_buffer);
__pyx_L2:;
- __Pyx_DECREF((PyObject *)__pyx_v_buffer);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":149
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":149
* png_destroy_write_struct(&png_ptr, &info_ptr)
*
* def add_points_to_image( # <<<<<<<<<<<<<<
@@ -20851,72 +22236,70 @@
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];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":155
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":155
* np.float64_t pv):
* cdef int i, j, k, pi
* cdef int np = px.shape[0] # <<<<<<<<<<<<<<
@@ -20925,7 +22308,7 @@
*/
__pyx_v_np = (__pyx_v_px->dimensions[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":156
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":156
* cdef int i, j, k, pi
* cdef int np = px.shape[0]
* cdef int xs = buffer.shape[0] # <<<<<<<<<<<<<<
@@ -20934,7 +22317,7 @@
*/
__pyx_v_xs = (__pyx_v_buffer->dimensions[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":157
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":157
* cdef int np = px.shape[0]
* cdef int xs = buffer.shape[0]
* cdef int ys = buffer.shape[1] # <<<<<<<<<<<<<<
@@ -20943,16 +22326,16 @@
*/
__pyx_v_ys = (__pyx_v_buffer->dimensions[1]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":159
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":159
* cdef int ys = buffer.shape[1]
* cdef int v
* v = iclip(<int>(pv * 255), 0, 255) # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":160
* cdef int v
* v = iclip(<int>(pv * 255), 0, 255)
* for pi in range(np): # <<<<<<<<<<<<<<
@@ -20963,7 +22346,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_pi = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":161
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":161
* v = iclip(<int>(pv * 255), 0, 255)
* for pi in range(np):
* j = <int> (xs * px[pi]) # <<<<<<<<<<<<<<
@@ -20978,11 +22361,11 @@
} 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))));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":162
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":162
* for pi in range(np):
* j = <int> (xs * px[pi])
* i = <int> (ys * py[pi]) # <<<<<<<<<<<<<<
@@ -20997,11 +22380,11 @@
} 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))));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":163
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":163
* j = <int> (xs * px[pi])
* i = <int> (ys * py[pi])
* for k in range(3): # <<<<<<<<<<<<<<
@@ -21011,7 +22394,7 @@
for (__pyx_t_5 = 0; __pyx_t_5 < 3; __pyx_t_5+=1) {
__pyx_v_k = __pyx_t_5;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":164
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":164
* i = <int> (ys * py[pi])
* for k in range(3):
* buffer[i, j, k] = 0 # <<<<<<<<<<<<<<
@@ -21036,13 +22419,13 @@
} 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;
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":165
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":165
* for k in range(3):
* buffer[i, j, k] = 0
* return # <<<<<<<<<<<<<<
@@ -21053,7 +22436,7 @@
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":166
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":166
* buffer[i, j, k] = 0
* return
* for i in range(xs): # <<<<<<<<<<<<<<
@@ -21064,7 +22447,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":167
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":167
* return
* for i in range(xs):
* for j in range(ys): # <<<<<<<<<<<<<<
@@ -21075,7 +22458,7 @@
for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_5; __pyx_t_9+=1) {
__pyx_v_j = __pyx_t_9;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":168
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":168
* for i in range(xs):
* for j in range(ys):
* for k in range(3): # <<<<<<<<<<<<<<
@@ -21085,7 +22468,7 @@
for (__pyx_t_10 = 0; __pyx_t_10 < 3; __pyx_t_10+=1) {
__pyx_v_k = __pyx_t_10;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":169
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":169
* for j in range(ys):
* for k in range(3):
* v = buffer[i, j, k] # <<<<<<<<<<<<<<
@@ -21109,11 +22492,11 @@
} 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));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/png_writer.pyx":170
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":170
* for k in range(3):
* v = buffer[i, j, k]
* buffer[i, j, k] = iclip(v, 0, 255) # <<<<<<<<<<<<<<
@@ -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,15 +22543,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":42
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":42
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def read_tiger_section( # <<<<<<<<<<<<<<
@@ -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,52 +22658,50 @@
__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];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":49
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":49
* int offset = 36):
* cdef int strides[3]
* strides[0] = 1 # <<<<<<<<<<<<<<
@@ -21332,7 +22710,7 @@
*/
(__pyx_v_strides[0]) = 1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":50
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":50
* cdef int strides[3]
* strides[0] = 1
* strides[1] = root_size[0] * strides[0] # <<<<<<<<<<<<<<
@@ -21342,7 +22720,7 @@
__pyx_t_1 = 0;
(__pyx_v_strides[1]) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_root_size.buf, __pyx_t_1, __pyx_bstride_0_root_size)) * (__pyx_v_strides[0]));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":51
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":51
* strides[0] = 1
* strides[1] = root_size[0] * strides[0]
* strides[2] = strides[1] * root_size[1] + 2 # <<<<<<<<<<<<<<
@@ -21352,37 +22730,37 @@
__pyx_t_2 = 1;
(__pyx_v_strides[2]) = (((__pyx_v_strides[1]) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_root_size.buf, __pyx_t_2, __pyx_bstride_0_root_size))) + 2);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":53
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":53
* strides[2] = strides[1] * root_size[1] + 2
* cdef np.int64_t i, j, k
* cdef np.ndarray buffer = np.zeros(slab_size, dtype='float32', order='F') # <<<<<<<<<<<<<<
* 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;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":54
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":54
* cdef np.int64_t i, j, k
* cdef np.ndarray buffer = np.zeros(slab_size, dtype='float32', order='F')
* cdef FILE *f = fopen(fn, "rb") # <<<<<<<<<<<<<<
@@ -21391,7 +22769,7 @@
*/
__pyx_v_f = fopen(__pyx_v_fn, __pyx_k__rb);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":56
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":56
* cdef FILE *f = fopen(fn, "rb")
* #for i in range(3): offset += strides[i] * slab_start[i]
* cdef np.int64_t pos = 0 # <<<<<<<<<<<<<<
@@ -21400,7 +22778,7 @@
*/
__pyx_v_pos = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":57
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":57
* #for i in range(3): offset += strides[i] * slab_start[i]
* cdef np.int64_t pos = 0
* cdef np.int64_t moff = 0 # <<<<<<<<<<<<<<
@@ -21409,7 +22787,7 @@
*/
__pyx_v_moff = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":58
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":58
* cdef np.int64_t pos = 0
* cdef np.int64_t moff = 0
* cdef float *data = <float *> buffer.data # <<<<<<<<<<<<<<
@@ -21418,7 +22796,7 @@
*/
__pyx_v_data = ((float *)__pyx_v_buffer->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":59
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":59
* cdef np.int64_t moff = 0
* cdef float *data = <float *> buffer.data
* fseek(f, offset, 0) # <<<<<<<<<<<<<<
@@ -21427,7 +22805,7 @@
*/
fseek(__pyx_v_f, __pyx_v_offset, 0);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":61
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":61
* fseek(f, offset, 0)
* # If anybody wants to convert this loop to a SEEK_CUR, that'd be great.
* for i in range(slab_size[2]): # <<<<<<<<<<<<<<
@@ -21439,7 +22817,7 @@
for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
__pyx_v_i = __pyx_t_9;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":62
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":62
* # If anybody wants to convert this loop to a SEEK_CUR, that'd be great.
* for i in range(slab_size[2]):
* for j in range(slab_size[1]): # <<<<<<<<<<<<<<
@@ -21451,7 +22829,7 @@
for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
__pyx_v_j = __pyx_t_12;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":63
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":63
* for i in range(slab_size[2]):
* for j in range(slab_size[1]):
* moff = (slab_start[0] ) * strides[0] \ # <<<<<<<<<<<<<<
@@ -21460,7 +22838,7 @@
*/
__pyx_t_13 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":64
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":64
* for j in range(slab_size[1]):
* moff = (slab_start[0] ) * strides[0] \
* + (slab_start[1] + j) * strides[1] \ # <<<<<<<<<<<<<<
@@ -21469,7 +22847,7 @@
*/
__pyx_t_14 = 1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":65
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":65
* moff = (slab_start[0] ) * strides[0] \
* + (slab_start[1] + j) * strides[1] \
* + (slab_start[2] + i) * strides[2] # <<<<<<<<<<<<<<
@@ -21479,7 +22857,7 @@
__pyx_t_15 = 2;
__pyx_v_moff = ((((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_slab_start.buf, __pyx_t_13, __pyx_bstride_0_slab_start)) * (__pyx_v_strides[0])) + (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_slab_start.buf, __pyx_t_14, __pyx_bstride_0_slab_start)) + __pyx_v_j) * (__pyx_v_strides[1]))) + (((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_slab_start.buf, __pyx_t_15, __pyx_bstride_0_slab_start)) + __pyx_v_i) * (__pyx_v_strides[2])));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":67
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":67
* + (slab_start[2] + i) * strides[2]
* #print offset + 4 * moff, pos
* fseek(f, offset + 4 * moff, SEEK_SET) # <<<<<<<<<<<<<<
@@ -21488,7 +22866,7 @@
*/
fseek(__pyx_v_f, (__pyx_v_offset + (4 * __pyx_v_moff)), SEEK_SET);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":68
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":68
* #print offset + 4 * moff, pos
* fseek(f, offset + 4 * moff, SEEK_SET)
* fread(<void *> (data + pos), 4, slab_size[0], f) # <<<<<<<<<<<<<<
@@ -21498,7 +22876,7 @@
__pyx_t_16 = 0;
fread(((void *)(__pyx_v_data + __pyx_v_pos)), 4, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_slab_size.buf, __pyx_t_16, __pyx_bstride_0_slab_size)), __pyx_v_f);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":69
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":69
* fseek(f, offset + 4 * moff, SEEK_SET)
* fread(<void *> (data + pos), 4, slab_size[0], f)
* pos += slab_size[0] # <<<<<<<<<<<<<<
@@ -21509,7 +22887,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/fortran_reader.pyx":70
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":70
* fread(<void *> (data + pos), 4, slab_size[0], f)
* pos += slab_size[0]
* return buffer # <<<<<<<<<<<<<<
@@ -21541,15 +22919,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":47
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":47
* QuadTreeNode *children[2][2]
*
* cdef void QTN_add_value(QuadTreeNode *self, # <<<<<<<<<<<<<<
@@ -21563,7 +22938,7 @@
int __pyx_t_2;
__Pyx_RefNannySetupContext("QTN_add_value");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":50
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":50
* np.float64_t *val, np.float64_t weight_val):
* cdef int i
* for i in range(self.nvals): # <<<<<<<<<<<<<<
@@ -21574,7 +22949,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":51
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":51
* cdef int i
* for i in range(self.nvals):
* self.val[i] += val[i] # <<<<<<<<<<<<<<
@@ -21584,7 +22959,7 @@
(__pyx_v_self->val[__pyx_v_i]) += (__pyx_v_val[__pyx_v_i]);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":52
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":52
* for i in range(self.nvals):
* self.val[i] += val[i]
* self.weight_val += weight_val # <<<<<<<<<<<<<<
@@ -21596,7 +22971,7 @@
__Pyx_RefNannyFinishContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":54
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":54
* self.weight_val += weight_val
*
* cdef void QTN_refine(QuadTreeNode *self): # <<<<<<<<<<<<<<
@@ -21612,7 +22987,7 @@
int __pyx_t_2;
__Pyx_RefNannySetupContext("QTN_refine");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":58
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":58
* cdef np.int64_t npos[2]
* cdef QuadTreeNode *node
* for i in range(2): # <<<<<<<<<<<<<<
@@ -21622,7 +22997,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 2; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":59
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":59
* cdef QuadTreeNode *node
* for i in range(2):
* npos[0] = self.pos[0] * 2 + i # <<<<<<<<<<<<<<
@@ -21631,7 +23006,7 @@
*/
(__pyx_v_npos[0]) = (((__pyx_v_self->pos[0]) * 2) + __pyx_v_i);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":60
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":60
* for i in range(2):
* npos[0] = self.pos[0] * 2 + i
* for j in range(2): # <<<<<<<<<<<<<<
@@ -21641,7 +23016,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < 2; __pyx_t_2+=1) {
__pyx_v_j = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":61
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":61
* npos[0] = self.pos[0] * 2 + i
* for j in range(2):
* npos[1] = self.pos[1] * 2 + j # <<<<<<<<<<<<<<
@@ -21650,7 +23025,7 @@
*/
(__pyx_v_npos[1]) = (((__pyx_v_self->pos[1]) * 2) + __pyx_v_j);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":63
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":63
* npos[1] = self.pos[1] * 2 + j
* # We have to be careful with allocation...
* self.children[i][j] = QTN_initialize( # <<<<<<<<<<<<<<
@@ -21661,7 +23036,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":67
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":67
* self.nvals, self.val, self.weight_val,
* self.level + 1)
* for i in range(self.nvals): self.val[i] = 0.0 # <<<<<<<<<<<<<<
@@ -21674,7 +23049,7 @@
(__pyx_v_self->val[__pyx_v_i]) = 0.0;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":68
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":68
* self.level + 1)
* for i in range(self.nvals): self.val[i] = 0.0
* self.weight_val = 0.0 # <<<<<<<<<<<<<<
@@ -21686,7 +23061,7 @@
__Pyx_RefNannyFinishContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":70
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":70
* self.weight_val = 0.0
*
* cdef QuadTreeNode *QTN_initialize(np.int64_t pos[2], int nvals, # <<<<<<<<<<<<<<
@@ -21703,7 +23078,7 @@
int __pyx_t_2;
__Pyx_RefNannySetupContext("QTN_initialize");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":75
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":75
* cdef QuadTreeNode *node
* cdef int i, j
* node = <QuadTreeNode *> malloc(sizeof(QuadTreeNode)) # <<<<<<<<<<<<<<
@@ -21712,7 +23087,7 @@
*/
__pyx_v_node = ((struct __pyx_t_2yt_9amr_utils_QuadTreeNode *)malloc((sizeof(struct __pyx_t_2yt_9amr_utils_QuadTreeNode))));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":76
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":76
* cdef int i, j
* node = <QuadTreeNode *> malloc(sizeof(QuadTreeNode))
* node.pos[0] = pos[0] # <<<<<<<<<<<<<<
@@ -21721,7 +23096,7 @@
*/
(__pyx_v_node->pos[0]) = (__pyx_v_pos[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":77
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":77
* node = <QuadTreeNode *> malloc(sizeof(QuadTreeNode))
* node.pos[0] = pos[0]
* node.pos[1] = pos[1] # <<<<<<<<<<<<<<
@@ -21730,7 +23105,7 @@
*/
(__pyx_v_node->pos[1]) = (__pyx_v_pos[1]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":78
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":78
* node.pos[0] = pos[0]
* node.pos[1] = pos[1]
* node.nvals = nvals # <<<<<<<<<<<<<<
@@ -21739,7 +23114,7 @@
*/
__pyx_v_node->nvals = __pyx_v_nvals;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":79
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":79
* node.pos[1] = pos[1]
* node.nvals = nvals
* node.val = <np.float64_t *> malloc( # <<<<<<<<<<<<<<
@@ -21748,7 +23123,7 @@
*/
__pyx_v_node->val = ((__pyx_t_5numpy_float64_t *)malloc((__pyx_v_nvals * (sizeof(__pyx_t_5numpy_float64_t)))));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":81
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":81
* node.val = <np.float64_t *> malloc(
* nvals * sizeof(np.float64_t))
* for i in range(nvals): # <<<<<<<<<<<<<<
@@ -21759,7 +23134,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":82
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":82
* nvals * sizeof(np.float64_t))
* for i in range(nvals):
* node.val[i] = val[i] # <<<<<<<<<<<<<<
@@ -21769,7 +23144,7 @@
(__pyx_v_node->val[__pyx_v_i]) = (__pyx_v_val[__pyx_v_i]);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":83
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":83
* for i in range(nvals):
* node.val[i] = val[i]
* node.weight_val = weight_val # <<<<<<<<<<<<<<
@@ -21778,7 +23153,7 @@
*/
__pyx_v_node->weight_val = __pyx_v_weight_val;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":84
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":84
* node.val[i] = val[i]
* node.weight_val = weight_val
* for i in range(2): # <<<<<<<<<<<<<<
@@ -21788,7 +23163,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 2; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":85
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":85
* node.weight_val = weight_val
* for i in range(2):
* for j in range(2): # <<<<<<<<<<<<<<
@@ -21798,7 +23173,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < 2; __pyx_t_2+=1) {
__pyx_v_j = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":86
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":86
* for i in range(2):
* for j in range(2):
* node.children[i][j] = NULL # <<<<<<<<<<<<<<
@@ -21809,7 +23184,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":87
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":87
* for j in range(2):
* node.children[i][j] = NULL
* node.level = level # <<<<<<<<<<<<<<
@@ -21818,7 +23193,7 @@
*/
__pyx_v_node->level = __pyx_v_level;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":88
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":88
* node.children[i][j] = NULL
* node.level = level
* return node # <<<<<<<<<<<<<<
@@ -21834,7 +23209,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":90
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":90
* return node
*
* cdef void QTN_free(QuadTreeNode *node): # <<<<<<<<<<<<<<
@@ -21850,7 +23225,7 @@
int __pyx_t_3;
__Pyx_RefNannySetupContext("QTN_free");
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":92
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":92
* cdef void QTN_free(QuadTreeNode *node):
* cdef int i, j
* for i in range(2): # <<<<<<<<<<<<<<
@@ -21860,7 +23235,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 2; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":93
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":93
* cdef int i, j
* for i in range(2):
* for j in range(2): # <<<<<<<<<<<<<<
@@ -21870,7 +23245,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < 2; __pyx_t_2+=1) {
__pyx_v_j = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":94
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":94
* for i in range(2):
* for j in range(2):
* if node.children[i][j] == NULL: continue # <<<<<<<<<<<<<<
@@ -21884,7 +23259,7 @@
}
__pyx_L7:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":95
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":95
* for j in range(2):
* if node.children[i][j] == NULL: continue
* QTN_free(node.children[i][j]) # <<<<<<<<<<<<<<
@@ -21896,7 +23271,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":96
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":96
* if node.children[i][j] == NULL: continue
* QTN_free(node.children[i][j])
* free(node.val) # <<<<<<<<<<<<<<
@@ -21905,7 +23280,7 @@
*/
free(__pyx_v_node->val);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":97
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":97
* QTN_free(node.children[i][j])
* free(node.val)
* free(node) # <<<<<<<<<<<<<<
@@ -21917,7 +23292,7 @@
__Pyx_RefNannyFinishContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":105
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":105
* cdef np.int64_t top_grid_dims[2]
*
* def __cinit__(self, np.ndarray[np.int64_t, ndim=1] top_grid_dims, # <<<<<<<<<<<<<<
@@ -21968,39 +23343,38 @@
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];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":111
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":111
* cdef np.int64_t pos[2]
* cdef np.float64_t *vals = <np.float64_t *> alloca(
* sizeof(np.float64_t)*nvals) # <<<<<<<<<<<<<<
@@ -22009,7 +23383,7 @@
*/
__pyx_v_vals = ((__pyx_t_5numpy_float64_t *)alloca(((sizeof(__pyx_t_5numpy_float64_t)) * __pyx_v_nvals)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":112
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":112
* cdef np.float64_t *vals = <np.float64_t *> alloca(
* sizeof(np.float64_t)*nvals)
* cdef np.float64_t weight_val = 0.0 # <<<<<<<<<<<<<<
@@ -22018,7 +23392,7 @@
*/
__pyx_v_weight_val = 0.0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":113
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":113
* sizeof(np.float64_t)*nvals)
* cdef np.float64_t weight_val = 0.0
* self.nvals = nvals # <<<<<<<<<<<<<<
@@ -22027,7 +23401,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->nvals = __pyx_v_nvals;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":114
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":114
* cdef np.float64_t weight_val = 0.0
* self.nvals = nvals
* for i in range(nvals): vals[i] = 0.0 # <<<<<<<<<<<<<<
@@ -22040,7 +23414,7 @@
(__pyx_v_vals[__pyx_v_i]) = 0.0;
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":116
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":116
* for i in range(nvals): vals[i] = 0.0
*
* self.top_grid_dims[0] = top_grid_dims[0] # <<<<<<<<<<<<<<
@@ -22055,11 +23429,11 @@
} 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));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":117
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":117
*
* self.top_grid_dims[0] = top_grid_dims[0]
* self.top_grid_dims[1] = top_grid_dims[1] # <<<<<<<<<<<<<<
@@ -22074,11 +23448,11 @@
} 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));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":120
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":120
*
* # This wouldn't be necessary if we did bitshifting...
* for i in range(80): # <<<<<<<<<<<<<<
@@ -22088,7 +23462,7 @@
for (__pyx_t_1 = 0; __pyx_t_1 < 80; __pyx_t_1+=1) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":121
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":121
* # This wouldn't be necessary if we did bitshifting...
* for i in range(80):
* self.po2[i] = 2**i # <<<<<<<<<<<<<<
@@ -22098,7 +23472,7 @@
(((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->po2[__pyx_v_i]) = __Pyx_pow_long(2, __pyx_v_i);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":123
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":123
* self.po2[i] = 2**i
* self.root_nodes = <QuadTreeNode ***> \
* malloc(sizeof(QuadTreeNode **) * top_grid_dims[0]) # <<<<<<<<<<<<<<
@@ -22113,10 +23487,10 @@
} 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":122
* for i in range(80):
* self.po2[i] = 2**i
* self.root_nodes = <QuadTreeNode ***> \ # <<<<<<<<<<<<<<
@@ -22125,7 +23499,7 @@
*/
((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->root_nodes = ((struct __pyx_t_2yt_9amr_utils_QuadTreeNode ***)malloc(((sizeof(struct __pyx_t_2yt_9amr_utils_QuadTreeNode **)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_top_grid_dims.buf, __pyx_t_5, __pyx_bstride_0_top_grid_dims)))));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":126
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":126
*
* # We initialize our root values to 0.0.
* for i in range(top_grid_dims[0]): # <<<<<<<<<<<<<<
@@ -22140,13 +23514,13 @@
} 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) {
__pyx_v_i = __pyx_t_1;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":127
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":127
* # We initialize our root values to 0.0.
* for i in range(top_grid_dims[0]):
* pos[0] = i # <<<<<<<<<<<<<<
@@ -22155,7 +23529,7 @@
*/
(__pyx_v_pos[0]) = __pyx_v_i;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":129
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":129
* pos[0] = i
* self.root_nodes[i] = <QuadTreeNode **> \
* malloc(sizeof(QuadTreeNode *) * top_grid_dims[1]) # <<<<<<<<<<<<<<
@@ -22170,10 +23544,10 @@
} 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":128
* for i in range(top_grid_dims[0]):
* pos[0] = i
* self.root_nodes[i] = <QuadTreeNode **> \ # <<<<<<<<<<<<<<
@@ -22182,7 +23556,7 @@
*/
(((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->root_nodes[__pyx_v_i]) = ((struct __pyx_t_2yt_9amr_utils_QuadTreeNode **)malloc(((sizeof(struct __pyx_t_2yt_9amr_utils_QuadTreeNode *)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_top_grid_dims.buf, __pyx_t_8, __pyx_bstride_0_top_grid_dims)))));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":130
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":130
* self.root_nodes[i] = <QuadTreeNode **> \
* malloc(sizeof(QuadTreeNode *) * top_grid_dims[1])
* for j in range(top_grid_dims[1]): # <<<<<<<<<<<<<<
@@ -22197,13 +23571,13 @@
} 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) {
__pyx_v_j = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":131
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":131
* malloc(sizeof(QuadTreeNode *) * top_grid_dims[1])
* for j in range(top_grid_dims[1]):
* pos[1] = j # <<<<<<<<<<<<<<
@@ -22212,7 +23586,7 @@
*/
(__pyx_v_pos[1]) = __pyx_v_j;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":132
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":132
* for j in range(top_grid_dims[1]):
* pos[1] = j
* self.root_nodes[i][j] = QTN_initialize( # <<<<<<<<<<<<<<
@@ -22236,13 +23610,11 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":135
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":135
* pos, nvals, vals, weight_val, 0)
*
* cdef void add_to_position(self, # <<<<<<<<<<<<<<
@@ -22263,10 +23635,9 @@
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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":141
* cdef int i, j
* cdef QuadTreeNode *node
* node = self.find_on_root_level(pos, level) # <<<<<<<<<<<<<<
@@ -22275,27 +23646,27 @@
*/
__pyx_v_node = ((struct __pyx_vtabstruct_2yt_9amr_utils_QuadTree *)__pyx_v_self->__pyx_vtab)->find_on_root_level(__pyx_v_self, __pyx_v_pos, __pyx_v_level);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":143
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":143
* node = self.find_on_root_level(pos, level)
* cdef np.int64_t fac
* for L in range(level): # <<<<<<<<<<<<<<
* 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);
@@ -22318,7 +23689,7 @@
__pyx_v_L = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":144
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":144
* cdef np.int64_t fac
* for L in range(level):
* if node.children[0][0] == NULL: # <<<<<<<<<<<<<<
@@ -22328,7 +23699,7 @@
__pyx_t_4 = (((__pyx_v_node->children[0])[0]) == NULL);
if (__pyx_t_4) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":145
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":145
* for L in range(level):
* if node.children[0][0] == NULL:
* QTN_refine(node) # <<<<<<<<<<<<<<
@@ -22340,26 +23711,26 @@
}
__pyx_L5:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":147
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":147
* QTN_refine(node)
* # Maybe we should use bitwise operators?
* fac = self.po2[level - L - 1] # <<<<<<<<<<<<<<
* 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]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":148
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":148
* # Maybe we should use bitwise operators?
* fac = self.po2[level - L - 1]
* i = (pos[0] >= fac*(2*node.pos[0]+1)) # <<<<<<<<<<<<<<
@@ -22368,7 +23739,7 @@
*/
__pyx_v_i = ((__pyx_v_pos[0]) >= (__pyx_v_fac * ((2 * (__pyx_v_node->pos[0])) + 1)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":149
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":149
* fac = self.po2[level - L - 1]
* i = (pos[0] >= fac*(2*node.pos[0]+1))
* j = (pos[1] >= fac*(2*node.pos[1]+1)) # <<<<<<<<<<<<<<
@@ -22377,7 +23748,7 @@
*/
__pyx_v_j = ((__pyx_v_pos[1]) >= (__pyx_v_fac * ((2 * (__pyx_v_node->pos[1])) + 1)));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":150
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":150
* i = (pos[0] >= fac*(2*node.pos[0]+1))
* j = (pos[1] >= fac*(2*node.pos[1]+1))
* node = node.children[i][j] # <<<<<<<<<<<<<<
@@ -22388,7 +23759,7 @@
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":151
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":151
* j = (pos[1] >= fac*(2*node.pos[1]+1))
* node = node.children[i][j]
* QTN_add_value(node, val, weight_val) # <<<<<<<<<<<<<<
@@ -22405,11 +23776,10 @@
__Pyx_WriteUnraisable("yt.amr_utils.QuadTree.add_to_position");
__pyx_L0:;
__Pyx_DECREF(__pyx_v_L);
- __Pyx_DECREF((PyObject *)__pyx_v_self);
__Pyx_RefNannyFinishContext();
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":153
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":153
* QTN_add_value(node, val, weight_val)
*
* cdef QuadTreeNode *find_on_root_level(self, np.int64_t pos[2], int level): # <<<<<<<<<<<<<<
@@ -22421,27 +23791,49 @@
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":157
* # So we find on the root level, then we traverse the tree.
* cdef np.int64_t i, j
* i = <np.int64_t> (pos[0] / self.po2[level]) # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":158
* cdef np.int64_t i, j
* i = <np.int64_t> (pos[0] / self.po2[level])
* j = <np.int64_t> (pos[1] / self.po2[level]) # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":159
* i = <np.int64_t> (pos[0] / self.po2[level])
* j = <np.int64_t> (pos[1] / self.po2[level])
* return self.root_nodes[i][j] # <<<<<<<<<<<<<<
@@ -22452,12 +23844,16 @@
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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":164
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":164
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def add_array_to_tree(self, int level, # <<<<<<<<<<<<<<
@@ -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,50 +23956,46 @@
}
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];
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":169
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":169
* np.ndarray[np.float64_t, ndim=2] pvals,
* np.ndarray[np.float64_t, ndim=1] pweight_vals):
* cdef int np = pxs.shape[0] # <<<<<<<<<<<<<<
@@ -22612,7 +24004,7 @@
*/
__pyx_v_np = (__pyx_v_pxs->dimensions[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":172
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":172
* cdef int p
* cdef cnp.float64_t *vals
* cdef cnp.float64_t *data = <cnp.float64_t *> pvals.data # <<<<<<<<<<<<<<
@@ -22621,7 +24013,7 @@
*/
__pyx_v_data = ((__pyx_t_5numpy_float64_t *)__pyx_v_pvals->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":174
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":174
* cdef cnp.float64_t *data = <cnp.float64_t *> pvals.data
* cdef cnp.int64_t pos[2]
* for p in range(np): # <<<<<<<<<<<<<<
@@ -22632,7 +24024,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_p = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":175
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":175
* cdef cnp.int64_t pos[2]
* for p in range(np):
* vals = data + self.nvals*p # <<<<<<<<<<<<<<
@@ -22641,7 +24033,7 @@
*/
__pyx_v_vals = (__pyx_v_data + (((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->nvals * __pyx_v_p));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":176
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":176
* for p in range(np):
* vals = data + self.nvals*p
* pos[0] = pxs[p] # <<<<<<<<<<<<<<
@@ -22651,7 +24043,7 @@
__pyx_t_3 = __pyx_v_p;
(__pyx_v_pos[0]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_pxs.buf, __pyx_t_3, __pyx_bstride_0_pxs));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":177
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":177
* vals = data + self.nvals*p
* pos[0] = pxs[p]
* pos[1] = pys[p] # <<<<<<<<<<<<<<
@@ -22661,7 +24053,7 @@
__pyx_t_4 = __pyx_v_p;
(__pyx_v_pos[1]) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_bstruct_pys.buf, __pyx_t_4, __pyx_bstride_0_pys));
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":178
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":178
* pos[0] = pxs[p]
* pos[1] = pys[p]
* self.add_to_position(level, pos, vals, pweight_vals[p]) # <<<<<<<<<<<<<<
@@ -22691,17 +24083,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":180
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":180
* self.add_to_position(level, pos, vals, pweight_vals[p])
*
* def add_grid_to_tree(self, int level, # <<<<<<<<<<<<<<
@@ -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];
@@ -22860,7 +24248,7 @@
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":189
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":189
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def get_all_from_level(self, int level, int count_only = 0): # <<<<<<<<<<<<<<
@@ -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);
@@ -22967,7 +24355,7 @@
__pyx_bstruct_nvals.buf = NULL;
__pyx_bstruct_nwvals.buf = NULL;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":191
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":191
* def get_all_from_level(self, int level, int count_only = 0):
* cdef int i, j
* cdef int total = 0 # <<<<<<<<<<<<<<
@@ -22976,20 +24364,20 @@
*/
__pyx_v_total = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":192
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":192
* cdef int i, j
* cdef int total = 0
* vals = [] # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":193
* cdef int total = 0
* vals = []
* for i in range(self.top_grid_dims[0]): # <<<<<<<<<<<<<<
@@ -23000,7 +24388,7 @@
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_i = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":194
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":194
* vals = []
* for i in range(self.top_grid_dims[0]):
* for j in range(self.top_grid_dims[1]): # <<<<<<<<<<<<<<
@@ -23011,7 +24399,7 @@
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
__pyx_v_j = __pyx_t_5;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":195
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":195
* for i in range(self.top_grid_dims[0]):
* for j in range(self.top_grid_dims[1]):
* total += self.count_at_level(self.root_nodes[i][j], level) # <<<<<<<<<<<<<<
@@ -23022,17 +24410,16 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":196
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":196
* for j in range(self.top_grid_dims[1]):
* total += self.count_at_level(self.root_nodes[i][j], level)
* if count_only: return total # <<<<<<<<<<<<<<
* # 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;
@@ -23041,21 +24428,21 @@
}
__pyx_L10:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":201
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":201
* cdef np.ndarray[np.float64_t, ndim=2] nvals
* cdef np.ndarray[np.float64_t, ndim=1] nwvals
* npos = np.zeros( (total, 2), dtype='int64') # <<<<<<<<<<<<<<
* 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,30 +24480,30 @@
}
__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));
__pyx_v_npos = ((PyArrayObject *)__pyx_t_8);
__pyx_t_8 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":202
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":202
* cdef np.ndarray[np.float64_t, ndim=1] nwvals
* npos = np.zeros( (total, 2), dtype='int64')
* nvals = np.zeros( (total, self.nvals), dtype='float64') # <<<<<<<<<<<<<<
* 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,41 +24541,41 @@
}
__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));
__pyx_v_nvals = ((PyArrayObject *)__pyx_t_8);
__pyx_t_8 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":203
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":203
* npos = np.zeros( (total, 2), dtype='int64')
* nvals = np.zeros( (total, self.nvals), dtype='float64')
* nwvals = np.zeros( total, dtype='float64') # <<<<<<<<<<<<<<
* 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,14 +24592,14 @@
}
__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));
__pyx_v_nwvals = ((PyArrayObject *)__pyx_t_7);
__pyx_t_7 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":204
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":204
* nvals = np.zeros( (total, self.nvals), dtype='float64')
* nwvals = np.zeros( total, dtype='float64')
* cdef np.int64_t curpos = 0 # <<<<<<<<<<<<<<
@@ -23221,7 +24608,7 @@
*/
__pyx_v_curpos = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":205
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":205
* nwvals = np.zeros( total, dtype='float64')
* cdef np.int64_t curpos = 0
* cdef np.int64_t *pdata = <np.int64_t *> npos.data # <<<<<<<<<<<<<<
@@ -23230,7 +24617,7 @@
*/
__pyx_v_pdata = ((__pyx_t_5numpy_int64_t *)__pyx_v_npos->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":206
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":206
* cdef np.int64_t curpos = 0
* cdef np.int64_t *pdata = <np.int64_t *> npos.data
* cdef np.float64_t *vdata = <np.float64_t *> nvals.data # <<<<<<<<<<<<<<
@@ -23239,7 +24626,7 @@
*/
__pyx_v_vdata = ((__pyx_t_5numpy_float64_t *)__pyx_v_nvals->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":207
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":207
* cdef np.int64_t *pdata = <np.int64_t *> npos.data
* cdef np.float64_t *vdata = <np.float64_t *> nvals.data
* cdef np.float64_t *wdata = <np.float64_t *> nwvals.data # <<<<<<<<<<<<<<
@@ -23248,7 +24635,7 @@
*/
__pyx_v_wdata = ((__pyx_t_5numpy_float64_t *)__pyx_v_nwvals->data);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":208
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":208
* cdef np.float64_t *vdata = <np.float64_t *> nvals.data
* cdef np.float64_t *wdata = <np.float64_t *> nwvals.data
* for i in range(self.top_grid_dims[0]): # <<<<<<<<<<<<<<
@@ -23259,7 +24646,7 @@
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_i = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":209
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":209
* cdef np.float64_t *wdata = <np.float64_t *> nwvals.data
* for i in range(self.top_grid_dims[0]):
* for j in range(self.top_grid_dims[1]): # <<<<<<<<<<<<<<
@@ -23270,7 +24657,7 @@
for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
__pyx_v_j = __pyx_t_5;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":211
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":211
* for j in range(self.top_grid_dims[1]):
* curpos += self.fill_from_level(self.root_nodes[i][j],
* level, curpos, pdata, vdata, wdata) # <<<<<<<<<<<<<<
@@ -23281,7 +24668,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":212
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":212
* curpos += self.fill_from_level(self.root_nodes[i][j],
* level, curpos, pdata, vdata, wdata)
* return npos, nvals, 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,13 +24716,12 @@
__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;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":214
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":214
* return npos, nvals, nwvals
*
* cdef int count_at_level(self, QuadTreeNode *node, int level): # <<<<<<<<<<<<<<
@@ -23352,9 +24738,8 @@
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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":218
* # We only really return a non-zero, calculated value if we are at the
* # level in question.
* if node.level == level: # <<<<<<<<<<<<<<
@@ -23364,7 +24749,7 @@
__pyx_t_1 = (__pyx_v_node->level == __pyx_v_level);
if (__pyx_t_1) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":221
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":221
* # We return 1 if there are no finer points at this level and zero
* # if there are
* return (node.children[0][0] == NULL) # <<<<<<<<<<<<<<
@@ -23377,7 +24762,7 @@
}
__pyx_L3:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":222
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":222
* # if there are
* return (node.children[0][0] == NULL)
* if node.children[0][0] == NULL: return 0 # <<<<<<<<<<<<<<
@@ -23392,7 +24777,7 @@
}
__pyx_L4:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":223
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":223
* return (node.children[0][0] == NULL)
* if node.children[0][0] == NULL: return 0
* cdef int count = 0 # <<<<<<<<<<<<<<
@@ -23401,7 +24786,7 @@
*/
__pyx_v_count = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":224
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":224
* if node.children[0][0] == NULL: return 0
* cdef int count = 0
* for i in range(2): # <<<<<<<<<<<<<<
@@ -23411,7 +24796,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < 2; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":225
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":225
* cdef int count = 0
* for i in range(2):
* for j in range(2): # <<<<<<<<<<<<<<
@@ -23421,7 +24806,7 @@
for (__pyx_t_3 = 0; __pyx_t_3 < 2; __pyx_t_3+=1) {
__pyx_v_j = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":226
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":226
* for i in range(2):
* for j in range(2):
* count += self.count_at_level(node.children[i][j], level) # <<<<<<<<<<<<<<
@@ -23432,7 +24817,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":227
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":227
* for j in range(2):
* count += self.count_at_level(node.children[i][j], level)
* return count # <<<<<<<<<<<<<<
@@ -23444,12 +24829,11 @@
__pyx_r = 0;
__pyx_L0:;
- __Pyx_DECREF((PyObject *)__pyx_v_self);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":229
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":229
* return count
*
* cdef int fill_from_level(self, QuadTreeNode *node, int level, # <<<<<<<<<<<<<<
@@ -23466,9 +24850,8 @@
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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":235
* np.float64_t *wdata):
* cdef int i, j
* if node.level == level: # <<<<<<<<<<<<<<
@@ -23478,7 +24861,7 @@
__pyx_t_1 = (__pyx_v_node->level == __pyx_v_level);
if (__pyx_t_1) {
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":236
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":236
* cdef int i, j
* if node.level == level:
* if node.children[0][0] != NULL: return 0 # <<<<<<<<<<<<<<
@@ -23493,7 +24876,7 @@
}
__pyx_L4:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":237
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":237
* if node.level == level:
* if node.children[0][0] != NULL: return 0
* for i in range(self.nvals): # <<<<<<<<<<<<<<
@@ -23504,7 +24887,7 @@
for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
__pyx_v_i = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":238
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":238
* if node.children[0][0] != NULL: return 0
* for i in range(self.nvals):
* vdata[self.nvals * curpos + i] = node.val[i] # <<<<<<<<<<<<<<
@@ -23514,7 +24897,7 @@
(__pyx_v_vdata[((__pyx_v_self->nvals * __pyx_v_curpos) + __pyx_v_i)]) = (__pyx_v_node->val[__pyx_v_i]);
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":239
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":239
* for i in range(self.nvals):
* vdata[self.nvals * curpos + i] = node.val[i]
* wdata[curpos] = node.weight_val # <<<<<<<<<<<<<<
@@ -23523,7 +24906,7 @@
*/
(__pyx_v_wdata[__pyx_v_curpos]) = __pyx_v_node->weight_val;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":240
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":240
* vdata[self.nvals * curpos + i] = node.val[i]
* wdata[curpos] = node.weight_val
* pdata[curpos * 2] = node.pos[0] # <<<<<<<<<<<<<<
@@ -23532,7 +24915,7 @@
*/
(__pyx_v_pdata[(__pyx_v_curpos * 2)]) = (__pyx_v_node->pos[0]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":241
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":241
* wdata[curpos] = node.weight_val
* pdata[curpos * 2] = node.pos[0]
* pdata[curpos * 2 + 1] = node.pos[1] # <<<<<<<<<<<<<<
@@ -23541,7 +24924,7 @@
*/
(__pyx_v_pdata[((__pyx_v_curpos * 2) + 1)]) = (__pyx_v_node->pos[1]);
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":242
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":242
* pdata[curpos * 2] = node.pos[0]
* pdata[curpos * 2 + 1] = node.pos[1]
* return 1 # <<<<<<<<<<<<<<
@@ -23554,7 +24937,7 @@
}
__pyx_L3:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":243
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":243
* pdata[curpos * 2 + 1] = node.pos[1]
* return 1
* if node.children[0][0] == NULL: return 0 # <<<<<<<<<<<<<<
@@ -23569,7 +24952,7 @@
}
__pyx_L7:;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":244
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":244
* return 1
* if node.children[0][0] == NULL: return 0
* cdef np.int64_t added = 0 # <<<<<<<<<<<<<<
@@ -23578,7 +24961,7 @@
*/
__pyx_v_added = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":245
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":245
* if node.children[0][0] == NULL: return 0
* cdef np.int64_t added = 0
* for i in range(2): # <<<<<<<<<<<<<<
@@ -23588,7 +24971,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < 2; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":246
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":246
* cdef np.int64_t added = 0
* for i in range(2):
* for j in range(2): # <<<<<<<<<<<<<<
@@ -23598,7 +24981,7 @@
for (__pyx_t_3 = 0; __pyx_t_3 < 2; __pyx_t_3+=1) {
__pyx_v_j = __pyx_t_3;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":248
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":248
* for j in range(2):
* added += self.fill_from_level(node.children[i][j],
* level, curpos + added, pdata, vdata, wdata) # <<<<<<<<<<<<<<
@@ -23609,7 +24992,7 @@
}
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":249
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":249
* added += self.fill_from_level(node.children[i][j],
* level, curpos + added, pdata, vdata, wdata)
* return added # <<<<<<<<<<<<<<
@@ -23621,12 +25004,11 @@
__pyx_r = 0;
__pyx_L0:;
- __Pyx_DECREF((PyObject *)__pyx_v_self);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-/* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":251
+/* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":251
* return added
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
@@ -23643,9 +25025,8 @@
__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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":253
* def __dealloc__(self):
* cdef int i, j
* for i in range(self.top_grid_dims[0]): # <<<<<<<<<<<<<<
@@ -23656,7 +25037,7 @@
for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
__pyx_v_i = __pyx_t_2;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":254
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":254
* cdef int i, j
* for i in range(self.top_grid_dims[0]):
* for j in range(self.top_grid_dims[1]): # <<<<<<<<<<<<<<
@@ -23667,7 +25048,7 @@
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_j = __pyx_t_4;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":255
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":255
* for i in range(self.top_grid_dims[0]):
* for j in range(self.top_grid_dims[1]):
* QTN_free(self.root_nodes[i][j]) # <<<<<<<<<<<<<<
@@ -23677,7 +25058,7 @@
__pyx_f_2yt_9amr_utils_QTN_free(((((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->root_nodes[__pyx_v_i])[__pyx_v_j]));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":256
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":256
* for j in range(self.top_grid_dims[1]):
* QTN_free(self.root_nodes[i][j])
* free(self.root_nodes[i]) # <<<<<<<<<<<<<<
@@ -23686,18 +25067,17 @@
free((((struct __pyx_obj_2yt_9amr_utils_QuadTree *)__pyx_v_self)->root_nodes[__pyx_v_i]));
}
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/QuadTree.pyx":257
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":257
* QTN_free(self.root_nodes[i][j])
* free(self.root_nodes[i])
* free(self.root_nodes) # <<<<<<<<<<<<<<
*/
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,32 +29699,32 @@
*(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 ---*/
- /* "/Users/matthewturk/Development/yt/trunk/yt/amr_utils.pyx":32
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/amr_utils.pyx":32
*
* # Set up some imports
* import numpy as np # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/DepthFirstOctree.pyx":26
* """
*
* import numpy as np # <<<<<<<<<<<<<<
@@ -27966,7 +29736,7 @@
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/Users/matthewturk/Development/yt/trunk/yt/_amr_utils/Interpolators.pyx":1
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/Interpolators.pyx":1
* """ # <<<<<<<<<<<<<<
* Simple interpolators
*
@@ -27976,7 +29746,7 @@
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[3]; __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/PointsInVolume.pyx":27
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/PointsInVolume.pyx":27
*
*
* import numpy as np # <<<<<<<<<<<<<<
@@ -27988,7 +29758,7 @@
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[1]; __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/RayIntegrators.pyx":26
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/RayIntegrators.pyx":26
* """
*
* import numpy as np # <<<<<<<<<<<<<<
@@ -28000,7 +29770,7 @@
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[4]; __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/VolumeIntegrator.pyx":1
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/VolumeIntegrator.pyx":1
* """ # <<<<<<<<<<<<<<
* Simple integrators for the radiative transfer equation
*
@@ -28010,7 +29780,7 @@
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __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/ContourFinding.pyx":26
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/ContourFinding.pyx":26
* """
*
* import numpy as np # <<<<<<<<<<<<<<
@@ -28022,69 +29792,70 @@
if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[6]; __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/png_writer.pyx":1
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/png_writer.pyx":1
* """ # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/fortran_reader.pyx":26
* """
*
* import numpy as np # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/_amr_utils/QuadTree.pyx":27
*
*
* import numpy as np # <<<<<<<<<<<<<<
* 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
+ /* "/Users/matthewturk/Development/yt/branches/yt-1.7/yt/amr_utils.pyx":1
* """ # <<<<<<<<<<<<<<
* 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