Changeset 6217
- Timestamp:
- 02/08/10 03:19:40 (4 weeks ago)
- Location:
- branches/0.7.x/scipy
- Files:
-
- 2 modified
-
spatial/ckdtree.c (modified) (407 diffs)
-
stats/vonmises_cython.c (modified) (151 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.7.x/scipy/spatial/ckdtree.c
r5038 r6217 1 /* Generated by Cython 0.1 0 on Mon Nov 10 22:15:02 2008*/1 /* Generated by Cython 0.12.1 on Mon Feb 8 18:11:01 2010 */ 2 2 3 3 #define PY_SSIZE_T_CLEAN 4 4 #include "Python.h" 5 5 #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 6 10 #ifndef PY_LONG_LONG 7 11 #define PY_LONG_LONG LONG_LONG … … 12 16 #if PY_VERSION_HEX < 0x02040000 13 17 #define METH_COEXIST 0 18 #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type) 19 #define PyDict_Contains(d,o) PySequence_Contains(d,o) 14 20 #endif 21 15 22 #if PY_VERSION_HEX < 0x02050000 16 23 typedef int Py_ssize_t; 17 24 #define PY_SSIZE_T_MAX INT_MAX 18 25 #define PY_SSIZE_T_MIN INT_MIN 26 #define PY_FORMAT_SIZE_T "" 19 27 #define PyInt_FromSsize_t(z) PyInt_FromLong(z) 20 28 #define PyInt_AsSsize_t(o) PyInt_AsLong(o) 21 29 #define PyNumber_Index(o) PyNumber_Int(o) 22 30 #define PyIndex_Check(o) PyNumber_Check(o) 31 #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) 23 32 #endif 33 24 34 #if PY_VERSION_HEX < 0x02060000 25 35 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) … … 31 41 32 42 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; 44 54 } Py_buffer; 45 55 46 56 #define PyBUF_SIMPLE 0 47 57 #define PyBUF_WRITABLE 0x0001 48 #define PyBUF_LOCK 0x000249 58 #define PyBUF_FORMAT 0x0004 50 59 #define PyBUF_ND 0x0008 … … 56 65 57 66 #endif 67 58 68 #if PY_MAJOR_VERSION < 3 59 69 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" … … 61 71 #define __Pyx_BUILTIN_MODULE_NAME "builtins" 62 72 #endif 73 63 74 #if PY_MAJOR_VERSION >= 3 64 75 #define Py_TPFLAGS_CHECKTYPES 0 65 76 #define Py_TPFLAGS_HAVE_INDEX 0 66 77 #endif 78 67 79 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) 68 80 #define Py_TPFLAGS_HAVE_NEWBUFFER 0 69 81 #endif 82 70 83 #if PY_MAJOR_VERSION >= 3 71 84 #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 73 93 #define PyInt_Type PyLong_Type 74 94 #define PyInt_Check(op) PyLong_Check(op) … … 85 105 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask 86 106 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) 107 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) 87 108 #else 88 109 #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 90 112 #endif 113 91 114 #if PY_MAJOR_VERSION >= 3 92 115 #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func) 93 116 #endif 117 94 118 #if !defined(WIN32) && !defined(MS_WINDOWS) 95 119 #ifndef __stdcall … … 99 123 #define __cdecl 100 124 #endif 125 #ifndef __fastcall 126 #define __fastcall 127 #endif 101 128 #else 102 129 #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) 103 148 #endif 104 149 #ifdef __cplusplus … … 110 155 #define __PYX_HAVE_API__scipy__spatial__ckdtree 111 156 #include "stdlib.h" 157 #include "stdio.h" 112 158 #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 171 typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ 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 119 180 #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 121 184 #endif 122 185 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)) 190 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); 191 static 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)) 135 200 #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))) 138 205 #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 255 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); 256 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); 257 static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); 258 147 259 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) 148 260 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 160 262 #ifdef __GNUC__ 161 263 /* Test for GCC > 2.95 */ … … 175 277 static PyObject *__pyx_b; 176 278 static PyObject *__pyx_empty_tuple; 279 static PyObject *__pyx_empty_bytes; 177 280 static int __pyx_lineno; 178 281 static int __pyx_clineno = 0; … … 181 284 static const char **__pyx_f; 182 285 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 310 typedef npy_int8 __pyx_t_5numpy_int8_t; 311 312 typedef npy_int16 __pyx_t_5numpy_int16_t; 313 314 typedef npy_int32 __pyx_t_5numpy_int32_t; 315 316 typedef npy_int64 __pyx_t_5numpy_int64_t; 317 318 typedef npy_uint8 __pyx_t_5numpy_uint8_t; 319 320 typedef npy_uint16 __pyx_t_5numpy_uint16_t; 321 322 typedef npy_uint32 __pyx_t_5numpy_uint32_t; 323 324 typedef npy_uint64 __pyx_t_5numpy_uint64_t; 325 326 typedef npy_float32 __pyx_t_5numpy_float32_t; 327 328 typedef npy_float64 __pyx_t_5numpy_float64_t; 329 330 typedef npy_long __pyx_t_5numpy_int_t; 331 332 typedef npy_longlong __pyx_t_5numpy_long_t; 333 334 typedef npy_intp __pyx_t_5numpy_intp_t; 335 336 typedef npy_uintp __pyx_t_5numpy_uintp_t; 337 338 typedef npy_ulong __pyx_t_5numpy_uint_t; 339 340 typedef npy_ulonglong __pyx_t_5numpy_ulong_t; 341 342 typedef npy_double __pyx_t_5numpy_float_t; 343 344 typedef npy_double __pyx_t_5numpy_double_t; 345 346 typedef 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 236 354 #else 237 #define __Pyx_GetBuffer PyObject_GetBuffer 238 #define __Pyx_ReleaseBuffer PyBuffer_Release 355 typedef struct { float real, imag; } __pyx_t_float_complex; 239 356 #endif 240 357 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 271 367 272 368 /* Type declarations */ 273 369 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 308 370 typedef npy_cfloat __pyx_t_5numpy_cfloat_t; 309 371 … … 312 374 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; 313 375 314 /* "/usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":15 376 typedef npy_cdouble __pyx_t_5numpy_complex_t; 377 378 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":15 315 379 * 316 380 * # priority queue … … 325 389 }; 326 390 327 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":19391 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":19 328 392 * char* ptrdata 329 393 * … … 338 402 }; 339 403 340 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":23404 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":23 341 405 * heapcontents contents 342 406 * … … 352 416 }; 353 417 354 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":139418 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":139 355 419 * 356 420 * # Tree structure … … 368 432 }; 369 433 370 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":145434 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":145 371 435 * innernode* less 372 436 * innernode* greater … … 383 447 }; 384 448 385 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":153449 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":153 386 450 * # this is the standard trick for variable-size arrays: 387 451 * # malloc sizeof(nodeinfo)+self.m*sizeof(double) bytes. … … 396 460 }; 397 461 398 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":157462 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":157 399 463 * double side_distances[0] 400 464 * … … 428 492 }; 429 493 static 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 541 static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */ 542 543 static void __Pyx_RaiseDoubleKeywordsError( 544 const char* func_name, PyObject* kw_name); /*proto*/ 545 546 static 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 549 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /*proto*/ 550 551 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); 552 553 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void); 554 555 static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/ 556 static int __Pyx_EndUnpack(PyObject *); /*proto*/ 557 558 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ 559 560 /* Run-time type information about structs used with buffers */ 561 struct __Pyx_StructField_; 562 563 typedef 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 570 typedef struct __Pyx_StructField_ { 571 __Pyx_TypeInfo* type; 572 const char* name; 573 size_t offset; 574 } __Pyx_StructField; 575 576 typedef struct { 577 __Pyx_StructField* field; 578 size_t parent_offset; 579 } __Pyx_BufFmt_StackElem; 580 581 582 static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); 583 static int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); 584 585 static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ 586 587 static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ 588 static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ 589 590 591 static 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 604 static 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 624 static 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 645 static 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 } 663 static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ 664 #define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1) 665 666 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); 667 668 static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/ 669 #if PY_MAJOR_VERSION < 3 670 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); 671 static void __Pyx_ReleaseBuffer(Py_buffer *view); 672 #else 673 #define __Pyx_GetBuffer PyObject_GetBuffer 674 #define __Pyx_ReleaseBuffer PyBuffer_Release 675 #endif 676 677 Py_ssize_t __Pyx_zeros[] = {0, 0}; 678 Py_ssize_t __Pyx_minusones[] = {-1, -1}; 679 680 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/ 681 682 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ 683 684 static 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 707 static 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 737 static 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 767 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); 768 769 static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); 770 771 static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); 772 773 static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); 774 775 static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); 776 777 static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); 778 779 static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); 780 781 static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); 782 783 static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); 784 785 static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); 786 787 static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); 788 789 static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); 790 791 static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); 792 793 static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); 794 795 static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); 796 797 static void __Pyx_WriteUnraisable(const char *name); /*proto*/ 798 799 static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ 800 801 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict); /*proto*/ 802 803 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/ 804 805 static void __Pyx_AddTraceback(const char *funcname); /*proto*/ 806 807 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ 430 808 /* Module declarations from python_buffer */ 431 809 810 /* Module declarations from python_ref */ 811 432 812 /* Module declarations from stdlib */ 433 813 814 /* Module declarations from stdio */ 815 434 816 /* Module declarations from numpy */ 435 817 … … 437 819 438 820 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; 821 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; 822 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; 439 823 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; 824 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; 825 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *); /*proto*/ 826 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *, PyObject *); /*proto*/ 827 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *, PyObject *, PyObject *); /*proto*/ 828 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ 829 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/ 830 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ 831 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *, PyObject *); /*proto*/ 832 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *); /*proto*/ 440 833 /* Module declarations from scipy.spatial.ckdtree */ 441 834 442 835 static PyTypeObject *__pyx_ptype_5scipy_7spatial_7ckdtree_cKDTree = 0; 443 836 static 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*/ 837 static CYTHON_INLINE PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapcreate(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *, int); /*proto*/ 838 static CYTHON_INLINE PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapdestroy(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *); /*proto*/ 839 static CYTHON_INLINE PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapresize(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *, int); /*proto*/ 840 static CYTHON_INLINE PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heappush(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *, struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem); /*proto*/ 449 841 static struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem __pyx_f_5scipy_7spatial_7ckdtree_heappeek(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *); /*proto*/ 450 842 static PyObject *__pyx_f_5scipy_7spatial_7ckdtree_heapremove(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *); /*proto*/ 451 843 static 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 844 static CYTHON_INLINE double __pyx_f_5scipy_7spatial_7ckdtree_dmax(double, double); /*proto*/ 845 static CYTHON_INLINE double __pyx_f_5scipy_7spatial_7ckdtree_dabs(double); /*proto*/ 846 static CYTHON_INLINE double __pyx_f_5scipy_7spatial_7ckdtree__distance_p(double *, double *, double, int, double); /*proto*/ 847 static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), 'R' }; 848 static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "numpy.int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), 'I' }; 849 static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), 'I' }; 850 #define __Pyx_MODULE_NAME "scipy.spatial.ckdtree" 851 int __pyx_module_is_main_scipy__spatial__ckdtree = 0; 456 852 457 853 /* Implementation of scipy.spatial.ckdtree */ 854 static PyObject *__pyx_builtin_ValueError; 855 static PyObject *__pyx_builtin_range; 856 static PyObject *__pyx_builtin_RuntimeError; 857 static char __pyx_k_1[] = "Heap containing %d items cannot be resized to %d"; 858 static char __pyx_k_2[] = "leafsize must be at least 1"; 859 static char __pyx_k_3[] = "distance_upper_bound"; 860 static char __pyx_k_5[] = "x must consist of vectors of length %d but has shape %s"; 861 static char __pyx_k_6[] = "Only p-norms with 1<=p<=infinity permitted"; 862 static char __pyx_k_7[] = "ndarray is not C contiguous"; 863 static char __pyx_k_8[] = "ndarray is not Fortran contiguous"; 864 static char __pyx_k_9[] = "Non-native byte order not supported"; 865 static char __pyx_k_10[] = "unknown dtype code in numpy.pxd (%d)"; 866 static char __pyx_k_11[] = "Format string allocated too short, see comment in numpy.pxd"; 867 static char __pyx_k_12[] = "Format string allocated too short."; 868 static char __pyx_k_13[] = "cKDTree.__init__ (line 195)"; 869 static char __pyx_k_14[] = "cKDTree.query (line 516)"; 870 static char __pyx_k__B[] = "B"; 871 static char __pyx_k__H[] = "H"; 872 static char __pyx_k__I[] = "I"; 873 static char __pyx_k__L[] = "L"; 874 static char __pyx_k__O[] = "O"; 875 static char __pyx_k__Q[] = "Q"; 876 static char __pyx_k__b[] = "b"; 877 static char __pyx_k__d[] = "d"; 878 static char __pyx_k__f[] = "f"; 879 static char __pyx_k__g[] = "g"; 880 static char __pyx_k__h[] = "h"; 881 static char __pyx_k__i[] = "i"; 882 static char __pyx_k__k[] = "k"; 883 static char __pyx_k__l[] = "l"; 884 static char __pyx_k__m[] = "m"; 885 static char __pyx_k__n[] = "n"; 886 static char __pyx_k__p[] = "p"; 887 static char __pyx_k__q[] = "q"; 888 static char __pyx_k__x[] = "x"; 889 static char __pyx_k__Zd[] = "Zd"; 890 static char __pyx_k__Zf[] = "Zf"; 891 static char __pyx_k__Zg[] = "Zg"; 892 static char __pyx_k__np[] = "np"; 893 static char __pyx_k__buf[] = "buf"; 894 static char __pyx_k__eps[] = "eps"; 895 static char __pyx_k__inf[] = "inf"; 896 static char __pyx_k__obj[] = "obj"; 897 static char __pyx_k__amax[] = "amax"; 898 static char __pyx_k__amin[] = "amin"; 899 static char __pyx_k__axis[] = "axis"; 900 static char __pyx_k__base[] = "base"; 901 static char __pyx_k__data[] = "data"; 902 static char __pyx_k__fill[] = "fill"; 903 static char __pyx_k__heap[] = "heap"; 904 static char __pyx_k__less[] = "less"; 905 static char __pyx_k__mins[] = "mins"; 906 static char __pyx_k__ndim[] = "ndim"; 907 static char __pyx_k__node[] = "node"; 908 static char __pyx_k__prod[] = "prod"; 909 static char __pyx_k__tree[] = "tree"; 910 static char __pyx_k__descr[] = "descr"; 911 static char __pyx_k__dtype[] = "dtype"; 912 static char __pyx_k__empty[] = "empty"; 913 static char __pyx_k__float[] = "float"; 914 static char __pyx_k__int32[] = "int32"; 915 static char __pyx_k__maxes[] = "maxes"; 916 static char __pyx_k__names[] = "names"; 917 static char __pyx_k__numpy[] = "numpy"; 918 static char __pyx_k__query[] = "query"; 919 static char __pyx_k__range[] = "range"; 920 static char __pyx_k__shape[] = "shape"; 921 static char __pyx_k__space[] = "space"; 922 static char __pyx_k__split[] = "split"; 923 static char __pyx_k__arange[] = "arange"; 924 static char __pyx_k__astype[] = "astype"; 925 static char __pyx_k__fields[] = "fields"; 926 static char __pyx_k__format[] = "format"; 927 static char __pyx_k__kdtree[] = "kdtree"; 928 static char __pyx_k____build[] = "__build"; 929 static char __pyx_k____query[] = "__query"; 930 static char __pyx_k__asarray[] = "asarray"; 931 static char __pyx_k__cKDTree[] = "cKDTree"; 932 static char __pyx_k__end_idx[] = "end_idx"; 933 static char __pyx_k__greater[] = "greater"; 934 static char __pyx_k__indices[] = "indices"; 935 static char __pyx_k__intdata[] = "intdata"; 936 static char __pyx_k__newaxis[] = "newaxis"; 937 static char __pyx_k__ptrdata[] = "ptrdata"; 938 static char __pyx_k__reshape[] = "reshape"; 939 static char __pyx_k__strides[] = "strides"; 940 static char __pyx_k____init__[] = "__init__"; 941 static char __pyx_k____main__[] = "__main__"; 942 static char __pyx_k____test__[] = "__test__"; 943 static char __pyx_k__contents[] = "contents"; 944 static char __pyx_k__itemsize[] = "itemsize"; 945 static char __pyx_k__leafsize[] = "leafsize"; 946 static char __pyx_k__priority[] = "priority"; 947 static char __pyx_k__raw_data[] = "raw_data"; 948 static char __pyx_k__raw_mins[] = "raw_mins"; 949 static char __pyx_k__readonly[] = "readonly"; 950 static char __pyx_k__type_num[] = "type_num"; 951 static char __pyx_k__byteorder[] = "byteorder"; 952 static char __pyx_k__raw_maxes[] = "raw_maxes"; 953 static char __pyx_k__split_dim[] = "split_dim"; 954 static char __pyx_k__start_idx[] = "start_idx"; 955 static char __pyx_k__ValueError[] = "ValueError"; 956 static char __pyx_k__suboffsets[] = "suboffsets"; 957 static char __pyx_k____free_tree[] = "__free_tree"; 958 static char __pyx_k__raw_indices[] = "raw_indices"; 959 static char __pyx_k__RuntimeError[] = "RuntimeError"; 960 static char __pyx_k__side_distances[] = "side_distances"; 961 static char __pyx_k__ascontiguousarray[] = "ascontiguousarray"; 962 static PyObject *__pyx_kp_s_1; 963 static PyObject *__pyx_kp_u_10; 964 static PyObject *__pyx_kp_u_11; 965 static PyObject *__pyx_kp_u_12; 966 static PyObject *__pyx_kp_u_13; 967 static PyObject *__pyx_kp_u_14; 968 static PyObject *__pyx_kp_s_2; 969 static PyObject *__pyx_n_s_3; 970 static PyObject *__pyx_kp_s_5; 971 static PyObject *__pyx_kp_s_6; 972 static PyObject *__pyx_kp_u_7; 973 static PyObject *__pyx_kp_u_8; 974 static PyObject *__pyx_kp_u_9; 975 static PyObject *__pyx_n_s__RuntimeError; 976 static PyObject *__pyx_n_s__ValueError; 977 static PyObject *__pyx_n_s____build; 978 static PyObject *__pyx_n_s____free_tree; 979 static PyObject *__pyx_n_s____init__; 980 static PyObject *__pyx_n_s____main__; 981 static PyObject *__pyx_n_s____query; 982 static PyObject *__pyx_n_s____test__; 983 static PyObject *__pyx_n_s__amax; 984 static PyObject *__pyx_n_s__amin; 985 static PyObject *__pyx_n_s__arange; 986 static PyObject *__pyx_n_s__asarray; 987 static PyObject *__pyx_n_s__ascontiguousarray; 988 static PyObject *__pyx_n_s__astype; 989 static PyObject *__pyx_n_s__axis; 990 static PyObject *__pyx_n_s__base; 991 static PyObject *__pyx_n_s__buf; 992 static PyObject *__pyx_n_s__byteorder; 993 static PyObject *__pyx_n_s__cKDTree; 994 static PyObject *__pyx_n_s__contents; 995 static PyObject *__pyx_n_s__data; 996 static PyObject *__pyx_n_s__descr; 997 static PyObject *__pyx_n_s__dtype; 998 static PyObject *__pyx_n_s__empty; 999 static PyObject *__pyx_n_s__end_idx; 1000 static PyObject *__pyx_n_s__eps; 1001 static PyObject *__pyx_n_s__fields; 1002 static PyObject *__pyx_n_s__fill; 1003 static PyObject *__pyx_n_s__float; 1004 static PyObject *__pyx_n_s__format; 1005 static PyObject *__pyx_n_s__greater; 1006 static PyObject *__pyx_n_s__heap; 1007 static PyObject *__pyx_n_s__i; 1008 static PyObject *__pyx_n_s__indices; 1009 static PyObject *__pyx_n_s__inf; 1010 static PyObject *__pyx_n_s__int32; 1011 static PyObject *__pyx_n_s__intdata; 1012 static PyObject *__pyx_n_s__itemsize; 1013 static PyObject *__pyx_n_s__k; 1014 static PyObject *__pyx_n_s__kdtree; 1015 static PyObject *__pyx_n_s__leafsize; 1016 static PyObject *__pyx_n_s__less; 1017 static PyObject *__pyx_n_s__m; 1018 static PyObject *__pyx_n_s__maxes; 1019 static PyObject *__pyx_n_s__mins; 1020 static PyObject *__pyx_n_s__n; 1021 static PyObject *__pyx_n_s__names; 1022 static PyObject *__pyx_n_s__ndim; 1023 static PyObject *__pyx_n_s__newaxis; 1024 static PyObject *__pyx_n_s__node; 1025 static PyObject *__pyx_n_s__np; 1026 static PyObject *__pyx_n_s__numpy; 1027 static PyObject *__pyx_n_s__obj; 1028 static PyObject *__pyx_n_s__p; 1029 static PyObject *__pyx_n_s__priority; 1030 static PyObject *__pyx_n_s__prod; 1031 static PyObject *__pyx_n_s__ptrdata; 1032 static PyObject *__pyx_n_s__query; 1033 static PyObject *__pyx_n_s__range; 1034 static PyObject *__pyx_n_s__raw_data; 1035 static PyObject *__pyx_n_s__raw_indices; 1036 static PyObject *__pyx_n_s__raw_maxes; 1037 static PyObject *__pyx_n_s__raw_mins; 1038 static PyObject *__pyx_n_s__readonly; 1039 static PyObject *__pyx_n_s__reshape; 1040 static PyObject *__pyx_n_s__shape; 1041 static PyObject *__pyx_n_s__side_distances; 1042 static PyObject *__pyx_n_s__space; 1043 static PyObject *__pyx_n_s__split; 1044 static PyObject *__pyx_n_s__split_dim; 1045 static PyObject *__pyx_n_s__start_idx; 1046 static PyObject *__pyx_n_s__strides; 1047 static PyObject *__pyx_n_s__suboffsets; 1048 static PyObject *__pyx_n_s__tree; 1049 static PyObject *__pyx_n_s__type_num; 1050 static PyObject *__pyx_n_s__x; 458 1051 static 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 1052 static PyObject *__pyx_int_neg_1; 1053 static PyObject *__pyx_int_15; 1054 static double __pyx_k_4; 1055 1056 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":28 581 1057 * int space 582 1058 * … … 586 1062 */ 587 1063 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 1064 static 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 592 1069 * 593 1070 * cdef inline heapcreate(heap* self,int initial_size): … … 598 1075 __pyx_v_self->space = __pyx_v_initial_size; 599 1076 600 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":301077 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":30 601 1078 * cdef inline heapcreate(heap* self,int initial_size): 602 1079 * self.space = initial_size … … 607 1084 __pyx_v_self->heap = ((struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem *)malloc(((sizeof(struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem)) * __pyx_v_self->space))); 608 1085 609 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":311086 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":31 610 1087 * self.space = initial_size 611 1088 * self.heap = <heapitem*>stdlib.malloc(sizeof(heapitem)*self.space) … … 616 1093 __pyx_v_self->n = 0; 617 1094 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(); 619 1098 return __pyx_r; 620 1099 } 621 1100 622 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":331101 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":33 623 1102 * self.n=0 624 1103 * … … 628 1107 */ 629 1108 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 1109 static 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 634 1114 * 635 1115 * cdef inline heapdestroy(heap* self): … … 640 1120 free(__pyx_v_self->heap); 641 1121 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(); 643 1125 return __pyx_r; 644 1126 } 645 1127 646 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":361128 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":36 647 1129 * stdlib.free(self.heap) 648 1130 * … … 652 1134 */ 653 1135 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":371136 static 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 663 1145 * 664 1146 * cdef inline heapresize(heap* self, int new_space): … … 667 1149 * self.space = new_space 668 1150 */ 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":381151 __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 673 1155 * cdef inline heapresize(heap* self, int new_space): 674 1156 * if new_space<self.n: … … 677 1159 * self.heap = <heapitem*>stdlib.realloc(<void*>self.heap,new_space*sizeof(heapitem)) 678 1160 */ 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; 695 1186 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 696 1187 goto __pyx_L3; … … 698 1189 __pyx_L3:; 699 1190 700 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":391191 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":39 701 1192 * if new_space<self.n: 702 1193 * raise ValueError("Heap containing %d items cannot be resized to %d" % (self.n, new_space)) … … 707 1198 __pyx_v_self->space = __pyx_v_new_space; 708 1199 709 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":401200 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":40 710 1201 * raise ValueError("Heap containing %d items cannot be resized to %d" % (self.n, new_space)) 711 1202 * self.space = new_space … … 716 1207 __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))))); 717 1208 718 __pyx_r = Py_None; Py_INCREF(Py_None);1209 __pyx_r = Py_None; __Pyx_INCREF(Py_None); 719 1210 goto __pyx_L0; 720 1211 __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); 724 1215 __Pyx_AddTraceback("scipy.spatial.ckdtree.heapresize"); 725 1216 __pyx_r = 0; 726 1217 __pyx_L0:; 1218 __Pyx_XGIVEREF(__pyx_r); 1219 __Pyx_RefNannyFinishContext(); 727 1220 return __pyx_r; 728 1221 } 729 1222 730 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":421223 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":42 731 1224 * self.heap = <heapitem*>stdlib.realloc(<void*>self.heap,new_space*sizeof(heapitem)) 732 1225 * … … 736 1229 */ 737 1230 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) {1231 static 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) { 739 1232 int __pyx_v_i; 740 1233 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 746 1242 * cdef heapitem t 747 1243 * … … 752 1248 __pyx_v_self->n += 1; 753 1249 754 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":471250 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":47 755 1251 * 756 1252 * self.n += 1 … … 759 1255 * 760 1256 */ 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":481257 __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 765 1261 * self.n += 1 766 1262 * if self.n>self.space: … … 769 1265 * i = self.n-1 770 1266 */ 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; 773 1270 goto __pyx_L3; 774 1271 } 775 1272 __pyx_L3:; 776 1273 777 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":501274 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":50 778 1275 * heapresize(self,2*self.space+1) 779 1276 * … … 784 1281 __pyx_v_i = (__pyx_v_self->n - 1); 785 1282 786 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":511283 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":51 787 1284 * 788 1285 * i = self.n-1 … … 793 1290 (__pyx_v_self->heap[__pyx_v_i]) = __pyx_v_item; 794 1291 795 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":521292 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":52 796 1293 * i = self.n-1 797 1294 * self.heap[i] = item … … 801 1298 */ 802 1299 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 810 1310 * self.heap[i] = item 811 1311 * while i>0 and self.heap[i].priority<self.heap[(i-1)//2].priority: … … 814 1314 * self.heap[i] = t 815 1315 */ 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":541316 __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 819 1319 * while i>0 and self.heap[i].priority<self.heap[(i-1)//2].priority: 820 1320 * t = self.heap[(i-1)//2] … … 823 1323 * i = (i-1)//2 824 1324 */ 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":551325 (__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 828 1328 * t = self.heap[(i-1)//2] 829 1329 * self.heap[(i-1)//2] = self.heap[i] … … 834 1334 (__pyx_v_self->heap[__pyx_v_i]) = __pyx_v_t; 835 1335 836 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":561336 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":56 837 1337 * self.heap[(i-1)//2] = self.heap[i] 838 1338 * self.heap[i] = t … … 841 1341 * cdef heapitem heappeek(heap* self): 842 1342 */ 843 __pyx_v_i = ((__pyx_v_i - 1) /2);1343 __pyx_v_i = __Pyx_div_long((__pyx_v_i - 1), 2); 844 1344 } 845 1345 846 __pyx_r = Py_None; Py_INCREF(Py_None);1346 __pyx_r = Py_None; __Pyx_INCREF(Py_None); 847 1347 goto __pyx_L0; 848 1348 __pyx_L1_error:; 849 Py_XDECREF(__pyx_2);1349 __Pyx_XDECREF(__pyx_t_2); 850 1350 __Pyx_AddTraceback("scipy.spatial.ckdtree.heappush"); 851 1351 __pyx_r = 0; 852 1352 __pyx_L0:; 1353 __Pyx_XGIVEREF(__pyx_r); 1354 __Pyx_RefNannyFinishContext(); 853 1355 return __pyx_r; 854 1356 } 855 1357 856 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":581358 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":58 857 1359 * i = (i-1)//2 858 1360 * … … 864 1366 static struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem __pyx_f_5scipy_7spatial_7ckdtree_heappeek(struct __pyx_t_5scipy_7spatial_7ckdtree_heap *__pyx_v_self) { 865 1367 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 868 1371 * 869 1372 * cdef heapitem heappeek(heap* self): … … 876 1379 877 1380 __pyx_L0:; 1381 __Pyx_RefNannyFinishContext(); 878 1382 return __pyx_r; 879 1383 } 880 1384 881 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":611385 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":61 882 1386 * return self.heap[0] 883 1387 * … … 893 1397 int __pyx_v_k; 894 1398 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 900 1408 * cdef int i, j, k, l 901 1409 * … … 906 1414 (__pyx_v_self->heap[0]) = (__pyx_v_self->heap[(__pyx_v_self->n - 1)]); 907 1415 908 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":661416 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":66 909 1417 * 910 1418 * self.heap[0] = self.heap[self.n-1] … … 915 1423 __pyx_v_self->n -= 1; 916 1424 917 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":671425 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":67 918 1426 * self.heap[0] = self.heap[self.n-1] 919 1427 * self.n -= 1 … … 922 1430 * 923 1431 */ 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; 927 1438 } 928 if (__pyx_ 1) {929 930 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":681439 if (__pyx_t_3) { 1440 1441 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":68 931 1442 * self.n -= 1 932 1443 * if self.n < self.space//4 and self.space>40: #FIXME: magic number … … 935 1446 * i=0 936 1447 */ 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; 939 1451 goto __pyx_L3; 940 1452 } 941 1453 __pyx_L3:; 942 1454 943 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":701455 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":70 944 1456 * heapresize(self,self.space//2+1) 945 1457 * … … 950 1462 __pyx_v_i = 0; 951 1463 952 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":711464 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":71 953 1465 * 954 1466 * i=0 … … 959 1471 __pyx_v_j = 1; 960 1472 961 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":721473 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":72 962 1474 * i=0 963 1475 * j=1 … … 968 1480 __pyx_v_k = 2; 969 1481 970 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":731482 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":73 971 1483 * j=1 972 1484 * k=2 … … 976 1488 */ 977 1489 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 982 1492 * k=2 983 1493 * while ((j<self.n and … … 986 1496 * self.heap[i].priority > self.heap[k].priority)): 987 1497 */ 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 993 1508 * while ((j<self.n and 994 1509 * self.heap[i].priority > self.heap[j].priority or … … 997 1512 * if k<self.n and self.heap[j].priority>self.heap[k].priority: 998 1513 */ 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":761514 __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 1003 1518 * self.heap[i].priority > self.heap[j].priority or 1004 1519 * k<self.n and … … 1007 1522 * l = k 1008 1523 */ 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; 1010 1528 } 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 1015 1536 * k<self.n and 1016 1537 * self.heap[i].priority > self.heap[k].priority)): … … 1019 1540 * else: 1020 1541 */ 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 1028 1552 * self.heap[i].priority > self.heap[k].priority)): 1029 1553 * if k<self.n and self.heap[j].priority>self.heap[k].priority: … … 1037 1561 /*else*/ { 1038 1562 1039 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":801563 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":80 1040 1564 * l = k 1041 1565 * else: … … 1048 1572 __pyx_L6:; 1049 1573 1050 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":811574 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":81 1051 1575 * else: 1052 1576 * l = j … … 1057 1581 __pyx_v_t = (__pyx_v_self->heap[__pyx_v_l]); 1058 1582 1059 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":821583 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":82 1060 1584 * l = j 1061 1585 * t = self.heap[l] … … 1066 1590 (__pyx_v_self->heap[__pyx_v_l]) = (__pyx_v_self->heap[__pyx_v_i]); 1067 1591 1068 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":831592 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":83 1069 1593 * t = self.heap[l] 1070 1594 * self.heap[l] = self.heap[i] … … 1075 1599 (__pyx_v_self->heap[__pyx_v_i]) = __pyx_v_t; 1076 1600 1077 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":841601 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":84 1078 1602 * self.heap[l] = self.heap[i] 1079 1603 * self.heap[i] = t … … 1084 1608 __pyx_v_i = __pyx_v_l; 1085 1609 1086 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":851610 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":85 1087 1611 * self.heap[i] = t 1088 1612 * i = l … … 1093 1617 __pyx_v_j = ((2 * __pyx_v_i) + 1); 1094 1618 1095 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":861619 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":86 1096 1620 * i = l 1097 1621 * j = 2*i+1 … … 1103 1627 } 1104 1628 1105 __pyx_r = Py_None; Py_INCREF(Py_None);1629 __pyx_r = Py_None; __Pyx_INCREF(Py_None); 1106 1630 goto __pyx_L0; 1107 1631 __pyx_L1_error:; 1108 Py_XDECREF(__pyx_2);1632 __Pyx_XDECREF(__pyx_t_4); 1109 1633 __Pyx_AddTraceback("scipy.spatial.ckdtree.heapremove"); 1110 1634 __pyx_r = 0; 1111 1635 __pyx_L0:; 1636 __Pyx_XGIVEREF(__pyx_r); 1637 __Pyx_RefNannyFinishContext(); 1112 1638 return __pyx_r; 1113 1639 } 1114 1640 1115 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":881641 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":88 1116 1642 * k = 2*i+2 1117 1643 * … … 1124 1650 struct __pyx_t_5scipy_7spatial_7ckdtree_heapitem __pyx_v_it; 1125 1651 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 1129 1656 * cdef heapitem heappop(heap* self): 1130 1657 * cdef heapitem it … … 1135 1662 __pyx_v_it = __pyx_f_5scipy_7spatial_7ckdtree_heappeek(__pyx_v_self); 1136 1663 1137 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":911664 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":91 1138 1665 * cdef heapitem it 1139 1666 * it = heappeek(self) … … 1142 1669 * 1143 1670 */ 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 1148 1676 * it = heappeek(self) 1149 1677 * heapremove(self) … … 1157 1685 goto __pyx_L0; 1158 1686 __pyx_L1_error:; 1159 Py_XDECREF(__pyx_1);1687 __Pyx_XDECREF(__pyx_t_1); 1160 1688 __Pyx_WriteUnraisable("scipy.spatial.ckdtree.heappop"); 1161 1689 __pyx_L0:; 1690 __Pyx_RefNannyFinishContext(); 1162 1691 return __pyx_r; 1163 1692 } 1164 1693 1165 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":991694 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":99 1166 1695 * 1167 1696 * # utility functions … … 1171 1700 */ 1172 1701 1173 static INLINE double __pyx_f_5scipy_7spatial_7ckdtree_dmax(double __pyx_v_x, double __pyx_v_y) {1702 static CYTHON_INLINE double __pyx_f_5scipy_7spatial_7ckdtree_dmax(double __pyx_v_x, double __pyx_v_y) { 1174 1703 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 1178 1708 * # utility functions 1179 1709 * cdef inline double dmax(double x, double y): … … 1182 1712 * else: 1183 1713 */ 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":1011714 __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 1188 1718 * cdef inline double dmax(double x, double y): 1189 1719 * if x>y: … … 1198 1728 /*else*/ { 1199 1729 1200 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":1031730 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":103 1201 1731 * return x 1202 1732 * else: … … 1212 1742 __pyx_r = 0; 1213 1743 __pyx_L0:; 1744 __Pyx_RefNannyFinishContext(); 1214 1745 return __pyx_r; 1215 1746 } 1216 1747 1217 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":1041748 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":104 1218 1749 * else: 1219 1750 * return y … … 1223 1754 */ 1224 1755 1225 static INLINE double __pyx_f_5scipy_7spatial_7ckdtree_dabs(double __pyx_v_x) {1756 static CYTHON_INLINE double __pyx_f_5scipy_7spatial_7ckdtree_dabs(double __pyx_v_x) { 1226 1757 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 1230 1762 * return y 1231 1763 * cdef inline double dabs(double x): … … 1234 1766 * else: 1235 1767 */ 1236 __pyx_ 1 = (__pyx_v_x > 0);1237 if (__pyx_ 1) {1238 1239 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":1061768 __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 1240 1772 * cdef inline double dabs(double x): 1241 1773 * if x>0: … … 1250 1782 /*else*/ { 1251 1783 1252 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":1081784 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":108 1253 1785 * return x 1254 1786 * else: … … 1264 1796 __pyx_r = 0; 1265 1797 __pyx_L0:; 1798 __Pyx_RefNannyFinishContext(); 1266 1799 return __pyx_r; 1267 1800 } 1268 1801 1269 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":1091802 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":109 1270 1803 * else: 1271 1804 * return -x … … 1275 1808 */ 1276 1809 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) {1810 static 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) { 1278 1811 int __pyx_v_i; 1279 1812 double __pyx_v_r; 1280 1813 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 1284 1820 * cdef int i 1285 1821 * cdef double r … … 1290 1826 __pyx_v_r = 0; 1291 1827 1292 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":1191828 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":119 1293 1829 * cdef double r 1294 1830 * r = 0 … … 1297 1833 * r = dmax(r,dabs(x[i]-y[i])) 1298 1834 */ 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":1201835 __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 1303 1839 * r = 0 1304 1840 * if p==infinity: … … 1307 1843 * if r>upperbound: 1308 1844 */ 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 1312 1850 * if p==infinity: 1313 1851 * for i in range(k): … … 1318 1856 __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])))); 1319 1857 1320 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":1221858 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":122 1321 1859 * for i in range(k): 1322 1860 * r = dmax(r,dabs(x[i]-y[i])) … … 1325 1863 * elif p==1: 1326 1864 */ 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":1231865 __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 1331 1869 * r = dmax(r,dabs(x[i]-y[i])) 1332 1870 * if r>upperbound: … … 1344 1882 } 1345 1883 1346 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":1241884 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":124 1347 1885 * if r>upperbound: 1348 1886 * return r … … 1351 1889 * r += dabs(x[i]-y[i]) 1352 1890 */ 1353 __pyx_ 1 = (__pyx_v_p == 1);1354 if (__pyx_ 1) {1355 1356 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":1251891 __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 1357 1895 * return r 1358 1896 * elif p==1: … … 1361 1899 * if r>upperbound: 1362 1900 */ 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 1366 1906 * elif p==1: 1367 1907 * for i in range(k): … … 1372 1912 __pyx_v_r += __pyx_f_5scipy_7spatial_7ckdtree_dabs(((__pyx_v_x[__pyx_v_i]) - (__pyx_v_y[__pyx_v_i]))); 1373 1913 1374 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":1271914 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":127 1375 1915 * for i in range(k): 1376 1916 * r += dabs(x[i]-y[i]) … … 1379 1919 * else: 1380 1920 */ 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":1281921 __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 1385 1925 * r += dabs(x[i]-y[i]) 1386 1926 * if r>upperbound: … … 1399 1939 /*else*/ { 1400 1940 1401 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":1301941 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":130 1402 1942 * return r 1403 1943 * else: … … 1406 1946 * if r>upperbound: 1407 1947 */ 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 1411 1953 * else: 1412 1954 * for i in range(k): … … 1417 1959 __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); 1418 1960 1419 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":1321961 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":132 1420 1962 * for i in range(k): 1421 1963 * r += dabs(x[i]-y[i])**p … … 1424 1966 * return r 1425 1967 */ 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":1331968 __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 1430 1972 * r += dabs(x[i]-y[i])**p 1431 1973 * if r>upperbound: … … 1443 1985 __pyx_L3:; 1444 1986 1445 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":1341987 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":134 1446 1988 * if r>upperbound: 1447 1989 * return r … … 1455 1997 __pyx_r = 0; 1456 1998 __pyx_L0:; 1999 __Pyx_RefNannyFinishContext(); 1457 2000 return __pyx_r; 1458 2001 } 1459 2002 1460 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":1952003 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":195 1461 2004 * cdef object indices 1462 2005 * cdef np.int32_t* raw_indices … … 1490 2033 Py_ssize_t __pyx_bshape_0_inner_mins = 0; 1491 2034 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; 1502 2037 PyObject *__pyx_t_3 = NULL; 1503 2038 PyObject *__pyx_t_4 = NULL; 1504 2039 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__"); 1510 2053 if (unlikely(__pyx_kwds)) { 2054 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds); 1511 2055 PyObject* values[2] = {0,0}; 1512 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);1513 2056 switch (PyTuple_GET_SIZE(__pyx_args)) { 1514 2057 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); … … 1519 2062 switch (PyTuple_GET_SIZE(__pyx_args)) { 1520 2063 case 0: 1521 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_ kp_data);2064 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__data); 1522 2065 if (likely(values[0])) kw_args--; 1523 2066 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 } 1524 2072 } 1525 2073 if (unlikely(kw_args > 0)) { … … 1528 2076 __pyx_v_data = values[0]; 1529 2077 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); 1531 2081 } 1532 2082 } else { 2083 __pyx_v_leafsize = ((int)10); 1533 2084 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;} 1535 2086 case 1: __pyx_v_data = PyTuple_GET_ITEM(__pyx_args, 0); 1536 2087 break; … … 1545 2096 return -1; 1546 2097 __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); 1551 2104 __pyx_bstruct_inner_data.buf = NULL; 1552 2105 __pyx_bstruct_inner_maxes.buf = NULL; … … 1554 2107 __pyx_bstruct_inner_indices.buf = NULL; 1555 2108 1556 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":2142109 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":214 1557 2110 * cdef np.ndarray[double, ndim=1] inner_mins 1558 2111 * cdef np.ndarray[np.int32_t, ndim=1] inner_indices … … 1561 2114 * self.leafsize = leafsize 1562 2115 */ 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 1584 2147 * cdef np.ndarray[np.int32_t, ndim=1] inner_indices 1585 2148 * self.data = np.ascontiguousarray(data,dtype=np.float) … … 1588 2151 * if self.leafsize<1: 1589 2152 */ 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; 1612 2194 } 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 1629 2197 * self.data = np.ascontiguousarray(data,dtype=np.float) 1630 2198 * self.n, self.m = np.shape(self.data) … … 1635 2203 ((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->leafsize = __pyx_v_leafsize; 1636 2204 1637 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":2172205 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":217 1638 2206 * self.n, self.m = np.shape(self.data) 1639 2207 * self.leafsize = leafsize … … 1642 2210 * self.maxes = np.ascontiguousarray(np.amax(self.data,axis=0)) 1643 2211 */ 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":2182212 __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 1648 2216 * self.leafsize = leafsize 1649 2217 * if self.leafsize<1: … … 1652 2220 * self.mins = np.ascontiguousarray(np.amin(self.data,axis=0)) 1653 2221 */ 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; 1661 2232 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 1662 2233 goto __pyx_L6; … … 1664 2235 __pyx_L6:; 1665 2236 1666 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":2192237 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":219 1667 2238 * if self.leafsize<1: 1668 2239 * raise ValueError("leafsize must be at least 1") … … 1671 2242 * self.indices = np.ascontiguousarray(np.arange(self.n,dtype=np.int32)) 1672 2243 */ 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 1699 2283 * raise ValueError("leafsize must be at least 1") 1700 2284 * self.maxes = np.ascontiguousarray(np.amax(self.data,axis=0)) … … 1703 2287 * 1704 2288 */ 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 1731 2328 * self.maxes = np.ascontiguousarray(np.amax(self.data,axis=0)) 1732 2329 * self.mins = np.ascontiguousarray(np.amin(self.data,axis=0)) … … 1735 2332 * inner_data = self.data 1736 2333 */ 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 1768 2381 * self.indices = np.ascontiguousarray(np.arange(self.n,dtype=np.int32)) 1769 2382 * … … 1772 2385 * inner_maxes = self.maxes 1773 2386 */ 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); 1779 2389 { 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); 1786 2400 } 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;} 1787 2405 } 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)); 1794 2409 __pyx_v_inner_data = ((PyArrayObject *)((struct __pyx_obj_5scipy_7spatial_7ckdtree_cKDTree *)__pyx_v_self)->data); 1795 2410 1796 /* "/ usr/data/david/src/dsp/scipy/trunk/scipy/spatial/ckdtree.pyx":2242411 /* "/home/david/src/numeric/scipy/scipy-git/scipy/spatial/ckdtree.pyx":224 1797 2412 * 1798 2413 * &
