Changeset 6217

Show
Ignore:
Timestamp:
02/08/10 03:19:40 (4 weeks ago)
Author:
cdavid
Message:

BUG: regenerate cython files with Cython 0.12.1.

Location:
branches/0.7.x/scipy
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/0.7.x/scipy/spatial/ckdtree.c

    r5038 r6217  
    1 /* Generated by Cython 0.10 on Mon Nov 10 22:15:02 2008 */ 
     1/* Generated by Cython 0.12.1 on Mon Feb  8 18:11:01 2010 */ 
    22 
    33#define PY_SSIZE_T_CLEAN 
    44#include "Python.h" 
    55#include "structmember.h" 
     6#ifndef Py_PYTHON_H 
     7    #error Python headers needed to compile C extensions, please install development version of Python. 
     8#else 
     9 
    610#ifndef PY_LONG_LONG 
    711  #define PY_LONG_LONG LONG_LONG 
     
    1216#if PY_VERSION_HEX < 0x02040000 
    1317  #define METH_COEXIST 0 
     18  #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type) 
     19  #define PyDict_Contains(d,o)   PySequence_Contains(d,o) 
    1420#endif 
     21 
    1522#if PY_VERSION_HEX < 0x02050000 
    1623  typedef int Py_ssize_t; 
    1724  #define PY_SSIZE_T_MAX INT_MAX 
    1825  #define PY_SSIZE_T_MIN INT_MIN 
     26  #define PY_FORMAT_SIZE_T "" 
    1927  #define PyInt_FromSsize_t(z) PyInt_FromLong(z) 
    2028  #define PyInt_AsSsize_t(o)   PyInt_AsLong(o) 
    2129  #define PyNumber_Index(o)    PyNumber_Int(o) 
    2230  #define PyIndex_Check(o)     PyNumber_Check(o) 
     31  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) 
    2332#endif 
     33 
    2434#if PY_VERSION_HEX < 0x02060000 
    2535  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) 
     
    3141 
    3242  typedef struct { 
    33        void *buf; 
    34        PyObject *obj; 
    35        Py_ssize_t len; 
    36        Py_ssize_t itemsize; 
    37        int readonly; 
    38        int ndim; 
    39        char *format; 
    40        Py_ssize_t *shape; 
    41        Py_ssize_t *strides; 
    42        Py_ssize_t *suboffsets; 
    43        void *internal; 
     43     void *buf; 
     44     PyObject *obj; 
     45     Py_ssize_t len; 
     46     Py_ssize_t itemsize; 
     47     int readonly; 
     48     int ndim; 
     49     char *format; 
     50     Py_ssize_t *shape; 
     51     Py_ssize_t *strides; 
     52     Py_ssize_t *suboffsets; 
     53     void *internal; 
    4454  } Py_buffer; 
    4555 
    4656  #define PyBUF_SIMPLE 0 
    4757  #define PyBUF_WRITABLE 0x0001 
    48   #define PyBUF_LOCK 0x0002 
    4958  #define PyBUF_FORMAT 0x0004 
    5059  #define PyBUF_ND 0x0008 
     
    5665 
    5766#endif 
     67 
    5868#if PY_MAJOR_VERSION < 3 
    5969  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" 
     
    6171  #define __Pyx_BUILTIN_MODULE_NAME "builtins" 
    6272#endif 
     73 
    6374#if PY_MAJOR_VERSION >= 3 
    6475  #define Py_TPFLAGS_CHECKTYPES 0 
    6576  #define Py_TPFLAGS_HAVE_INDEX 0 
    6677#endif 
     78 
    6779#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) 
    6880  #define Py_TPFLAGS_HAVE_NEWBUFFER 0 
    6981#endif 
     82 
    7083#if PY_MAJOR_VERSION >= 3 
    7184  #define PyBaseString_Type            PyUnicode_Type 
    72   #define PyString_Type                PyBytes_Type 
     85  #define PyString_Type                PyUnicode_Type 
     86  #define PyString_CheckExact          PyUnicode_CheckExact 
     87#else 
     88  #define PyBytes_Type                 PyString_Type 
     89  #define PyBytes_CheckExact           PyString_CheckExact 
     90#endif 
     91 
     92#if PY_MAJOR_VERSION >= 3 
    7393  #define PyInt_Type                   PyLong_Type 
    7494  #define PyInt_Check(op)              PyLong_Check(op) 
     
    85105  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask 
    86106  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y) 
     107  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y) 
    87108#else 
    88109  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y) 
    89   #define PyBytes_Type                 PyString_Type 
     110  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y) 
     111 
    90112#endif 
     113 
    91114#if PY_MAJOR_VERSION >= 3 
    92115  #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func) 
    93116#endif 
     117 
    94118#if !defined(WIN32) && !defined(MS_WINDOWS) 
    95119  #ifndef __stdcall 
     
    99123    #define __cdecl 
    100124  #endif 
     125  #ifndef __fastcall 
     126    #define __fastcall 
     127  #endif 
    101128#else 
    102129  #define _USE_MATH_DEFINES 
     130#endif 
     131 
     132#if PY_VERSION_HEX < 0x02050000 
     133  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n))) 
     134  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a)) 
     135  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n))) 
     136#else 
     137  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n)) 
     138  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a)) 
     139  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n)) 
     140#endif 
     141 
     142#if PY_VERSION_HEX < 0x02050000 
     143  #define __Pyx_NAMESTR(n) ((char *)(n)) 
     144  #define __Pyx_DOCSTR(n)  ((char *)(n)) 
     145#else 
     146  #define __Pyx_NAMESTR(n) (n) 
     147  #define __Pyx_DOCSTR(n)  (n) 
    103148#endif 
    104149#ifdef __cplusplus 
     
    110155#define __PYX_HAVE_API__scipy__spatial__ckdtree 
    111156#include "stdlib.h" 
     157#include "stdio.h" 
    112158#include "numpy/arrayobject.h" 
    113  
    114  
    115 #ifdef __GNUC__ 
    116 #define INLINE __inline__ 
    117 #elif _WIN32 
    118 #define INLINE __inline 
     159#include "numpy/ufuncobject.h" 
     160 
     161#ifndef CYTHON_INLINE 
     162  #if defined(__GNUC__) 
     163    #define CYTHON_INLINE __inline__ 
     164  #elif defined(_MSC_VER) 
     165    #define CYTHON_INLINE __inline 
     166  #else 
     167    #define CYTHON_INLINE  
     168  #endif 
     169#endif 
     170 
     171typedef 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*/ 
     172 
     173 
     174/* Type Conversion Predeclarations */ 
     175 
     176#if PY_MAJOR_VERSION < 3 
     177#define __Pyx_PyBytes_FromString          PyString_FromString 
     178#define __Pyx_PyBytes_FromStringAndSize   PyString_FromStringAndSize 
     179#define __Pyx_PyBytes_AsString            PyString_AsString 
    119180#else 
    120 #define INLINE  
     181#define __Pyx_PyBytes_FromString          PyBytes_FromString 
     182#define __Pyx_PyBytes_FromStringAndSize   PyBytes_FromStringAndSize 
     183#define __Pyx_PyBytes_AsString            PyBytes_AsString 
    121184#endif 
    122185 
    123 typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/ 
    124  
    125  
    126  
    127 static int __pyx_skip_dispatch = 0; 
    128  
    129  
    130 /* Type Conversion Predeclarations */ 
    131  
    132 #if PY_MAJOR_VERSION < 3 
    133 #define __Pyx_PyBytes_FromString PyString_FromString 
    134 #define __Pyx_PyBytes_AsString   PyString_AsString 
     186#define __Pyx_PyBytes_FromUString(s)      __Pyx_PyBytes_FromString((char*)s) 
     187#define __Pyx_PyBytes_AsUString(s)        ((unsigned char*) __Pyx_PyBytes_AsString(s)) 
     188 
     189#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) 
     190static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); 
     191static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); 
     192 
     193#if !defined(T_PYSSIZET) 
     194#if PY_VERSION_HEX < 0x02050000 
     195#define T_PYSSIZET T_INT 
     196#elif !defined(T_LONGLONG) 
     197#define T_PYSSIZET \ 
     198        ((sizeof(Py_ssize_t) == sizeof(int))  ? T_INT  : \ 
     199        ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1)) 
    135200#else 
    136 #define __Pyx_PyBytes_FromString PyBytes_FromString 
    137 #define __Pyx_PyBytes_AsString   PyBytes_AsString 
     201#define T_PYSSIZET \ 
     202        ((sizeof(Py_ssize_t) == sizeof(int))          ? T_INT      : \ 
     203        ((sizeof(Py_ssize_t) == sizeof(long))         ? T_LONG     : \ 
     204        ((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1))) 
    138205#endif 
    139  
    140 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) 
    141 static INLINE int __Pyx_PyObject_IsTrue(PyObject* x); 
    142 static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x); 
    143 static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x); 
    144 static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b); 
    145  
    146 #define __pyx_PyInt_AsLong(x) (PyInt_CheckExact(x) ? PyInt_AS_LONG(x) : PyInt_AsLong(x)) 
     206#endif 
     207 
     208 
     209#if !defined(T_ULONGLONG) 
     210#define __Pyx_T_UNSIGNED_INT(x) \ 
     211        ((sizeof(x) == sizeof(unsigned char))  ? T_UBYTE : \ 
     212        ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \ 
     213        ((sizeof(x) == sizeof(unsigned int))   ? T_UINT : \ 
     214        ((sizeof(x) == sizeof(unsigned long))  ? T_ULONG : -1)))) 
     215#else 
     216#define __Pyx_T_UNSIGNED_INT(x) \ 
     217        ((sizeof(x) == sizeof(unsigned char))  ? T_UBYTE : \ 
     218        ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \ 
     219        ((sizeof(x) == sizeof(unsigned int))   ? T_UINT : \ 
     220        ((sizeof(x) == sizeof(unsigned long))  ? T_ULONG : \ 
     221        ((sizeof(x) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1))))) 
     222#endif 
     223#if !defined(T_LONGLONG) 
     224#define __Pyx_T_SIGNED_INT(x) \ 
     225        ((sizeof(x) == sizeof(char))  ? T_BYTE : \ 
     226        ((sizeof(x) == sizeof(short)) ? T_SHORT : \ 
     227        ((sizeof(x) == sizeof(int))   ? T_INT : \ 
     228        ((sizeof(x) == sizeof(long))  ? T_LONG : -1)))) 
     229#else 
     230#define __Pyx_T_SIGNED_INT(x) \ 
     231        ((sizeof(x) == sizeof(char))  ? T_BYTE : \ 
     232        ((sizeof(x) == sizeof(short)) ? T_SHORT : \ 
     233        ((sizeof(x) == sizeof(int))   ? T_INT : \ 
     234        ((sizeof(x) == sizeof(long))  ? T_LONG : \ 
     235        ((sizeof(x) == sizeof(PY_LONG_LONG))   ? T_LONGLONG : -1))))) 
     236#endif 
     237 
     238#define __Pyx_T_FLOATING(x) \ 
     239        ((sizeof(x) == sizeof(float)) ? T_FLOAT : \ 
     240        ((sizeof(x) == sizeof(double)) ? T_DOUBLE : -1)) 
     241 
     242#if !defined(T_SIZET) 
     243#if !defined(T_ULONGLONG) 
     244#define T_SIZET \ 
     245        ((sizeof(size_t) == sizeof(unsigned int))  ? T_UINT  : \ 
     246        ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1)) 
     247#else 
     248#define T_SIZET \ 
     249        ((sizeof(size_t) == sizeof(unsigned int))          ? T_UINT      : \ 
     250        ((sizeof(size_t) == sizeof(unsigned long))         ? T_ULONG     : \ 
     251        ((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1))) 
     252#endif 
     253#endif 
     254 
     255static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); 
     256static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); 
     257static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); 
     258 
    147259#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) 
    148260 
    149 static INLINE unsigned char __pyx_PyInt_unsigned_char(PyObject* x); 
    150 static INLINE unsigned short __pyx_PyInt_unsigned_short(PyObject* x); 
    151 static INLINE char __pyx_PyInt_char(PyObject* x); 
    152 static INLINE short __pyx_PyInt_short(PyObject* x); 
    153 static INLINE int __pyx_PyInt_int(PyObject* x); 
    154 static INLINE long __pyx_PyInt_long(PyObject* x); 
    155 static INLINE signed char __pyx_PyInt_signed_char(PyObject* x); 
    156 static INLINE signed short __pyx_PyInt_signed_short(PyObject* x); 
    157 static INLINE signed int __pyx_PyInt_signed_int(PyObject* x); 
    158 static INLINE signed long __pyx_PyInt_signed_long(PyObject* x); 
    159 static INLINE long double __pyx_PyInt_long_double(PyObject* x); 
     261 
    160262#ifdef __GNUC__ 
    161263/* Test for GCC > 2.95 */ 
     
    175277static PyObject *__pyx_b; 
    176278static PyObject *__pyx_empty_tuple; 
     279static PyObject *__pyx_empty_bytes; 
    177280static int __pyx_lineno; 
    178281static int __pyx_clineno = 0; 
     
    181284static const char **__pyx_f; 
    182285 
    183 static void __Pyx_RaiseDoubleKeywordsError( 
    184     const char* func_name, PyObject* kw_name); /*proto*/ 
    185  
    186 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, 
    187     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/ 
    188  
    189 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/ 
    190 static INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); 
    191 static INLINE void __Pyx_ZeroBuffer(Py_buffer* buf); /*proto*/ 
    192 static INLINE const char* __Pyx_ConsumeWhitespace(const char* ts); /*proto*/ 
    193 static void __Pyx_BufferNdimError(Py_buffer* buffer, int expected_ndim); /*proto*/ 
    194 static const char* __Pyx_DescribeTokenInFormatString(const char* ts); /*proto*/ 
    195 static const char* __Pyx_CheckTypestring_double(const char* ts); /*proto*/ 
    196  
    197 static int __Pyx_GetBuffer_double(PyObject* obj, Py_buffer* buf, int flags, int nd, int cast); /*proto*/ 
    198  
    199 static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ 
    200 static const char* __Pyx_CheckTypestring_nn___pyx_t_5numpy_int32_t(const char* ts); /*proto*/ 
    201  
    202 static int __Pyx_GetBuffer_nn___pyx_t_5numpy_int32_t(PyObject* obj, Py_buffer* buf, int flags, int nd, int cast); /*proto*/ 
    203  
    204 static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ 
    205 static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ 
    206  
    207 static INLINE PyObject *__Pyx_GetItemInt(PyObject *o, Py_ssize_t i, int is_unsigned) { 
    208     PyObject *r; 
    209     if (PyList_CheckExact(o) && 0 <= i && i < PyList_GET_SIZE(o)) { 
    210         r = PyList_GET_ITEM(o, i); 
    211         Py_INCREF(r); 
    212     } 
    213     else if (PyTuple_CheckExact(o) && 0 <= i && i < PyTuple_GET_SIZE(o)) { 
    214         r = PyTuple_GET_ITEM(o, i); 
    215         Py_INCREF(r); 
    216     } 
    217     else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0) || !is_unsigned)) 
    218         r = PySequence_GetItem(o, i); 
    219     else { 
    220         PyObject *j = (likely(i >= 0) || !is_unsigned) ? PyInt_FromLong(i) : PyLong_FromUnsignedLongLong((sizeof(unsigned long long) > sizeof(Py_ssize_t) ? (1ULL << (sizeof(Py_ssize_t)*8)) : 0) + i); 
    221         if (!j) 
    222             return 0; 
    223         r = PyObject_GetItem(o, j); 
    224         Py_DECREF(j); 
    225     } 
    226     return r; 
    227 } 
    228 static const char* __Pyx_CheckTypestring_int(const char* ts); /*proto*/ 
    229  
    230 static int __Pyx_GetBuffer_int(PyObject* obj, Py_buffer* buf, int flags, int nd, int cast); /*proto*/ 
    231 static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ 
    232 #define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1) 
    233 #if PY_MAJOR_VERSION < 3 
    234 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); 
    235 static void __Pyx_ReleaseBuffer(Py_buffer *view); 
     286 
     287#if !defined(CYTHON_CCOMPLEX) 
     288  #if defined(__cplusplus) 
     289    #define CYTHON_CCOMPLEX 1 
     290  #elif defined(_Complex_I) 
     291    #define CYTHON_CCOMPLEX 1 
     292  #else 
     293    #define CYTHON_CCOMPLEX 0 
     294  #endif 
     295#endif 
     296 
     297#if CYTHON_CCOMPLEX 
     298  #ifdef __cplusplus 
     299    #include <complex> 
     300  #else 
     301    #include <complex.h> 
     302  #endif 
     303#endif 
     304 
     305#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) 
     306  #undef _Complex_I 
     307  #define _Complex_I 1.0fj 
     308#endif 
     309 
     310typedef npy_int8 __pyx_t_5numpy_int8_t; 
     311 
     312typedef npy_int16 __pyx_t_5numpy_int16_t; 
     313 
     314typedef npy_int32 __pyx_t_5numpy_int32_t; 
     315 
     316typedef npy_int64 __pyx_t_5numpy_int64_t; 
     317 
     318typedef npy_uint8 __pyx_t_5numpy_uint8_t; 
     319 
     320typedef npy_uint16 __pyx_t_5numpy_uint16_t; 
     321 
     322typedef npy_uint32 __pyx_t_5numpy_uint32_t; 
     323 
     324typedef npy_uint64 __pyx_t_5numpy_uint64_t; 
     325 
     326typedef npy_float32 __pyx_t_5numpy_float32_t; 
     327 
     328typedef npy_float64 __pyx_t_5numpy_float64_t; 
     329 
     330typedef npy_long __pyx_t_5numpy_int_t; 
     331 
     332typedef npy_longlong __pyx_t_5numpy_long_t; 
     333 
     334typedef npy_intp __pyx_t_5numpy_intp_t; 
     335 
     336typedef npy_uintp __pyx_t_5numpy_uintp_t; 
     337 
     338typedef npy_ulong __pyx_t_5numpy_uint_t; 
     339 
     340typedef npy_ulonglong __pyx_t_5numpy_ulong_t; 
     341 
     342typedef npy_double __pyx_t_5numpy_float_t; 
     343 
     344typedef npy_double __pyx_t_5numpy_double_t; 
     345 
     346typedef npy_longdouble __pyx_t_5numpy_longdouble_t; 
     347 
     348#if CYTHON_CCOMPLEX 
     349  #ifdef __cplusplus 
     350    typedef ::std::complex< float > __pyx_t_float_complex; 
     351  #else 
     352    typedef float _Complex __pyx_t_float_complex; 
     353  #endif 
    236354#else 
    237 #define __Pyx_GetBuffer PyObject_GetBuffer 
    238 #define __Pyx_ReleaseBuffer PyBuffer_Release 
     355    typedef struct { float real, imag; } __pyx_t_float_complex; 
    239356#endif 
    240357 
    241 Py_ssize_t __Pyx_zeros[] = {0, 0}; 
    242 Py_ssize_t __Pyx_minusones[] = {-1, -1}; 
    243  
    244 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ 
    245  
    246 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ 
    247  
    248 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ 
    249  
    250 static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/ 
    251 static int __Pyx_EndUnpack(PyObject *); /*proto*/ 
    252  
    253 static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ 
    254  
    255 static INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ 
    256 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ 
    257  
    258 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ 
    259  
    260 static void __Pyx_WriteUnraisable(const char *name); /*proto*/ 
    261  
    262 static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ 
    263  
    264 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size);  /*proto*/ 
    265  
    266 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ 
    267  
    268 static void __Pyx_AddTraceback(const char *funcname); /*proto*/ 
    269  
    270 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ 
     358#if CYTHON_CCOMPLEX 
     359  #ifdef __cplusplus 
     360    typedef ::std::complex< double > __pyx_t_double_complex; 
     361  #else 
     362    typedef double _Complex __pyx_t_double_complex; 
     363  #endif 
     364#else 
     365    typedef struct { double real, imag; } __pyx_t_double_complex; 
     366#endif 
    271367 
    272368/* Type declarations */ 
    273369 
    274 typedef npy_int8 __pyx_t_5numpy_int8_t; 
    275  
    276 typedef npy_int16 __pyx_t_5numpy_int16_t; 
    277  
    278 typedef npy_int32 __pyx_t_5numpy_int32_t; 
    279  
    280 typedef npy_int64 __pyx_t_5numpy_int64_t; 
    281  
    282 typedef npy_uint8 __pyx_t_5numpy_uint8_t; 
    283  
    284 typedef npy_uint16 __pyx_t_5numpy_uint16_t; 
    285  
    286 typedef npy_uint32 __pyx_t_5numpy_uint32_t; 
    287  
    288 typedef npy_uint64 __pyx_t_5numpy_uint64_t; 
    289  
    290 typedef npy_float32 __pyx_t_5numpy_float32_t; 
    291  
    292 typedef npy_float64 __pyx_t_5numpy_float64_t; 
    293  
    294 typedef npy_long __pyx_t_5numpy_int_t; 
    295  
    296 typedef npy_longlong __pyx_t_5numpy_long_t; 
    297  
    298 typedef npy_ulong __pyx_t_5numpy_uint_t; 
    299  
    300 typedef npy_ulonglong __pyx_t_5numpy_ulong_t; 
    301  
    302 typedef npy_double __pyx_t_5numpy_float_t; 
    303  
    304 typedef npy_double __pyx_t_5numpy_double_t; 
    305  
    306 typedef npy_longdouble __pyx_t_5numpy_longdouble_t; 
    307  
    308370typedef npy_cfloat __pyx_t_5numpy_cfloat_t; 
    309371 
     
    312374typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; 
    313375 
    314 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":15 
     376typedef npy_cdouble __pyx_t_5numpy_complex_t; 
     377 
     378/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":15 
    315379 *  
    316380 * # priority queue 
     
    325389}; 
    326390 
    327 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":19 
     391/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":19 
    328392 *     char* ptrdata 
    329393 *  
     
    338402}; 
    339403 
    340 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":23 
     404/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":23 
    341405 *     heapcontents contents 
    342406 *  
     
    352416}; 
    353417 
    354 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":139 
     418/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":139 
    355419 *  
    356420 * # Tree structure 
     
    368432}; 
    369433 
    370 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":145 
     434/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":145 
    371435 *     innernode* less 
    372436 *     innernode* greater 
     
    383447}; 
    384448 
    385 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":153 
     449/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":153 
    386450 * # this is the standard trick for variable-size arrays: 
    387451 * # malloc sizeof(nodeinfo)+self.m*sizeof(double) bytes. 
     
    396460}; 
    397461 
    398 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":157 
     462/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":157 
    399463 *     double side_distances[0] 
    400464 *  
     
    428492}; 
    429493static struct __pyx_vtabstruct_5scipy_7spatial_7ckdtree_cKDTree *__pyx_vtabptr_5scipy_7spatial_7ckdtree_cKDTree; 
     494 
     495#ifndef CYTHON_REFNANNY 
     496  #define CYTHON_REFNANNY 0 
     497#endif 
     498 
     499#if CYTHON_REFNANNY 
     500  typedef struct { 
     501    void (*INCREF)(void*, PyObject*, int); 
     502    void (*DECREF)(void*, PyObject*, int); 
     503    void (*GOTREF)(void*, PyObject*, int); 
     504    void (*GIVEREF)(void*, PyObject*, int); 
     505    void* (*SetupContext)(const char*, int, const char*); 
     506    void (*FinishContext)(void**); 
     507  } __Pyx_RefNannyAPIStruct; 
     508  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; 
     509  static __Pyx_RefNannyAPIStruct * __Pyx_RefNannyImportAPI(const char *modname) { 
     510    PyObject *m = NULL, *p = NULL; 
     511    void *r = NULL; 
     512    m = PyImport_ImportModule((char *)modname); 
     513    if (!m) goto end; 
     514    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); 
     515    if (!p) goto end; 
     516    r = PyLong_AsVoidPtr(p); 
     517  end: 
     518    Py_XDECREF(p); 
     519    Py_XDECREF(m); 
     520    return (__Pyx_RefNannyAPIStruct *)r; 
     521  } 
     522  #define __Pyx_RefNannySetupContext(name)           void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) 
     523  #define __Pyx_RefNannyFinishContext()           __Pyx_RefNanny->FinishContext(&__pyx_refnanny) 
     524  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) 
     525  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) 
     526  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) 
     527  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) 
     528  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0) 
     529#else 
     530  #define __Pyx_RefNannySetupContext(name) 
     531  #define __Pyx_RefNannyFinishContext() 
     532  #define __Pyx_INCREF(r) Py_INCREF(r) 
     533  #define __Pyx_DECREF(r) Py_DECREF(r) 
     534  #define __Pyx_GOTREF(r) 
     535  #define __Pyx_GIVEREF(r) 
     536  #define __Pyx_XDECREF(r) Py_XDECREF(r) 
     537#endif /* CYTHON_REFNANNY */ 
     538#define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0) 
     539#define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0) 
     540 
     541static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */ 
     542 
     543static void __Pyx_RaiseDoubleKeywordsError( 
     544    const char* func_name, PyObject* kw_name); /*proto*/ 
     545 
     546static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, 
     547    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/ 
     548 
     549static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/ 
     550 
     551static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); 
     552 
     553static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void); 
     554 
     555static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/ 
     556static int __Pyx_EndUnpack(PyObject *); /*proto*/ 
     557 
     558static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ 
     559 
     560/* Run-time type information about structs used with buffers */ 
     561struct __Pyx_StructField_; 
     562 
     563typedef struct { 
     564  const char* name; /* for error messages only */ 
     565  struct __Pyx_StructField_* fields; 
     566  size_t size;     /* sizeof(type) */ 
     567  char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject */ 
     568} __Pyx_TypeInfo; 
     569 
     570typedef struct __Pyx_StructField_ { 
     571  __Pyx_TypeInfo* type; 
     572  const char* name; 
     573  size_t offset; 
     574} __Pyx_StructField; 
     575 
     576typedef struct { 
     577  __Pyx_StructField* field; 
     578  size_t parent_offset; 
     579} __Pyx_BufFmt_StackElem; 
     580 
     581 
     582static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); 
     583static int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); 
     584 
     585static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ 
     586 
     587static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ 
     588static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ 
     589 
     590 
     591static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { 
     592    PyObject *r; 
     593    if (!j) return NULL; 
     594    r = PyObject_GetItem(o, j); 
     595    Py_DECREF(j); 
     596    return r; 
     597} 
     598 
     599 
     600#define __Pyx_GetItemInt_List(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \ 
     601                                                    __Pyx_GetItemInt_List_Fast(o, i, size <= sizeof(long)) : \ 
     602                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i))) 
     603 
     604static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int fits_long) { 
     605    if (likely(o != Py_None)) { 
     606        if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { 
     607            PyObject *r = PyList_GET_ITEM(o, i); 
     608            Py_INCREF(r); 
     609            return r; 
     610        } 
     611        else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) { 
     612            PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i); 
     613            Py_INCREF(r); 
     614            return r; 
     615        } 
     616    } 
     617    return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i)); 
     618} 
     619 
     620#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \ 
     621                                                    __Pyx_GetItemInt_Tuple_Fast(o, i, size <= sizeof(long)) : \ 
     622                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i))) 
     623 
     624static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int fits_long) { 
     625    if (likely(o != Py_None)) { 
     626        if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { 
     627            PyObject *r = PyTuple_GET_ITEM(o, i); 
     628            Py_INCREF(r); 
     629            return r; 
     630        } 
     631        else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) { 
     632            PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i); 
     633            Py_INCREF(r); 
     634            return r; 
     635        } 
     636    } 
     637    return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i)); 
     638} 
     639 
     640 
     641#define __Pyx_GetItemInt(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \ 
     642                                                    __Pyx_GetItemInt_Fast(o, i, size <= sizeof(long)) : \ 
     643                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i))) 
     644 
     645static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) { 
     646    PyObject *r; 
     647    if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) { 
     648        r = PyList_GET_ITEM(o, i); 
     649        Py_INCREF(r); 
     650    } 
     651    else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { 
     652        r = PyTuple_GET_ITEM(o, i); 
     653        Py_INCREF(r); 
     654    } 
     655    else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) { 
     656        r = PySequence_GetItem(o, i); 
     657    } 
     658    else { 
     659        r = __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i)); 
     660    } 
     661    return r; 
     662} 
     663static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ 
     664#define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1) 
     665 
     666static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); 
     667 
     668static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/ 
     669#if PY_MAJOR_VERSION < 3 
     670static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); 
     671static void __Pyx_ReleaseBuffer(Py_buffer *view); 
     672#else 
     673#define __Pyx_GetBuffer PyObject_GetBuffer 
     674#define __Pyx_ReleaseBuffer PyBuffer_Release 
     675#endif 
     676 
     677Py_ssize_t __Pyx_zeros[] = {0, 0}; 
     678Py_ssize_t __Pyx_minusones[] = {-1, -1}; 
     679 
     680static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ 
     681 
     682static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ 
     683 
     684static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ 
     685 
     686#if CYTHON_CCOMPLEX 
     687  #ifdef __cplusplus 
     688    #define __Pyx_CREAL(z) ((z).real()) 
     689    #define __Pyx_CIMAG(z) ((z).imag()) 
     690  #else 
     691    #define __Pyx_CREAL(z) (__real__(z)) 
     692    #define __Pyx_CIMAG(z) (__imag__(z)) 
     693  #endif 
     694#else 
     695    #define __Pyx_CREAL(z) ((z).real) 
     696    #define __Pyx_CIMAG(z) ((z).imag) 
     697#endif 
     698 
     699#if defined(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX 
     700    #define __Pyx_SET_CREAL(z,x) ((z).real(x)) 
     701    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) 
     702#else 
     703    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) 
     704    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) 
     705#endif 
     706 
     707static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); 
     708 
     709#if CYTHON_CCOMPLEX 
     710    #define __Pyx_c_eqf(a, b)   ((a)==(b)) 
     711    #define __Pyx_c_sumf(a, b)  ((a)+(b)) 
     712    #define __Pyx_c_difff(a, b) ((a)-(b)) 
     713    #define __Pyx_c_prodf(a, b) ((a)*(b)) 
     714    #define __Pyx_c_quotf(a, b) ((a)/(b)) 
     715    #define __Pyx_c_negf(a)     (-(a)) 
     716  #ifdef __cplusplus 
     717    #define __Pyx_c_is_zerof(z) ((z)==(float)0) 
     718    #define __Pyx_c_conjf(z)    (::std::conj(z)) 
     719    /*#define __Pyx_c_absf(z)     (::std::abs(z))*/ 
     720  #else 
     721    #define __Pyx_c_is_zerof(z) ((z)==0) 
     722    #define __Pyx_c_conjf(z)    (conjf(z)) 
     723    /*#define __Pyx_c_absf(z)     (cabsf(z))*/ 
     724 #endif 
     725#else 
     726    static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex); 
     727    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex); 
     728    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex); 
     729    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex); 
     730    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex); 
     731    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex); 
     732    static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex); 
     733    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex); 
     734    /*static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex);*/ 
     735#endif 
     736 
     737static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); 
     738 
     739#if CYTHON_CCOMPLEX 
     740    #define __Pyx_c_eq(a, b)   ((a)==(b)) 
     741    #define __Pyx_c_sum(a, b)  ((a)+(b)) 
     742    #define __Pyx_c_diff(a, b) ((a)-(b)) 
     743    #define __Pyx_c_prod(a, b) ((a)*(b)) 
     744    #define __Pyx_c_quot(a, b) ((a)/(b)) 
     745    #define __Pyx_c_neg(a)     (-(a)) 
     746  #ifdef __cplusplus 
     747    #define __Pyx_c_is_zero(z) ((z)==(double)0) 
     748    #define __Pyx_c_conj(z)    (::std::conj(z)) 
     749    /*#define __Pyx_c_abs(z)     (::std::abs(z))*/ 
     750  #else 
     751    #define __Pyx_c_is_zero(z) ((z)==0) 
     752    #define __Pyx_c_conj(z)    (conj(z)) 
     753    /*#define __Pyx_c_abs(z)     (cabs(z))*/ 
     754 #endif 
     755#else 
     756    static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex); 
     757    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex); 
     758    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex); 
     759    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex); 
     760    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex); 
     761    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex); 
     762    static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex); 
     763    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex); 
     764    /*static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex);*/ 
     765#endif 
     766 
     767static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); 
     768 
     769static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); 
     770 
     771static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); 
     772 
     773static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); 
     774 
     775static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); 
     776 
     777static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); 
     778 
     779static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); 
     780 
     781static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); 
     782 
     783static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); 
     784 
     785static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); 
     786 
     787static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); 
     788 
     789static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); 
     790 
     791static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); 
     792 
     793static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); 
     794 
     795static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); 
     796 
     797static void __Pyx_WriteUnraisable(const char *name); /*proto*/ 
     798 
     799static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ 
     800 
     801static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict);  /*proto*/ 
     802 
     803static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ 
     804 
     805static void __Pyx_AddTraceback(const char *funcname); /*proto*/ 
     806 
     807static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ 
    430808/* Module declarations from python_buffer */ 
    431809 
     810/* Module declarations from python_ref */ 
     811 
    432812/* Module declarations from stdlib */ 
    433813 
     814/* Module declarations from stdio */ 
     815 
    434816/* Module declarations from numpy */ 
    435817 
     
    437819 
    438820static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; 
     821static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; 
     822static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; 
    439823static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; 
     824static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; 
     825static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *); /*proto*/ 
     826static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *, PyObject *); /*proto*/ 
     827static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *, PyObject *, PyObject *); /*proto*/ 
     828static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ 
     829static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ 
     830static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ 
     831static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *, PyObject *); /*proto*/ 
     832static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *); /*proto*/ 
    440833/* Module declarations from scipy.spatial.ckdtree */ 
    441834 
    442835static PyTypeObject *__pyx_ptype_5scipy_7spatial_7ckdtree_cKDTree = 0; 
    443836static double __pyx_v_5scipy_7spatial_7ckdtree_infinity; 
    444 static double __pyx_k_24; 
    445 static PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapcreate(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *, int); /*proto*/ 
    446 static PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapdestroy(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *); /*proto*/ 
    447 static PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapresize(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *, int); /*proto*/ 
    448 static PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heappush(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *, struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem); /*proto*/ 
     837static CYTHON_INLINE PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapcreate(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *, int); /*proto*/ 
     838static CYTHON_INLINE PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapdestroy(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *); /*proto*/ 
     839static CYTHON_INLINE PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapresize(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *, int); /*proto*/ 
     840static CYTHON_INLINE PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heappush(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *, struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem); /*proto*/ 
    449841static struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem __pyx_f_5scipy_7spatial_7ckdtree_heappeek(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *); /*proto*/ 
    450842static PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapremove(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *); /*proto*/ 
    451843static struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem __pyx_f_5scipy_7spatial_7ckdtree_heappop(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *); /*proto*/ 
    452 static double __pyx_f_5scipy_7spatial_7ckdtree_dmax(double, double); /*proto*/ 
    453 static double __pyx_f_5scipy_7spatial_7ckdtree_dabs(double); /*proto*/ 
    454 static double __pyx_f_5scipy_7spatial_7ckdtree__distance_p(double *, double *, double, int, double); /*proto*/ 
    455  
     844static CYTHON_INLINE double __pyx_f_5scipy_7spatial_7ckdtree_dmax(double, double); /*proto*/ 
     845static CYTHON_INLINE double __pyx_f_5scipy_7spatial_7ckdtree_dabs(double); /*proto*/ 
     846static CYTHON_INLINE double __pyx_f_5scipy_7spatial_7ckdtree__distance_p(double *, double *, double, int, double); /*proto*/ 
     847static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), 'R' }; 
     848static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "numpy.int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), 'I' }; 
     849static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), 'I' }; 
     850#define __Pyx_MODULE_NAME "scipy.spatial.ckdtree" 
     851int __pyx_module_is_main_scipy__spatial__ckdtree = 0; 
    456852 
    457853/* Implementation of scipy.spatial.ckdtree */ 
     854static PyObject *__pyx_builtin_ValueError; 
     855static PyObject *__pyx_builtin_range; 
     856static PyObject *__pyx_builtin_RuntimeError; 
     857static char __pyx_k_1[] = "Heap containing %d items cannot be resized to %d"; 
     858static char __pyx_k_2[] = "leafsize must be at least 1"; 
     859static char __pyx_k_3[] = "distance_upper_bound"; 
     860static char __pyx_k_5[] = "x must consist of vectors of length %d but has shape %s"; 
     861static char __pyx_k_6[] = "Only p-norms with 1<=p<=infinity permitted"; 
     862static char __pyx_k_7[] = "ndarray is not C contiguous"; 
     863static char __pyx_k_8[] = "ndarray is not Fortran contiguous"; 
     864static char __pyx_k_9[] = "Non-native byte order not supported"; 
     865static char __pyx_k_10[] = "unknown dtype code in numpy.pxd (%d)"; 
     866static char __pyx_k_11[] = "Format string allocated too short, see comment in numpy.pxd"; 
     867static char __pyx_k_12[] = "Format string allocated too short."; 
     868static char __pyx_k_13[] = "cKDTree.__init__ (line 195)"; 
     869static char __pyx_k_14[] = "cKDTree.query (line 516)"; 
     870static char __pyx_k__B[] = "B"; 
     871static char __pyx_k__H[] = "H"; 
     872static char __pyx_k__I[] = "I"; 
     873static char __pyx_k__L[] = "L"; 
     874static char __pyx_k__O[] = "O"; 
     875static char __pyx_k__Q[] = "Q"; 
     876static char __pyx_k__b[] = "b"; 
     877static char __pyx_k__d[] = "d"; 
     878static char __pyx_k__f[] = "f"; 
     879static char __pyx_k__g[] = "g"; 
     880static char __pyx_k__h[] = "h"; 
     881static char __pyx_k__i[] = "i"; 
     882static char __pyx_k__k[] = "k"; 
     883static char __pyx_k__l[] = "l"; 
     884static char __pyx_k__m[] = "m"; 
     885static char __pyx_k__n[] = "n"; 
     886static char __pyx_k__p[] = "p"; 
     887static char __pyx_k__q[] = "q"; 
     888static char __pyx_k__x[] = "x"; 
     889static char __pyx_k__Zd[] = "Zd"; 
     890static char __pyx_k__Zf[] = "Zf"; 
     891static char __pyx_k__Zg[] = "Zg"; 
     892static char __pyx_k__np[] = "np"; 
     893static char __pyx_k__buf[] = "buf"; 
     894static char __pyx_k__eps[] = "eps"; 
     895static char __pyx_k__inf[] = "inf"; 
     896static char __pyx_k__obj[] = "obj"; 
     897static char __pyx_k__amax[] = "amax"; 
     898static char __pyx_k__amin[] = "amin"; 
     899static char __pyx_k__axis[] = "axis"; 
     900static char __pyx_k__base[] = "base"; 
     901static char __pyx_k__data[] = "data"; 
     902static char __pyx_k__fill[] = "fill"; 
     903static char __pyx_k__heap[] = "heap"; 
     904static char __pyx_k__less[] = "less"; 
     905static char __pyx_k__mins[] = "mins"; 
     906static char __pyx_k__ndim[] = "ndim"; 
     907static char __pyx_k__node[] = "node"; 
     908static char __pyx_k__prod[] = "prod"; 
     909static char __pyx_k__tree[] = "tree"; 
     910static char __pyx_k__descr[] = "descr"; 
     911static char __pyx_k__dtype[] = "dtype"; 
     912static char __pyx_k__empty[] = "empty"; 
     913static char __pyx_k__float[] = "float"; 
     914static char __pyx_k__int32[] = "int32"; 
     915static char __pyx_k__maxes[] = "maxes"; 
     916static char __pyx_k__names[] = "names"; 
     917static char __pyx_k__numpy[] = "numpy"; 
     918static char __pyx_k__query[] = "query"; 
     919static char __pyx_k__range[] = "range"; 
     920static char __pyx_k__shape[] = "shape"; 
     921static char __pyx_k__space[] = "space"; 
     922static char __pyx_k__split[] = "split"; 
     923static char __pyx_k__arange[] = "arange"; 
     924static char __pyx_k__astype[] = "astype"; 
     925static char __pyx_k__fields[] = "fields"; 
     926static char __pyx_k__format[] = "format"; 
     927static char __pyx_k__kdtree[] = "kdtree"; 
     928static char __pyx_k____build[] = "__build"; 
     929static char __pyx_k____query[] = "__query"; 
     930static char __pyx_k__asarray[] = "asarray"; 
     931static char __pyx_k__cKDTree[] = "cKDTree"; 
     932static char __pyx_k__end_idx[] = "end_idx"; 
     933static char __pyx_k__greater[] = "greater"; 
     934static char __pyx_k__indices[] = "indices"; 
     935static char __pyx_k__intdata[] = "intdata"; 
     936static char __pyx_k__newaxis[] = "newaxis"; 
     937static char __pyx_k__ptrdata[] = "ptrdata"; 
     938static char __pyx_k__reshape[] = "reshape"; 
     939static char __pyx_k__strides[] = "strides"; 
     940static char __pyx_k____init__[] = "__init__"; 
     941static char __pyx_k____main__[] = "__main__"; 
     942static char __pyx_k____test__[] = "__test__"; 
     943static char __pyx_k__contents[] = "contents"; 
     944static char __pyx_k__itemsize[] = "itemsize"; 
     945static char __pyx_k__leafsize[] = "leafsize"; 
     946static char __pyx_k__priority[] = "priority"; 
     947static char __pyx_k__raw_data[] = "raw_data"; 
     948static char __pyx_k__raw_mins[] = "raw_mins"; 
     949static char __pyx_k__readonly[] = "readonly"; 
     950static char __pyx_k__type_num[] = "type_num"; 
     951static char __pyx_k__byteorder[] = "byteorder"; 
     952static char __pyx_k__raw_maxes[] = "raw_maxes"; 
     953static char __pyx_k__split_dim[] = "split_dim"; 
     954static char __pyx_k__start_idx[] = "start_idx"; 
     955static char __pyx_k__ValueError[] = "ValueError"; 
     956static char __pyx_k__suboffsets[] = "suboffsets"; 
     957static char __pyx_k____free_tree[] = "__free_tree"; 
     958static char __pyx_k__raw_indices[] = "raw_indices"; 
     959static char __pyx_k__RuntimeError[] = "RuntimeError"; 
     960static char __pyx_k__side_distances[] = "side_distances"; 
     961static char __pyx_k__ascontiguousarray[] = "ascontiguousarray"; 
     962static PyObject *__pyx_kp_s_1; 
     963static PyObject *__pyx_kp_u_10; 
     964static PyObject *__pyx_kp_u_11; 
     965static PyObject *__pyx_kp_u_12; 
     966static PyObject *__pyx_kp_u_13; 
     967static PyObject *__pyx_kp_u_14; 
     968static PyObject *__pyx_kp_s_2; 
     969static PyObject *__pyx_n_s_3; 
     970static PyObject *__pyx_kp_s_5; 
     971static PyObject *__pyx_kp_s_6; 
     972static PyObject *__pyx_kp_u_7; 
     973static PyObject *__pyx_kp_u_8; 
     974static PyObject *__pyx_kp_u_9; 
     975static PyObject *__pyx_n_s__RuntimeError; 
     976static PyObject *__pyx_n_s__ValueError; 
     977static PyObject *__pyx_n_s____build; 
     978static PyObject *__pyx_n_s____free_tree; 
     979static PyObject *__pyx_n_s____init__; 
     980static PyObject *__pyx_n_s____main__; 
     981static PyObject *__pyx_n_s____query; 
     982static PyObject *__pyx_n_s____test__; 
     983static PyObject *__pyx_n_s__amax; 
     984static PyObject *__pyx_n_s__amin; 
     985static PyObject *__pyx_n_s__arange; 
     986static PyObject *__pyx_n_s__asarray; 
     987static PyObject *__pyx_n_s__ascontiguousarray; 
     988static PyObject *__pyx_n_s__astype; 
     989static PyObject *__pyx_n_s__axis; 
     990static PyObject *__pyx_n_s__base; 
     991static PyObject *__pyx_n_s__buf; 
     992static PyObject *__pyx_n_s__byteorder; 
     993static PyObject *__pyx_n_s__cKDTree; 
     994static PyObject *__pyx_n_s__contents; 
     995static PyObject *__pyx_n_s__data; 
     996static PyObject *__pyx_n_s__descr; 
     997static PyObject *__pyx_n_s__dtype; 
     998static PyObject *__pyx_n_s__empty; 
     999static PyObject *__pyx_n_s__end_idx; 
     1000static PyObject *__pyx_n_s__eps; 
     1001static PyObject *__pyx_n_s__fields; 
     1002static PyObject *__pyx_n_s__fill; 
     1003static PyObject *__pyx_n_s__float; 
     1004static PyObject *__pyx_n_s__format; 
     1005static PyObject *__pyx_n_s__greater; 
     1006static PyObject *__pyx_n_s__heap; 
     1007static PyObject *__pyx_n_s__i; 
     1008static PyObject *__pyx_n_s__indices; 
     1009static PyObject *__pyx_n_s__inf; 
     1010static PyObject *__pyx_n_s__int32; 
     1011static PyObject *__pyx_n_s__intdata; 
     1012static PyObject *__pyx_n_s__itemsize; 
     1013static PyObject *__pyx_n_s__k; 
     1014static PyObject *__pyx_n_s__kdtree; 
     1015static PyObject *__pyx_n_s__leafsize; 
     1016static PyObject *__pyx_n_s__less; 
     1017static PyObject *__pyx_n_s__m; 
     1018static PyObject *__pyx_n_s__maxes; 
     1019static PyObject *__pyx_n_s__mins; 
     1020static PyObject *__pyx_n_s__n; 
     1021static PyObject *__pyx_n_s__names; 
     1022static PyObject *__pyx_n_s__ndim; 
     1023static PyObject *__pyx_n_s__newaxis; 
     1024static PyObject *__pyx_n_s__node; 
     1025static PyObject *__pyx_n_s__np; 
     1026static PyObject *__pyx_n_s__numpy; 
     1027static PyObject *__pyx_n_s__obj; 
     1028static PyObject *__pyx_n_s__p; 
     1029static PyObject *__pyx_n_s__priority; 
     1030static PyObject *__pyx_n_s__prod; 
     1031static PyObject *__pyx_n_s__ptrdata; 
     1032static PyObject *__pyx_n_s__query; 
     1033static PyObject *__pyx_n_s__range; 
     1034static PyObject *__pyx_n_s__raw_data; 
     1035static PyObject *__pyx_n_s__raw_indices; 
     1036static PyObject *__pyx_n_s__raw_maxes; 
     1037static PyObject *__pyx_n_s__raw_mins; 
     1038static PyObject *__pyx_n_s__readonly; 
     1039static PyObject *__pyx_n_s__reshape; 
     1040static PyObject *__pyx_n_s__shape; 
     1041static PyObject *__pyx_n_s__side_distances; 
     1042static PyObject *__pyx_n_s__space; 
     1043static PyObject *__pyx_n_s__split; 
     1044static PyObject *__pyx_n_s__split_dim; 
     1045static PyObject *__pyx_n_s__start_idx; 
     1046static PyObject *__pyx_n_s__strides; 
     1047static PyObject *__pyx_n_s__suboffsets; 
     1048static PyObject *__pyx_n_s__tree; 
     1049static PyObject *__pyx_n_s__type_num; 
     1050static PyObject *__pyx_n_s__x; 
    4581051static PyObject *__pyx_int_0; 
    459 static char __pyx_k___init__[] = "__init__"; 
    460 static PyObject *__pyx_kp___init__; 
    461 static char __pyx_k___dealloc__[] = "__dealloc__"; 
    462 static PyObject *__pyx_kp___dealloc__; 
    463 static char __pyx_k_query[] = "query"; 
    464 static PyObject *__pyx_kp_query; 
    465 static char __pyx_k_data[] = "data"; 
    466 static PyObject *__pyx_kp_data; 
    467 static char __pyx_k_leafsize[] = "leafsize"; 
    468 static PyObject *__pyx_kp_leafsize; 
    469 static char __pyx_k_x[] = "x"; 
    470 static PyObject *__pyx_kp_x; 
    471 static char __pyx_k_k[] = "k"; 
    472 static PyObject *__pyx_kp_k; 
    473 static char __pyx_k_eps[] = "eps"; 
    474 static PyObject *__pyx_kp_eps; 
    475 static char __pyx_k_p[] = "p"; 
    476 static PyObject *__pyx_kp_p; 
    477 static char __pyx_k_23[] = "distance_upper_bound"; 
    478 static PyObject *__pyx_kp_23; 
    479 static char __pyx_k_numpy[] = "numpy"; 
    480 static PyObject *__pyx_kp_numpy; 
    481 static char __pyx_k_np[] = "np"; 
    482 static PyObject *__pyx_kp_np; 
    483 static char __pyx_k_kdtree[] = "kdtree"; 
    484 static PyObject *__pyx_kp_kdtree; 
    485 static char __pyx_k_inf[] = "inf"; 
    486 static PyObject *__pyx_kp_inf; 
    487 static char __pyx_k_ValueError[] = "ValueError"; 
    488 static PyObject *__pyx_kp_ValueError; 
    489 static char __pyx_k_ascontiguousarray[] = "ascontiguousarray"; 
    490 static PyObject *__pyx_kp_ascontiguousarray; 
    491 static char __pyx_k_dtype[] = "dtype"; 
    492 static PyObject *__pyx_kp_dtype; 
    493 static char __pyx_k_float[] = "float"; 
    494 static PyObject *__pyx_kp_float; 
    495 static char __pyx_k_shape[] = "shape"; 
    496 static PyObject *__pyx_kp_shape; 
    497 static char __pyx_k_amax[] = "amax"; 
    498 static PyObject *__pyx_kp_amax; 
    499 static char __pyx_k_axis[] = "axis"; 
    500 static PyObject *__pyx_kp_axis; 
    501 static char __pyx_k_amin[] = "amin"; 
    502 static PyObject *__pyx_kp_amin; 
    503 static char __pyx_k_arange[] = "arange"; 
    504 static PyObject *__pyx_kp_arange; 
    505 static char __pyx_k_27[] = "int32"; 
    506 static PyObject *__pyx_kp_27; 
    507 static char __pyx_k_asarray[] = "asarray"; 
    508 static PyObject *__pyx_kp_asarray; 
    509 static char __pyx_k_astype[] = "astype"; 
    510 static PyObject *__pyx_kp_astype; 
    511 static char __pyx_k_newaxis[] = "newaxis"; 
    512 static PyObject *__pyx_kp_newaxis; 
    513 static char __pyx_k_prod[] = "prod"; 
    514 static PyObject *__pyx_kp_prod; 
    515 static char __pyx_k_reshape[] = "reshape"; 
    516 static PyObject *__pyx_kp_reshape; 
    517 static char __pyx_k_empty[] = "empty"; 
    518 static PyObject *__pyx_kp_empty; 
    519 static char __pyx_k_fill[] = "fill"; 
    520 static PyObject *__pyx_kp_fill; 
    521 static char __pyx_k_30[] = "i"; 
    522 static PyObject *__pyx_kp_30; 
    523 static PyObject *__pyx_builtin_ValueError; 
    524 static PyObject *__pyx_kp_25; 
    525 static char __pyx_k_25[] = "Heap containing %d items cannot be resized to %d"; 
    526 static PyObject *__pyx_kp_26; 
    527 static char __pyx_k_26[] = "leafsize must be at least 1"; 
    528 static PyObject *__pyx_kp_28; 
    529 static PyObject *__pyx_kp_29; 
    530 static char __pyx_k_28[] = "x must consist of vectors of length %d but has shape %s"; 
    531 static char __pyx_k_29[] = "Only p-norms with 1<=p<=infinity permitted"; 
    532 static char __pyx_k___getbuffer__[] = "__getbuffer__"; 
    533 static PyObject *__pyx_kp___getbuffer__; 
    534 static char __pyx_k___releasebuffer__[] = "__releasebuffer__"; 
    535 static PyObject *__pyx_kp___releasebuffer__; 
    536 static char __pyx_k_info[] = "info"; 
    537 static PyObject *__pyx_kp_info; 
    538 static char __pyx_k_flags[] = "flags"; 
    539 static PyObject *__pyx_kp_flags; 
    540 static char __pyx_k_iteritems[] = "iteritems"; 
    541 static PyObject *__pyx_kp_iteritems; 
    542 static char __pyx_k_next[] = "next"; 
    543 static PyObject *__pyx_kp_next; 
    544 static char __pyx_k_StopIteration[] = "StopIteration"; 
    545 static PyObject *__pyx_kp_StopIteration; 
    546 static char __pyx_k_pop[] = "pop"; 
    547 static PyObject *__pyx_kp_pop; 
    548 static char __pyx_k_RuntimeError[] = "RuntimeError"; 
    549 static PyObject *__pyx_kp_RuntimeError; 
    550 static PyObject *__pyx_kp_1; 
    551 static PyObject *__pyx_kp_2; 
    552 static PyObject *__pyx_kp_20; 
    553 static PyObject *__pyx_kp_21; 
    554 static PyObject *__pyx_kp_22; 
    555 static PyObject *__pyx_builtin_StopIteration; 
    556 static PyObject *__pyx_builtin_RuntimeError; 
    557 static char __pyx_k_1[] = "ndarray is not C contiguous"; 
    558 static char __pyx_k_2[] = "ndarray is not Fortran contiguous"; 
    559 static char __pyx_k_3[] = "b"; 
    560 static char __pyx_k_4[] = "B"; 
    561 static char __pyx_k_5[] = "h"; 
    562 static char __pyx_k_6[] = "H"; 
    563 static char __pyx_k_7[] = "i"; 
    564 static char __pyx_k_8[] = "I"; 
    565 static char __pyx_k_9[] = "l"; 
    566 static char __pyx_k_10[] = "L"; 
    567 static char __pyx_k_11[] = "q"; 
    568 static char __pyx_k_12[] = "Q"; 
    569 static char __pyx_k_13[] = "f"; 
    570 static char __pyx_k_14[] = "d"; 
    571 static char __pyx_k_15[] = "g"; 
    572 static char __pyx_k_16[] = "Zf"; 
    573 static char __pyx_k_17[] = "Zd"; 
    574 static char __pyx_k_18[] = "Zg"; 
    575 static char __pyx_k_19[] = "O"; 
    576 static char __pyx_k_20[] = "unknown dtype code in numpy.pxd (%d)"; 
    577 static char __pyx_k_21[] = "Format string allocated too short."; 
    578 static char __pyx_k_22[] = "unknown dtype code in numpy.pxd (%d)"; 
    579  
    580 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":28 
     1052static PyObject *__pyx_int_neg_1; 
     1053static PyObject *__pyx_int_15; 
     1054static double __pyx_k_4; 
     1055 
     1056/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":28 
    5811057 *     int space 
    5821058 *  
     
    5861062 */ 
    5871063 
    588 static INLINE PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapcreate(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *__pyx_v_self, int __pyx_v_initial_size) { 
    589   PyObject *__pyx_r; 
    590  
    591   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":29 
     1064static CYTHON_INLINE PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapcreate(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *__pyx_v_self, int __pyx_v_initial_size) { 
     1065  PyObject *__pyx_r = NULL; 
     1066  __Pyx_RefNannySetupContext("heapcreate"); 
     1067 
     1068  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":29 
    5921069 *  
    5931070 * cdef inline heapcreate(heap* self,int initial_size): 
     
    5981075  __pyx_v_self->space = __pyx_v_initial_size; 
    5991076 
    600   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":30 
     1077  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":30 
    6011078 * cdef inline heapcreate(heap* self,int initial_size): 
    6021079 *     self.space = initial_size 
     
    6071084  __pyx_v_self->heap = ((struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem *)malloc(((sizeof(struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem)) * __pyx_v_self->space))); 
    6081085 
    609   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":31 
     1086  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":31 
    6101087 *     self.space = initial_size 
    6111088 *     self.heap = <heapitem*>stdlib.malloc(sizeof(heapitem)*self.space) 
     
    6161093  __pyx_v_self->n = 0; 
    6171094 
    618   __pyx_r = Py_None; Py_INCREF(Py_None); 
     1095  __pyx_r = Py_None; __Pyx_INCREF(Py_None); 
     1096  __Pyx_XGIVEREF(__pyx_r); 
     1097  __Pyx_RefNannyFinishContext(); 
    6191098  return __pyx_r; 
    6201099} 
    6211100 
    622 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":33 
     1101/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":33 
    6231102 *     self.n=0 
    6241103 *  
     
    6281107 */ 
    6291108 
    630 static INLINE PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapdestroy(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *__pyx_v_self) { 
    631   PyObject *__pyx_r; 
    632  
    633   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":34 
     1109static CYTHON_INLINE PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapdestroy(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *__pyx_v_self) { 
     1110  PyObject *__pyx_r = NULL; 
     1111  __Pyx_RefNannySetupContext("heapdestroy"); 
     1112 
     1113  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":34 
    6341114 *  
    6351115 * cdef inline heapdestroy(heap* self): 
     
    6401120  free(__pyx_v_self->heap); 
    6411121 
    642   __pyx_r = Py_None; Py_INCREF(Py_None); 
     1122  __pyx_r = Py_None; __Pyx_INCREF(Py_None); 
     1123  __Pyx_XGIVEREF(__pyx_r); 
     1124  __Pyx_RefNannyFinishContext(); 
    6431125  return __pyx_r; 
    6441126} 
    6451127 
    646 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":36 
     1128/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":36 
    6471129 *     stdlib.free(self.heap) 
    6481130 *  
     
    6521134 */ 
    6531135 
    654 static INLINE PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapresize(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *__pyx_v_self, int __pyx_v_new_space) { 
    655   PyObject *__pyx_r; 
    656   int __pyx_1; 
    657   PyObject *__pyx_2 = 0; 
    658   PyObject *__pyx_3 = 0; 
    659   PyObject *__pyx_4 = 0; 
    660   PyObject *__pyx_t_1 = NULL; 
    661  
    662   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":37 
     1136static CYTHON_INLINE PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapresize(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *__pyx_v_self, int __pyx_v_new_space) { 
     1137  PyObject *__pyx_r = NULL; 
     1138  int __pyx_t_1; 
     1139  PyObject *__pyx_t_2 = NULL; 
     1140  PyObject *__pyx_t_3 = NULL; 
     1141  PyObject *__pyx_t_4 = NULL; 
     1142  __Pyx_RefNannySetupContext("heapresize"); 
     1143 
     1144  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":37 
    6631145 *  
    6641146 * cdef inline heapresize(heap* self, int new_space): 
     
    6671149 *     self.space = new_space 
    6681150 */ 
    669   __pyx_1 = (__pyx_v_new_space < __pyx_v_self->n); 
    670   if (__pyx_1) { 
    671  
    672     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":38 
     1151  __pyx_t_1 = (__pyx_v_new_space < __pyx_v_self->n); 
     1152  if (__pyx_t_1) { 
     1153 
     1154    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":38 
    6731155 * cdef inline heapresize(heap* self, int new_space): 
    6741156 *     if new_space<self.n: 
     
    6771159 *     self.heap = <heapitem*>stdlib.realloc(<void*>self.heap,new_space*sizeof(heapitem)) 
    6781160 */ 
    679     __pyx_2 = PyInt_FromLong(__pyx_v_self->n); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    680     __pyx_3 = PyInt_FromLong(__pyx_v_new_space); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    681     __pyx_4 = PyTuple_New(2); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    682     PyTuple_SET_ITEM(__pyx_4, 0, __pyx_2); 
    683     PyTuple_SET_ITEM(__pyx_4, 1, __pyx_3); 
    684     __pyx_2 = 0; 
    685     __pyx_3 = 0; 
    686     __pyx_t_1 = PyNumber_Remainder(__pyx_kp_25, ((PyObject *)__pyx_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    687     Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; 
    688     __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    689     PyTuple_SET_ITEM(__pyx_2, 0, __pyx_t_1); 
    690     __pyx_t_1 = 0; 
    691     __pyx_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    692     Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0; 
    693     __Pyx_Raise(__pyx_3, 0, 0); 
    694     Py_DECREF(__pyx_3); __pyx_3 = 0; 
     1161    __pyx_t_2 = PyInt_FromLong(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     1162    __Pyx_GOTREF(__pyx_t_2); 
     1163    __pyx_t_3 = PyInt_FromLong(__pyx_v_new_space); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     1164    __Pyx_GOTREF(__pyx_t_3); 
     1165    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     1166    __Pyx_GOTREF(__pyx_t_4); 
     1167    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); 
     1168    __Pyx_GIVEREF(__pyx_t_2); 
     1169    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); 
     1170    __Pyx_GIVEREF(__pyx_t_3); 
     1171    __pyx_t_2 = 0; 
     1172    __pyx_t_3 = 0; 
     1173    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_1), __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     1174    __Pyx_GOTREF(__pyx_t_3); 
     1175    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; 
     1176    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     1177    __Pyx_GOTREF(__pyx_t_4); 
     1178    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); 
     1179    __Pyx_GIVEREF(__pyx_t_3); 
     1180    __pyx_t_3 = 0; 
     1181    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     1182    __Pyx_GOTREF(__pyx_t_3); 
     1183    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; 
     1184    __Pyx_Raise(__pyx_t_3, 0, 0); 
     1185    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; 
    6951186    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    6961187    goto __pyx_L3; 
     
    6981189  __pyx_L3:; 
    6991190 
    700   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":39 
     1191  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":39 
    7011192 *     if new_space<self.n: 
    7021193 *         raise ValueError("Heap containing %d items cannot be resized to %d" % (self.n, new_space)) 
     
    7071198  __pyx_v_self->space = __pyx_v_new_space; 
    7081199 
    709   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":40 
     1200  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":40 
    7101201 *         raise ValueError("Heap containing %d items cannot be resized to %d" % (self.n, new_space)) 
    7111202 *     self.space = new_space 
     
    7161207  __pyx_v_self->heap = ((struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem *)realloc(((void *)__pyx_v_self->heap), (__pyx_v_new_space * (sizeof(struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem))))); 
    7171208 
    718   __pyx_r = Py_None; Py_INCREF(Py_None); 
     1209  __pyx_r = Py_None; __Pyx_INCREF(Py_None); 
    7191210  goto __pyx_L0; 
    7201211  __pyx_L1_error:; 
    721   Py_XDECREF(__pyx_2); 
    722   Py_XDECREF(__pyx_3); 
    723   Py_XDECREF(__pyx_4); 
     1212  __Pyx_XDECREF(__pyx_t_2); 
     1213  __Pyx_XDECREF(__pyx_t_3); 
     1214  __Pyx_XDECREF(__pyx_t_4); 
    7241215  __Pyx_AddTraceback("scipy.spatial.ckdtree.heapresize"); 
    7251216  __pyx_r = 0; 
    7261217  __pyx_L0:; 
     1218  __Pyx_XGIVEREF(__pyx_r); 
     1219  __Pyx_RefNannyFinishContext(); 
    7271220  return __pyx_r; 
    7281221} 
    7291222 
    730 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":42 
     1223/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":42 
    7311224 *     self.heap = <heapitem*>stdlib.realloc(<void*>self.heap,new_space*sizeof(heapitem)) 
    7321225 *  
     
    7361229 */ 
    7371230 
    738 static INLINE PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heappush(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *__pyx_v_self, struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem __pyx_v_item) { 
     1231static CYTHON_INLINE PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heappush(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *__pyx_v_self, struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem __pyx_v_item) { 
    7391232  int __pyx_v_i; 
    7401233  struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem __pyx_v_t; 
    741   PyObject *__pyx_r; 
    742   int __pyx_1; 
    743   PyObject *__pyx_2 = 0; 
    744  
    745   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":46 
     1234  PyObject *__pyx_r = NULL; 
     1235  int __pyx_t_1; 
     1236  PyObject *__pyx_t_2 = NULL; 
     1237  int __pyx_t_3; 
     1238  int __pyx_t_4; 
     1239  __Pyx_RefNannySetupContext("heappush"); 
     1240 
     1241  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":46 
    7461242 *     cdef heapitem t 
    7471243 *  
     
    7521248  __pyx_v_self->n += 1; 
    7531249 
    754   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":47 
     1250  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":47 
    7551251 *  
    7561252 *     self.n += 1 
     
    7591255 *  
    7601256 */ 
    761   __pyx_1 = (__pyx_v_self->n > __pyx_v_self->space); 
    762   if (__pyx_1) { 
    763  
    764     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":48 
     1257  __pyx_t_1 = (__pyx_v_self->n > __pyx_v_self->space); 
     1258  if (__pyx_t_1) { 
     1259 
     1260    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":48 
    7651261 *     self.n += 1 
    7661262 *     if self.n>self.space: 
     
    7691265 *     i = self.n-1 
    7701266 */ 
    771     __pyx_2 = __pyx_f_5scipy_7spatial_7ckdtree_heapresize(__pyx_v_self, ((2 * __pyx_v_self->space) + 1)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    772     Py_DECREF(__pyx_2); __pyx_2 = 0; 
     1267    __pyx_t_2 = __pyx_f_5scipy_7spatial_7ckdtree_heapresize(__pyx_v_self, ((2 * __pyx_v_self->space) + 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     1268    __Pyx_GOTREF(__pyx_t_2); 
     1269    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; 
    7731270    goto __pyx_L3; 
    7741271  } 
    7751272  __pyx_L3:; 
    7761273 
    777   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":50 
     1274  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":50 
    7781275 *         heapresize(self,2*self.space+1) 
    7791276 *  
     
    7841281  __pyx_v_i = (__pyx_v_self->n - 1); 
    7851282 
    786   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":51 
     1283  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":51 
    7871284 *  
    7881285 *     i = self.n-1 
     
    7931290  (__pyx_v_self->heap[__pyx_v_i]) = __pyx_v_item; 
    7941291 
    795   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":52 
     1292  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":52 
    7961293 *     i = self.n-1 
    7971294 *     self.heap[i] = item 
     
    8011298 */ 
    8021299  while (1) { 
    803     __pyx_1 = (__pyx_v_i > 0); 
    804     if (__pyx_1) { 
    805       __pyx_1 = ((__pyx_v_self->heap[__pyx_v_i]).priority < (__pyx_v_self->heap[((__pyx_v_i - 1) / 2)]).priority); 
    806     } 
    807     if (!__pyx_1) break; 
    808  
    809     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":53 
     1300    __pyx_t_1 = (__pyx_v_i > 0); 
     1301    if (__pyx_t_1) { 
     1302      __pyx_t_3 = ((__pyx_v_self->heap[__pyx_v_i]).priority < (__pyx_v_self->heap[__Pyx_div_long((__pyx_v_i - 1), 2)]).priority); 
     1303      __pyx_t_4 = __pyx_t_3; 
     1304    } else { 
     1305      __pyx_t_4 = __pyx_t_1; 
     1306    } 
     1307    if (!__pyx_t_4) break; 
     1308 
     1309    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":53 
    8101310 *     self.heap[i] = item 
    8111311 *     while i>0 and self.heap[i].priority<self.heap[(i-1)//2].priority: 
     
    8141314 *         self.heap[i] = t 
    8151315 */ 
    816     __pyx_v_t = (__pyx_v_self->heap[((__pyx_v_i - 1) / 2)]); 
    817  
    818     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":54 
     1316    __pyx_v_t = (__pyx_v_self->heap[__Pyx_div_long((__pyx_v_i - 1), 2)]); 
     1317 
     1318    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":54 
    8191319 *     while i>0 and self.heap[i].priority<self.heap[(i-1)//2].priority: 
    8201320 *         t = self.heap[(i-1)//2] 
     
    8231323 *         i = (i-1)//2 
    8241324 */ 
    825     (__pyx_v_self->heap[((__pyx_v_i - 1) / 2)]) = (__pyx_v_self->heap[__pyx_v_i]); 
    826  
    827     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":55 
     1325    (__pyx_v_self->heap[__Pyx_div_long((__pyx_v_i - 1), 2)]) = (__pyx_v_self->heap[__pyx_v_i]); 
     1326 
     1327    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":55 
    8281328 *         t = self.heap[(i-1)//2] 
    8291329 *         self.heap[(i-1)//2] = self.heap[i] 
     
    8341334    (__pyx_v_self->heap[__pyx_v_i]) = __pyx_v_t; 
    8351335 
    836     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":56 
     1336    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":56 
    8371337 *         self.heap[(i-1)//2] = self.heap[i] 
    8381338 *         self.heap[i] = t 
     
    8411341 * cdef heapitem heappeek(heap* self): 
    8421342 */ 
    843     __pyx_v_i = ((__pyx_v_i - 1) / 2); 
     1343    __pyx_v_i = __Pyx_div_long((__pyx_v_i - 1), 2); 
    8441344  } 
    8451345 
    846   __pyx_r = Py_None; Py_INCREF(Py_None); 
     1346  __pyx_r = Py_None; __Pyx_INCREF(Py_None); 
    8471347  goto __pyx_L0; 
    8481348  __pyx_L1_error:; 
    849   Py_XDECREF(__pyx_2); 
     1349  __Pyx_XDECREF(__pyx_t_2); 
    8501350  __Pyx_AddTraceback("scipy.spatial.ckdtree.heappush"); 
    8511351  __pyx_r = 0; 
    8521352  __pyx_L0:; 
     1353  __Pyx_XGIVEREF(__pyx_r); 
     1354  __Pyx_RefNannyFinishContext(); 
    8531355  return __pyx_r; 
    8541356} 
    8551357 
    856 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":58 
     1358/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":58 
    8571359 *         i = (i-1)//2 
    8581360 *  
     
    8641366static  struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem __pyx_f_5scipy_7spatial_7ckdtree_heappeek(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *__pyx_v_self) { 
    8651367  struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem __pyx_r; 
    866  
    867   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":59 
     1368  __Pyx_RefNannySetupContext("heappeek"); 
     1369 
     1370  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":59 
    8681371 *  
    8691372 * cdef heapitem heappeek(heap* self): 
     
    8761379 
    8771380  __pyx_L0:; 
     1381  __Pyx_RefNannyFinishContext(); 
    8781382  return __pyx_r; 
    8791383} 
    8801384 
    881 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":61 
     1385/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":61 
    8821386 *     return self.heap[0] 
    8831387 *  
     
    8931397  int __pyx_v_k; 
    8941398  int __pyx_v_l; 
    895   PyObject *__pyx_r; 
    896   int __pyx_1; 
    897   PyObject *__pyx_2 = 0; 
    898  
    899   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":65 
     1399  PyObject *__pyx_r = NULL; 
     1400  int __pyx_t_1; 
     1401  int __pyx_t_2; 
     1402  int __pyx_t_3; 
     1403  PyObject *__pyx_t_4 = NULL; 
     1404  int __pyx_t_5; 
     1405  __Pyx_RefNannySetupContext("heapremove"); 
     1406 
     1407  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":65 
    9001408 *     cdef int i, j, k, l 
    9011409 *  
     
    9061414  (__pyx_v_self->heap[0]) = (__pyx_v_self->heap[(__pyx_v_self->n - 1)]); 
    9071415 
    908   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":66 
     1416  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":66 
    9091417 *  
    9101418 *     self.heap[0] = self.heap[self.n-1] 
     
    9151423  __pyx_v_self->n -= 1; 
    9161424 
    917   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":67 
     1425  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":67 
    9181426 *     self.heap[0] = self.heap[self.n-1] 
    9191427 *     self.n -= 1 
     
    9221430 *  
    9231431 */ 
    924   __pyx_1 = (__pyx_v_self->n < (__pyx_v_self->space / 4)); 
    925   if (__pyx_1) { 
    926     __pyx_1 = (__pyx_v_self->space > 40); 
     1432  __pyx_t_1 = (__pyx_v_self->n < __Pyx_div_long(__pyx_v_self->space, 4)); 
     1433  if (__pyx_t_1) { 
     1434    __pyx_t_2 = (__pyx_v_self->space > 40); 
     1435    __pyx_t_3 = __pyx_t_2; 
     1436  } else { 
     1437    __pyx_t_3 = __pyx_t_1; 
    9271438  } 
    928   if (__pyx_1) { 
    929  
    930     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":68 
     1439  if (__pyx_t_3) { 
     1440 
     1441    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":68 
    9311442 *     self.n -= 1 
    9321443 *     if self.n < self.space//4 and self.space>40: #FIXME: magic number 
     
    9351446 *     i=0 
    9361447 */ 
    937     __pyx_2 = __pyx_f_5scipy_7spatial_7ckdtree_heapresize(__pyx_v_self, ((__pyx_v_self->space / 2) + 1)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    938     Py_DECREF(__pyx_2); __pyx_2 = 0; 
     1448    __pyx_t_4 = __pyx_f_5scipy_7spatial_7ckdtree_heapresize(__pyx_v_self, (__Pyx_div_long(__pyx_v_self->space, 2) + 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     1449    __Pyx_GOTREF(__pyx_t_4); 
     1450    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; 
    9391451    goto __pyx_L3; 
    9401452  } 
    9411453  __pyx_L3:; 
    9421454 
    943   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":70 
     1455  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":70 
    9441456 *         heapresize(self,self.space//2+1) 
    9451457 *  
     
    9501462  __pyx_v_i = 0; 
    9511463 
    952   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":71 
     1464  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":71 
    9531465 *  
    9541466 *     i=0 
     
    9591471  __pyx_v_j = 1; 
    9601472 
    961   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":72 
     1473  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":72 
    9621474 *     i=0 
    9631475 *     j=1 
     
    9681480  __pyx_v_k = 2; 
    9691481 
    970   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":73 
     1482  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":73 
    9711483 *     j=1 
    9721484 *     k=2 
     
    9761488 */ 
    9771489  while (1) { 
    978     __pyx_1 = (__pyx_v_j < __pyx_v_self->n); 
    979     if (__pyx_1) { 
    980  
    981       /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":74 
     1490 
     1491    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":74 
    9821492 *     k=2 
    9831493 *     while ((j<self.n and 
     
    9861496 *                 self.heap[i].priority > self.heap[k].priority)): 
    9871497 */ 
    988       __pyx_1 = ((__pyx_v_self->heap[__pyx_v_i]).priority > (__pyx_v_self->heap[__pyx_v_j]).priority); 
    989     } 
    990     if (!__pyx_1) { 
    991  
    992       /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":75 
     1498    __pyx_t_3 = (__pyx_v_j < __pyx_v_self->n); 
     1499    if (__pyx_t_3) { 
     1500      __pyx_t_1 = ((__pyx_v_self->heap[__pyx_v_i]).priority > (__pyx_v_self->heap[__pyx_v_j]).priority); 
     1501      __pyx_t_2 = __pyx_t_1; 
     1502    } else { 
     1503      __pyx_t_2 = __pyx_t_3; 
     1504    } 
     1505    if (!__pyx_t_2) { 
     1506 
     1507      /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":75 
    9931508 *     while ((j<self.n and 
    9941509 *                 self.heap[i].priority > self.heap[j].priority or 
     
    9971512 *         if k<self.n and self.heap[j].priority>self.heap[k].priority: 
    9981513 */ 
    999       __pyx_1 = (__pyx_v_k < __pyx_v_self->n); 
    1000       if (__pyx_1) { 
    1001  
    1002         /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":76 
     1514      __pyx_t_3 = (__pyx_v_k < __pyx_v_self->n); 
     1515      if (__pyx_t_3) { 
     1516 
     1517        /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":76 
    10031518 *                 self.heap[i].priority > self.heap[j].priority or 
    10041519 *             k<self.n and 
     
    10071522 *             l = k 
    10081523 */ 
    1009         __pyx_1 = ((__pyx_v_self->heap[__pyx_v_i]).priority > (__pyx_v_self->heap[__pyx_v_k]).priority); 
     1524        __pyx_t_1 = ((__pyx_v_self->heap[__pyx_v_i]).priority > (__pyx_v_self->heap[__pyx_v_k]).priority); 
     1525        __pyx_t_5 = __pyx_t_1; 
     1526      } else { 
     1527        __pyx_t_5 = __pyx_t_3; 
    10101528      } 
    1011     } 
    1012     if (!__pyx_1) break; 
    1013  
    1014     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":77 
     1529      __pyx_t_3 = __pyx_t_5; 
     1530    } else { 
     1531      __pyx_t_3 = __pyx_t_2; 
     1532    } 
     1533    if (!__pyx_t_3) break; 
     1534 
     1535    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":77 
    10151536 *             k<self.n and 
    10161537 *                 self.heap[i].priority > self.heap[k].priority)): 
     
    10191540 *         else: 
    10201541 */ 
    1021     __pyx_1 = (__pyx_v_k < __pyx_v_self->n); 
    1022     if (__pyx_1) { 
    1023       __pyx_1 = ((__pyx_v_self->heap[__pyx_v_j]).priority > (__pyx_v_self->heap[__pyx_v_k]).priority); 
    1024     } 
    1025     if (__pyx_1) { 
    1026  
    1027       /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":78 
     1542    __pyx_t_3 = (__pyx_v_k < __pyx_v_self->n); 
     1543    if (__pyx_t_3) { 
     1544      __pyx_t_2 = ((__pyx_v_self->heap[__pyx_v_j]).priority > (__pyx_v_self->heap[__pyx_v_k]).priority); 
     1545      __pyx_t_5 = __pyx_t_2; 
     1546    } else { 
     1547      __pyx_t_5 = __pyx_t_3; 
     1548    } 
     1549    if (__pyx_t_5) { 
     1550 
     1551      /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":78 
    10281552 *                 self.heap[i].priority > self.heap[k].priority)): 
    10291553 *         if k<self.n and self.heap[j].priority>self.heap[k].priority: 
     
    10371561    /*else*/ { 
    10381562 
    1039       /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":80 
     1563      /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":80 
    10401564 *             l = k 
    10411565 *         else: 
     
    10481572    __pyx_L6:; 
    10491573 
    1050     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":81 
     1574    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":81 
    10511575 *         else: 
    10521576 *             l = j 
     
    10571581    __pyx_v_t = (__pyx_v_self->heap[__pyx_v_l]); 
    10581582 
    1059     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":82 
     1583    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":82 
    10601584 *             l = j 
    10611585 *         t = self.heap[l] 
     
    10661590    (__pyx_v_self->heap[__pyx_v_l]) = (__pyx_v_self->heap[__pyx_v_i]); 
    10671591 
    1068     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":83 
     1592    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":83 
    10691593 *         t = self.heap[l] 
    10701594 *         self.heap[l] = self.heap[i] 
     
    10751599    (__pyx_v_self->heap[__pyx_v_i]) = __pyx_v_t; 
    10761600 
    1077     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":84 
     1601    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":84 
    10781602 *         self.heap[l] = self.heap[i] 
    10791603 *         self.heap[i] = t 
     
    10841608    __pyx_v_i = __pyx_v_l; 
    10851609 
    1086     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":85 
     1610    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":85 
    10871611 *         self.heap[i] = t 
    10881612 *         i = l 
     
    10931617    __pyx_v_j = ((2 * __pyx_v_i) + 1); 
    10941618 
    1095     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":86 
     1619    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":86 
    10961620 *         i = l 
    10971621 *         j = 2*i+1 
     
    11031627  } 
    11041628 
    1105   __pyx_r = Py_None; Py_INCREF(Py_None); 
     1629  __pyx_r = Py_None; __Pyx_INCREF(Py_None); 
    11061630  goto __pyx_L0; 
    11071631  __pyx_L1_error:; 
    1108   Py_XDECREF(__pyx_2); 
     1632  __Pyx_XDECREF(__pyx_t_4); 
    11091633  __Pyx_AddTraceback("scipy.spatial.ckdtree.heapremove"); 
    11101634  __pyx_r = 0; 
    11111635  __pyx_L0:; 
     1636  __Pyx_XGIVEREF(__pyx_r); 
     1637  __Pyx_RefNannyFinishContext(); 
    11121638  return __pyx_r; 
    11131639} 
    11141640 
    1115 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":88 
     1641/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":88 
    11161642 *         k = 2*i+2 
    11171643 *  
     
    11241650  struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem __pyx_v_it; 
    11251651  struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem __pyx_r; 
    1126   PyObject *__pyx_1 = 0; 
    1127  
    1128   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":90 
     1652  PyObject *__pyx_t_1 = NULL; 
     1653  __Pyx_RefNannySetupContext("heappop"); 
     1654 
     1655  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":90 
    11291656 * cdef heapitem heappop(heap* self): 
    11301657 *     cdef heapitem it 
     
    11351662  __pyx_v_it = __pyx_f_5scipy_7spatial_7ckdtree_heappeek(__pyx_v_self); 
    11361663 
    1137   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":91 
     1664  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":91 
    11381665 *     cdef heapitem it 
    11391666 *     it = heappeek(self) 
     
    11421669 *  
    11431670 */ 
    1144   __pyx_1 = __pyx_f_5scipy_7spatial_7ckdtree_heapremove(__pyx_v_self); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1145   Py_DECREF(__pyx_1); __pyx_1 = 0; 
    1146  
    1147   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":92 
     1671  __pyx_t_1 = __pyx_f_5scipy_7spatial_7ckdtree_heapremove(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     1672  __Pyx_GOTREF(__pyx_t_1); 
     1673  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; 
     1674 
     1675  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":92 
    11481676 *     it = heappeek(self) 
    11491677 *     heapremove(self) 
     
    11571685  goto __pyx_L0; 
    11581686  __pyx_L1_error:; 
    1159   Py_XDECREF(__pyx_1); 
     1687  __Pyx_XDECREF(__pyx_t_1); 
    11601688  __Pyx_WriteUnraisable("scipy.spatial.ckdtree.heappop"); 
    11611689  __pyx_L0:; 
     1690  __Pyx_RefNannyFinishContext(); 
    11621691  return __pyx_r; 
    11631692} 
    11641693 
    1165 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":99 
     1694/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":99 
    11661695 *  
    11671696 * # utility functions 
     
    11711700 */ 
    11721701 
    1173 static INLINE double __pyx_f_5scipy_7spatial_7ckdtree_dmax(double __pyx_v_x, double __pyx_v_y) { 
     1702static CYTHON_INLINE double __pyx_f_5scipy_7spatial_7ckdtree_dmax(double __pyx_v_x, double __pyx_v_y) { 
    11741703  double __pyx_r; 
    1175   int __pyx_1; 
    1176  
    1177   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":100 
     1704  int __pyx_t_1; 
     1705  __Pyx_RefNannySetupContext("dmax"); 
     1706 
     1707  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":100 
    11781708 * # utility functions 
    11791709 * cdef inline double dmax(double x, double y): 
     
    11821712 *     else: 
    11831713 */ 
    1184   __pyx_1 = (__pyx_v_x > __pyx_v_y); 
    1185   if (__pyx_1) { 
    1186  
    1187     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":101 
     1714  __pyx_t_1 = (__pyx_v_x > __pyx_v_y); 
     1715  if (__pyx_t_1) { 
     1716 
     1717    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":101 
    11881718 * cdef inline double dmax(double x, double y): 
    11891719 *     if x>y: 
     
    11981728  /*else*/ { 
    11991729 
    1200     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":103 
     1730    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":103 
    12011731 *         return x 
    12021732 *     else: 
     
    12121742  __pyx_r = 0; 
    12131743  __pyx_L0:; 
     1744  __Pyx_RefNannyFinishContext(); 
    12141745  return __pyx_r; 
    12151746} 
    12161747 
    1217 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":104 
     1748/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":104 
    12181749 *     else: 
    12191750 *         return y 
     
    12231754 */ 
    12241755 
    1225 static INLINE double __pyx_f_5scipy_7spatial_7ckdtree_dabs(double __pyx_v_x) { 
     1756static CYTHON_INLINE double __pyx_f_5scipy_7spatial_7ckdtree_dabs(double __pyx_v_x) { 
    12261757  double __pyx_r; 
    1227   int __pyx_1; 
    1228  
    1229   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":105 
     1758  int __pyx_t_1; 
     1759  __Pyx_RefNannySetupContext("dabs"); 
     1760 
     1761  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":105 
    12301762 *         return y 
    12311763 * cdef inline double dabs(double x): 
     
    12341766 *     else: 
    12351767 */ 
    1236   __pyx_1 = (__pyx_v_x > 0); 
    1237   if (__pyx_1) { 
    1238  
    1239     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":106 
     1768  __pyx_t_1 = (__pyx_v_x > 0); 
     1769  if (__pyx_t_1) { 
     1770 
     1771    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":106 
    12401772 * cdef inline double dabs(double x): 
    12411773 *     if x>0: 
     
    12501782  /*else*/ { 
    12511783 
    1252     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":108 
     1784    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":108 
    12531785 *         return x 
    12541786 *     else: 
     
    12641796  __pyx_r = 0; 
    12651797  __pyx_L0:; 
     1798  __Pyx_RefNannyFinishContext(); 
    12661799  return __pyx_r; 
    12671800} 
    12681801 
    1269 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":109 
     1802/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":109 
    12701803 *     else: 
    12711804 *         return -x 
     
    12751808 */ 
    12761809 
    1277 static INLINE double __pyx_f_5scipy_7spatial_7ckdtree__distance_p(double *__pyx_v_x, double *__pyx_v_y, double __pyx_v_p, int __pyx_v_k, double __pyx_v_upperbound) { 
     1810static CYTHON_INLINE double __pyx_f_5scipy_7spatial_7ckdtree__distance_p(double *__pyx_v_x, double *__pyx_v_y, double __pyx_v_p, int __pyx_v_k, double __pyx_v_upperbound) { 
    12781811  int __pyx_v_i; 
    12791812  double __pyx_v_r; 
    12801813  double __pyx_r; 
    1281   int __pyx_1; 
    1282  
    1283   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":118 
     1814  int __pyx_t_1; 
     1815  int __pyx_t_2; 
     1816  int __pyx_t_3; 
     1817  __Pyx_RefNannySetupContext("_distance_p"); 
     1818 
     1819  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":118 
    12841820 *     cdef int i 
    12851821 *     cdef double r 
     
    12901826  __pyx_v_r = 0; 
    12911827 
    1292   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":119 
     1828  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":119 
    12931829 *     cdef double r 
    12941830 *     r = 0 
     
    12971833 *             r = dmax(r,dabs(x[i]-y[i])) 
    12981834 */ 
    1299   __pyx_1 = (__pyx_v_p == __pyx_v_5scipy_7spatial_7ckdtree_infinity); 
    1300   if (__pyx_1) { 
    1301  
    1302     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":120 
     1835  __pyx_t_1 = (__pyx_v_p == __pyx_v_5scipy_7spatial_7ckdtree_infinity); 
     1836  if (__pyx_t_1) { 
     1837 
     1838    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":120 
    13031839 *     r = 0 
    13041840 *     if p==infinity: 
     
    13071843 *             if r>upperbound: 
    13081844 */ 
    1309     for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_k; __pyx_v_i+=1) { 
    1310  
    1311       /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":121 
     1845    __pyx_t_2 = __pyx_v_k; 
     1846    for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { 
     1847      __pyx_v_i = __pyx_t_3; 
     1848 
     1849      /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":121 
    13121850 *     if p==infinity: 
    13131851 *         for i in range(k): 
     
    13181856      __pyx_v_r = __pyx_f_5scipy_7spatial_7ckdtree_dmax(__pyx_v_r, __pyx_f_5scipy_7spatial_7ckdtree_dabs(((__pyx_v_x[__pyx_v_i]) - (__pyx_v_y[__pyx_v_i])))); 
    13191857 
    1320       /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":122 
     1858      /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":122 
    13211859 *         for i in range(k): 
    13221860 *             r = dmax(r,dabs(x[i]-y[i])) 
     
    13251863 *     elif p==1: 
    13261864 */ 
    1327       __pyx_1 = (__pyx_v_r > __pyx_v_upperbound); 
    1328       if (__pyx_1) { 
    1329  
    1330         /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":123 
     1865      __pyx_t_1 = (__pyx_v_r > __pyx_v_upperbound); 
     1866      if (__pyx_t_1) { 
     1867 
     1868        /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":123 
    13311869 *             r = dmax(r,dabs(x[i]-y[i])) 
    13321870 *             if r>upperbound: 
     
    13441882  } 
    13451883 
    1346   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":124 
     1884  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":124 
    13471885 *             if r>upperbound: 
    13481886 *                 return r 
     
    13511889 *             r += dabs(x[i]-y[i]) 
    13521890 */ 
    1353   __pyx_1 = (__pyx_v_p == 1); 
    1354   if (__pyx_1) { 
    1355  
    1356     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":125 
     1891  __pyx_t_1 = (__pyx_v_p == 1); 
     1892  if (__pyx_t_1) { 
     1893 
     1894    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":125 
    13571895 *                 return r 
    13581896 *     elif p==1: 
     
    13611899 *             if r>upperbound: 
    13621900 */ 
    1363     for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_k; __pyx_v_i+=1) { 
    1364  
    1365       /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":126 
     1901    __pyx_t_2 = __pyx_v_k; 
     1902    for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { 
     1903      __pyx_v_i = __pyx_t_3; 
     1904 
     1905      /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":126 
    13661906 *     elif p==1: 
    13671907 *         for i in range(k): 
     
    13721912      __pyx_v_r += __pyx_f_5scipy_7spatial_7ckdtree_dabs(((__pyx_v_x[__pyx_v_i]) - (__pyx_v_y[__pyx_v_i]))); 
    13731913 
    1374       /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":127 
     1914      /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":127 
    13751915 *         for i in range(k): 
    13761916 *             r += dabs(x[i]-y[i]) 
     
    13791919 *     else: 
    13801920 */ 
    1381       __pyx_1 = (__pyx_v_r > __pyx_v_upperbound); 
    1382       if (__pyx_1) { 
    1383  
    1384         /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":128 
     1921      __pyx_t_1 = (__pyx_v_r > __pyx_v_upperbound); 
     1922      if (__pyx_t_1) { 
     1923 
     1924        /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":128 
    13851925 *             r += dabs(x[i]-y[i]) 
    13861926 *             if r>upperbound: 
     
    13991939  /*else*/ { 
    14001940 
    1401     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":130 
     1941    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":130 
    14021942 *                 return r 
    14031943 *     else: 
     
    14061946 *             if r>upperbound: 
    14071947 */ 
    1408     for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_k; __pyx_v_i+=1) { 
    1409  
    1410       /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":131 
     1948    __pyx_t_2 = __pyx_v_k; 
     1949    for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { 
     1950      __pyx_v_i = __pyx_t_3; 
     1951 
     1952      /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":131 
    14111953 *     else: 
    14121954 *         for i in range(k): 
     
    14171959      __pyx_v_r += pow(__pyx_f_5scipy_7spatial_7ckdtree_dabs(((__pyx_v_x[__pyx_v_i]) - (__pyx_v_y[__pyx_v_i]))), __pyx_v_p); 
    14181960 
    1419       /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":132 
     1961      /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":132 
    14201962 *         for i in range(k): 
    14211963 *             r += dabs(x[i]-y[i])**p 
     
    14241966 *     return r 
    14251967 */ 
    1426       __pyx_1 = (__pyx_v_r > __pyx_v_upperbound); 
    1427       if (__pyx_1) { 
    1428  
    1429         /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":133 
     1968      __pyx_t_1 = (__pyx_v_r > __pyx_v_upperbound); 
     1969      if (__pyx_t_1) { 
     1970 
     1971        /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":133 
    14301972 *             r += dabs(x[i]-y[i])**p 
    14311973 *             if r>upperbound: 
     
    14431985  __pyx_L3:; 
    14441986 
    1445   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":134 
     1987  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":134 
    14461988 *             if r>upperbound: 
    14471989 *                 return r 
     
    14551997  __pyx_r = 0; 
    14561998  __pyx_L0:; 
     1999  __Pyx_RefNannyFinishContext(); 
    14572000  return __pyx_r; 
    14582001} 
    14592002 
    1460 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":195 
     2003/* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":195 
    14612004 *     cdef object indices 
    14622005 *     cdef np.int32_t* raw_indices 
     
    14902033  Py_ssize_t __pyx_bshape_0_inner_mins = 0; 
    14912034  int __pyx_r; 
    1492   PyObject *__pyx_1 = 0; 
    1493   PyObject *__pyx_2 = 0; 
    1494   PyObject *__pyx_3 = 0; 
    1495   PyObject *__pyx_4 = 0; 
    1496   PyObject *__pyx_5 = 0; 
    1497   int __pyx_6; 
    1498   int __pyx_7; 
    1499   PyObject *__pyx_8 = 0; 
    1500   PyArrayObject *__pyx_t_1 = NULL; 
    1501   int __pyx_t_2; 
     2035  PyObject *__pyx_t_1 = NULL; 
     2036  PyObject *__pyx_t_2 = NULL; 
    15022037  PyObject *__pyx_t_3 = NULL; 
    15032038  PyObject *__pyx_t_4 = NULL; 
    15042039  PyObject *__pyx_t_5 = NULL; 
    1505   PyArrayObject *__pyx_t_6 = NULL; 
    1506   PyArrayObject *__pyx_t_7 = NULL; 
    1507   PyArrayObject *__pyx_t_8 = NULL; 
    1508   static PyObject **__pyx_pyargnames[] = {&__pyx_kp_data,&__pyx_kp_leafsize,0}; 
    1509   __pyx_v_leafsize = 10; 
     2040  int __pyx_t_6; 
     2041  int __pyx_t_7; 
     2042  int __pyx_t_8; 
     2043  PyObject *__pyx_t_9 = NULL; 
     2044  PyArrayObject *__pyx_t_10 = NULL; 
     2045  PyObject *__pyx_t_11 = NULL; 
     2046  PyObject *__pyx_t_12 = NULL; 
     2047  PyObject *__pyx_t_13 = NULL; 
     2048  PyArrayObject *__pyx_t_14 = NULL; 
     2049  PyArrayObject *__pyx_t_15 = NULL; 
     2050  PyArrayObject *__pyx_t_16 = NULL; 
     2051  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__data,&__pyx_n_s__leafsize,0}; 
     2052  __Pyx_RefNannySetupContext("__init__"); 
    15102053  if (unlikely(__pyx_kwds)) { 
     2054    Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); 
    15112055    PyObject* values[2] = {0,0}; 
    1512     Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); 
    15132056    switch (PyTuple_GET_SIZE(__pyx_args)) { 
    15142057      case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); 
     
    15192062    switch (PyTuple_GET_SIZE(__pyx_args)) { 
    15202063      case  0: 
    1521       values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_data); 
     2064      values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data); 
    15222065      if (likely(values[0])) kw_args--; 
    15232066      else goto __pyx_L5_argtuple_error; 
     2067      case  1: 
     2068      if (kw_args > 1) { 
     2069        PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__leafsize); 
     2070        if (unlikely(value)) { values[1] = value; kw_args--; } 
     2071      } 
    15242072    } 
    15252073    if (unlikely(kw_args > 0)) { 
     
    15282076    __pyx_v_data = values[0]; 
    15292077    if (values[1]) { 
    1530       __pyx_v_leafsize = __pyx_PyInt_int(values[1]); if (unlikely((__pyx_v_leafsize == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L3_error;} 
     2078      __pyx_v_leafsize = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_leafsize == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L3_error;} 
     2079    } else { 
     2080      __pyx_v_leafsize = ((int)10); 
    15312081    } 
    15322082  } else { 
     2083    __pyx_v_leafsize = ((int)10); 
    15332084    switch (PyTuple_GET_SIZE(__pyx_args)) { 
    1534       case  2: __pyx_v_leafsize = __pyx_PyInt_int(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_leafsize == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L3_error;} 
     2085      case  2: __pyx_v_leafsize = __Pyx_PyInt_AsInt(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_leafsize == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L3_error;} 
    15352086      case  1: __pyx_v_data = PyTuple_GET_ITEM(__pyx_args, 0); 
    15362087      break; 
     
    15452096  return -1; 
    15462097  __pyx_L4_argument_unpacking_done:; 
    1547   __pyx_v_inner_data = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); 
    1548   __pyx_v_inner_maxes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); 
    1549   __pyx_v_inner_mins = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); 
    1550   __pyx_v_inner_indices = ((PyArrayObject *)Py_None); Py_INCREF(Py_None); 
     2098  __Pyx_INCREF((PyObject *)__pyx_v_self); 
     2099  __Pyx_INCREF(__pyx_v_data); 
     2100  __pyx_v_inner_data = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); 
     2101  __pyx_v_inner_maxes = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); 
     2102  __pyx_v_inner_mins = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); 
     2103  __pyx_v_inner_indices = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); 
    15512104  __pyx_bstruct_inner_data.buf = NULL; 
    15522105  __pyx_bstruct_inner_maxes.buf = NULL; 
     
    15542107  __pyx_bstruct_inner_indices.buf = NULL; 
    15552108 
    1556   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":214 
     2109  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":214 
    15572110 *         cdef np.ndarray[double, ndim=1] inner_mins 
    15582111 *         cdef np.ndarray[np.int32_t, ndim=1] inner_indices 
     
    15612114 *         self.leafsize = leafsize 
    15622115 */ 
    1563   __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1564   __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_ascontiguousarray); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1565   Py_DECREF(__pyx_1); __pyx_1 = 0; 
    1566   __pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1567   Py_INCREF(__pyx_v_data); 
    1568   PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_data); 
    1569   __pyx_3 = PyDict_New(); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1570   __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1571   __pyx_5 = PyObject_GetAttr(__pyx_4, __pyx_kp_float); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1572   Py_DECREF(__pyx_4); __pyx_4 = 0; 
    1573   if (PyDict_SetItem(__pyx_3, __pyx_kp_dtype, __pyx_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1574   Py_DECREF(__pyx_5); __pyx_5 = 0; 
    1575   __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_1), ((PyObject *)__pyx_3)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1576   Py_DECREF(__pyx_2); __pyx_2 = 0; 
    1577   Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; 
    1578   Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0; 
    1579   Py_DECREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
    1580   ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data = __pyx_4; 
    1581   __pyx_4 = 0; 
    1582  
    1583   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":215 
     2116  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2117  __Pyx_GOTREF(__pyx_t_1); 
     2118  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2119  __Pyx_GOTREF(__pyx_t_2); 
     2120  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; 
     2121  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2122  __Pyx_GOTREF(__pyx_t_1); 
     2123  __Pyx_INCREF(__pyx_v_data); 
     2124  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_data); 
     2125  __Pyx_GIVEREF(__pyx_v_data); 
     2126  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2127  __Pyx_GOTREF(((PyObject *)__pyx_t_3)); 
     2128  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2129  __Pyx_GOTREF(__pyx_t_4); 
     2130  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2131  __Pyx_GOTREF(__pyx_t_5); 
     2132  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; 
     2133  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2134  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; 
     2135  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_2, __pyx_t_1, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2136  __Pyx_GOTREF(__pyx_t_5); 
     2137  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; 
     2138  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; 
     2139  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; 
     2140  __Pyx_GIVEREF(__pyx_t_5); 
     2141  __Pyx_GOTREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
     2142  __Pyx_DECREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
     2143  ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data = __pyx_t_5; 
     2144  __pyx_t_5 = 0; 
     2145 
     2146  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":215 
    15842147 *         cdef np.ndarray[np.int32_t, ndim=1] inner_indices 
    15852148 *         self.data = np.ascontiguousarray(data,dtype=np.float) 
     
    15882151 *         if self.leafsize<1: 
    15892152 */ 
    1590   __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1591   __pyx_2 = PyObject_GetAttr(__pyx_5, __pyx_kp_shape); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1592   Py_DECREF(__pyx_5); __pyx_5 = 0; 
    1593   __pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1594   Py_INCREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
    1595   PyTuple_SET_ITEM(__pyx_1, 0, ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
    1596   __pyx_3 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_1), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1597   Py_DECREF(__pyx_2); __pyx_2 = 0; 
    1598   Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; 
    1599   if (PyTuple_CheckExact(__pyx_3) && PyTuple_GET_SIZE(__pyx_3) == 2) { 
    1600     PyObject* tuple = __pyx_3; 
    1601     __pyx_5 = PyTuple_GET_ITEM(tuple, 0); 
    1602     Py_INCREF(__pyx_5); 
    1603     __pyx_6 = __pyx_PyInt_int(__pyx_5); if (unlikely((__pyx_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1604     Py_DECREF(__pyx_5); __pyx_5 = 0; 
    1605     ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->n = __pyx_6; 
    1606     __pyx_2 = PyTuple_GET_ITEM(tuple, 1); 
    1607     Py_INCREF(__pyx_2); 
    1608     __pyx_6 = __pyx_PyInt_int(__pyx_2); if (unlikely((__pyx_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1609     Py_DECREF(__pyx_2); __pyx_2 = 0; 
    1610     ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->m = __pyx_6; 
    1611     Py_DECREF(__pyx_3); __pyx_3 = 0; 
     2153  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2154  __Pyx_GOTREF(__pyx_t_5); 
     2155  __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__shape); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2156  __Pyx_GOTREF(__pyx_t_3); 
     2157  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; 
     2158  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2159  __Pyx_GOTREF(__pyx_t_5); 
     2160  __Pyx_INCREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
     2161  PyTuple_SET_ITEM(__pyx_t_5, 0, ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
     2162  __Pyx_GIVEREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
     2163  __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2164  __Pyx_GOTREF(__pyx_t_1); 
     2165  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; 
     2166  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; 
     2167  if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) { 
     2168    PyObject* tuple = __pyx_t_1; 
     2169    __pyx_t_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_5); 
     2170    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2171    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; 
     2172    __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3); 
     2173    __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2174    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; 
     2175    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; 
     2176    ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->n = __pyx_t_6; 
     2177    ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->m = __pyx_t_7; 
     2178  } else { 
     2179    __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2180    __Pyx_GOTREF(__pyx_t_2); 
     2181    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; 
     2182    __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_2, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2183    __Pyx_GOTREF(__pyx_t_5); 
     2184    __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2185    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; 
     2186    __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_2, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2187    __Pyx_GOTREF(__pyx_t_3); 
     2188    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2189    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; 
     2190    if (__Pyx_EndUnpack(__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2191    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; 
     2192    ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->n = __pyx_t_7; 
     2193    ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->m = __pyx_t_6; 
    16122194  } 
    1613   else { 
    1614     __pyx_4 = PyObject_GetIter(__pyx_3); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1615     Py_DECREF(__pyx_3); __pyx_3 = 0; 
    1616     __pyx_5 = __Pyx_UnpackItem(__pyx_4, 0); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1617     __pyx_6 = __pyx_PyInt_int(__pyx_5); if (unlikely((__pyx_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1618     Py_DECREF(__pyx_5); __pyx_5 = 0; 
    1619     ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->n = __pyx_6; 
    1620     __pyx_2 = __Pyx_UnpackItem(__pyx_4, 1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1621     __pyx_6 = __pyx_PyInt_int(__pyx_2); if (unlikely((__pyx_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1622     Py_DECREF(__pyx_2); __pyx_2 = 0; 
    1623     ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->m = __pyx_6; 
    1624     if (__Pyx_EndUnpack(__pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1625     Py_DECREF(__pyx_4); __pyx_4 = 0; 
    1626   } 
    1627  
    1628   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":216 
     2195 
     2196  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":216 
    16292197 *         self.data = np.ascontiguousarray(data,dtype=np.float) 
    16302198 *         self.n, self.m = np.shape(self.data) 
     
    16352203  ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->leafsize = __pyx_v_leafsize; 
    16362204 
    1637   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":217 
     2205  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":217 
    16382206 *         self.n, self.m = np.shape(self.data) 
    16392207 *         self.leafsize = leafsize 
     
    16422210 *         self.maxes = np.ascontiguousarray(np.amax(self.data,axis=0)) 
    16432211 */ 
    1644   __pyx_7 = (((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->leafsize < 1); 
    1645   if (__pyx_7) { 
    1646  
    1647     /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":218 
     2212  __pyx_t_8 = (((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->leafsize < 1); 
     2213  if (__pyx_t_8) { 
     2214 
     2215    /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":218 
    16482216 *         self.leafsize = leafsize 
    16492217 *         if self.leafsize<1: 
     
    16522220 *         self.mins = np.ascontiguousarray(np.amin(self.data,axis=0)) 
    16532221 */ 
    1654     __pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1655     Py_INCREF(__pyx_kp_26); 
    1656     PyTuple_SET_ITEM(__pyx_1, 0, __pyx_kp_26); 
    1657     __pyx_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_1), NULL); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1658     Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; 
    1659     __Pyx_Raise(__pyx_5, 0, 0); 
    1660     Py_DECREF(__pyx_5); __pyx_5 = 0; 
     2222    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2223    __Pyx_GOTREF(__pyx_t_1); 
     2224    __Pyx_INCREF(((PyObject *)__pyx_kp_s_2)); 
     2225    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_s_2)); 
     2226    __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2)); 
     2227    __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2228    __Pyx_GOTREF(__pyx_t_3); 
     2229    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; 
     2230    __Pyx_Raise(__pyx_t_3, 0, 0); 
     2231    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; 
    16612232    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    16622233    goto __pyx_L6; 
     
    16642235  __pyx_L6:; 
    16652236 
    1666   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":219 
     2237  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":219 
    16672238 *         if self.leafsize<1: 
    16682239 *             raise ValueError("leafsize must be at least 1") 
     
    16712242 *         self.indices = np.ascontiguousarray(np.arange(self.n,dtype=np.int32)) 
    16722243 */ 
    1673   __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1674   __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_ascontiguousarray); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1675   Py_DECREF(__pyx_2); __pyx_2 = 0; 
    1676   __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1677   __pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_kp_amax); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1678   Py_DECREF(__pyx_4); __pyx_4 = 0; 
    1679   __pyx_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1680   Py_INCREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
    1681   PyTuple_SET_ITEM(__pyx_5, 0, ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
    1682   __pyx_2 = PyDict_New(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1683   if (PyDict_SetItem(__pyx_2, __pyx_kp_axis, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1684   __pyx_4 = PyEval_CallObjectWithKeywords(__pyx_1, ((PyObject *)__pyx_5), ((PyObject *)__pyx_2)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1685   Py_DECREF(__pyx_1); __pyx_1 = 0; 
    1686   Py_DECREF(((PyObject *)__pyx_5)); __pyx_5 = 0; 
    1687   Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0; 
    1688   __pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1689   PyTuple_SET_ITEM(__pyx_1, 0, __pyx_4); 
    1690   __pyx_4 = 0; 
    1691   __pyx_5 = PyObject_Call(__pyx_3, ((PyObject *)__pyx_1), NULL); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1692   Py_DECREF(__pyx_3); __pyx_3 = 0; 
    1693   Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; 
    1694   Py_DECREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->maxes); 
    1695   ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->maxes = __pyx_5; 
    1696   __pyx_5 = 0; 
    1697  
    1698   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":220 
     2244  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2245  __Pyx_GOTREF(__pyx_t_3); 
     2246  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2247  __Pyx_GOTREF(__pyx_t_1); 
     2248  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; 
     2249  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2250  __Pyx_GOTREF(__pyx_t_3); 
     2251  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__amax); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2252  __Pyx_GOTREF(__pyx_t_5); 
     2253  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; 
     2254  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2255  __Pyx_GOTREF(__pyx_t_3); 
     2256  __Pyx_INCREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
     2257  PyTuple_SET_ITEM(__pyx_t_3, 0, ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
     2258  __Pyx_GIVEREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
     2259  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2260  __Pyx_GOTREF(((PyObject *)__pyx_t_2)); 
     2261  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__axis), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2262  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_5, __pyx_t_3, ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2263  __Pyx_GOTREF(__pyx_t_4); 
     2264  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; 
     2265  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; 
     2266  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; 
     2267  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2268  __Pyx_GOTREF(__pyx_t_2); 
     2269  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); 
     2270  __Pyx_GIVEREF(__pyx_t_4); 
     2271  __pyx_t_4 = 0; 
     2272  __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2273  __Pyx_GOTREF(__pyx_t_4); 
     2274  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; 
     2275  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; 
     2276  __Pyx_GIVEREF(__pyx_t_4); 
     2277  __Pyx_GOTREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->maxes); 
     2278  __Pyx_DECREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->maxes); 
     2279  ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->maxes = __pyx_t_4; 
     2280  __pyx_t_4 = 0; 
     2281 
     2282  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":220 
    16992283 *             raise ValueError("leafsize must be at least 1") 
    17002284 *         self.maxes = np.ascontiguousarray(np.amax(self.data,axis=0)) 
     
    17032287 *  
    17042288 */ 
    1705   __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1706   __pyx_4 = PyObject_GetAttr(__pyx_2, __pyx_kp_ascontiguousarray); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1707   Py_DECREF(__pyx_2); __pyx_2 = 0; 
    1708   __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1709   __pyx_1 = PyObject_GetAttr(__pyx_3, __pyx_kp_amin); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1710   Py_DECREF(__pyx_3); __pyx_3 = 0; 
    1711   __pyx_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1712   Py_INCREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
    1713   PyTuple_SET_ITEM(__pyx_5, 0, ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
    1714   __pyx_2 = PyDict_New(); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1715   if (PyDict_SetItem(__pyx_2, __pyx_kp_axis, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1716   __pyx_3 = PyEval_CallObjectWithKeywords(__pyx_1, ((PyObject *)__pyx_5), ((PyObject *)__pyx_2)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1717   Py_DECREF(__pyx_1); __pyx_1 = 0; 
    1718   Py_DECREF(((PyObject *)__pyx_5)); __pyx_5 = 0; 
    1719   Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0; 
    1720   __pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1721   PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3); 
    1722   __pyx_3 = 0; 
    1723   __pyx_5 = PyObject_Call(__pyx_4, ((PyObject *)__pyx_1), NULL); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1724   Py_DECREF(__pyx_4); __pyx_4 = 0; 
    1725   Py_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0; 
    1726   Py_DECREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->mins); 
    1727   ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->mins = __pyx_5; 
    1728   __pyx_5 = 0; 
    1729  
    1730   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":221 
     2289  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2290  __Pyx_GOTREF(__pyx_t_4); 
     2291  __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2292  __Pyx_GOTREF(__pyx_t_2); 
     2293  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; 
     2294  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2295  __Pyx_GOTREF(__pyx_t_4); 
     2296  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__amin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2297  __Pyx_GOTREF(__pyx_t_1); 
     2298  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; 
     2299  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2300  __Pyx_GOTREF(__pyx_t_4); 
     2301  __Pyx_INCREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
     2302  PyTuple_SET_ITEM(__pyx_t_4, 0, ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
     2303  __Pyx_GIVEREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
     2304  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2305  __Pyx_GOTREF(((PyObject *)__pyx_t_3)); 
     2306  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__axis), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2307  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_1, __pyx_t_4, ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2308  __Pyx_GOTREF(__pyx_t_5); 
     2309  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; 
     2310  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; 
     2311  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; 
     2312  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2313  __Pyx_GOTREF(__pyx_t_3); 
     2314  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); 
     2315  __Pyx_GIVEREF(__pyx_t_5); 
     2316  __pyx_t_5 = 0; 
     2317  __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2318  __Pyx_GOTREF(__pyx_t_5); 
     2319  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; 
     2320  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; 
     2321  __Pyx_GIVEREF(__pyx_t_5); 
     2322  __Pyx_GOTREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->mins); 
     2323  __Pyx_DECREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->mins); 
     2324  ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->mins = __pyx_t_5; 
     2325  __pyx_t_5 = 0; 
     2326 
     2327  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":221 
    17312328 *         self.maxes = np.ascontiguousarray(np.amax(self.data,axis=0)) 
    17322329 *         self.mins = np.ascontiguousarray(np.amin(self.data,axis=0)) 
     
    17352332 *         inner_data = self.data 
    17362333 */ 
    1737   __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1738   __pyx_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_ascontiguousarray); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1739   Py_DECREF(__pyx_2); __pyx_2 = 0; 
    1740   __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1741   __pyx_1 = PyObject_GetAttr(__pyx_4, __pyx_kp_arange); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1742   Py_DECREF(__pyx_4); __pyx_4 = 0; 
    1743   __pyx_5 = PyInt_FromLong(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->n); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1744   __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1745   PyTuple_SET_ITEM(__pyx_2, 0, __pyx_5); 
    1746   __pyx_5 = 0; 
    1747   __pyx_4 = PyDict_New(); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1748   __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1749   __pyx_8 = PyObject_GetAttr(__pyx_5, __pyx_kp_27); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1750   Py_DECREF(__pyx_5); __pyx_5 = 0; 
    1751   if (PyDict_SetItem(__pyx_4, __pyx_kp_dtype, __pyx_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1752   Py_DECREF(__pyx_8); __pyx_8 = 0; 
    1753   __pyx_5 = PyEval_CallObjectWithKeywords(__pyx_1, ((PyObject *)__pyx_2), ((PyObject *)__pyx_4)); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1754   Py_DECREF(__pyx_1); __pyx_1 = 0; 
    1755   Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0; 
    1756   Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0; 
    1757   __pyx_8 = PyTuple_New(1); if (unlikely(!__pyx_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1758   PyTuple_SET_ITEM(__pyx_8, 0, __pyx_5); 
    1759   __pyx_5 = 0; 
    1760   __pyx_1 = PyObject_Call(__pyx_3, ((PyObject *)__pyx_8), NULL); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1761   Py_DECREF(__pyx_3); __pyx_3 = 0; 
    1762   Py_DECREF(((PyObject *)__pyx_8)); __pyx_8 = 0; 
    1763   Py_DECREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->indices); 
    1764   ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->indices = __pyx_1; 
    1765   __pyx_1 = 0; 
    1766  
    1767   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":223 
     2334  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2335  __Pyx_GOTREF(__pyx_t_5); 
     2336  __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__ascontiguousarray); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2337  __Pyx_GOTREF(__pyx_t_3); 
     2338  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; 
     2339  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2340  __Pyx_GOTREF(__pyx_t_5); 
     2341  __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__arange); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2342  __Pyx_GOTREF(__pyx_t_2); 
     2343  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; 
     2344  __pyx_t_5 = PyInt_FromLong(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2345  __Pyx_GOTREF(__pyx_t_5); 
     2346  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2347  __Pyx_GOTREF(__pyx_t_4); 
     2348  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); 
     2349  __Pyx_GIVEREF(__pyx_t_5); 
     2350  __pyx_t_5 = 0; 
     2351  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2352  __Pyx_GOTREF(((PyObject *)__pyx_t_5)); 
     2353  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2354  __Pyx_GOTREF(__pyx_t_1); 
     2355  __pyx_t_9 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__int32); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2356  __Pyx_GOTREF(__pyx_t_9); 
     2357  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; 
     2358  if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2359  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; 
     2360  __pyx_t_9 = PyEval_CallObjectWithKeywords(__pyx_t_2, __pyx_t_4, ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2361  __Pyx_GOTREF(__pyx_t_9); 
     2362  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; 
     2363  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; 
     2364  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; 
     2365  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2366  __Pyx_GOTREF(__pyx_t_5); 
     2367  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); 
     2368  __Pyx_GIVEREF(__pyx_t_9); 
     2369  __pyx_t_9 = 0; 
     2370  __pyx_t_9 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2371  __Pyx_GOTREF(__pyx_t_9); 
     2372  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; 
     2373  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; 
     2374  __Pyx_GIVEREF(__pyx_t_9); 
     2375  __Pyx_GOTREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->indices); 
     2376  __Pyx_DECREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->indices); 
     2377  ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->indices = __pyx_t_9; 
     2378  __pyx_t_9 = 0; 
     2379 
     2380  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":223 
    17682381 *         self.indices = np.ascontiguousarray(np.arange(self.n,dtype=np.int32)) 
    17692382 *  
     
    17722385 *         inner_maxes = self.maxes 
    17732386 */ 
    1774   if (!(__Pyx_TypeTest(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1775   __pyx_t_1 = ((PyArrayObject *)((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
    1776   __Pyx_SafeReleaseBuffer(&__pyx_bstruct_inner_data); 
    1777   __pyx_t_2 = __Pyx_GetBuffer_double((PyObject*)__pyx_t_1, &__pyx_bstruct_inner_data, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0); 
    1778   if (unlikely(__pyx_t_2 < 0))  
     2387  if (!(likely(((((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data) == Py_None) || likely(__Pyx_TypeTest(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
     2388  __pyx_t_10 = ((PyArrayObject *)((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
    17792389  { 
    1780       PyErr_Fetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); 
    1781       if (unlikely(__Pyx_GetBuffer_double((PyObject*)__pyx_v_inner_data, &__pyx_bstruct_inner_data, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0) == -1)) { 
    1782           Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5); 
    1783           __Pyx_RaiseBufferFallbackError(); 
    1784         } else { 
    1785           PyErr_Restore(__pyx_t_3, __pyx_t_4, __pyx_t_5); 
     2390    __Pyx_BufFmt_StackElem __pyx_stack[1]; 
     2391    __Pyx_SafeReleaseBuffer(&__pyx_bstruct_inner_data); 
     2392    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_inner_data, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack); 
     2393    if (unlikely(__pyx_t_6 < 0)) { 
     2394      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); 
     2395      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_inner_data, (PyObject*)__pyx_v_inner_data, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { 
     2396        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); 
     2397        __Pyx_RaiseBufferFallbackError(); 
     2398      } else { 
     2399        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13); 
    17862400      } 
     2401    } 
     2402    __pyx_bstride_0_inner_data = __pyx_bstruct_inner_data.strides[0]; __pyx_bstride_1_inner_data = __pyx_bstruct_inner_data.strides[1]; 
     2403    __pyx_bshape_0_inner_data = __pyx_bstruct_inner_data.shape[0]; __pyx_bshape_1_inner_data = __pyx_bstruct_inner_data.shape[1]; 
     2404    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    17872405  } 
    1788   __pyx_bstride_0_inner_data = __pyx_bstruct_inner_data.strides[0]; __pyx_bstride_1_inner_data = __pyx_bstruct_inner_data.strides[1]; 
    1789   __pyx_bshape_0_inner_data = __pyx_bstruct_inner_data.shape[0]; __pyx_bshape_1_inner_data = __pyx_bstruct_inner_data.shape[1]; 
    1790   if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    1791   __pyx_t_1 = 0; 
    1792   Py_INCREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
    1793   Py_DECREF(((PyObject *)__pyx_v_inner_data)); 
     2406  __pyx_t_10 = 0; 
     2407  __Pyx_INCREF(((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
     2408  __Pyx_DECREF(((PyObject *)__pyx_v_inner_data)); 
    17942409  __pyx_v_inner_data = ((PyArrayObject *)((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 
    17952410 
    1796   /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":224 
     2411  /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":224 
    17972412 *  
    17982413 *        &