1
/* Generated by Cython 0.11.2 on Tue Aug 4 23:05:09 2009 */
3
#define PY_SSIZE_T_CLEAN
5
#include "structmember.h"
7
#error Python headers needed to compile C extensions, please install development version of Python.
10
#define PY_LONG_LONG LONG_LONG
13
#define DL_EXPORT(t) t
15
#if PY_VERSION_HEX < 0x02040000
16
#define METH_COEXIST 0
17
#define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
19
#if PY_VERSION_HEX < 0x02050000
20
typedef int Py_ssize_t;
21
#define PY_SSIZE_T_MAX INT_MAX
22
#define PY_SSIZE_T_MIN INT_MIN
23
#define PY_FORMAT_SIZE_T ""
24
#define PyInt_FromSsize_t(z) PyInt_FromLong(z)
25
#define PyInt_AsSsize_t(o) PyInt_AsLong(o)
26
#define PyNumber_Index(o) PyNumber_Int(o)
27
#define PyIndex_Check(o) PyNumber_Check(o)
29
#if PY_VERSION_HEX < 0x02060000
30
#define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
31
#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
32
#define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size)
33
#define PyVarObject_HEAD_INIT(type, size) \
34
PyObject_HEAD_INIT(type) size,
35
#define PyType_Modified(t)
47
Py_ssize_t *suboffsets;
51
#define PyBUF_SIMPLE 0
52
#define PyBUF_WRITABLE 0x0001
53
#define PyBUF_FORMAT 0x0004
54
#define PyBUF_ND 0x0008
55
#define PyBUF_STRIDES (0x0010 | PyBUF_ND)
56
#define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
57
#define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
58
#define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
59
#define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
62
#if PY_MAJOR_VERSION < 3
63
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
65
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
67
#if PY_MAJOR_VERSION >= 3
68
#define Py_TPFLAGS_CHECKTYPES 0
69
#define Py_TPFLAGS_HAVE_INDEX 0
71
#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
72
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
74
#if PY_MAJOR_VERSION >= 3
75
#define PyBaseString_Type PyUnicode_Type
76
#define PyString_Type PyBytes_Type
77
#define PyString_CheckExact PyBytes_CheckExact
78
#define PyInt_Type PyLong_Type
79
#define PyInt_Check(op) PyLong_Check(op)
80
#define PyInt_CheckExact(op) PyLong_CheckExact(op)
81
#define PyInt_FromString PyLong_FromString
82
#define PyInt_FromUnicode PyLong_FromUnicode
83
#define PyInt_FromLong PyLong_FromLong
84
#define PyInt_FromSize_t PyLong_FromSize_t
85
#define PyInt_FromSsize_t PyLong_FromSsize_t
86
#define PyInt_AsLong PyLong_AsLong
87
#define PyInt_AS_LONG PyLong_AS_LONG
88
#define PyInt_AsSsize_t PyLong_AsSsize_t
89
#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
90
#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
91
#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
93
#define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
94
#define PyBytes_Type PyString_Type
96
#if PY_MAJOR_VERSION >= 3
97
#define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
99
#if !defined(WIN32) && !defined(MS_WINDOWS)
110
#define _USE_MATH_DEFINES
112
#if PY_VERSION_HEX < 0x02050000
113
#define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n)))
114
#define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
115
#define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n)))
117
#define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n))
118
#define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
119
#define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n))
121
#if PY_VERSION_HEX < 0x02050000
122
#define __Pyx_NAMESTR(n) ((char *)(n))
123
#define __Pyx_DOCSTR(n) ((char *)(n))
125
#define __Pyx_NAMESTR(n) (n)
126
#define __Pyx_DOCSTR(n) (n)
129
#define __PYX_EXTERN_C extern "C"
131
#define __PYX_EXTERN_C extern
134
#define __PYX_HAVE_API__tseries
135
#include "numpy/arrayobject.h"
136
#include "datetime.h"
140
#define __PYX_USE_C99_COMPLEX defined(_Complex_I)
144
#define INLINE __inline__
146
#define INLINE __inline
151
typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/
155
static int __pyx_skip_dispatch = 0;
158
/* Type Conversion Predeclarations */
160
#if PY_MAJOR_VERSION < 3
161
#define __Pyx_PyBytes_FromString PyString_FromString
162
#define __Pyx_PyBytes_FromStringAndSize PyString_FromStringAndSize
163
#define __Pyx_PyBytes_AsString PyString_AsString
165
#define __Pyx_PyBytes_FromString PyBytes_FromString
166
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
167
#define __Pyx_PyBytes_AsString PyBytes_AsString
170
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
171
static INLINE int __Pyx_PyObject_IsTrue(PyObject*);
172
static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
174
#if !defined(T_PYSSIZET)
175
#if PY_VERSION_HEX < 0x02050000
176
#define T_PYSSIZET T_INT
177
#elif !defined(T_LONGLONG)
179
((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
180
((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1))
183
((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
184
((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : \
185
((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))
189
#if !defined(T_SIZET)
190
#if !defined(T_ULONGLONG)
192
((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
193
((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1))
196
((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
197
((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : \
198
((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))
202
static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
203
static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
204
static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
206
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
210
/* Test for GCC > 2.95 */
211
#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
212
#define likely(x) __builtin_expect(!!(x), 1)
213
#define unlikely(x) __builtin_expect(!!(x), 0)
214
#else /* __GNUC__ > 2 ... */
215
#define likely(x) (x)
216
#define unlikely(x) (x)
217
#endif /* __GNUC__ > 2 ... */
219
#define likely(x) (x)
220
#define unlikely(x) (x)
221
#endif /* __GNUC__ */
223
static PyObject *__pyx_m;
224
static PyObject *__pyx_b;
225
static PyObject *__pyx_empty_tuple;
226
static int __pyx_lineno;
227
static int __pyx_clineno = 0;
228
static const char * __pyx_cfilenm= __FILE__;
229
static const char *__pyx_filename;
230
static const char **__pyx_f;
233
#ifdef CYTHON_REFNANNY
235
void (*INCREF)(void*, PyObject*, int);
236
void (*DECREF)(void*, PyObject*, int);
237
void (*GOTREF)(void*, PyObject*, int);
238
void (*GIVEREF)(void*, PyObject*, int);
239
void* (*NewContext)(const char*, int, const char*);
240
void (*FinishContext)(void**);
241
} __Pyx_RefnannyAPIStruct;
242
static __Pyx_RefnannyAPIStruct *__Pyx_Refnanny = NULL;
243
#define __Pyx_ImportRefcountAPI(name) (__Pyx_RefnannyAPIStruct *) PyCObject_Import((char *)name, (char *)"RefnannyAPI")
244
#define __Pyx_INCREF(r) __Pyx_Refnanny->INCREF(__pyx_refchk, (PyObject *)(r), __LINE__)
245
#define __Pyx_DECREF(r) __Pyx_Refnanny->DECREF(__pyx_refchk, (PyObject *)(r), __LINE__)
246
#define __Pyx_GOTREF(r) __Pyx_Refnanny->GOTREF(__pyx_refchk, (PyObject *)(r), __LINE__)
247
#define __Pyx_GIVEREF(r) __Pyx_Refnanny->GIVEREF(__pyx_refchk, (PyObject *)(r), __LINE__)
248
#define __Pyx_XDECREF(r) if((r) == NULL) ; else __Pyx_DECREF(r)
249
#define __Pyx_SetupRefcountContext(name) void* __pyx_refchk = __Pyx_Refnanny->NewContext((name), __LINE__, __FILE__)
250
#define __Pyx_FinishRefcountContext() __Pyx_Refnanny->FinishContext(&__pyx_refchk)
252
#define __Pyx_INCREF(r) Py_INCREF(r)
253
#define __Pyx_DECREF(r) Py_DECREF(r)
254
#define __Pyx_GOTREF(r)
255
#define __Pyx_GIVEREF(r)
256
#define __Pyx_XDECREF(r) Py_XDECREF(r)
257
#define __Pyx_SetupRefcountContext(name)
258
#define __Pyx_FinishRefcountContext()
259
#endif /* CYTHON_REFNANNY */
260
#define __Pyx_XGIVEREF(r) if((r) == NULL) ; else __Pyx_GIVEREF(r)
261
#define __Pyx_XGOTREF(r) if((r) == NULL) ; else __Pyx_GOTREF(r)
263
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
265
static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
267
static void __Pyx_RaiseDoubleKeywordsError(
268
const char* func_name, PyObject* kw_name); /*proto*/
270
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
271
Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
273
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /*proto*/
275
/* Run-time type information about structs used with buffers */
276
struct __Pyx_StructField_;
279
const char* name; /* for error messages only */
280
struct __Pyx_StructField_* fields;
281
size_t size; /* sizeof(type) */
282
char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject */
285
typedef struct __Pyx_StructField_ {
286
__Pyx_TypeInfo* type;
292
__Pyx_StructField* field;
293
size_t parent_offset;
294
} __Pyx_BufFmt_StackElem;
297
static INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);
298
static int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
299
#define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0)
301
static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
302
static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
304
static INLINE void __Pyx_RaiseNoneNotIterableError(void);
306
static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
308
static INLINE void __Pyx_RaiseTooManyValuesError(void);
310
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/
312
static void __Pyx_RaiseBufferFallbackError(void); /*proto*/
313
static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/
316
static INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
319
r = PyObject_GetItem(o, j);
325
#define __Pyx_GetItemInt_List(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
326
__Pyx_GetItemInt_List_Fast(o, i, size <= sizeof(long)) : \
327
__Pyx_GetItemInt_Generic(o, to_py_func(i)))
329
static INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
330
if (likely(o != Py_None)) {
331
if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
332
PyObject *r = PyList_GET_ITEM(o, i);
336
else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
337
PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
342
return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
345
#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
346
__Pyx_GetItemInt_Tuple_Fast(o, i, size <= sizeof(long)) : \
347
__Pyx_GetItemInt_Generic(o, to_py_func(i)))
349
static INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
350
if (likely(o != Py_None)) {
351
if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
352
PyObject *r = PyTuple_GET_ITEM(o, i);
356
else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
357
PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
362
return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
366
#define __Pyx_GetItemInt(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
367
__Pyx_GetItemInt_Fast(o, i, size <= sizeof(long)) : \
368
__Pyx_GetItemInt_Generic(o, to_py_func(i)))
370
static INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
372
if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
373
r = PyList_GET_ITEM(o, i);
376
else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
377
r = PyTuple_GET_ITEM(o, i);
380
else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
381
r = PySequence_GetItem(o, i);
384
r = __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
389
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
390
const char *name, int exact); /*proto*/
392
static INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
393
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
394
#if PY_MAJOR_VERSION < 3
395
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
396
static void __Pyx_ReleaseBuffer(Py_buffer *view);
398
#define __Pyx_GetBuffer PyObject_GetBuffer
399
#define __Pyx_ReleaseBuffer PyBuffer_Release
402
Py_ssize_t __Pyx_zeros[] = {0};
403
Py_ssize_t __Pyx_minusones[] = {-1};
405
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
407
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
409
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
411
static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
412
static int __Pyx_EndUnpack(PyObject *); /*proto*/
414
#if __PYX_USE_C99_COMPLEX
415
#define __Pyx_REAL_PART(z) __real__(z)
416
#define __Pyx_IMAG_PART(z) __imag__(z)
418
#define __Pyx_REAL_PART(z) ((z).real)
419
#define __Pyx_IMAG_PART(z) ((z).imag)
422
#define __pyx_PyObject_from_complex(z) PyComplex_FromDoubles((double)__Pyx_REAL_PART(z), (double)__Pyx_IMAG_PART(z))
424
#if __PYX_USE_C99_COMPLEX
426
typedef float _Complex __pyx_t_float_complex;
427
static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
428
return x + y*(__pyx_t_float_complex)_Complex_I;
431
#define __pyx_t_float_complex_is_zero(a) ((a) == 0)
432
#define __pyx_t_float_complex_eq(a, b) ((a) == (b))
433
#define __pyx_t_float_complex_add(a, b) ((a)+(b))
434
#define __pyx_t_float_complex_sub(a, b) ((a)-(b))
435
#define __pyx_t_float_complex_mul(a, b) ((a)*(b))
436
#define __pyx_t_float_complex_div(a, b) ((a)/(b))
437
#define __pyx_t_float_complex_neg(a) (-(a))
441
typedef struct { float real, imag; } __pyx_t_float_complex;
442
static INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
443
__pyx_t_float_complex c; c.real = x; c.imag = y; return c;
446
static INLINE int __pyx_t_float_complex_is_zero(__pyx_t_float_complex a) {
447
return (a.real == 0) & (a.imag == 0);
450
static INLINE int __pyx_t_float_complex_eq(__pyx_t_float_complex a, __pyx_t_float_complex b) {
451
return (a.real == b.real) & (a.imag == b.imag);
454
static INLINE __pyx_t_float_complex __pyx_t_float_complex_add(__pyx_t_float_complex a, __pyx_t_float_complex b) {
455
__pyx_t_float_complex z;
456
z.real = a.real + b.real;
457
z.imag = a.imag + b.imag;
461
static INLINE __pyx_t_float_complex __pyx_t_float_complex_sub(__pyx_t_float_complex a, __pyx_t_float_complex b) {
462
__pyx_t_float_complex z;
463
z.real = a.real - b.real;
464
z.imag = a.imag - b.imag;
468
static INLINE __pyx_t_float_complex __pyx_t_float_complex_mul(__pyx_t_float_complex a, __pyx_t_float_complex b) {
469
__pyx_t_float_complex z;
470
z.real = a.real * b.real - a.imag * b.imag;
471
z.imag = a.real * b.imag + a.imag * b.real;
475
static INLINE __pyx_t_float_complex __pyx_t_float_complex_div(__pyx_t_float_complex a, __pyx_t_float_complex b) {
476
__pyx_t_float_complex z;
477
float denom = b.real*b.real + b.imag*b.imag;
478
z.real = (a.real * b.real + a.imag * b.imag) / denom;
479
z.imag = (a.imag * b.real - a.real * b.imag) / denom;
483
static INLINE __pyx_t_float_complex __pyx_t_float_complex_neg(__pyx_t_float_complex a) {
484
__pyx_t_float_complex z;
492
#if __PYX_USE_C99_COMPLEX
494
typedef double _Complex __pyx_t_double_complex;
495
static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
496
return x + y*(__pyx_t_double_complex)_Complex_I;
499
#define __pyx_t_double_complex_is_zero(a) ((a) == 0)
500
#define __pyx_t_double_complex_eq(a, b) ((a) == (b))
501
#define __pyx_t_double_complex_add(a, b) ((a)+(b))
502
#define __pyx_t_double_complex_sub(a, b) ((a)-(b))
503
#define __pyx_t_double_complex_mul(a, b) ((a)*(b))
504
#define __pyx_t_double_complex_div(a, b) ((a)/(b))
505
#define __pyx_t_double_complex_neg(a) (-(a))
509
typedef struct { double real, imag; } __pyx_t_double_complex;
510
static INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
511
__pyx_t_double_complex c; c.real = x; c.imag = y; return c;
514
static INLINE int __pyx_t_double_complex_is_zero(__pyx_t_double_complex a) {
515
return (a.real == 0) & (a.imag == 0);
518
static INLINE int __pyx_t_double_complex_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) {
519
return (a.real == b.real) & (a.imag == b.imag);
522
static INLINE __pyx_t_double_complex __pyx_t_double_complex_add(__pyx_t_double_complex a, __pyx_t_double_complex b) {
523
__pyx_t_double_complex z;
524
z.real = a.real + b.real;
525
z.imag = a.imag + b.imag;
529
static INLINE __pyx_t_double_complex __pyx_t_double_complex_sub(__pyx_t_double_complex a, __pyx_t_double_complex b) {
530
__pyx_t_double_complex z;
531
z.real = a.real - b.real;
532
z.imag = a.imag - b.imag;
536
static INLINE __pyx_t_double_complex __pyx_t_double_complex_mul(__pyx_t_double_complex a, __pyx_t_double_complex b) {
537
__pyx_t_double_complex z;
538
z.real = a.real * b.real - a.imag * b.imag;
539
z.imag = a.real * b.imag + a.imag * b.real;
543
static INLINE __pyx_t_double_complex __pyx_t_double_complex_div(__pyx_t_double_complex a, __pyx_t_double_complex b) {
544
__pyx_t_double_complex z;
545
double denom = b.real*b.real + b.imag*b.imag;
546
z.real = (a.real * b.real + a.imag * b.imag) / denom;
547
z.imag = (a.imag * b.real - a.real * b.imag) / denom;
551
static INLINE __pyx_t_double_complex __pyx_t_double_complex_neg(__pyx_t_double_complex a) {
552
__pyx_t_double_complex z;
560
#if __PYX_USE_C99_COMPLEX
562
typedef long double _Complex __pyx_t_long__double_complex;
563
static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_from_parts(long double x, long double y) {
564
return x + y*(__pyx_t_long__double_complex)_Complex_I;
567
#define __pyx_t_long__double_complex_is_zero(a) ((a) == 0)
568
#define __pyx_t_long__double_complex_eq(a, b) ((a) == (b))
569
#define __pyx_t_long__double_complex_add(a, b) ((a)+(b))
570
#define __pyx_t_long__double_complex_sub(a, b) ((a)-(b))
571
#define __pyx_t_long__double_complex_mul(a, b) ((a)*(b))
572
#define __pyx_t_long__double_complex_div(a, b) ((a)/(b))
573
#define __pyx_t_long__double_complex_neg(a) (-(a))
577
typedef struct { long double real, imag; } __pyx_t_long__double_complex;
578
static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_from_parts(long double x, long double y) {
579
__pyx_t_long__double_complex c; c.real = x; c.imag = y; return c;
582
static INLINE int __pyx_t_long__double_complex_is_zero(__pyx_t_long__double_complex a) {
583
return (a.real == 0) & (a.imag == 0);
586
static INLINE int __pyx_t_long__double_complex_eq(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) {
587
return (a.real == b.real) & (a.imag == b.imag);
590
static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_add(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) {
591
__pyx_t_long__double_complex z;
592
z.real = a.real + b.real;
593
z.imag = a.imag + b.imag;
597
static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_sub(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) {
598
__pyx_t_long__double_complex z;
599
z.real = a.real - b.real;
600
z.imag = a.imag - b.imag;
604
static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_mul(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) {
605
__pyx_t_long__double_complex z;
606
z.real = a.real * b.real - a.imag * b.imag;
607
z.imag = a.real * b.imag + a.imag * b.real;
611
static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_div(__pyx_t_long__double_complex a, __pyx_t_long__double_complex b) {
612
__pyx_t_long__double_complex z;
613
long double denom = b.real*b.real + b.imag*b.imag;
614
z.real = (a.real * b.real + a.imag * b.imag) / denom;
615
z.imag = (a.imag * b.real - a.real * b.imag) / denom;
619
static INLINE __pyx_t_long__double_complex __pyx_t_long__double_complex_neg(__pyx_t_long__double_complex a) {
620
__pyx_t_long__double_complex z;
628
static INLINE int __Pyx_StrEq(const char *, const char *); /*proto*/
630
static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
632
static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
634
static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
636
static INLINE char __Pyx_PyInt_AsChar(PyObject *);
638
static INLINE short __Pyx_PyInt_AsShort(PyObject *);
640
static INLINE int __Pyx_PyInt_AsInt(PyObject *);
642
static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
644
static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
646
static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
648
static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
650
static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
652
static INLINE long __Pyx_PyInt_AsLong(PyObject *);
654
static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
656
static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
658
static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
660
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size); /*proto*/
662
static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
664
static void __Pyx_AddTraceback(const char *funcname); /*proto*/
666
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
668
/* Type declarations */
670
typedef npy_int8 __pyx_t_5numpy_int8_t;
672
typedef npy_int16 __pyx_t_5numpy_int16_t;
674
typedef npy_int32 __pyx_t_5numpy_int32_t;
676
typedef npy_int64 __pyx_t_5numpy_int64_t;
678
typedef npy_uint8 __pyx_t_5numpy_uint8_t;
680
typedef npy_uint16 __pyx_t_5numpy_uint16_t;
682
typedef npy_uint32 __pyx_t_5numpy_uint32_t;
684
typedef npy_uint64 __pyx_t_5numpy_uint64_t;
686
typedef npy_float32 __pyx_t_5numpy_float32_t;
688
typedef npy_float64 __pyx_t_5numpy_float64_t;
690
typedef npy_complex64 __pyx_t_5numpy_complex64_t;
692
typedef npy_complex128 __pyx_t_5numpy_complex128_t;
694
typedef npy_long __pyx_t_5numpy_int_t;
696
typedef npy_longlong __pyx_t_5numpy_long_t;
698
typedef npy_ulong __pyx_t_5numpy_uint_t;
700
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
702
typedef npy_double __pyx_t_5numpy_float_t;
704
typedef npy_double __pyx_t_5numpy_double_t;
706
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
708
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
710
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
712
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
714
typedef npy_cdouble __pyx_t_5numpy_complex_t;
716
typedef double (*__pyx_t_7tseries_double_func)(double, double);
717
/* Module declarations from numpy */
719
/* Module declarations from datetime */
721
/* Module declarations from python_buffer */
723
/* Module declarations from stdlib */
725
/* Module declarations from numpy */
727
/* Module declarations from numpy */
729
static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
730
static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
731
static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
732
/* Module declarations from python_dict */
734
/* Module declarations from cython */
736
/* Module declarations from tseries */
738
static PyTypeObject *__pyx_ptype_7tseries_dtype = 0;
739
static PyTypeObject *__pyx_ptype_7tseries_ndarray = 0;
740
static PyTypeObject *__pyx_ptype_7tseries_flatiter = 0;
741
static PyTypeObject *__pyx_ptype_7tseries_broadcast = 0;
742
static PyTypeObject *__pyx_ptype_7tseries_datetime = 0;
743
static double __pyx_v_7tseries_NaN;
744
static double __pyx_v_7tseries_INF;
745
static double __pyx_v_7tseries_NEGINF;
746
static INLINE PyObject *__pyx_f_7tseries_trycall(PyObject *, PyObject *); /*proto*/
747
static INLINE int __pyx_f_7tseries_int_max(int, int); /*proto*/
748
static INLINE int __pyx_f_7tseries_int_min(int, int); /*proto*/
749
static PyObject *__pyx_f_7tseries__nofill(PyArrayObject *, PyArrayObject *, PyObject *, PyObject *); /*proto*/
750
static PyObject *__pyx_f_7tseries__backfill(PyArrayObject *, PyArrayObject *, PyObject *, PyObject *); /*proto*/
751
static PyObject *__pyx_f_7tseries__pad(PyArrayObject *, PyArrayObject *, PyObject *, PyObject *); /*proto*/
752
static INLINE PyObject *__pyx_f_7tseries__checknull(PyObject *); /*proto*/
753
static PyArrayObject *__pyx_f_7tseries__isnullobj(PyObject *); /*proto*/
754
static double __pyx_f_7tseries___add(double, double); /*proto*/
755
static double __pyx_f_7tseries___sub(double, double); /*proto*/
756
static double __pyx_f_7tseries___div(double, double); /*proto*/
757
static double __pyx_f_7tseries___mul(double, double); /*proto*/
758
static double __pyx_f_7tseries___eq(double, double); /*proto*/
759
static double __pyx_f_7tseries___ne(double, double); /*proto*/
760
static double __pyx_f_7tseries___lt(double, double); /*proto*/
761
static double __pyx_f_7tseries___gt(double, double); /*proto*/
762
static double __pyx_f_7tseries___pow(double, double); /*proto*/
763
static PyArrayObject *__pyx_f_7tseries__applyFunc(__pyx_t_7tseries_double_func, PyArrayObject *, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
764
static __Pyx_TypeInfo __Pyx_TypeInfo_object = { "Python object", NULL, sizeof(PyObject *), 'O' };
765
static __Pyx_TypeInfo __Pyx_TypeInfo_nn_npy_int8 = { "numpy.npy_int8", NULL, sizeof(npy_int8), 'I' };
766
static __Pyx_TypeInfo __Pyx_TypeInfo_nn_npy_float64 = { "numpy.npy_float64", NULL, sizeof(npy_float64), 'R' };
767
#define __Pyx_MODULE_NAME "tseries"
768
int __pyx_module_is_main_tseries = 0;
770
/* Implementation of tseries */
771
static PyObject *__pyx_int_1;
772
static char __pyx_k___main__[] = "__main__";
773
static PyObject *__pyx_kp___main__;
774
static char __pyx_k_index[] = "index";
775
static PyObject *__pyx_kp_index;
776
static char __pyx_k_A[] = "A";
777
static PyObject *__pyx_kp_A;
778
static char __pyx_k_B[] = "B";
779
static PyObject *__pyx_kp_B;
780
static char __pyx_k_arr[] = "arr";
781
static PyObject *__pyx_kp_arr;
782
static char __pyx_k_idxMap[] = "idxMap";
783
static PyObject *__pyx_kp_idxMap;
784
static char __pyx_k_oldIndex[] = "oldIndex";
785
static PyObject *__pyx_kp_oldIndex;
786
static char __pyx_k_newIndex[] = "newIndex";
787
static PyObject *__pyx_kp_newIndex;
788
static char __pyx_k_oldMap[] = "oldMap";
789
static PyObject *__pyx_kp_oldMap;
790
static char __pyx_k_newMap[] = "newMap";
791
static PyObject *__pyx_kp_newMap;
792
static char __pyx_k_kind[] = "kind";
793
static PyObject *__pyx_kp_kind;
794
static char __pyx_k_values[] = "values";
795
static PyObject *__pyx_kp_values;
796
static char __pyx_k_indexMap[] = "indexMap";
797
static PyObject *__pyx_kp_indexMap;
798
static char __pyx_k_input[] = "input";
799
static PyObject *__pyx_kp_input;
800
static char __pyx_k_name[] = "name";
801
static PyObject *__pyx_kp_name;
802
static char __pyx_k_ao[] = "ao";
803
static PyObject *__pyx_kp_ao;
804
static char __pyx_k_bo[] = "bo";
805
static PyObject *__pyx_kp_bo;
806
static char __pyx_k_aMap[] = "aMap";
807
static PyObject *__pyx_kp_aMap;
808
static char __pyx_k_bMap[] = "bMap";
809
static PyObject *__pyx_kp_bMap;
810
static char __pyx_k_func[] = "func";
811
static PyObject *__pyx_kp_func;
812
static char __pyx_k_keyfunc[] = "keyfunc";
813
static PyObject *__pyx_kp_keyfunc;
814
static char __pyx_k_applyfunc[] = "applyfunc";
815
static PyObject *__pyx_kp_applyfunc;
816
static char __pyx_k_numpy[] = "numpy";
817
static PyObject *__pyx_kp_numpy;
818
static char __pyx_k_np[] = "np";
819
static PyObject *__pyx_kp_np;
820
static char __pyx_k_isnan[] = "isnan";
821
static PyObject *__pyx_kp_isnan;
822
static char __pyx_k_NaN[] = "NaN";
823
static PyObject *__pyx_kp_NaN;
824
static char __pyx_k_datetime[] = "datetime";
825
static PyObject *__pyx_kp_datetime;
826
static char __pyx_k_pydatetime[] = "pydatetime";
827
static PyObject *__pyx_kp_pydatetime;
828
static char __pyx_k_inf[] = "inf";
829
static PyObject *__pyx_kp_inf;
830
static char __pyx_k_Exception[] = "Exception";
831
static PyObject *__pyx_kp_Exception;
832
static char __pyx_k_map_indices[] = "map_indices";
833
static PyObject *__pyx_kp_map_indices;
834
static char __pyx_k_empty[] = "empty";
835
static PyObject *__pyx_kp_empty;
836
static char __pyx_k_32[] = "float64";
837
static PyObject *__pyx_kp_32;
838
static char __pyx_k_astype[] = "astype";
839
static PyObject *__pyx_kp_astype;
840
static char __pyx_k_dtype[] = "dtype";
841
static PyObject *__pyx_kp_dtype;
842
static char __pyx_k_object_[] = "object_";
843
static PyObject *__pyx_kp_object_;
844
static char __pyx_k_object[] = "object";
845
static PyObject *__pyx_kp_object;
846
static char __pyx_k_33[] = "int32";
847
static PyObject *__pyx_kp_33;
848
static char __pyx_k_zeros[] = "zeros";
849
static PyObject *__pyx_kp_zeros;
850
static char __pyx_k_34[] = "int8";
851
static PyObject *__pyx_kp_34;
852
static char __pyx_k_36[] = "PAD";
853
static PyObject *__pyx_kp_36;
854
static char __pyx_k_37[] = "BACKFILL";
855
static PyObject *__pyx_kp_37;
856
static char __pyx_k_bool[] = "bool";
857
static PyObject *__pyx_kp_bool;
858
static char __pyx_k_38[] = "O";
859
static PyObject *__pyx_kp_38;
860
static char __pyx_k_39[] = "S";
861
static PyObject *__pyx_kp_39;
862
static char __pyx_k_isfinite[] = "isfinite";
863
static PyObject *__pyx_kp_isfinite;
864
static char __pyx_k_isnull[] = "isnull";
865
static PyObject *__pyx_kp_isnull;
866
static char __pyx_k_40[] = "__add__";
867
static PyObject *__pyx_kp_40;
868
static char __pyx_k_41[] = "__sub__";
869
static PyObject *__pyx_kp_41;
870
static char __pyx_k_42[] = "__div__";
871
static PyObject *__pyx_kp_42;
872
static char __pyx_k_43[] = "__mul__";
873
static PyObject *__pyx_kp_43;
874
static char __pyx_k_44[] = "__eq__";
875
static PyObject *__pyx_kp_44;
876
static char __pyx_k_45[] = "__ne__";
877
static PyObject *__pyx_kp_45;
878
static char __pyx_k_46[] = "__lt__";
879
static PyObject *__pyx_kp_46;
880
static char __pyx_k_47[] = "__gt__";
881
static PyObject *__pyx_kp_47;
882
static char __pyx_k_48[] = "__pow__";
883
static PyObject *__pyx_kp_48;
884
static char __pyx_k_arrmap[] = "arrmap";
885
static PyObject *__pyx_kp_arrmap;
886
static char __pyx_k_asarray[] = "asarray";
887
static PyObject *__pyx_kp_asarray;
888
static char __pyx_k_any[] = "any";
889
static PyObject *__pyx_kp_any;
890
static PyObject *__pyx_builtin_Exception;
891
static PyObject *__pyx_builtin_object;
892
static PyObject *__pyx_kp_31;
893
static char __pyx_k_31[] = "Error calling func on index %s";
894
static PyObject *__pyx_kp_35;
895
static char __pyx_k_35[] = "";
896
static PyObject *__pyx_kp_49;
897
static char __pyx_k_49[] = "bad funcname requested of Cython code";
898
static PyObject *__pyx_kp_50;
899
static char __pyx_k_50[] = "Dates and values were not the same length!";
900
static PyObject *__pyx_kp_51;
901
static char __pyx_k_51[] = "Dates and values were not the same length!";
902
static PyObject *__pyx_kp_52;
903
static char __pyx_k_52[] = "Dates and values were not the same length!";
904
static PyObject *__pyx_kp_53;
905
static char __pyx_k_53[] = "Dates and values were not the same length!";
906
static PyObject *__pyx_int_15;
907
static char __pyx_k___getbuffer__[] = "__getbuffer__";
908
static PyObject *__pyx_kp___getbuffer__;
909
static char __pyx_k___releasebuffer__[] = "__releasebuffer__";
910
static PyObject *__pyx_kp___releasebuffer__;
911
static char __pyx_k_info[] = "info";
912
static PyObject *__pyx_kp_info;
913
static char __pyx_k_flags[] = "flags";
914
static PyObject *__pyx_kp_flags;
915
static char __pyx_k_ValueError[] = "ValueError";
916
static PyObject *__pyx_kp_ValueError;
917
static char __pyx_k_range[] = "range";
918
static PyObject *__pyx_kp_range;
919
static char __pyx_k_itervalues[] = "itervalues";
920
static PyObject *__pyx_kp_itervalues;
921
static char __pyx_k_RuntimeError[] = "RuntimeError";
922
static PyObject *__pyx_kp_RuntimeError;
923
static PyObject *__pyx_kp_1;
924
static PyObject *__pyx_kp_2;
925
static PyObject *__pyx_kp_5;
926
static PyObject *__pyx_kp_23;
927
static PyObject *__pyx_builtin_ValueError;
928
static PyObject *__pyx_builtin_range;
929
static PyObject *__pyx_builtin_RuntimeError;
930
static char __pyx_k_1[] = "ndarray is not C contiguous";
931
static char __pyx_k_2[] = "ndarray is not Fortran contiguous";
932
static char __pyx_k_3[] = ">";
933
static char __pyx_k_4[] = "<";
934
static char __pyx_k_5[] = "Non-native byte order not supported";
935
static char __pyx_k_6[] = "b";
936
static char __pyx_k_7[] = "B";
937
static char __pyx_k_8[] = "h";
938
static char __pyx_k_9[] = "H";
939
static char __pyx_k_10[] = "i";
940
static char __pyx_k_11[] = "I";
941
static char __pyx_k_12[] = "l";
942
static char __pyx_k_13[] = "L";
943
static char __pyx_k_14[] = "q";
944
static char __pyx_k_15[] = "Q";
945
static char __pyx_k_16[] = "f";
946
static char __pyx_k_17[] = "d";
947
static char __pyx_k_18[] = "g";
948
static char __pyx_k_19[] = "Zf";
949
static char __pyx_k_20[] = "Zd";
950
static char __pyx_k_21[] = "Zg";
951
static char __pyx_k_22[] = "O";
952
static char __pyx_k_23[] = "unknown dtype code in numpy.pxd (%d)";
953
static char __pyx_k_24[] = "^";
954
static PyObject *__pyx_kp_25;
955
static PyObject *__pyx_kp_28;
956
static PyObject *__pyx_kp_29;
957
static PyObject *__pyx_kp_30;
958
static char __pyx_k_25[] = "Format string allocated too short, see comment in numpy.pxd";
959
static char __pyx_k_26[] = ">";
960
static char __pyx_k_27[] = "<";
961
static char __pyx_k_28[] = "Non-native byte order not supported";
962
static char __pyx_k_29[] = "Format string allocated too short.";
963
static char __pyx_k_30[] = "unknown dtype code in numpy.pxd (%d)";
965
/* "pandas/lib/src/tseries.pyx":21
968
* cdef inline object trycall(object func, object arg): # <<<<<<<<<<<<<<
973
static INLINE PyObject *__pyx_f_7tseries_trycall(PyObject *__pyx_v_func, PyObject *__pyx_v_arg) {
974
PyObject *__pyx_v_result;
975
PyObject *__pyx_r = NULL;
976
PyObject *__pyx_t_1 = NULL;
977
PyObject *__pyx_t_2 = NULL;
978
PyObject *__pyx_t_3 = NULL;
979
PyObject *__pyx_t_4 = NULL;
980
PyObject *__pyx_t_5 = NULL;
981
__Pyx_SetupRefcountContext("trycall");
982
__pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
984
/* "pandas/lib/src/tseries.pyx":23
985
* cdef inline object trycall(object func, object arg):
987
* try: # <<<<<<<<<<<<<<
992
PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
993
__Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
994
__Pyx_XGOTREF(__pyx_save_exc_type);
995
__Pyx_XGOTREF(__pyx_save_exc_value);
996
__Pyx_XGOTREF(__pyx_save_exc_tb);
999
/* "pandas/lib/src/tseries.pyx":24
1000
* cdef object result
1002
* result = func(arg) # <<<<<<<<<<<<<<
1004
* raise Exception('Error calling func on index %s' % arg)
1006
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1007
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
1008
__Pyx_INCREF(__pyx_v_arg);
1009
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_arg);
1010
__Pyx_GIVEREF(__pyx_v_arg);
1011
__pyx_t_2 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1012
__Pyx_GOTREF(__pyx_t_2);
1013
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
1014
__Pyx_DECREF(__pyx_v_result);
1015
__pyx_v_result = __pyx_t_2;
1018
__Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
1019
__Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
1020
__Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
1021
goto __pyx_L10_try_end;
1023
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
1024
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
1026
/* "pandas/lib/src/tseries.pyx":25
1028
* result = func(arg)
1029
* except: # <<<<<<<<<<<<<<
1030
* raise Exception('Error calling func on index %s' % arg)
1034
__Pyx_AddTraceback("tseries.trycall");
1035
if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
1036
__Pyx_GOTREF(__pyx_t_2);
1037
__Pyx_GOTREF(__pyx_t_1);
1038
__Pyx_GOTREF(__pyx_t_3);
1040
/* "pandas/lib/src/tseries.pyx":26
1041
* result = func(arg)
1043
* raise Exception('Error calling func on index %s' % arg) # <<<<<<<<<<<<<<
1047
__pyx_t_4 = PyNumber_Remainder(__pyx_kp_31, __pyx_v_arg); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
1048
__Pyx_GOTREF(__pyx_t_4);
1049
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
1050
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
1051
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
1052
__Pyx_GIVEREF(__pyx_t_4);
1054
__pyx_t_4 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
1055
__Pyx_GOTREF(__pyx_t_4);
1056
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
1057
__Pyx_Raise(__pyx_t_4, 0, 0);
1058
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1059
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
1060
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1061
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1062
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1063
goto __pyx_L4_exception_handled;
1065
__pyx_L5_except_error:;
1066
__Pyx_XDECREF(__pyx_save_exc_type);
1067
__Pyx_XDECREF(__pyx_save_exc_value);
1068
__Pyx_XDECREF(__pyx_save_exc_tb);
1069
goto __pyx_L1_error;
1070
__pyx_L4_exception_handled:;
1071
__Pyx_XGIVEREF(__pyx_save_exc_type);
1072
__Pyx_XGIVEREF(__pyx_save_exc_value);
1073
__Pyx_XGIVEREF(__pyx_save_exc_tb);
1074
__Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
1078
/* "pandas/lib/src/tseries.pyx":27
1080
* raise Exception('Error calling func on index %s' % arg)
1081
* return result # <<<<<<<<<<<<<<
1083
* cdef inline int int_max(int a, int b): return a if a >= b else b
1085
__Pyx_XDECREF(__pyx_r);
1086
__Pyx_INCREF(__pyx_v_result);
1087
__pyx_r = __pyx_v_result;
1090
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
1093
__Pyx_XDECREF(__pyx_t_1);
1094
__Pyx_XDECREF(__pyx_t_2);
1095
__Pyx_XDECREF(__pyx_t_3);
1096
__Pyx_XDECREF(__pyx_t_4);
1097
__Pyx_XDECREF(__pyx_t_5);
1098
__Pyx_AddTraceback("tseries.trycall");
1101
__Pyx_DECREF(__pyx_v_result);
1102
__Pyx_XGIVEREF(__pyx_r);
1103
__Pyx_FinishRefcountContext();
1107
/* "pandas/lib/src/tseries.pyx":29
1110
* cdef inline int int_max(int a, int b): return a if a >= b else b # <<<<<<<<<<<<<<
1111
* cdef inline int int_min(int a, int b): return a if a >= b else b
1115
static INLINE int __pyx_f_7tseries_int_max(int __pyx_v_a, int __pyx_v_b) {
1118
__Pyx_SetupRefcountContext("int_max");
1119
if ((__pyx_v_a >= __pyx_v_b)) {
1120
__pyx_1 = __pyx_v_a;
1122
__pyx_1 = __pyx_v_b;
1129
__Pyx_FinishRefcountContext();
1133
/* "pandas/lib/src/tseries.pyx":30
1135
* cdef inline int int_max(int a, int b): return a if a >= b else b
1136
* cdef inline int int_min(int a, int b): return a if a >= b else b # <<<<<<<<<<<<<<
1138
* def map_indices(ndarray index):
1141
static INLINE int __pyx_f_7tseries_int_min(int __pyx_v_a, int __pyx_v_b) {
1144
__Pyx_SetupRefcountContext("int_min");
1145
if ((__pyx_v_a >= __pyx_v_b)) {
1146
__pyx_1 = __pyx_v_a;
1148
__pyx_1 = __pyx_v_b;
1155
__Pyx_FinishRefcountContext();
1159
/* "pandas/lib/src/tseries.pyx":32
1160
* cdef inline int int_min(int a, int b): return a if a >= b else b
1162
* def map_indices(ndarray index): # <<<<<<<<<<<<<<
1164
* Produce a dict mapping the values of the input array to their respective
1167
static PyObject *__pyx_pf_7tseries_map_indices(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
1168
static char __pyx_doc_7tseries_map_indices[] = "\n Produce a dict mapping the values of the input array to their respective\n locations.\n \n Example:\n array(['hi', 'there']) --> {'hi' : 0 , 'there' : 1}\n \n Better to do this with Cython because of the enormous speed boost.\n ";
1169
static PyObject *__pyx_pf_7tseries_map_indices(PyObject *__pyx_self, PyObject *__pyx_v_index) {
1172
PyArrayIterObject *__pyx_v_iter;
1173
PyObject *__pyx_v_result;
1174
PyObject *__pyx_v_idx;
1175
PyObject *__pyx_r = NULL;
1176
PyObject *__pyx_1 = 0;
1177
PyObject *__pyx_t_1 = NULL;
1179
__Pyx_SetupRefcountContext("map_indices");
1180
__pyx_self = __pyx_self;
1181
__pyx_v_iter = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
1182
__pyx_v_result = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
1183
__pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
1184
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1186
/* "pandas/lib/src/tseries.pyx":47
1189
* result = {} # <<<<<<<<<<<<<<
1191
* iter = PyArray_IterNew(index)
1193
__pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1194
__Pyx_GOTREF(((PyObject *)__pyx_1));
1195
__Pyx_DECREF(((PyObject *)__pyx_v_result));
1196
__pyx_v_result = __pyx_1;
1199
/* "pandas/lib/src/tseries.pyx":49
1202
* iter = PyArray_IterNew(index) # <<<<<<<<<<<<<<
1204
* length = PyArray_SIZE(index)
1206
__pyx_t_1 = PyArray_IterNew(__pyx_v_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1207
__Pyx_GOTREF(__pyx_t_1);
1208
if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1209
__Pyx_DECREF(((PyObject *)__pyx_v_iter));
1210
__pyx_v_iter = ((PyArrayIterObject *)__pyx_t_1);
1213
/* "pandas/lib/src/tseries.pyx":51
1214
* iter = PyArray_IterNew(index)
1216
* length = PyArray_SIZE(index) # <<<<<<<<<<<<<<
1218
* for i from 0 <= i < length:
1220
if (!(__Pyx_TypeTest(__pyx_v_index, __pyx_ptype_7tseries_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1221
__pyx_v_length = PyArray_SIZE(((PyArrayObject *)__pyx_v_index));
1223
/* "pandas/lib/src/tseries.pyx":53
1224
* length = PyArray_SIZE(index)
1226
* for i from 0 <= i < length: # <<<<<<<<<<<<<<
1227
* idx = PyArray_GETITEM(index, <void *> iter.dataptr)
1230
__pyx_t_2 = __pyx_v_length;
1231
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {
1233
/* "pandas/lib/src/tseries.pyx":54
1235
* for i from 0 <= i < length:
1236
* idx = PyArray_GETITEM(index, <void *> iter.dataptr) # <<<<<<<<<<<<<<
1238
* PyArray_ITER_NEXT(iter)
1240
__pyx_t_1 = PyArray_GETITEM(__pyx_v_index, ((void *)__pyx_v_iter->dataptr)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1241
__Pyx_GOTREF(__pyx_t_1);
1242
__Pyx_DECREF(__pyx_v_idx);
1243
__pyx_v_idx = __pyx_t_1;
1246
/* "pandas/lib/src/tseries.pyx":55
1247
* for i from 0 <= i < length:
1248
* idx = PyArray_GETITEM(index, <void *> iter.dataptr)
1249
* result[idx] = i # <<<<<<<<<<<<<<
1250
* PyArray_ITER_NEXT(iter)
1253
__pyx_t_1 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1254
__Pyx_GOTREF(__pyx_t_1);
1255
if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_idx, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1256
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1258
/* "pandas/lib/src/tseries.pyx":56
1259
* idx = PyArray_GETITEM(index, <void *> iter.dataptr)
1261
* PyArray_ITER_NEXT(iter) # <<<<<<<<<<<<<<
1265
PyArray_ITER_NEXT(__pyx_v_iter);
1268
/* "pandas/lib/src/tseries.pyx":58
1269
* PyArray_ITER_NEXT(iter)
1271
* return result # <<<<<<<<<<<<<<
1273
* def match(ndarray A, ndarray B):
1275
__Pyx_XDECREF(__pyx_r);
1276
__Pyx_INCREF(((PyObject *)__pyx_v_result));
1277
__pyx_r = ((PyObject *)__pyx_v_result);
1280
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
1283
__Pyx_XDECREF(__pyx_1);
1284
__Pyx_XDECREF(__pyx_t_1);
1285
__Pyx_AddTraceback("tseries.map_indices");
1288
__Pyx_DECREF((PyObject *)__pyx_v_iter);
1289
__Pyx_DECREF(__pyx_v_result);
1290
__Pyx_DECREF(__pyx_v_idx);
1291
__Pyx_XGIVEREF(__pyx_r);
1292
__Pyx_FinishRefcountContext();
1296
/* "pandas/lib/src/tseries.pyx":60
1299
* def match(ndarray A, ndarray B): # <<<<<<<<<<<<<<
1304
static PyObject *__pyx_pf_7tseries_match(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1305
static char __pyx_doc_7tseries_match[] = "\n --> match(a, b)\n \n Close equivalent of R's match function.\n \n For given input index A, find matching locations for values of A in B.\n \n Example:\n >>> b\n array([[ 0. , 0.26929312],\n [ 1. , 0.49540359],\n [ 2. , 0.66389941],\n [ 3. , 0.66235806],\n [ 4. , 0.97993956],\n [ 5. , 0.83804732],\n [ 6. , 0.75033074],\n [ 7. , 0.10250388],\n [ 8. , 0.66591799],\n [ 9. , 0.18337242]])\n >>> a\n array([1, 3, 6, 8, 4, 5, 7, 0, 2, 9])\n \n # Now with match we can realign b based on a\n \n >>> b[match(a, b[:,0]),:]\n array([[ 1. , 0.49540359],\n [ 3. , 0.66235806],\n [ 6. , 0.75033074],\n [ 8. , 0.66591799],\n [ 4. , 0.97993956],\n [ 5. , 0.83804732],\n [ 7. , 0.10250388],\n [ 0. , 0.26929312],\n [ 2. , 0.66389941],\n [ 9. , 0.18337242]])\n \n ";
1306
static PyObject *__pyx_pf_7tseries_match(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1307
PyArrayObject *__pyx_v_A = 0;
1308
PyArrayObject *__pyx_v_B = 0;
1311
PyArrayIterObject *__pyx_v_itera;
1312
PyObject *__pyx_v_bmap;
1313
double *__pyx_v_result_data;
1315
PyObject *__pyx_v_idx;
1316
PyArrayObject *__pyx_v_result;
1317
PyObject *__pyx_r = NULL;
1318
PyObject *__pyx_1 = 0;
1319
PyObject *__pyx_t_1 = NULL;
1321
PyObject *__pyx_t_3 = NULL;
1322
PyObject *__pyx_t_4 = NULL;
1323
PyObject *__pyx_t_5 = NULL;
1326
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_A,&__pyx_kp_B,0};
1327
__Pyx_SetupRefcountContext("match");
1328
__pyx_self = __pyx_self;
1329
if (unlikely(__pyx_kwds)) {
1330
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
1331
PyObject* values[2] = {0,0};
1332
switch (PyTuple_GET_SIZE(__pyx_args)) {
1333
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1334
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1336
default: goto __pyx_L5_argtuple_error;
1338
switch (PyTuple_GET_SIZE(__pyx_args)) {
1340
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_A);
1341
if (likely(values[0])) kw_args--;
1342
else goto __pyx_L5_argtuple_error;
1344
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_B);
1345
if (likely(values[1])) kw_args--;
1347
__Pyx_RaiseArgtupleInvalid("match", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1350
if (unlikely(kw_args > 0)) {
1351
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "match") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1353
__pyx_v_A = ((PyArrayObject *)values[0]);
1354
__pyx_v_B = ((PyArrayObject *)values[1]);
1355
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
1356
goto __pyx_L5_argtuple_error;
1358
__pyx_v_A = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
1359
__pyx_v_B = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
1361
goto __pyx_L4_argument_unpacking_done;
1362
__pyx_L5_argtuple_error:;
1363
__Pyx_RaiseArgtupleInvalid("match", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1365
__Pyx_AddTraceback("tseries.match");
1367
__pyx_L4_argument_unpacking_done:;
1368
__pyx_v_itera = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
1369
__pyx_v_bmap = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
1370
__pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
1371
__pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
1372
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_A), __pyx_ptype_5numpy_ndarray, 1, "A", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1373
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_B), __pyx_ptype_5numpy_ndarray, 1, "B", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1375
/* "pandas/lib/src/tseries.pyx":107
1376
* cdef ndarray result
1378
* nan = <double> np.NaN # <<<<<<<<<<<<<<
1380
* bmap = map_indices(B)
1382
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1383
__Pyx_GOTREF(__pyx_1);
1384
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_NaN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1385
__Pyx_GOTREF(__pyx_t_1);
1386
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
1387
__pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1388
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1389
__pyx_v_nan = ((double)__pyx_t_2);
1391
/* "pandas/lib/src/tseries.pyx":109
1392
* nan = <double> np.NaN
1394
* bmap = map_indices(B) # <<<<<<<<<<<<<<
1396
* itera = PyArray_IterNew(A)
1398
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_map_indices); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1399
__Pyx_GOTREF(__pyx_1);
1400
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1401
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
1402
__Pyx_INCREF(((PyObject *)__pyx_v_B));
1403
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_B));
1404
__Pyx_GIVEREF(((PyObject *)__pyx_v_B));
1405
__pyx_t_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1406
__Pyx_GOTREF(__pyx_t_3);
1407
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
1408
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
1409
if (!(likely(PyDict_CheckExact(__pyx_t_3)) || (__pyx_t_3) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected dict, got %s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1410
__Pyx_DECREF(((PyObject *)__pyx_v_bmap));
1411
__pyx_v_bmap = ((PyObject *)__pyx_t_3);
1414
/* "pandas/lib/src/tseries.pyx":111
1415
* bmap = map_indices(B)
1417
* itera = PyArray_IterNew(A) # <<<<<<<<<<<<<<
1418
* length = PyArray_SIZE(A)
1421
__pyx_t_3 = PyArray_IterNew(((PyObject *)__pyx_v_A)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1422
__Pyx_GOTREF(__pyx_t_3);
1423
if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1424
__Pyx_DECREF(((PyObject *)__pyx_v_itera));
1425
__pyx_v_itera = ((PyArrayIterObject *)__pyx_t_3);
1428
/* "pandas/lib/src/tseries.pyx":112
1430
* itera = PyArray_IterNew(A)
1431
* length = PyArray_SIZE(A) # <<<<<<<<<<<<<<
1433
* result = <ndarray> np.empty(length, np.float64)
1435
if (!(__Pyx_TypeTest(((PyObject *)__pyx_v_A), __pyx_ptype_7tseries_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1436
__pyx_v_length = PyArray_SIZE(((PyArrayObject *)__pyx_v_A));
1438
/* "pandas/lib/src/tseries.pyx":114
1439
* length = PyArray_SIZE(A)
1441
* result = <ndarray> np.empty(length, np.float64) # <<<<<<<<<<<<<<
1443
* result_data = <double *> result.data
1445
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1446
__Pyx_GOTREF(__pyx_1);
1447
__pyx_t_3 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1448
__Pyx_GOTREF(__pyx_t_3);
1449
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
1450
__pyx_t_1 = PyInt_FromLong(__pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1451
__Pyx_GOTREF(__pyx_t_1);
1452
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1453
__Pyx_GOTREF(__pyx_1);
1454
__pyx_t_4 = PyObject_GetAttr(__pyx_1, __pyx_kp_32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1455
__Pyx_GOTREF(__pyx_t_4);
1456
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
1457
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1458
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
1459
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
1460
__Pyx_GIVEREF(__pyx_t_1);
1461
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
1462
__Pyx_GIVEREF(__pyx_t_4);
1465
__pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1466
__Pyx_GOTREF(__pyx_t_4);
1467
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1468
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
1469
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_4)));
1470
__Pyx_DECREF(((PyObject *)__pyx_v_result));
1471
__pyx_v_result = ((PyArrayObject *)__pyx_t_4);
1472
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1474
/* "pandas/lib/src/tseries.pyx":116
1475
* result = <ndarray> np.empty(length, np.float64)
1477
* result_data = <double *> result.data # <<<<<<<<<<<<<<
1479
* for i from 0 <= i < length:
1481
__pyx_v_result_data = ((double *)__pyx_v_result->data);
1483
/* "pandas/lib/src/tseries.pyx":118
1484
* result_data = <double *> result.data
1486
* for i from 0 <= i < length: # <<<<<<<<<<<<<<
1487
* idx = PyArray_GETITEM(A, <void *> itera.dataptr)
1490
__pyx_t_6 = __pyx_v_length;
1491
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {
1493
/* "pandas/lib/src/tseries.pyx":119
1495
* for i from 0 <= i < length:
1496
* idx = PyArray_GETITEM(A, <void *> itera.dataptr) # <<<<<<<<<<<<<<
1498
* result_data[i] = <double> bmap[idx]
1500
__pyx_t_4 = PyArray_GETITEM(((PyObject *)__pyx_v_A), ((void *)__pyx_v_itera->dataptr)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1501
__Pyx_GOTREF(__pyx_t_4);
1502
__Pyx_DECREF(__pyx_v_idx);
1503
__pyx_v_idx = __pyx_t_4;
1506
/* "pandas/lib/src/tseries.pyx":120
1507
* for i from 0 <= i < length:
1508
* idx = PyArray_GETITEM(A, <void *> itera.dataptr)
1509
* if idx in bmap: # <<<<<<<<<<<<<<
1510
* result_data[i] = <double> bmap[idx]
1513
__pyx_t_7 = (PySequence_Contains(((PyObject *)__pyx_v_bmap), __pyx_v_idx)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1516
/* "pandas/lib/src/tseries.pyx":121
1517
* idx = PyArray_GETITEM(A, <void *> itera.dataptr)
1519
* result_data[i] = <double> bmap[idx] # <<<<<<<<<<<<<<
1521
* result_data[i] = nan
1523
__pyx_1 = PyObject_GetItem(((PyObject *)__pyx_v_bmap), __pyx_v_idx); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1524
__Pyx_GOTREF(__pyx_1);
1525
__pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1526
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
1527
(__pyx_v_result_data[__pyx_v_i]) = ((double)__pyx_t_2);
1532
/* "pandas/lib/src/tseries.pyx":123
1533
* result_data[i] = <double> bmap[idx]
1535
* result_data[i] = nan # <<<<<<<<<<<<<<
1537
* PyArray_ITER_NEXT(itera)
1539
(__pyx_v_result_data[__pyx_v_i]) = __pyx_v_nan;
1543
/* "pandas/lib/src/tseries.pyx":125
1544
* result_data[i] = nan
1546
* PyArray_ITER_NEXT(itera) # <<<<<<<<<<<<<<
1548
* return result.astype(int)
1550
PyArray_ITER_NEXT(__pyx_v_itera);
1553
/* "pandas/lib/src/tseries.pyx":127
1554
* PyArray_ITER_NEXT(itera)
1556
* return result.astype(int) # <<<<<<<<<<<<<<
1558
* def reindex(ndarray index, ndarray arr, dict idxMap):
1560
__Pyx_XDECREF(__pyx_r);
1561
__pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_kp_astype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1562
__Pyx_GOTREF(__pyx_t_4);
1563
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1564
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
1565
__Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
1566
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)((PyObject*)&PyInt_Type)));
1567
__Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
1568
__pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1569
__Pyx_GOTREF(__pyx_t_3);
1570
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1571
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
1572
__pyx_r = __pyx_t_3;
1576
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
1579
__Pyx_XDECREF(__pyx_1);
1580
__Pyx_XDECREF(__pyx_t_1);
1581
__Pyx_XDECREF(__pyx_t_3);
1582
__Pyx_XDECREF(__pyx_t_4);
1583
__Pyx_XDECREF(__pyx_t_5);
1584
__Pyx_AddTraceback("tseries.match");
1587
__Pyx_DECREF((PyObject *)__pyx_v_itera);
1588
__Pyx_DECREF(__pyx_v_bmap);
1589
__Pyx_DECREF(__pyx_v_idx);
1590
__Pyx_DECREF((PyObject *)__pyx_v_result);
1591
__Pyx_XGIVEREF(__pyx_r);
1592
__Pyx_FinishRefcountContext();
1596
/* "pandas/lib/src/tseries.pyx":129
1597
* return result.astype(int)
1599
* def reindex(ndarray index, ndarray arr, dict idxMap): # <<<<<<<<<<<<<<
1601
* Using the provided new index, a given array, and a mapping of index-value
1604
static PyObject *__pyx_pf_7tseries_reindex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1605
static char __pyx_doc_7tseries_reindex[] = "\n Using the provided new index, a given array, and a mapping of index-value\n correpondences in the value array, return a new ndarray conforming to \n the new index.\n \n This is significantly faster than doing it in pure Python.\n ";
1606
static PyObject *__pyx_pf_7tseries_reindex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1607
PyArrayObject *__pyx_v_index = 0;
1608
PyArrayObject *__pyx_v_arr = 0;
1609
PyObject *__pyx_v_idxMap = 0;
1610
PyArrayObject *__pyx_v_result;
1611
double *__pyx_v_result_data;
1614
PyArrayIterObject *__pyx_v_itera;
1615
PyArrayIterObject *__pyx_v_iteridx;
1617
PyObject *__pyx_v_idx;
1618
PyObject *__pyx_r = NULL;
1619
PyObject *__pyx_1 = 0;
1620
PyObject *__pyx_t_1 = NULL;
1622
PyObject *__pyx_t_3 = NULL;
1623
PyObject *__pyx_t_4 = NULL;
1624
PyObject *__pyx_t_5 = NULL;
1628
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_index,&__pyx_kp_arr,&__pyx_kp_idxMap,0};
1629
__Pyx_SetupRefcountContext("reindex");
1630
__pyx_self = __pyx_self;
1631
if (unlikely(__pyx_kwds)) {
1632
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
1633
PyObject* values[3] = {0,0,0};
1634
switch (PyTuple_GET_SIZE(__pyx_args)) {
1635
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1636
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1637
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1639
default: goto __pyx_L5_argtuple_error;
1641
switch (PyTuple_GET_SIZE(__pyx_args)) {
1643
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_index);
1644
if (likely(values[0])) kw_args--;
1645
else goto __pyx_L5_argtuple_error;
1647
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_arr);
1648
if (likely(values[1])) kw_args--;
1650
__Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1653
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_idxMap);
1654
if (likely(values[2])) kw_args--;
1656
__Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1659
if (unlikely(kw_args > 0)) {
1660
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "reindex") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1662
__pyx_v_index = ((PyArrayObject *)values[0]);
1663
__pyx_v_arr = ((PyArrayObject *)values[1]);
1664
__pyx_v_idxMap = ((PyObject *)values[2]);
1665
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
1666
goto __pyx_L5_argtuple_error;
1668
__pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
1669
__pyx_v_arr = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
1670
__pyx_v_idxMap = ((PyObject *)PyTuple_GET_ITEM(__pyx_args, 2));
1672
goto __pyx_L4_argument_unpacking_done;
1673
__pyx_L5_argtuple_error:;
1674
__Pyx_RaiseArgtupleInvalid("reindex", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1676
__Pyx_AddTraceback("tseries.reindex");
1678
__pyx_L4_argument_unpacking_done:;
1679
__pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
1680
__pyx_v_itera = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
1681
__pyx_v_iteridx = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
1682
__pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
1683
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1684
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1685
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idxMap), &PyDict_Type, 1, "idxMap", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1687
/* "pandas/lib/src/tseries.pyx":144
1690
* nan = <double> np.NaN # <<<<<<<<<<<<<<
1692
* length = PyArray_SIZE(index)
1694
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1695
__Pyx_GOTREF(__pyx_1);
1696
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_NaN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1697
__Pyx_GOTREF(__pyx_t_1);
1698
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
1699
__pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1700
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1701
__pyx_v_nan = ((double)__pyx_t_2);
1703
/* "pandas/lib/src/tseries.pyx":146
1704
* nan = <double> np.NaN
1706
* length = PyArray_SIZE(index) # <<<<<<<<<<<<<<
1708
* result = <ndarray> np.empty(length, np.float64)
1710
if (!(__Pyx_TypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_7tseries_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1711
__pyx_v_length = PyArray_SIZE(((PyArrayObject *)__pyx_v_index));
1713
/* "pandas/lib/src/tseries.pyx":148
1714
* length = PyArray_SIZE(index)
1716
* result = <ndarray> np.empty(length, np.float64) # <<<<<<<<<<<<<<
1718
* result_data = <double *> result.data
1720
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1721
__Pyx_GOTREF(__pyx_1);
1722
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1723
__Pyx_GOTREF(__pyx_t_1);
1724
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
1725
__pyx_t_3 = PyInt_FromLong(__pyx_v_length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1726
__Pyx_GOTREF(__pyx_t_3);
1727
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1728
__Pyx_GOTREF(__pyx_1);
1729
__pyx_t_4 = PyObject_GetAttr(__pyx_1, __pyx_kp_32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1730
__Pyx_GOTREF(__pyx_t_4);
1731
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
1732
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1733
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
1734
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
1735
__Pyx_GIVEREF(__pyx_t_3);
1736
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
1737
__Pyx_GIVEREF(__pyx_t_4);
1740
__pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1741
__Pyx_GOTREF(__pyx_t_4);
1742
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1743
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
1744
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_4)));
1745
__Pyx_DECREF(((PyObject *)__pyx_v_result));
1746
__pyx_v_result = ((PyArrayObject *)__pyx_t_4);
1747
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
1749
/* "pandas/lib/src/tseries.pyx":150
1750
* result = <ndarray> np.empty(length, np.float64)
1752
* result_data = <double *> result.data # <<<<<<<<<<<<<<
1754
* itera = PyArray_IterNew(arr)
1756
__pyx_v_result_data = ((double *)__pyx_v_result->data);
1758
/* "pandas/lib/src/tseries.pyx":152
1759
* result_data = <double *> result.data
1761
* itera = PyArray_IterNew(arr) # <<<<<<<<<<<<<<
1762
* iteridx = PyArray_IterNew(index)
1765
__pyx_t_4 = PyArray_IterNew(((PyObject *)__pyx_v_arr)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1766
__Pyx_GOTREF(__pyx_t_4);
1767
if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1768
__Pyx_DECREF(((PyObject *)__pyx_v_itera));
1769
__pyx_v_itera = ((PyArrayIterObject *)__pyx_t_4);
1772
/* "pandas/lib/src/tseries.pyx":153
1774
* itera = PyArray_IterNew(arr)
1775
* iteridx = PyArray_IterNew(index) # <<<<<<<<<<<<<<
1777
* for i from 0 <= i < length:
1779
__pyx_t_4 = PyArray_IterNew(((PyObject *)__pyx_v_index)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1780
__Pyx_GOTREF(__pyx_t_4);
1781
if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1782
__Pyx_DECREF(((PyObject *)__pyx_v_iteridx));
1783
__pyx_v_iteridx = ((PyArrayIterObject *)__pyx_t_4);
1786
/* "pandas/lib/src/tseries.pyx":155
1787
* iteridx = PyArray_IterNew(index)
1789
* for i from 0 <= i < length: # <<<<<<<<<<<<<<
1790
* idx = PyArray_GETITEM(index, <void *> iteridx.dataptr)
1791
* PyArray_ITER_NEXT(iteridx)
1793
__pyx_t_6 = __pyx_v_length;
1794
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {
1796
/* "pandas/lib/src/tseries.pyx":156
1798
* for i from 0 <= i < length:
1799
* idx = PyArray_GETITEM(index, <void *> iteridx.dataptr) # <<<<<<<<<<<<<<
1800
* PyArray_ITER_NEXT(iteridx)
1801
* if idx not in idxMap:
1803
__pyx_t_4 = PyArray_GETITEM(((PyObject *)__pyx_v_index), ((void *)__pyx_v_iteridx->dataptr)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1804
__Pyx_GOTREF(__pyx_t_4);
1805
__Pyx_DECREF(__pyx_v_idx);
1806
__pyx_v_idx = __pyx_t_4;
1809
/* "pandas/lib/src/tseries.pyx":157
1810
* for i from 0 <= i < length:
1811
* idx = PyArray_GETITEM(index, <void *> iteridx.dataptr)
1812
* PyArray_ITER_NEXT(iteridx) # <<<<<<<<<<<<<<
1813
* if idx not in idxMap:
1814
* result_data[i] = nan
1816
PyArray_ITER_NEXT(__pyx_v_iteridx);
1818
/* "pandas/lib/src/tseries.pyx":158
1819
* idx = PyArray_GETITEM(index, <void *> iteridx.dataptr)
1820
* PyArray_ITER_NEXT(iteridx)
1821
* if idx not in idxMap: # <<<<<<<<<<<<<<
1822
* result_data[i] = nan
1825
__pyx_t_7 = (!PySequence_Contains(((PyObject *)__pyx_v_idxMap), __pyx_v_idx)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1828
/* "pandas/lib/src/tseries.pyx":159
1829
* PyArray_ITER_NEXT(iteridx)
1830
* if idx not in idxMap:
1831
* result_data[i] = nan # <<<<<<<<<<<<<<
1833
* PyArray_ITER_GOTO1D(itera, idxMap[idx])
1835
(__pyx_v_result_data[__pyx_v_i]) = __pyx_v_nan;
1837
/* "pandas/lib/src/tseries.pyx":160
1838
* if idx not in idxMap:
1839
* result_data[i] = nan
1840
* continue # <<<<<<<<<<<<<<
1841
* PyArray_ITER_GOTO1D(itera, idxMap[idx])
1842
* result_data[i] = (<double *>(itera.dataptr))[0]
1844
goto __pyx_L6_continue;
1849
/* "pandas/lib/src/tseries.pyx":161
1850
* result_data[i] = nan
1852
* PyArray_ITER_GOTO1D(itera, idxMap[idx]) # <<<<<<<<<<<<<<
1853
* result_data[i] = (<double *>(itera.dataptr))[0]
1856
__pyx_1 = PyObject_GetItem(((PyObject *)__pyx_v_idxMap), __pyx_v_idx); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1857
__Pyx_GOTREF(__pyx_1);
1858
__pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1859
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
1860
PyArray_ITER_GOTO1D(__pyx_v_itera, __pyx_t_8);
1862
/* "pandas/lib/src/tseries.pyx":162
1864
* PyArray_ITER_GOTO1D(itera, idxMap[idx])
1865
* result_data[i] = (<double *>(itera.dataptr))[0] # <<<<<<<<<<<<<<
1869
(__pyx_v_result_data[__pyx_v_i]) = (((double *)__pyx_v_itera->dataptr)[0]);
1873
/* "pandas/lib/src/tseries.pyx":164
1874
* result_data[i] = (<double *>(itera.dataptr))[0]
1876
* return result # <<<<<<<<<<<<<<
1878
* def reindexObj(ndarray index, ndarray arr, dict idxMap):
1880
__Pyx_XDECREF(__pyx_r);
1881
__Pyx_INCREF(((PyObject *)__pyx_v_result));
1882
__pyx_r = ((PyObject *)__pyx_v_result);
1885
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
1888
__Pyx_XDECREF(__pyx_1);
1889
__Pyx_XDECREF(__pyx_t_1);
1890
__Pyx_XDECREF(__pyx_t_3);
1891
__Pyx_XDECREF(__pyx_t_4);
1892
__Pyx_XDECREF(__pyx_t_5);
1893
__Pyx_AddTraceback("tseries.reindex");
1896
__Pyx_DECREF((PyObject *)__pyx_v_result);
1897
__Pyx_DECREF((PyObject *)__pyx_v_itera);
1898
__Pyx_DECREF((PyObject *)__pyx_v_iteridx);
1899
__Pyx_DECREF(__pyx_v_idx);
1900
__Pyx_XGIVEREF(__pyx_r);
1901
__Pyx_FinishRefcountContext();
1905
/* "pandas/lib/src/tseries.pyx":166
1908
* def reindexObj(ndarray index, ndarray arr, dict idxMap): # <<<<<<<<<<<<<<
1910
* Using the provided new index, a given array, and a mapping of index-value
1913
static PyObject *__pyx_pf_7tseries_reindexObj(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1914
static char __pyx_doc_7tseries_reindexObj[] = "\n Using the provided new index, a given array, and a mapping of index-value\n correpondences in the value array, return a new ndarray conforming to \n the new index.\n \n This is significantly faster than doing it in pure Python.\n ";
1915
static PyObject *__pyx_pf_7tseries_reindexObj(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1916
PyArrayObject *__pyx_v_index = 0;
1917
PyArrayObject *__pyx_v_arr = 0;
1918
PyObject *__pyx_v_idxMap = 0;
1919
PyArrayObject *__pyx_v_result;
1922
PyArrayIterObject *__pyx_v_itera;
1923
PyArrayIterObject *__pyx_v_iteridx;
1924
PyArrayIterObject *__pyx_v_iterresult;
1925
PyObject *__pyx_v_idx;
1926
PyObject *__pyx_v_nan;
1927
PyObject *__pyx_v_obj;
1929
PyObject *__pyx_r = NULL;
1930
PyObject *__pyx_1 = 0;
1931
PyObject *__pyx_2 = 0;
1932
PyObject *__pyx_t_1 = NULL;
1933
PyObject *__pyx_t_2 = NULL;
1934
PyObject *__pyx_t_3 = NULL;
1938
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_index,&__pyx_kp_arr,&__pyx_kp_idxMap,0};
1939
__Pyx_SetupRefcountContext("reindexObj");
1940
__pyx_self = __pyx_self;
1941
if (unlikely(__pyx_kwds)) {
1942
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
1943
PyObject* values[3] = {0,0,0};
1944
switch (PyTuple_GET_SIZE(__pyx_args)) {
1945
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
1946
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
1947
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1949
default: goto __pyx_L5_argtuple_error;
1951
switch (PyTuple_GET_SIZE(__pyx_args)) {
1953
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_index);
1954
if (likely(values[0])) kw_args--;
1955
else goto __pyx_L5_argtuple_error;
1957
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_arr);
1958
if (likely(values[1])) kw_args--;
1960
__Pyx_RaiseArgtupleInvalid("reindexObj", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1963
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_idxMap);
1964
if (likely(values[2])) kw_args--;
1966
__Pyx_RaiseArgtupleInvalid("reindexObj", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1969
if (unlikely(kw_args > 0)) {
1970
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "reindexObj") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1972
__pyx_v_index = ((PyArrayObject *)values[0]);
1973
__pyx_v_arr = ((PyArrayObject *)values[1]);
1974
__pyx_v_idxMap = ((PyObject *)values[2]);
1975
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
1976
goto __pyx_L5_argtuple_error;
1978
__pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
1979
__pyx_v_arr = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
1980
__pyx_v_idxMap = ((PyObject *)PyTuple_GET_ITEM(__pyx_args, 2));
1982
goto __pyx_L4_argument_unpacking_done;
1983
__pyx_L5_argtuple_error:;
1984
__Pyx_RaiseArgtupleInvalid("reindexObj", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1986
__Pyx_AddTraceback("tseries.reindexObj");
1988
__pyx_L4_argument_unpacking_done:;
1989
__pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
1990
__pyx_v_itera = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
1991
__pyx_v_iteridx = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
1992
__pyx_v_iterresult = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
1993
__pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
1994
__pyx_v_nan = Py_None; __Pyx_INCREF(Py_None);
1995
__pyx_v_obj = Py_None; __Pyx_INCREF(Py_None);
1996
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1997
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1998
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idxMap), &PyDict_Type, 1, "idxMap", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2000
/* "pandas/lib/src/tseries.pyx":179
2001
* cdef object idx, nan, obj
2003
* nan = np.NaN # <<<<<<<<<<<<<<
2004
* length = PyArray_SIZE(index)
2007
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2008
__Pyx_GOTREF(__pyx_1);
2009
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_NaN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2010
__Pyx_GOTREF(__pyx_t_1);
2011
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
2012
__Pyx_DECREF(__pyx_v_nan);
2013
__pyx_v_nan = __pyx_t_1;
2016
/* "pandas/lib/src/tseries.pyx":180
2019
* length = PyArray_SIZE(index) # <<<<<<<<<<<<<<
2021
* result = <ndarray> np.empty(length, dtype=np.object_)
2023
if (!(__Pyx_TypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_7tseries_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2024
__pyx_v_length = PyArray_SIZE(((PyArrayObject *)__pyx_v_index));
2026
/* "pandas/lib/src/tseries.pyx":182
2027
* length = PyArray_SIZE(index)
2029
* result = <ndarray> np.empty(length, dtype=np.object_) # <<<<<<<<<<<<<<
2031
* itera = PyArray_IterNew(arr)
2033
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2034
__Pyx_GOTREF(__pyx_1);
2035
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2036
__Pyx_GOTREF(__pyx_t_1);
2037
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
2038
__pyx_t_2 = PyInt_FromLong(__pyx_v_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2039
__Pyx_GOTREF(__pyx_t_2);
2040
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2041
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
2042
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
2043
__Pyx_GIVEREF(__pyx_t_2);
2045
__pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2046
__Pyx_GOTREF(((PyObject *)__pyx_1));
2047
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2048
__Pyx_GOTREF(__pyx_2);
2049
__pyx_t_2 = PyObject_GetAttr(__pyx_2, __pyx_kp_object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2050
__Pyx_GOTREF(__pyx_t_2);
2051
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
2052
if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2053
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2054
__pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2055
__Pyx_GOTREF(__pyx_t_2);
2056
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2057
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
2058
__Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
2059
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_2)));
2060
__Pyx_DECREF(((PyObject *)__pyx_v_result));
2061
__pyx_v_result = ((PyArrayObject *)__pyx_t_2);
2062
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2064
/* "pandas/lib/src/tseries.pyx":184
2065
* result = <ndarray> np.empty(length, dtype=np.object_)
2067
* itera = PyArray_IterNew(arr) # <<<<<<<<<<<<<<
2068
* iteridx = PyArray_IterNew(index)
2069
* iterresult = PyArray_IterNew(result)
2071
__pyx_t_2 = PyArray_IterNew(((PyObject *)__pyx_v_arr)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2072
__Pyx_GOTREF(__pyx_t_2);
2073
if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2074
__Pyx_DECREF(((PyObject *)__pyx_v_itera));
2075
__pyx_v_itera = ((PyArrayIterObject *)__pyx_t_2);
2078
/* "pandas/lib/src/tseries.pyx":185
2080
* itera = PyArray_IterNew(arr)
2081
* iteridx = PyArray_IterNew(index) # <<<<<<<<<<<<<<
2082
* iterresult = PyArray_IterNew(result)
2085
__pyx_t_2 = PyArray_IterNew(((PyObject *)__pyx_v_index)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2086
__Pyx_GOTREF(__pyx_t_2);
2087
if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2088
__Pyx_DECREF(((PyObject *)__pyx_v_iteridx));
2089
__pyx_v_iteridx = ((PyArrayIterObject *)__pyx_t_2);
2092
/* "pandas/lib/src/tseries.pyx":186
2093
* itera = PyArray_IterNew(arr)
2094
* iteridx = PyArray_IterNew(index)
2095
* iterresult = PyArray_IterNew(result) # <<<<<<<<<<<<<<
2099
__pyx_t_2 = PyArray_IterNew(((PyObject *)__pyx_v_result)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2100
__Pyx_GOTREF(__pyx_t_2);
2101
if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2102
__Pyx_DECREF(((PyObject *)__pyx_v_iterresult));
2103
__pyx_v_iterresult = ((PyArrayIterObject *)__pyx_t_2);
2106
/* "pandas/lib/src/tseries.pyx":190
2109
* for i from 0 <= i < length: # <<<<<<<<<<<<<<
2110
* idx = PyArray_GETITEM(index, <void *> iteridx.dataptr)
2111
* PyArray_ITER_NEXT(iteridx)
2113
__pyx_t_4 = __pyx_v_length;
2114
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) {
2116
/* "pandas/lib/src/tseries.pyx":191
2118
* for i from 0 <= i < length:
2119
* idx = PyArray_GETITEM(index, <void *> iteridx.dataptr) # <<<<<<<<<<<<<<
2120
* PyArray_ITER_NEXT(iteridx)
2123
__pyx_t_2 = PyArray_GETITEM(((PyObject *)__pyx_v_index), ((void *)__pyx_v_iteridx->dataptr)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2124
__Pyx_GOTREF(__pyx_t_2);
2125
__Pyx_DECREF(__pyx_v_idx);
2126
__pyx_v_idx = __pyx_t_2;
2129
/* "pandas/lib/src/tseries.pyx":192
2130
* for i from 0 <= i < length:
2131
* idx = PyArray_GETITEM(index, <void *> iteridx.dataptr)
2132
* PyArray_ITER_NEXT(iteridx) # <<<<<<<<<<<<<<
2134
* if idx not in idxMap:
2136
PyArray_ITER_NEXT(__pyx_v_iteridx);
2138
/* "pandas/lib/src/tseries.pyx":194
2139
* PyArray_ITER_NEXT(iteridx)
2141
* if idx not in idxMap: # <<<<<<<<<<<<<<
2142
* PyArray_SETITEM(result, <void *> iterresult.dataptr, nan)
2143
* PyArray_ITER_NEXT(iterresult)
2145
__pyx_t_5 = (!PySequence_Contains(((PyObject *)__pyx_v_idxMap), __pyx_v_idx)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2148
/* "pandas/lib/src/tseries.pyx":195
2150
* if idx not in idxMap:
2151
* PyArray_SETITEM(result, <void *> iterresult.dataptr, nan) # <<<<<<<<<<<<<<
2152
* PyArray_ITER_NEXT(iterresult)
2155
PyArray_SETITEM(((PyObject *)__pyx_v_result), ((void *)__pyx_v_iterresult->dataptr), __pyx_v_nan);
2157
/* "pandas/lib/src/tseries.pyx":196
2158
* if idx not in idxMap:
2159
* PyArray_SETITEM(result, <void *> iterresult.dataptr, nan)
2160
* PyArray_ITER_NEXT(iterresult) # <<<<<<<<<<<<<<
2164
PyArray_ITER_NEXT(__pyx_v_iterresult);
2166
/* "pandas/lib/src/tseries.pyx":197
2167
* PyArray_SETITEM(result, <void *> iterresult.dataptr, nan)
2168
* PyArray_ITER_NEXT(iterresult)
2169
* continue # <<<<<<<<<<<<<<
2171
* PyArray_ITER_GOTO1D(itera, idxMap[idx])
2173
goto __pyx_L6_continue;
2178
/* "pandas/lib/src/tseries.pyx":199
2181
* PyArray_ITER_GOTO1D(itera, idxMap[idx]) # <<<<<<<<<<<<<<
2182
* obj = PyArray_GETITEM(arr, <void *> itera.dataptr)
2185
__pyx_2 = PyObject_GetItem(((PyObject *)__pyx_v_idxMap), __pyx_v_idx); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2186
__Pyx_GOTREF(__pyx_2);
2187
__pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2188
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
2189
PyArray_ITER_GOTO1D(__pyx_v_itera, __pyx_t_6);
2191
/* "pandas/lib/src/tseries.pyx":200
2193
* PyArray_ITER_GOTO1D(itera, idxMap[idx])
2194
* obj = PyArray_GETITEM(arr, <void *> itera.dataptr) # <<<<<<<<<<<<<<
2196
* res = PyArray_SETITEM(result, <void *> iterresult.dataptr, obj)
2198
__pyx_t_2 = PyArray_GETITEM(((PyObject *)__pyx_v_arr), ((void *)__pyx_v_itera->dataptr)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2199
__Pyx_GOTREF(__pyx_t_2);
2200
__Pyx_DECREF(__pyx_v_obj);
2201
__pyx_v_obj = __pyx_t_2;
2204
/* "pandas/lib/src/tseries.pyx":202
2205
* obj = PyArray_GETITEM(arr, <void *> itera.dataptr)
2207
* res = PyArray_SETITEM(result, <void *> iterresult.dataptr, obj) # <<<<<<<<<<<<<<
2208
* PyArray_ITER_NEXT(iterresult)
2211
__pyx_v_res = PyArray_SETITEM(((PyObject *)__pyx_v_result), ((void *)__pyx_v_iterresult->dataptr), __pyx_v_obj);
2213
/* "pandas/lib/src/tseries.pyx":203
2215
* res = PyArray_SETITEM(result, <void *> iterresult.dataptr, obj)
2216
* PyArray_ITER_NEXT(iterresult) # <<<<<<<<<<<<<<
2220
PyArray_ITER_NEXT(__pyx_v_iterresult);
2224
/* "pandas/lib/src/tseries.pyx":205
2225
* PyArray_ITER_NEXT(iterresult)
2227
* return result # <<<<<<<<<<<<<<
2229
* @cython.boundscheck(False)
2231
__Pyx_XDECREF(__pyx_r);
2232
__Pyx_INCREF(((PyObject *)__pyx_v_result));
2233
__pyx_r = ((PyObject *)__pyx_v_result);
2236
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
2239
__Pyx_XDECREF(__pyx_1);
2240
__Pyx_XDECREF(__pyx_2);
2241
__Pyx_XDECREF(__pyx_t_1);
2242
__Pyx_XDECREF(__pyx_t_2);
2243
__Pyx_XDECREF(__pyx_t_3);
2244
__Pyx_AddTraceback("tseries.reindexObj");
2247
__Pyx_DECREF((PyObject *)__pyx_v_result);
2248
__Pyx_DECREF((PyObject *)__pyx_v_itera);
2249
__Pyx_DECREF((PyObject *)__pyx_v_iteridx);
2250
__Pyx_DECREF((PyObject *)__pyx_v_iterresult);
2251
__Pyx_DECREF(__pyx_v_idx);
2252
__Pyx_DECREF(__pyx_v_nan);
2253
__Pyx_DECREF(__pyx_v_obj);
2254
__Pyx_XGIVEREF(__pyx_r);
2255
__Pyx_FinishRefcountContext();
2259
/* "pandas/lib/src/tseries.pyx":208
2261
* @cython.boundscheck(False)
2262
* def reindexObject(ndarray[object, ndim=1] index, # <<<<<<<<<<<<<<
2263
* ndarray[object, ndim=1] arr,
2267
static PyObject *__pyx_pf_7tseries_reindexObject(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2268
static char __pyx_doc_7tseries_reindexObject[] = "\n Using the provided new index, a given array, and a mapping of index-value\n correpondences in the value array, return a new ndarray conforming to \n the new index.\n ";
2269
static PyObject *__pyx_pf_7tseries_reindexObject(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2270
PyArrayObject *__pyx_v_index = 0;
2271
PyArrayObject *__pyx_v_arr = 0;
2272
PyObject *__pyx_v_idxMap = 0;
2275
PyObject *__pyx_v_idx;
2276
PyObject *__pyx_v_value;
2277
PyObject *__pyx_v_nan = 0;
2278
PyArrayObject *__pyx_v_result = 0;
2280
Py_buffer __pyx_bstruct_index;
2281
Py_ssize_t __pyx_bstride_0_index = 0;
2282
Py_ssize_t __pyx_bshape_0_index = 0;
2283
Py_buffer __pyx_bstruct_arr;
2284
Py_ssize_t __pyx_bstride_0_arr = 0;
2285
Py_ssize_t __pyx_bshape_0_arr = 0;
2286
Py_buffer __pyx_bstruct_result;
2287
Py_ssize_t __pyx_bstride_0_result = 0;
2288
Py_ssize_t __pyx_bshape_0_result = 0;
2289
PyObject *__pyx_r = NULL;
2290
PyObject *__pyx_1 = 0;
2291
PyObject *__pyx_2 = 0;
2292
PyObject *__pyx_t_1 = NULL;
2293
PyObject *__pyx_t_2 = NULL;
2294
PyObject *__pyx_t_3 = NULL;
2295
PyArrayObject *__pyx_t_4 = NULL;
2300
PyObject **__pyx_t_9;
2302
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_index,&__pyx_kp_arr,&__pyx_kp_idxMap,0};
2303
__Pyx_SetupRefcountContext("reindexObject");
2304
__pyx_self = __pyx_self;
2305
if (unlikely(__pyx_kwds)) {
2306
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
2307
PyObject* values[3] = {0,0,0};
2308
switch (PyTuple_GET_SIZE(__pyx_args)) {
2309
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
2310
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2311
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2313
default: goto __pyx_L5_argtuple_error;
2315
switch (PyTuple_GET_SIZE(__pyx_args)) {
2317
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_index);
2318
if (likely(values[0])) kw_args--;
2319
else goto __pyx_L5_argtuple_error;
2321
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_arr);
2322
if (likely(values[1])) kw_args--;
2324
__Pyx_RaiseArgtupleInvalid("reindexObject", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2327
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_idxMap);
2328
if (likely(values[2])) kw_args--;
2330
__Pyx_RaiseArgtupleInvalid("reindexObject", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2333
if (unlikely(kw_args > 0)) {
2334
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "reindexObject") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2336
__pyx_v_index = ((PyArrayObject *)values[0]);
2337
__pyx_v_arr = ((PyArrayObject *)values[1]);
2338
__pyx_v_idxMap = ((PyObject *)values[2]);
2339
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
2340
goto __pyx_L5_argtuple_error;
2342
__pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
2343
__pyx_v_arr = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
2344
__pyx_v_idxMap = ((PyObject *)PyTuple_GET_ITEM(__pyx_args, 2));
2346
goto __pyx_L4_argument_unpacking_done;
2347
__pyx_L5_argtuple_error:;
2348
__Pyx_RaiseArgtupleInvalid("reindexObject", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2350
__Pyx_AddTraceback("tseries.reindexObject");
2352
__pyx_L4_argument_unpacking_done:;
2353
__pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
2354
__pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
2355
__pyx_bstruct_result.buf = NULL;
2356
__pyx_bstruct_index.buf = NULL;
2357
__pyx_bstruct_arr.buf = NULL;
2358
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2359
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2360
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idxMap), &PyDict_Type, 1, "idxMap", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2362
__Pyx_BufFmt_StackElem __pyx_stack[1];
2363
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2365
__pyx_bstride_0_index = __pyx_bstruct_index.strides[0];
2366
__pyx_bshape_0_index = __pyx_bstruct_index.shape[0];
2368
__Pyx_BufFmt_StackElem __pyx_stack[1];
2369
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_arr, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2371
__pyx_bstride_0_arr = __pyx_bstruct_arr.strides[0];
2372
__pyx_bshape_0_arr = __pyx_bstruct_arr.shape[0];
2374
/* "pandas/lib/src/tseries.pyx":218
2375
* cdef int j, loc, length
2376
* cdef object idx, value
2377
* cdef object nan = np.NaN # <<<<<<<<<<<<<<
2379
* length = index.shape[0]
2381
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2382
__Pyx_GOTREF(__pyx_1);
2383
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_NaN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2384
__Pyx_GOTREF(__pyx_t_1);
2385
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
2386
__pyx_v_nan = __pyx_t_1;
2389
/* "pandas/lib/src/tseries.pyx":220
2390
* cdef object nan = np.NaN
2392
* length = index.shape[0] # <<<<<<<<<<<<<<
2393
* cdef ndarray[object, ndim = 1] result = np.empty(length, dtype=object)
2396
__pyx_v_length = (__pyx_v_index->dimensions[0]);
2398
/* "pandas/lib/src/tseries.pyx":221
2400
* length = index.shape[0]
2401
* cdef ndarray[object, ndim = 1] result = np.empty(length, dtype=object) # <<<<<<<<<<<<<<
2405
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2406
__Pyx_GOTREF(__pyx_1);
2407
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2408
__Pyx_GOTREF(__pyx_t_1);
2409
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
2410
__pyx_t_2 = PyInt_FromLong(__pyx_v_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2411
__Pyx_GOTREF(__pyx_t_2);
2412
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2413
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
2414
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
2415
__Pyx_GIVEREF(__pyx_t_2);
2417
__pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2418
__Pyx_GOTREF(((PyObject *)__pyx_1));
2419
if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2420
__pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2421
__Pyx_GOTREF(__pyx_t_2);
2422
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2423
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
2424
__Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
2425
if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2426
__pyx_t_4 = ((PyArrayObject *)__pyx_t_2);
2428
__Pyx_BufFmt_StackElem __pyx_stack[1];
2429
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
2430
__pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_result.buf = NULL;
2431
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2432
} else {__pyx_bstride_0_result = __pyx_bstruct_result.strides[0];
2433
__pyx_bshape_0_result = __pyx_bstruct_result.shape[0];
2437
__pyx_v_result = ((PyArrayObject *)__pyx_t_2);
2440
/* "pandas/lib/src/tseries.pyx":223
2441
* cdef ndarray[object, ndim = 1] result = np.empty(length, dtype=object)
2443
* loc = 0 # <<<<<<<<<<<<<<
2445
* for i from 0 <= i < length:
2449
/* "pandas/lib/src/tseries.pyx":224
2452
* cdef int i = 0 # <<<<<<<<<<<<<<
2453
* for i from 0 <= i < length:
2458
/* "pandas/lib/src/tseries.pyx":225
2461
* for i from 0 <= i < length: # <<<<<<<<<<<<<<
2463
* if not PyDict_Contains(idxMap, idx):
2465
__pyx_t_5 = __pyx_v_length;
2466
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
2468
/* "pandas/lib/src/tseries.pyx":226
2470
* for i from 0 <= i < length:
2471
* idx = index[i] # <<<<<<<<<<<<<<
2472
* if not PyDict_Contains(idxMap, idx):
2475
__pyx_t_6 = __pyx_v_i;
2476
if (__pyx_t_6 < 0) __pyx_t_6 += __pyx_bshape_0_index;
2477
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index.buf, __pyx_t_6, __pyx_bstride_0_index);
2478
__Pyx_INCREF((PyObject*)__pyx_1);
2479
__Pyx_DECREF(__pyx_v_idx);
2480
__pyx_v_idx = __pyx_1;
2483
/* "pandas/lib/src/tseries.pyx":227
2484
* for i from 0 <= i < length:
2486
* if not PyDict_Contains(idxMap, idx): # <<<<<<<<<<<<<<
2490
__pyx_t_7 = (!PyDict_Contains(((PyObject *)__pyx_v_idxMap), __pyx_v_idx));
2493
/* "pandas/lib/src/tseries.pyx":228
2495
* if not PyDict_Contains(idxMap, idx):
2496
* result[i] = nan # <<<<<<<<<<<<<<
2498
* value = arr[idxMap[idx]]
2500
__pyx_t_8 = __pyx_v_i;
2501
if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_bshape_0_result;
2502
__pyx_t_9 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_result.buf, __pyx_t_8, __pyx_bstride_0_result);
2503
__Pyx_GOTREF(*__pyx_t_9);
2504
__Pyx_DECREF(*__pyx_t_9); __Pyx_INCREF(__pyx_v_nan);
2505
*__pyx_t_9 = __pyx_v_nan;
2506
__Pyx_GIVEREF(*__pyx_t_9);
2508
/* "pandas/lib/src/tseries.pyx":229
2509
* if not PyDict_Contains(idxMap, idx):
2511
* continue # <<<<<<<<<<<<<<
2512
* value = arr[idxMap[idx]]
2515
goto __pyx_L6_continue;
2520
/* "pandas/lib/src/tseries.pyx":230
2523
* value = arr[idxMap[idx]] # <<<<<<<<<<<<<<
2527
__pyx_1 = PyObject_GetItem(((PyObject *)__pyx_v_idxMap), __pyx_v_idx); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2528
__Pyx_GOTREF(__pyx_1);
2529
__pyx_2 = PyObject_GetItem(((PyObject *)__pyx_v_arr), __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2530
__Pyx_GOTREF(__pyx_2);
2531
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
2532
__Pyx_DECREF(__pyx_v_value);
2533
__pyx_v_value = __pyx_2;
2536
/* "pandas/lib/src/tseries.pyx":231
2538
* value = arr[idxMap[idx]]
2539
* result[i] = value # <<<<<<<<<<<<<<
2543
__pyx_t_10 = __pyx_v_i;
2544
if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_bshape_0_result;
2545
__pyx_t_9 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_result.buf, __pyx_t_10, __pyx_bstride_0_result);
2546
__Pyx_GOTREF(*__pyx_t_9);
2547
__Pyx_DECREF(*__pyx_t_9); __Pyx_INCREF(__pyx_v_value);
2548
*__pyx_t_9 = __pyx_v_value;
2549
__Pyx_GIVEREF(*__pyx_t_9);
2553
/* "pandas/lib/src/tseries.pyx":232
2554
* value = arr[idxMap[idx]]
2556
* return result # <<<<<<<<<<<<<<
2558
* cdef tuple _nofill(ndarray oldIndex, ndarray newIndex, dict oldMap, dict newMap):
2560
__Pyx_XDECREF(__pyx_r);
2561
__Pyx_INCREF(((PyObject *)__pyx_v_result));
2562
__pyx_r = ((PyObject *)__pyx_v_result);
2565
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
2568
__Pyx_XDECREF(__pyx_1);
2569
__Pyx_XDECREF(__pyx_2);
2570
__Pyx_XDECREF(__pyx_t_1);
2571
__Pyx_XDECREF(__pyx_t_2);
2572
__Pyx_XDECREF(__pyx_t_3);
2573
{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
2574
__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
2575
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
2576
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
2577
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
2578
__Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
2579
__Pyx_AddTraceback("tseries.reindexObject");
2583
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
2584
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_arr);
2585
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
2587
__Pyx_DECREF(__pyx_v_idx);
2588
__Pyx_DECREF(__pyx_v_value);
2589
__Pyx_XDECREF(__pyx_v_nan);
2590
__Pyx_XDECREF((PyObject *)__pyx_v_result);
2591
__Pyx_XGIVEREF(__pyx_r);
2592
__Pyx_FinishRefcountContext();
2596
/* "pandas/lib/src/tseries.pyx":234
2599
* cdef tuple _nofill(ndarray oldIndex, ndarray newIndex, dict oldMap, dict newMap): # <<<<<<<<<<<<<<
2600
* cdef int *fillLocs
2604
static PyObject *__pyx_f_7tseries__nofill(PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, PyObject *__pyx_v_newMap) {
2605
int *__pyx_v_fillLocs;
2610
int __pyx_v_newLength;
2611
PyArrayIterObject *__pyx_v_iterold;
2612
PyObject *__pyx_v_idx;
2613
PyArrayObject *__pyx_v_fillVec;
2614
PyArrayObject *__pyx_v_maskVec;
2615
PyObject *__pyx_r = NULL;
2616
PyObject *__pyx_1 = 0;
2617
PyObject *__pyx_2 = 0;
2618
PyObject *__pyx_t_1 = NULL;
2619
Py_ssize_t __pyx_t_2;
2620
PyObject *__pyx_t_3 = NULL;
2621
PyObject *__pyx_t_4 = NULL;
2625
__Pyx_SetupRefcountContext("_nofill");
2626
__pyx_v_iterold = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
2627
__pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
2628
__pyx_v_fillVec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
2629
__pyx_v_maskVec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
2631
/* "pandas/lib/src/tseries.pyx":244
2632
* cdef ndarray maskVec
2634
* fillVec = <ndarray> np.empty(len(newIndex), dtype = np.int32) # <<<<<<<<<<<<<<
2635
* maskVec = <ndarray> np.zeros(len(newIndex), dtype = np.int8)
2638
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2639
__Pyx_GOTREF(__pyx_1);
2640
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2641
__Pyx_GOTREF(__pyx_t_1);
2642
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
2643
__pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2644
__pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2645
__Pyx_GOTREF(__pyx_t_3);
2646
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2647
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
2648
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
2649
__Pyx_GIVEREF(__pyx_t_3);
2651
__pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2652
__Pyx_GOTREF(((PyObject *)__pyx_1));
2653
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2654
__Pyx_GOTREF(__pyx_2);
2655
__pyx_t_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_33); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2656
__Pyx_GOTREF(__pyx_t_3);
2657
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
2658
if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2659
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2660
__pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2661
__Pyx_GOTREF(__pyx_t_3);
2662
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2663
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
2664
__Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
2665
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_3)));
2666
__Pyx_DECREF(((PyObject *)__pyx_v_fillVec));
2667
__pyx_v_fillVec = ((PyArrayObject *)__pyx_t_3);
2668
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2670
/* "pandas/lib/src/tseries.pyx":245
2672
* fillVec = <ndarray> np.empty(len(newIndex), dtype = np.int32)
2673
* maskVec = <ndarray> np.zeros(len(newIndex), dtype = np.int8) # <<<<<<<<<<<<<<
2675
* fillLocs = <int *> fillVec.data
2677
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2678
__Pyx_GOTREF(__pyx_2);
2679
__pyx_t_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2680
__Pyx_GOTREF(__pyx_t_3);
2681
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
2682
__pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2683
__pyx_t_4 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2684
__Pyx_GOTREF(__pyx_t_4);
2685
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2686
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
2687
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
2688
__Pyx_GIVEREF(__pyx_t_4);
2690
__pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2691
__Pyx_GOTREF(((PyObject *)__pyx_1));
2692
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2693
__Pyx_GOTREF(__pyx_2);
2694
__pyx_t_4 = PyObject_GetAttr(__pyx_2, __pyx_kp_34); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2695
__Pyx_GOTREF(__pyx_t_4);
2696
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
2697
if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2698
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2699
__pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2700
__Pyx_GOTREF(__pyx_t_4);
2701
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2702
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
2703
__Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
2704
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_4)));
2705
__Pyx_DECREF(((PyObject *)__pyx_v_maskVec));
2706
__pyx_v_maskVec = ((PyArrayObject *)__pyx_t_4);
2707
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2709
/* "pandas/lib/src/tseries.pyx":247
2710
* maskVec = <ndarray> np.zeros(len(newIndex), dtype = np.int8)
2712
* fillLocs = <int *> fillVec.data # <<<<<<<<<<<<<<
2713
* mask = <char *> maskVec.data
2716
__pyx_v_fillLocs = ((int *)__pyx_v_fillVec->data);
2718
/* "pandas/lib/src/tseries.pyx":248
2720
* fillLocs = <int *> fillVec.data
2721
* mask = <char *> maskVec.data # <<<<<<<<<<<<<<
2723
* newLength = PyArray_SIZE(fillVec)
2725
__pyx_v_mask = ((char *)__pyx_v_maskVec->data);
2727
/* "pandas/lib/src/tseries.pyx":250
2728
* mask = <char *> maskVec.data
2730
* newLength = PyArray_SIZE(fillVec) # <<<<<<<<<<<<<<
2732
* length = PyArray_SIZE(oldIndex)
2734
if (!(__Pyx_TypeTest(((PyObject *)__pyx_v_fillVec), __pyx_ptype_7tseries_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2735
__pyx_v_newLength = PyArray_SIZE(((PyArrayObject *)__pyx_v_fillVec));
2737
/* "pandas/lib/src/tseries.pyx":252
2738
* newLength = PyArray_SIZE(fillVec)
2740
* length = PyArray_SIZE(oldIndex) # <<<<<<<<<<<<<<
2741
* iterold = PyArray_IterNew(oldIndex)
2744
if (!(__Pyx_TypeTest(((PyObject *)__pyx_v_oldIndex), __pyx_ptype_7tseries_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2745
__pyx_v_length = PyArray_SIZE(((PyArrayObject *)__pyx_v_oldIndex));
2747
/* "pandas/lib/src/tseries.pyx":253
2749
* length = PyArray_SIZE(oldIndex)
2750
* iterold = PyArray_IterNew(oldIndex) # <<<<<<<<<<<<<<
2752
* for i from 0 <= i < length:
2754
__pyx_t_4 = PyArray_IterNew(((PyObject *)__pyx_v_oldIndex)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2755
__Pyx_GOTREF(__pyx_t_4);
2756
if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2757
__Pyx_DECREF(((PyObject *)__pyx_v_iterold));
2758
__pyx_v_iterold = ((PyArrayIterObject *)__pyx_t_4);
2761
/* "pandas/lib/src/tseries.pyx":255
2762
* iterold = PyArray_IterNew(oldIndex)
2764
* for i from 0 <= i < length: # <<<<<<<<<<<<<<
2765
* idx = PyArray_GETITEM(oldIndex, <void *> iterold.dataptr)
2766
* if i < length - 1:
2768
__pyx_t_5 = __pyx_v_length;
2769
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
2771
/* "pandas/lib/src/tseries.pyx":256
2773
* for i from 0 <= i < length:
2774
* idx = PyArray_GETITEM(oldIndex, <void *> iterold.dataptr) # <<<<<<<<<<<<<<
2775
* if i < length - 1:
2776
* PyArray_ITER_NEXT(iterold)
2778
__pyx_t_4 = PyArray_GETITEM(((PyObject *)__pyx_v_oldIndex), ((void *)__pyx_v_iterold->dataptr)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2779
__Pyx_GOTREF(__pyx_t_4);
2780
__Pyx_DECREF(__pyx_v_idx);
2781
__pyx_v_idx = __pyx_t_4;
2784
/* "pandas/lib/src/tseries.pyx":257
2785
* for i from 0 <= i < length:
2786
* idx = PyArray_GETITEM(oldIndex, <void *> iterold.dataptr)
2787
* if i < length - 1: # <<<<<<<<<<<<<<
2788
* PyArray_ITER_NEXT(iterold)
2791
__pyx_t_6 = (__pyx_v_i < (__pyx_v_length - 1));
2794
/* "pandas/lib/src/tseries.pyx":258
2795
* idx = PyArray_GETITEM(oldIndex, <void *> iterold.dataptr)
2796
* if i < length - 1:
2797
* PyArray_ITER_NEXT(iterold) # <<<<<<<<<<<<<<
2801
PyArray_ITER_NEXT(__pyx_v_iterold);
2806
/* "pandas/lib/src/tseries.pyx":259
2807
* if i < length - 1:
2808
* PyArray_ITER_NEXT(iterold)
2809
* if idx in newMap: # <<<<<<<<<<<<<<
2813
__pyx_t_6 = (PySequence_Contains(((PyObject *)__pyx_v_newMap), __pyx_v_idx)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2816
/* "pandas/lib/src/tseries.pyx":260
2817
* PyArray_ITER_NEXT(iterold)
2819
* j = newMap[idx] # <<<<<<<<<<<<<<
2823
__pyx_2 = PyObject_GetItem(((PyObject *)__pyx_v_newMap), __pyx_v_idx); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2824
__Pyx_GOTREF(__pyx_2);
2825
__pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2826
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
2827
__pyx_v_j = __pyx_t_7;
2829
/* "pandas/lib/src/tseries.pyx":261
2832
* fillLocs[j] = i # <<<<<<<<<<<<<<
2836
(__pyx_v_fillLocs[__pyx_v_j]) = __pyx_v_i;
2838
/* "pandas/lib/src/tseries.pyx":262
2841
* mask[j] = 1 # <<<<<<<<<<<<<<
2843
* for i from 0 <= i < newLength:
2845
(__pyx_v_mask[__pyx_v_j]) = 1;
2851
/* "pandas/lib/src/tseries.pyx":264
2854
* for i from 0 <= i < newLength: # <<<<<<<<<<<<<<
2858
__pyx_t_5 = __pyx_v_newLength;
2859
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
2861
/* "pandas/lib/src/tseries.pyx":265
2863
* for i from 0 <= i < newLength:
2864
* if mask[i] == 0: # <<<<<<<<<<<<<<
2868
__pyx_t_6 = ((__pyx_v_mask[__pyx_v_i]) == 0);
2871
/* "pandas/lib/src/tseries.pyx":266
2872
* for i from 0 <= i < newLength:
2874
* fillLocs[i] = -1 # <<<<<<<<<<<<<<
2876
* return fillVec, maskVec
2878
(__pyx_v_fillLocs[__pyx_v_i]) = -1;
2884
/* "pandas/lib/src/tseries.pyx":268
2887
* return fillVec, maskVec # <<<<<<<<<<<<<<
2889
* cdef tuple _backfill(ndarray oldIndex, ndarray newIndex, dict oldMap, dict newMap):
2891
__Pyx_XDECREF(((PyObject *)__pyx_r));
2892
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2893
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
2894
__Pyx_INCREF(((PyObject *)__pyx_v_fillVec));
2895
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_fillVec));
2896
__Pyx_GIVEREF(((PyObject *)__pyx_v_fillVec));
2897
__Pyx_INCREF(((PyObject *)__pyx_v_maskVec));
2898
PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_maskVec));
2899
__Pyx_GIVEREF(((PyObject *)__pyx_v_maskVec));
2900
__pyx_r = __pyx_t_4;
2904
__pyx_r = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
2907
__Pyx_XDECREF(__pyx_1);
2908
__Pyx_XDECREF(__pyx_2);
2909
__Pyx_XDECREF(__pyx_t_1);
2910
__Pyx_XDECREF(__pyx_t_3);
2911
__Pyx_XDECREF(__pyx_t_4);
2912
__Pyx_AddTraceback("tseries._nofill");
2915
__Pyx_DECREF((PyObject *)__pyx_v_iterold);
2916
__Pyx_DECREF(__pyx_v_idx);
2917
__Pyx_DECREF((PyObject *)__pyx_v_fillVec);
2918
__Pyx_DECREF((PyObject *)__pyx_v_maskVec);
2919
__Pyx_XGIVEREF(__pyx_r);
2920
__Pyx_FinishRefcountContext();
2924
/* "pandas/lib/src/tseries.pyx":270
2925
* return fillVec, maskVec
2927
* cdef tuple _backfill(ndarray oldIndex, ndarray newIndex, dict oldMap, dict newMap): # <<<<<<<<<<<<<<
2929
* Backfilling logic for generating fill vector
2932
static PyObject *__pyx_f_7tseries__backfill(PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, PyObject *__pyx_v_newMap) {
2934
int __pyx_v_oldLength;
2935
int __pyx_v_newLength;
2937
PyArrayObject *__pyx_v_fillVec;
2938
PyArrayObject *__pyx_v_maskVec;
2939
int *__pyx_v_fillLocs;
2941
PyArrayIterObject *__pyx_v_iterold;
2942
PyArrayIterObject *__pyx_v_iternew;
2945
PyObject *__pyx_v_prevOld;
2946
PyObject *__pyx_v_curOld;
2947
PyObject *__pyx_r = NULL;
2948
PyObject *__pyx_1 = 0;
2949
PyObject *__pyx_2 = 0;
2950
PyObject *__pyx_t_1 = NULL;
2951
Py_ssize_t __pyx_t_2;
2952
PyObject *__pyx_t_3 = NULL;
2953
PyObject *__pyx_t_4 = NULL;
2956
__Pyx_SetupRefcountContext("_backfill");
2957
__pyx_v_fillVec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
2958
__pyx_v_maskVec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
2959
__pyx_v_iterold = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
2960
__pyx_v_iternew = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
2961
__pyx_v_prevOld = Py_None; __Pyx_INCREF(Py_None);
2962
__pyx_v_curOld = Py_None; __Pyx_INCREF(Py_None);
2964
/* "pandas/lib/src/tseries.pyx":299
2965
* cdef ndarray fillVec
2966
* cdef ndarray maskVec
2967
* fillVec = <ndarray> np.empty(len(newIndex), dtype = np.int32) # <<<<<<<<<<<<<<
2968
* maskVec = <ndarray> np.zeros(len(newIndex), dtype = np.int8)
2971
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2972
__Pyx_GOTREF(__pyx_1);
2973
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2974
__Pyx_GOTREF(__pyx_t_1);
2975
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
2976
__pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2977
__pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2978
__Pyx_GOTREF(__pyx_t_3);
2979
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2980
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
2981
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
2982
__Pyx_GIVEREF(__pyx_t_3);
2984
__pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2985
__Pyx_GOTREF(((PyObject *)__pyx_1));
2986
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2987
__Pyx_GOTREF(__pyx_2);
2988
__pyx_t_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_33); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2989
__Pyx_GOTREF(__pyx_t_3);
2990
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
2991
if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2992
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2993
__pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2994
__Pyx_GOTREF(__pyx_t_3);
2995
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2996
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
2997
__Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
2998
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_3)));
2999
__Pyx_DECREF(((PyObject *)__pyx_v_fillVec));
3000
__pyx_v_fillVec = ((PyArrayObject *)__pyx_t_3);
3001
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3003
/* "pandas/lib/src/tseries.pyx":300
3004
* cdef ndarray maskVec
3005
* fillVec = <ndarray> np.empty(len(newIndex), dtype = np.int32)
3006
* maskVec = <ndarray> np.zeros(len(newIndex), dtype = np.int8) # <<<<<<<<<<<<<<
3010
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3011
__Pyx_GOTREF(__pyx_2);
3012
__pyx_t_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3013
__Pyx_GOTREF(__pyx_t_3);
3014
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
3015
__pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3016
__pyx_t_4 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3017
__Pyx_GOTREF(__pyx_t_4);
3018
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3019
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
3020
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
3021
__Pyx_GIVEREF(__pyx_t_4);
3023
__pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3024
__Pyx_GOTREF(((PyObject *)__pyx_1));
3025
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3026
__Pyx_GOTREF(__pyx_2);
3027
__pyx_t_4 = PyObject_GetAttr(__pyx_2, __pyx_kp_34); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3028
__Pyx_GOTREF(__pyx_t_4);
3029
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
3030
if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3031
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3032
__pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3033
__Pyx_GOTREF(__pyx_t_4);
3034
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3035
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
3036
__Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
3037
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_4)));
3038
__Pyx_DECREF(((PyObject *)__pyx_v_maskVec));
3039
__pyx_v_maskVec = ((PyArrayObject *)__pyx_t_4);
3040
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3042
/* "pandas/lib/src/tseries.pyx":305
3043
* cdef int *fillLocs
3045
* fillLocs = <int *> fillVec.data # <<<<<<<<<<<<<<
3046
* mask = <char *> maskVec.data
3049
__pyx_v_fillLocs = ((int *)__pyx_v_fillVec->data);
3051
/* "pandas/lib/src/tseries.pyx":306
3053
* fillLocs = <int *> fillVec.data
3054
* mask = <char *> maskVec.data # <<<<<<<<<<<<<<
3056
* # Create the iterators
3058
__pyx_v_mask = ((char *)__pyx_v_maskVec->data);
3060
/* "pandas/lib/src/tseries.pyx":310
3061
* # Create the iterators
3062
* cdef flatiter iterold, iternew
3063
* iterold = PyArray_IterNew(oldIndex) # <<<<<<<<<<<<<<
3064
* iternew = PyArray_IterNew(newIndex)
3067
__pyx_t_4 = PyArray_IterNew(((PyObject *)__pyx_v_oldIndex)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3068
__Pyx_GOTREF(__pyx_t_4);
3069
if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3070
__Pyx_DECREF(((PyObject *)__pyx_v_iterold));
3071
__pyx_v_iterold = ((PyArrayIterObject *)__pyx_t_4);
3074
/* "pandas/lib/src/tseries.pyx":311
3075
* cdef flatiter iterold, iternew
3076
* iterold = PyArray_IterNew(oldIndex)
3077
* iternew = PyArray_IterNew(newIndex) # <<<<<<<<<<<<<<
3081
__pyx_t_4 = PyArray_IterNew(((PyObject *)__pyx_v_newIndex)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3082
__Pyx_GOTREF(__pyx_t_4);
3083
if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3084
__Pyx_DECREF(((PyObject *)__pyx_v_iternew));
3085
__pyx_v_iternew = ((PyArrayIterObject *)__pyx_t_4);
3088
/* "pandas/lib/src/tseries.pyx":314
3091
* oldLength = PyArray_SIZE(oldIndex) # <<<<<<<<<<<<<<
3092
* newLength = PyArray_SIZE(newIndex)
3095
if (!(__Pyx_TypeTest(((PyObject *)__pyx_v_oldIndex), __pyx_ptype_7tseries_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3096
__pyx_v_oldLength = PyArray_SIZE(((PyArrayObject *)__pyx_v_oldIndex));
3098
/* "pandas/lib/src/tseries.pyx":315
3100
* oldLength = PyArray_SIZE(oldIndex)
3101
* newLength = PyArray_SIZE(newIndex) # <<<<<<<<<<<<<<
3103
* # Current positions
3105
if (!(__Pyx_TypeTest(((PyObject *)__pyx_v_newIndex), __pyx_ptype_7tseries_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3106
__pyx_v_newLength = PyArray_SIZE(((PyArrayObject *)__pyx_v_newIndex));
3108
/* "pandas/lib/src/tseries.pyx":319
3109
* # Current positions
3110
* cdef int newPos, oldPos
3111
* oldPos = oldLength - 1 # <<<<<<<<<<<<<<
3112
* newPos = newLength - 1
3115
__pyx_v_oldPos = (__pyx_v_oldLength - 1);
3117
/* "pandas/lib/src/tseries.pyx":320
3118
* cdef int newPos, oldPos
3119
* oldPos = oldLength - 1
3120
* newPos = newLength - 1 # <<<<<<<<<<<<<<
3122
* # References holding indices
3124
__pyx_v_newPos = (__pyx_v_newLength - 1);
3126
/* "pandas/lib/src/tseries.pyx":325
3127
* cdef object prevOld, curOld
3129
* while newPos >= 0: # <<<<<<<<<<<<<<
3130
* # Move to the current position
3131
* PyArray_ITER_GOTO1D(iternew, newPos)
3134
__pyx_t_5 = (__pyx_v_newPos >= 0);
3135
if (!__pyx_t_5) break;
3137
/* "pandas/lib/src/tseries.pyx":327
3138
* while newPos >= 0:
3139
* # Move to the current position
3140
* PyArray_ITER_GOTO1D(iternew, newPos) # <<<<<<<<<<<<<<
3141
* PyArray_ITER_GOTO1D(iterold, oldPos)
3144
PyArray_ITER_GOTO1D(__pyx_v_iternew, __pyx_v_newPos);
3146
/* "pandas/lib/src/tseries.pyx":328
3147
* # Move to the current position
3148
* PyArray_ITER_GOTO1D(iternew, newPos)
3149
* PyArray_ITER_GOTO1D(iterold, oldPos) # <<<<<<<<<<<<<<
3151
* # Get the current index
3153
PyArray_ITER_GOTO1D(__pyx_v_iterold, __pyx_v_oldPos);
3155
/* "pandas/lib/src/tseries.pyx":331
3157
* # Get the current index
3158
* curOld = PyArray_GETITEM(oldIndex, <void *> iterold.dataptr) # <<<<<<<<<<<<<<
3160
* # Until we reach a point where we are before the curOld point
3162
__pyx_t_4 = PyArray_GETITEM(((PyObject *)__pyx_v_oldIndex), ((void *)__pyx_v_iterold->dataptr)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3163
__Pyx_GOTREF(__pyx_t_4);
3164
__Pyx_DECREF(__pyx_v_curOld);
3165
__pyx_v_curOld = __pyx_t_4;
3168
/* "pandas/lib/src/tseries.pyx":334
3170
* # Until we reach a point where we are before the curOld point
3171
* while PyArray_GETITEM(newIndex, <void *> iternew.dataptr) > curOld: # <<<<<<<<<<<<<<
3176
__pyx_t_4 = PyArray_GETITEM(((PyObject *)__pyx_v_newIndex), ((void *)__pyx_v_iternew->dataptr)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3177
__Pyx_GOTREF(__pyx_t_4);
3178
__pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_v_curOld, Py_GT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3179
__Pyx_GOTREF(__pyx_t_1);
3180
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3181
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3182
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3183
if (!__pyx_t_5) break;
3185
/* "pandas/lib/src/tseries.pyx":335
3186
* # Until we reach a point where we are before the curOld point
3187
* while PyArray_GETITEM(newIndex, <void *> iternew.dataptr) > curOld:
3188
* newPos -= 1 # <<<<<<<<<<<<<<
3192
__pyx_v_newPos -= 1;
3194
/* "pandas/lib/src/tseries.pyx":336
3195
* while PyArray_GETITEM(newIndex, <void *> iternew.dataptr) > curOld:
3197
* if newPos < 0: # <<<<<<<<<<<<<<
3199
* PyArray_ITER_GOTO1D(iternew, newPos)
3201
__pyx_t_5 = (__pyx_v_newPos < 0);
3204
/* "pandas/lib/src/tseries.pyx":337
3207
* break # <<<<<<<<<<<<<<
3208
* PyArray_ITER_GOTO1D(iternew, newPos)
3211
goto __pyx_L6_break;
3216
/* "pandas/lib/src/tseries.pyx":338
3219
* PyArray_ITER_GOTO1D(iternew, newPos) # <<<<<<<<<<<<<<
3221
* # Get the location in the old index
3223
PyArray_ITER_GOTO1D(__pyx_v_iternew, __pyx_v_newPos);
3227
/* "pandas/lib/src/tseries.pyx":341
3229
* # Get the location in the old index
3230
* curLoc = oldMap[curOld] # <<<<<<<<<<<<<<
3232
* # At the beginning of the old index
3234
__pyx_2 = PyObject_GetItem(((PyObject *)__pyx_v_oldMap), __pyx_v_curOld); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3235
__Pyx_GOTREF(__pyx_2);
3236
__pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3237
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
3238
__pyx_v_curLoc = __pyx_t_6;
3240
/* "pandas/lib/src/tseries.pyx":344
3242
* # At the beginning of the old index
3243
* if oldPos == 0: # <<<<<<<<<<<<<<
3245
* # Make sure we are before the curOld index
3247
__pyx_t_5 = (__pyx_v_oldPos == 0);
3250
/* "pandas/lib/src/tseries.pyx":347
3252
* # Make sure we are before the curOld index
3253
* if PyArray_GETITEM(newIndex, <void *> iternew.dataptr) <= curOld: # <<<<<<<<<<<<<<
3254
* fillVec[:newPos + 1] = curLoc
3255
* maskVec[:newPos + 1] = 1
3257
__pyx_t_1 = PyArray_GETITEM(((PyObject *)__pyx_v_newIndex), ((void *)__pyx_v_iternew->dataptr)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3258
__Pyx_GOTREF(__pyx_t_1);
3259
__pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_curOld, Py_LE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3260
__Pyx_GOTREF(__pyx_t_4);
3261
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3262
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3263
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3266
/* "pandas/lib/src/tseries.pyx":348
3267
* # Make sure we are before the curOld index
3268
* if PyArray_GETITEM(newIndex, <void *> iternew.dataptr) <= curOld:
3269
* fillVec[:newPos + 1] = curLoc # <<<<<<<<<<<<<<
3270
* maskVec[:newPos + 1] = 1
3273
__pyx_t_4 = PyInt_FromLong(__pyx_v_curLoc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3274
__Pyx_GOTREF(__pyx_t_4);
3275
if (PySequence_SetSlice(((PyObject *)__pyx_v_fillVec), 0, (__pyx_v_newPos + 1), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3276
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3278
/* "pandas/lib/src/tseries.pyx":349
3279
* if PyArray_GETITEM(newIndex, <void *> iternew.dataptr) <= curOld:
3280
* fillVec[:newPos + 1] = curLoc
3281
* maskVec[:newPos + 1] = 1 # <<<<<<<<<<<<<<
3283
* # Exit the main loop
3285
if (PySequence_SetSlice(((PyObject *)__pyx_v_maskVec), 0, (__pyx_v_newPos + 1), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3290
/* "pandas/lib/src/tseries.pyx":352
3292
* # Exit the main loop
3293
* break # <<<<<<<<<<<<<<
3297
goto __pyx_L4_break;
3302
/* "pandas/lib/src/tseries.pyx":356
3304
* # Move one position back
3305
* PyArray_ITER_GOTO1D(iterold, oldPos - 1) # <<<<<<<<<<<<<<
3307
* # Get the index there
3309
PyArray_ITER_GOTO1D(__pyx_v_iterold, (__pyx_v_oldPos - 1));
3311
/* "pandas/lib/src/tseries.pyx":359
3313
* # Get the index there
3314
* prevOld = PyArray_GETITEM(oldIndex, <void *> iterold.dataptr) # <<<<<<<<<<<<<<
3316
* # Until we reach the previous index
3318
__pyx_t_4 = PyArray_GETITEM(((PyObject *)__pyx_v_oldIndex), ((void *)__pyx_v_iterold->dataptr)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3319
__Pyx_GOTREF(__pyx_t_4);
3320
__Pyx_DECREF(__pyx_v_prevOld);
3321
__pyx_v_prevOld = __pyx_t_4;
3324
/* "pandas/lib/src/tseries.pyx":362
3326
* # Until we reach the previous index
3327
* while PyArray_GETITEM(newIndex, <void *> iternew.dataptr) > prevOld: # <<<<<<<<<<<<<<
3329
* # Set the current fill location
3332
__pyx_t_4 = PyArray_GETITEM(((PyObject *)__pyx_v_newIndex), ((void *)__pyx_v_iternew->dataptr)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3333
__Pyx_GOTREF(__pyx_t_4);
3334
__pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_v_prevOld, Py_GT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3335
__Pyx_GOTREF(__pyx_t_1);
3336
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3337
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3338
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3339
if (!__pyx_t_5) break;
3341
/* "pandas/lib/src/tseries.pyx":365
3343
* # Set the current fill location
3344
* fillLocs[newPos] = curLoc # <<<<<<<<<<<<<<
3348
(__pyx_v_fillLocs[__pyx_v_newPos]) = __pyx_v_curLoc;
3350
/* "pandas/lib/src/tseries.pyx":366
3351
* # Set the current fill location
3352
* fillLocs[newPos] = curLoc
3353
* mask[newPos] = 1 # <<<<<<<<<<<<<<
3357
(__pyx_v_mask[__pyx_v_newPos]) = 1;
3359
/* "pandas/lib/src/tseries.pyx":368
3362
* newPos -= 1 # <<<<<<<<<<<<<<
3366
__pyx_v_newPos -= 1;
3368
/* "pandas/lib/src/tseries.pyx":369
3371
* if newPos < 0: # <<<<<<<<<<<<<<
3375
__pyx_t_5 = (__pyx_v_newPos < 0);
3378
/* "pandas/lib/src/tseries.pyx":370
3381
* break # <<<<<<<<<<<<<<
3383
* # Move the iterator back
3385
goto __pyx_L11_break;
3390
/* "pandas/lib/src/tseries.pyx":373
3392
* # Move the iterator back
3393
* PyArray_ITER_GOTO1D(iternew, newPos) # <<<<<<<<<<<<<<
3395
* # Move one period back
3397
PyArray_ITER_GOTO1D(__pyx_v_iternew, __pyx_v_newPos);
3403
/* "pandas/lib/src/tseries.pyx":376
3405
* # Move one period back
3406
* oldPos -= 1 # <<<<<<<<<<<<<<
3408
* for i from 0 <= i < newLength:
3410
__pyx_v_oldPos -= 1;
3414
/* "pandas/lib/src/tseries.pyx":378
3417
* for i from 0 <= i < newLength: # <<<<<<<<<<<<<<
3419
* # Fill from some generic location
3421
__pyx_t_6 = __pyx_v_newLength;
3422
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {
3424
/* "pandas/lib/src/tseries.pyx":379
3426
* for i from 0 <= i < newLength:
3427
* if mask[i] == 0: # <<<<<<<<<<<<<<
3428
* # Fill from some generic location
3431
__pyx_t_5 = ((__pyx_v_mask[__pyx_v_i]) == 0);
3434
/* "pandas/lib/src/tseries.pyx":381
3436
* # Fill from some generic location
3437
* fillLocs[i] = -1 # <<<<<<<<<<<<<<
3439
* return (fillVec, maskVec)
3441
(__pyx_v_fillLocs[__pyx_v_i]) = -1;
3447
/* "pandas/lib/src/tseries.pyx":383
3450
* return (fillVec, maskVec) # <<<<<<<<<<<<<<
3452
* cdef tuple _pad(ndarray oldIndex, ndarray newIndex, dict oldMap, dict newMap):
3454
__Pyx_XDECREF(((PyObject *)__pyx_r));
3455
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3456
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
3457
__Pyx_INCREF(((PyObject *)__pyx_v_fillVec));
3458
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_fillVec));
3459
__Pyx_GIVEREF(((PyObject *)__pyx_v_fillVec));
3460
__Pyx_INCREF(((PyObject *)__pyx_v_maskVec));
3461
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_maskVec));
3462
__Pyx_GIVEREF(((PyObject *)__pyx_v_maskVec));
3463
__pyx_r = __pyx_t_1;
3467
__pyx_r = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
3470
__Pyx_XDECREF(__pyx_1);
3471
__Pyx_XDECREF(__pyx_2);
3472
__Pyx_XDECREF(__pyx_t_1);
3473
__Pyx_XDECREF(__pyx_t_3);
3474
__Pyx_XDECREF(__pyx_t_4);
3475
__Pyx_AddTraceback("tseries._backfill");
3478
__Pyx_DECREF((PyObject *)__pyx_v_fillVec);
3479
__Pyx_DECREF((PyObject *)__pyx_v_maskVec);
3480
__Pyx_DECREF((PyObject *)__pyx_v_iterold);
3481
__Pyx_DECREF((PyObject *)__pyx_v_iternew);
3482
__Pyx_DECREF(__pyx_v_prevOld);
3483
__Pyx_DECREF(__pyx_v_curOld);
3484
__Pyx_XGIVEREF(__pyx_r);
3485
__Pyx_FinishRefcountContext();
3489
/* "pandas/lib/src/tseries.pyx":385
3490
* return (fillVec, maskVec)
3492
* cdef tuple _pad(ndarray oldIndex, ndarray newIndex, dict oldMap, dict newMap): # <<<<<<<<<<<<<<
3494
* Padding logic for generating fill vector
3497
static PyObject *__pyx_f_7tseries__pad(PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, PyObject *__pyx_v_newMap) {
3498
PyArrayObject *__pyx_v_fillVec;
3499
PyArrayObject *__pyx_v_maskVec;
3500
int *__pyx_v_fillLocs;
3503
int __pyx_v_oldLength;
3504
int __pyx_v_newLength;
3508
PyArrayIterObject *__pyx_v_iterold;
3509
PyArrayIterObject *__pyx_v_iternew;
3510
PyObject *__pyx_v_nextOld;
3511
PyObject *__pyx_v_curOld;
3513
PyObject *__pyx_r = NULL;
3514
PyObject *__pyx_1 = 0;
3515
PyObject *__pyx_2 = 0;
3516
PyObject *__pyx_t_1 = NULL;
3517
Py_ssize_t __pyx_t_2;
3518
PyObject *__pyx_t_3 = NULL;
3519
PyObject *__pyx_t_4 = NULL;
3523
__Pyx_SetupRefcountContext("_pad");
3524
__pyx_v_fillVec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
3525
__pyx_v_maskVec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
3526
__pyx_v_iterold = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
3527
__pyx_v_iternew = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
3528
__pyx_v_nextOld = Py_None; __Pyx_INCREF(Py_None);
3529
__pyx_v_curOld = Py_None; __Pyx_INCREF(Py_None);
3531
/* "pandas/lib/src/tseries.pyx":419
3533
* # Make empty fill vector and mask vector, cast to ndarray
3534
* fillVec = <ndarray> np.empty(len(newIndex), dtype = np.int32) # <<<<<<<<<<<<<<
3535
* maskVec = <ndarray> np.zeros(len(newIndex), dtype = np.int8)
3538
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3539
__Pyx_GOTREF(__pyx_1);
3540
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3541
__Pyx_GOTREF(__pyx_t_1);
3542
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
3543
__pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3544
__pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3545
__Pyx_GOTREF(__pyx_t_3);
3546
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3547
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
3548
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
3549
__Pyx_GIVEREF(__pyx_t_3);
3551
__pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3552
__Pyx_GOTREF(((PyObject *)__pyx_1));
3553
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3554
__Pyx_GOTREF(__pyx_2);
3555
__pyx_t_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_33); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3556
__Pyx_GOTREF(__pyx_t_3);
3557
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
3558
if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3559
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3560
__pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3561
__Pyx_GOTREF(__pyx_t_3);
3562
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3563
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
3564
__Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
3565
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_3)));
3566
__Pyx_DECREF(((PyObject *)__pyx_v_fillVec));
3567
__pyx_v_fillVec = ((PyArrayObject *)__pyx_t_3);
3568
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3570
/* "pandas/lib/src/tseries.pyx":420
3571
* # Make empty fill vector and mask vector, cast to ndarray
3572
* fillVec = <ndarray> np.empty(len(newIndex), dtype = np.int32)
3573
* maskVec = <ndarray> np.zeros(len(newIndex), dtype = np.int8) # <<<<<<<<<<<<<<
3575
* # Get reference to the arrays inside
3577
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3578
__Pyx_GOTREF(__pyx_2);
3579
__pyx_t_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3580
__Pyx_GOTREF(__pyx_t_3);
3581
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
3582
__pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3583
__pyx_t_4 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3584
__Pyx_GOTREF(__pyx_t_4);
3585
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3586
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
3587
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
3588
__Pyx_GIVEREF(__pyx_t_4);
3590
__pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3591
__Pyx_GOTREF(((PyObject *)__pyx_1));
3592
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3593
__Pyx_GOTREF(__pyx_2);
3594
__pyx_t_4 = PyObject_GetAttr(__pyx_2, __pyx_kp_34); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3595
__Pyx_GOTREF(__pyx_t_4);
3596
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
3597
if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3598
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3599
__pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3600
__Pyx_GOTREF(__pyx_t_4);
3601
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3602
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
3603
__Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
3604
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_4)));
3605
__Pyx_DECREF(((PyObject *)__pyx_v_maskVec));
3606
__pyx_v_maskVec = ((PyArrayObject *)__pyx_t_4);
3607
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3609
/* "pandas/lib/src/tseries.pyx":423
3611
* # Get reference to the arrays inside
3612
* fillLocs = <int *> fillVec.data # <<<<<<<<<<<<<<
3613
* mask = <char *> maskVec.data
3616
__pyx_v_fillLocs = ((int *)__pyx_v_fillVec->data);
3618
/* "pandas/lib/src/tseries.pyx":424
3619
* # Get reference to the arrays inside
3620
* fillLocs = <int *> fillVec.data
3621
* mask = <char *> maskVec.data # <<<<<<<<<<<<<<
3623
* # Create simple ndarray iterators using C API
3625
__pyx_v_mask = ((char *)__pyx_v_maskVec->data);
3627
/* "pandas/lib/src/tseries.pyx":427
3629
* # Create simple ndarray iterators using C API
3630
* iterold = PyArray_IterNew(oldIndex) # <<<<<<<<<<<<<<
3631
* iternew = PyArray_IterNew(newIndex)
3634
__pyx_t_4 = PyArray_IterNew(((PyObject *)__pyx_v_oldIndex)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3635
__Pyx_GOTREF(__pyx_t_4);
3636
if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3637
__Pyx_DECREF(((PyObject *)__pyx_v_iterold));
3638
__pyx_v_iterold = ((PyArrayIterObject *)__pyx_t_4);
3641
/* "pandas/lib/src/tseries.pyx":428
3642
* # Create simple ndarray iterators using C API
3643
* iterold = PyArray_IterNew(oldIndex)
3644
* iternew = PyArray_IterNew(newIndex) # <<<<<<<<<<<<<<
3646
* # Length of each index
3648
__pyx_t_4 = PyArray_IterNew(((PyObject *)__pyx_v_newIndex)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3649
__Pyx_GOTREF(__pyx_t_4);
3650
if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3651
__Pyx_DECREF(((PyObject *)__pyx_v_iternew));
3652
__pyx_v_iternew = ((PyArrayIterObject *)__pyx_t_4);
3655
/* "pandas/lib/src/tseries.pyx":431
3657
* # Length of each index
3658
* oldLength = PyArray_SIZE(oldIndex) # <<<<<<<<<<<<<<
3659
* newLength = PyArray_SIZE(newIndex)
3662
if (!(__Pyx_TypeTest(((PyObject *)__pyx_v_oldIndex), __pyx_ptype_7tseries_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3663
__pyx_v_oldLength = PyArray_SIZE(((PyArrayObject *)__pyx_v_oldIndex));
3665
/* "pandas/lib/src/tseries.pyx":432
3666
* # Length of each index
3667
* oldLength = PyArray_SIZE(oldIndex)
3668
* newLength = PyArray_SIZE(newIndex) # <<<<<<<<<<<<<<
3672
if (!(__Pyx_TypeTest(((PyObject *)__pyx_v_newIndex), __pyx_ptype_7tseries_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3673
__pyx_v_newLength = PyArray_SIZE(((PyArrayObject *)__pyx_v_newIndex));
3675
/* "pandas/lib/src/tseries.pyx":434
3676
* newLength = PyArray_SIZE(newIndex)
3678
* oldPos = 0 # <<<<<<<<<<<<<<
3680
* while newPos < newLength:
3684
/* "pandas/lib/src/tseries.pyx":435
3687
* newPos = 0 # <<<<<<<<<<<<<<
3688
* while newPos < newLength:
3689
* curOld = PyArray_GETITEM(oldIndex, <void *> iterold.dataptr)
3693
/* "pandas/lib/src/tseries.pyx":436
3696
* while newPos < newLength: # <<<<<<<<<<<<<<
3697
* curOld = PyArray_GETITEM(oldIndex, <void *> iterold.dataptr)
3701
__pyx_t_5 = (__pyx_v_newPos < __pyx_v_newLength);
3702
if (!__pyx_t_5) break;
3704
/* "pandas/lib/src/tseries.pyx":437
3706
* while newPos < newLength:
3707
* curOld = PyArray_GETITEM(oldIndex, <void *> iterold.dataptr) # <<<<<<<<<<<<<<
3709
* # At beginning, keep going until we go exceed the
3711
__pyx_t_4 = PyArray_GETITEM(((PyObject *)__pyx_v_oldIndex), ((void *)__pyx_v_iterold->dataptr)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3712
__Pyx_GOTREF(__pyx_t_4);
3713
__Pyx_DECREF(__pyx_v_curOld);
3714
__pyx_v_curOld = __pyx_t_4;
3717
/* "pandas/lib/src/tseries.pyx":441
3718
* # At beginning, keep going until we go exceed the
3719
* # first OLD index in the NEW index
3720
* while PyArray_GETITEM(newIndex, <void *> iternew.dataptr) < curOld: # <<<<<<<<<<<<<<
3722
* if newPos > newLength - 1:
3725
__pyx_t_4 = PyArray_GETITEM(((PyObject *)__pyx_v_newIndex), ((void *)__pyx_v_iternew->dataptr)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3726
__Pyx_GOTREF(__pyx_t_4);
3727
__pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_v_curOld, Py_LT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3728
__Pyx_GOTREF(__pyx_t_1);
3729
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3730
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3731
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3732
if (!__pyx_t_5) break;
3734
/* "pandas/lib/src/tseries.pyx":442
3735
* # first OLD index in the NEW index
3736
* while PyArray_GETITEM(newIndex, <void *> iternew.dataptr) < curOld:
3737
* newPos += 1 # <<<<<<<<<<<<<<
3738
* if newPos > newLength - 1:
3741
__pyx_v_newPos += 1;
3743
/* "pandas/lib/src/tseries.pyx":443
3744
* while PyArray_GETITEM(newIndex, <void *> iternew.dataptr) < curOld:
3746
* if newPos > newLength - 1: # <<<<<<<<<<<<<<
3748
* PyArray_ITER_NEXT(iternew)
3750
__pyx_t_5 = (__pyx_v_newPos > (__pyx_v_newLength - 1));
3753
/* "pandas/lib/src/tseries.pyx":444
3755
* if newPos > newLength - 1:
3756
* break # <<<<<<<<<<<<<<
3757
* PyArray_ITER_NEXT(iternew)
3760
goto __pyx_L6_break;
3765
/* "pandas/lib/src/tseries.pyx":445
3766
* if newPos > newLength - 1:
3768
* PyArray_ITER_NEXT(iternew) # <<<<<<<<<<<<<<
3770
* # We got there, get the current location in the old index
3772
PyArray_ITER_NEXT(__pyx_v_iternew);
3776
/* "pandas/lib/src/tseries.pyx":448
3778
* # We got there, get the current location in the old index
3779
* curLoc = oldMap[curOld] # <<<<<<<<<<<<<<
3781
* # We're at the end of the road, need to propagate this value to the end
3783
__pyx_2 = PyObject_GetItem(((PyObject *)__pyx_v_oldMap), __pyx_v_curOld); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3784
__Pyx_GOTREF(__pyx_2);
3785
__pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3786
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
3787
__pyx_v_curLoc = __pyx_t_6;
3789
/* "pandas/lib/src/tseries.pyx":451
3791
* # We're at the end of the road, need to propagate this value to the end
3792
* if oldPos == oldLength - 1: # <<<<<<<<<<<<<<
3793
* if PyArray_GETITEM(newIndex, <void *> iternew.dataptr) >= curOld:
3794
* fillVec[newPos:] = curLoc
3796
__pyx_t_5 = (__pyx_v_oldPos == (__pyx_v_oldLength - 1));
3799
/* "pandas/lib/src/tseries.pyx":452
3800
* # We're at the end of the road, need to propagate this value to the end
3801
* if oldPos == oldLength - 1:
3802
* if PyArray_GETITEM(newIndex, <void *> iternew.dataptr) >= curOld: # <<<<<<<<<<<<<<
3803
* fillVec[newPos:] = curLoc
3804
* maskVec[newPos:] = 1
3806
__pyx_t_1 = PyArray_GETITEM(((PyObject *)__pyx_v_newIndex), ((void *)__pyx_v_iternew->dataptr)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3807
__Pyx_GOTREF(__pyx_t_1);
3808
__pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_curOld, Py_GE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3809
__Pyx_GOTREF(__pyx_t_4);
3810
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3811
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3812
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3815
/* "pandas/lib/src/tseries.pyx":453
3816
* if oldPos == oldLength - 1:
3817
* if PyArray_GETITEM(newIndex, <void *> iternew.dataptr) >= curOld:
3818
* fillVec[newPos:] = curLoc # <<<<<<<<<<<<<<
3819
* maskVec[newPos:] = 1
3822
__pyx_t_4 = PyInt_FromLong(__pyx_v_curLoc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3823
__Pyx_GOTREF(__pyx_t_4);
3824
if (PySequence_SetSlice(((PyObject *)__pyx_v_fillVec), __pyx_v_newPos, PY_SSIZE_T_MAX, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3825
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3827
/* "pandas/lib/src/tseries.pyx":454
3828
* if PyArray_GETITEM(newIndex, <void *> iternew.dataptr) >= curOld:
3829
* fillVec[newPos:] = curLoc
3830
* maskVec[newPos:] = 1 # <<<<<<<<<<<<<<
3834
if (PySequence_SetSlice(((PyObject *)__pyx_v_maskVec), __pyx_v_newPos, PY_SSIZE_T_MAX, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3839
/* "pandas/lib/src/tseries.pyx":455
3840
* fillVec[newPos:] = curLoc
3841
* maskVec[newPos:] = 1
3842
* break # <<<<<<<<<<<<<<
3844
* # Not at the end, need to go about filling
3846
goto __pyx_L4_break;
3851
/* "pandas/lib/src/tseries.pyx":460
3853
* # Get the next index so we know when to stop propagating this value
3854
* PyArray_ITER_NEXT(iterold) # <<<<<<<<<<<<<<
3855
* nextOld = PyArray_GETITEM(oldIndex, <void *> iterold.dataptr)
3858
PyArray_ITER_NEXT(__pyx_v_iterold);
3860
/* "pandas/lib/src/tseries.pyx":461
3861
* # Get the next index so we know when to stop propagating this value
3862
* PyArray_ITER_NEXT(iterold)
3863
* nextOld = PyArray_GETITEM(oldIndex, <void *> iterold.dataptr) # <<<<<<<<<<<<<<
3867
__pyx_t_4 = PyArray_GETITEM(((PyObject *)__pyx_v_oldIndex), ((void *)__pyx_v_iterold->dataptr)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3868
__Pyx_GOTREF(__pyx_t_4);
3869
__Pyx_DECREF(__pyx_v_nextOld);
3870
__pyx_v_nextOld = __pyx_t_4;
3873
/* "pandas/lib/src/tseries.pyx":463
3874
* nextOld = PyArray_GETITEM(oldIndex, <void *> iterold.dataptr)
3876
* done = 0 # <<<<<<<<<<<<<<
3878
* # Until we reach the next OLD value in the NEW index
3882
/* "pandas/lib/src/tseries.pyx":466
3884
* # Until we reach the next OLD value in the NEW index
3885
* while PyArray_GETITEM(newIndex, <void *> iternew.dataptr) < nextOld: # <<<<<<<<<<<<<<
3887
* # Use this location to fill
3890
__pyx_t_4 = PyArray_GETITEM(((PyObject *)__pyx_v_newIndex), ((void *)__pyx_v_iternew->dataptr)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3891
__Pyx_GOTREF(__pyx_t_4);
3892
__pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_v_nextOld, Py_LT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3893
__Pyx_GOTREF(__pyx_t_1);
3894
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3895
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3896
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3897
if (!__pyx_t_5) break;
3899
/* "pandas/lib/src/tseries.pyx":469
3901
* # Use this location to fill
3902
* fillLocs[newPos] = curLoc # <<<<<<<<<<<<<<
3904
* # Set mask to be 1 so will not be NaN'd
3906
(__pyx_v_fillLocs[__pyx_v_newPos]) = __pyx_v_curLoc;
3908
/* "pandas/lib/src/tseries.pyx":472
3910
* # Set mask to be 1 so will not be NaN'd
3911
* mask[newPos] = 1 # <<<<<<<<<<<<<<
3915
(__pyx_v_mask[__pyx_v_newPos]) = 1;
3917
/* "pandas/lib/src/tseries.pyx":473
3918
* # Set mask to be 1 so will not be NaN'd
3920
* newPos += 1 # <<<<<<<<<<<<<<
3922
* # We got to the end of the new index
3924
__pyx_v_newPos += 1;
3926
/* "pandas/lib/src/tseries.pyx":476
3928
* # We got to the end of the new index
3929
* if newPos > newLength - 1: # <<<<<<<<<<<<<<
3933
__pyx_t_5 = (__pyx_v_newPos > (__pyx_v_newLength - 1));
3936
/* "pandas/lib/src/tseries.pyx":477
3937
* # We got to the end of the new index
3938
* if newPos > newLength - 1:
3939
* done = 1 # <<<<<<<<<<<<<<
3945
/* "pandas/lib/src/tseries.pyx":478
3946
* if newPos > newLength - 1:
3948
* break # <<<<<<<<<<<<<<
3950
* # Advance the pointer
3952
goto __pyx_L11_break;
3957
/* "pandas/lib/src/tseries.pyx":481
3959
* # Advance the pointer
3960
* PyArray_ITER_NEXT(iternew) # <<<<<<<<<<<<<<
3962
* # We got to the end of the new index
3964
PyArray_ITER_NEXT(__pyx_v_iternew);
3968
/* "pandas/lib/src/tseries.pyx":484
3970
* # We got to the end of the new index
3971
* if done: # <<<<<<<<<<<<<<
3975
__pyx_t_7 = __pyx_v_done;
3978
/* "pandas/lib/src/tseries.pyx":485
3979
* # We got to the end of the new index
3981
* break # <<<<<<<<<<<<<<
3983
* # We already advanced the iterold pointer to the next value,
3985
goto __pyx_L4_break;
3992
/* "pandas/lib/src/tseries.pyx":489
3993
* # We already advanced the iterold pointer to the next value,
3995
* oldPos += 1 # <<<<<<<<<<<<<<
3997
* # Places where the mask is 0, fill with an arbitrary value
3999
__pyx_v_oldPos += 1;
4003
/* "pandas/lib/src/tseries.pyx":493
4004
* # Places where the mask is 0, fill with an arbitrary value
4005
* # (will be NA'd out)
4006
* for i from 0 <= i < newLength: # <<<<<<<<<<<<<<
4010
__pyx_t_6 = __pyx_v_newLength;
4011
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {
4013
/* "pandas/lib/src/tseries.pyx":494
4014
* # (will be NA'd out)
4015
* for i from 0 <= i < newLength:
4016
* if mask[i] == 0: # <<<<<<<<<<<<<<
4020
__pyx_t_5 = ((__pyx_v_mask[__pyx_v_i]) == 0);
4023
/* "pandas/lib/src/tseries.pyx":495
4024
* for i from 0 <= i < newLength:
4026
* fillLocs[i] = -1 # <<<<<<<<<<<<<<
4028
* return fillVec, maskVec
4030
(__pyx_v_fillLocs[__pyx_v_i]) = -1;
4036
/* "pandas/lib/src/tseries.pyx":497
4039
* return fillVec, maskVec # <<<<<<<<<<<<<<
4041
* def getFillVec(ndarray oldIndex, ndarray newIndex, dict oldMap, dict newMap,
4043
__Pyx_XDECREF(((PyObject *)__pyx_r));
4044
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4045
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
4046
__Pyx_INCREF(((PyObject *)__pyx_v_fillVec));
4047
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_fillVec));
4048
__Pyx_GIVEREF(((PyObject *)__pyx_v_fillVec));
4049
__Pyx_INCREF(((PyObject *)__pyx_v_maskVec));
4050
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_maskVec));
4051
__Pyx_GIVEREF(((PyObject *)__pyx_v_maskVec));
4052
__pyx_r = __pyx_t_1;
4056
__pyx_r = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
4059
__Pyx_XDECREF(__pyx_1);
4060
__Pyx_XDECREF(__pyx_2);
4061
__Pyx_XDECREF(__pyx_t_1);
4062
__Pyx_XDECREF(__pyx_t_3);
4063
__Pyx_XDECREF(__pyx_t_4);
4064
__Pyx_AddTraceback("tseries._pad");
4067
__Pyx_DECREF((PyObject *)__pyx_v_fillVec);
4068
__Pyx_DECREF((PyObject *)__pyx_v_maskVec);
4069
__Pyx_DECREF((PyObject *)__pyx_v_iterold);
4070
__Pyx_DECREF((PyObject *)__pyx_v_iternew);
4071
__Pyx_DECREF(__pyx_v_nextOld);
4072
__Pyx_DECREF(__pyx_v_curOld);
4073
__Pyx_XGIVEREF(__pyx_r);
4074
__Pyx_FinishRefcountContext();
4078
/* "pandas/lib/src/tseries.pyx":499
4079
* return fillVec, maskVec
4081
* def getFillVec(ndarray oldIndex, ndarray newIndex, dict oldMap, dict newMap, # <<<<<<<<<<<<<<
4086
static PyObject *__pyx_pf_7tseries_getFillVec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4087
static PyObject *__pyx_pf_7tseries_getFillVec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4088
PyArrayObject *__pyx_v_oldIndex = 0;
4089
PyArrayObject *__pyx_v_newIndex = 0;
4090
PyObject *__pyx_v_oldMap = 0;
4091
PyObject *__pyx_v_newMap = 0;
4092
PyObject *__pyx_v_kind = 0;
4093
PyObject *__pyx_v_fillVec;
4094
PyObject *__pyx_v_maskVec;
4095
PyObject *__pyx_r = NULL;
4096
PyObject *__pyx_1 = 0;
4097
PyObject *__pyx_2 = 0;
4098
PyObject *__pyx_3 = 0;
4099
PyObject *__pyx_t_1 = NULL;
4101
PyObject *__pyx_t_3 = NULL;
4102
PyObject *__pyx_t_4 = NULL;
4103
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_oldIndex,&__pyx_kp_newIndex,&__pyx_kp_oldMap,&__pyx_kp_newMap,&__pyx_kp_kind,0};
4104
__Pyx_SetupRefcountContext("getFillVec");
4105
__pyx_self = __pyx_self;
4106
if (unlikely(__pyx_kwds)) {
4107
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
4108
PyObject* values[5] = {0,0,0,0,0};
4109
switch (PyTuple_GET_SIZE(__pyx_args)) {
4110
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4111
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4112
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4113
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4114
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4116
default: goto __pyx_L5_argtuple_error;
4118
switch (PyTuple_GET_SIZE(__pyx_args)) {
4120
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_oldIndex);
4121
if (likely(values[0])) kw_args--;
4122
else goto __pyx_L5_argtuple_error;
4124
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_newIndex);
4125
if (likely(values[1])) kw_args--;
4127
__Pyx_RaiseArgtupleInvalid("getFillVec", 1, 5, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4130
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_oldMap);
4131
if (likely(values[2])) kw_args--;
4133
__Pyx_RaiseArgtupleInvalid("getFillVec", 1, 5, 5, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4136
values[3] = PyDict_GetItem(__pyx_kwds, __pyx_kp_newMap);
4137
if (likely(values[3])) kw_args--;
4139
__Pyx_RaiseArgtupleInvalid("getFillVec", 1, 5, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4142
values[4] = PyDict_GetItem(__pyx_kwds, __pyx_kp_kind);
4143
if (likely(values[4])) kw_args--;
4145
__Pyx_RaiseArgtupleInvalid("getFillVec", 1, 5, 5, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4148
if (unlikely(kw_args > 0)) {
4149
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "getFillVec") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4151
__pyx_v_oldIndex = ((PyArrayObject *)values[0]);
4152
__pyx_v_newIndex = ((PyArrayObject *)values[1]);
4153
__pyx_v_oldMap = ((PyObject *)values[2]);
4154
__pyx_v_newMap = ((PyObject *)values[3]);
4155
__pyx_v_kind = values[4];
4156
} else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
4157
goto __pyx_L5_argtuple_error;
4159
__pyx_v_oldIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
4160
__pyx_v_newIndex = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
4161
__pyx_v_oldMap = ((PyObject *)PyTuple_GET_ITEM(__pyx_args, 2));
4162
__pyx_v_newMap = ((PyObject *)PyTuple_GET_ITEM(__pyx_args, 3));
4163
__pyx_v_kind = PyTuple_GET_ITEM(__pyx_args, 4);
4165
goto __pyx_L4_argument_unpacking_done;
4166
__pyx_L5_argtuple_error:;
4167
__Pyx_RaiseArgtupleInvalid("getFillVec", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4169
__Pyx_AddTraceback("tseries.getFillVec");
4171
__pyx_L4_argument_unpacking_done:;
4172
__pyx_v_fillVec = Py_None; __Pyx_INCREF(Py_None);
4173
__pyx_v_maskVec = Py_None; __Pyx_INCREF(Py_None);
4174
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldIndex), __pyx_ptype_5numpy_ndarray, 1, "oldIndex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4175
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newIndex), __pyx_ptype_5numpy_ndarray, 1, "newIndex", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4176
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), &PyDict_Type, 1, "oldMap", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4177
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newMap), &PyDict_Type, 1, "newMap", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4179
/* "pandas/lib/src/tseries.pyx":502
4182
* if kind == '': # <<<<<<<<<<<<<<
4183
* fillVec, maskVec = _nofill(oldIndex, newIndex, oldMap, newMap)
4184
* elif kind == 'PAD':
4186
__pyx_t_1 = PyObject_RichCompare(__pyx_v_kind, __pyx_kp_35, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4187
__Pyx_GOTREF(__pyx_t_1);
4188
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4189
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4192
/* "pandas/lib/src/tseries.pyx":503
4195
* fillVec, maskVec = _nofill(oldIndex, newIndex, oldMap, newMap) # <<<<<<<<<<<<<<
4196
* elif kind == 'PAD':
4197
* fillVec, maskVec = _pad(oldIndex, newIndex, oldMap, newMap)
4199
__pyx_t_1 = ((PyObject *)__pyx_f_7tseries__nofill(__pyx_v_oldIndex, __pyx_v_newIndex, __pyx_v_oldMap, __pyx_v_newMap)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4200
__Pyx_GOTREF(__pyx_t_1);
4201
if (likely(__pyx_t_1 != Py_None) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
4202
PyObject* tuple = __pyx_t_1;
4203
__pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
4204
__pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
4205
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4206
__Pyx_DECREF(__pyx_v_fillVec);
4207
__pyx_v_fillVec = __pyx_2;
4209
__Pyx_DECREF(__pyx_v_maskVec);
4210
__pyx_v_maskVec = __pyx_3;
4213
__Pyx_UnpackTupleError(__pyx_t_1, 2);
4214
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4219
/* "pandas/lib/src/tseries.pyx":504
4221
* fillVec, maskVec = _nofill(oldIndex, newIndex, oldMap, newMap)
4222
* elif kind == 'PAD': # <<<<<<<<<<<<<<
4223
* fillVec, maskVec = _pad(oldIndex, newIndex, oldMap, newMap)
4224
* elif kind == 'BACKFILL':
4226
__pyx_t_1 = PyObject_RichCompare(__pyx_v_kind, __pyx_kp_36, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4227
__Pyx_GOTREF(__pyx_t_1);
4228
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4229
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4232
/* "pandas/lib/src/tseries.pyx":505
4233
* fillVec, maskVec = _nofill(oldIndex, newIndex, oldMap, newMap)
4234
* elif kind == 'PAD':
4235
* fillVec, maskVec = _pad(oldIndex, newIndex, oldMap, newMap) # <<<<<<<<<<<<<<
4236
* elif kind == 'BACKFILL':
4237
* fillVec, maskVec = _backfill(oldIndex, newIndex, oldMap, newMap)
4239
__pyx_t_1 = ((PyObject *)__pyx_f_7tseries__pad(__pyx_v_oldIndex, __pyx_v_newIndex, __pyx_v_oldMap, __pyx_v_newMap)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4240
__Pyx_GOTREF(__pyx_t_1);
4241
if (likely(__pyx_t_1 != Py_None) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
4242
PyObject* tuple = __pyx_t_1;
4243
__pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
4244
__pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
4245
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4246
__Pyx_DECREF(__pyx_v_fillVec);
4247
__pyx_v_fillVec = __pyx_2;
4249
__Pyx_DECREF(__pyx_v_maskVec);
4250
__pyx_v_maskVec = __pyx_3;
4253
__Pyx_UnpackTupleError(__pyx_t_1, 2);
4254
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4259
/* "pandas/lib/src/tseries.pyx":506
4260
* elif kind == 'PAD':
4261
* fillVec, maskVec = _pad(oldIndex, newIndex, oldMap, newMap)
4262
* elif kind == 'BACKFILL': # <<<<<<<<<<<<<<
4263
* fillVec, maskVec = _backfill(oldIndex, newIndex, oldMap, newMap)
4266
__pyx_t_1 = PyObject_RichCompare(__pyx_v_kind, __pyx_kp_37, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4267
__Pyx_GOTREF(__pyx_t_1);
4268
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4269
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4272
/* "pandas/lib/src/tseries.pyx":507
4273
* fillVec, maskVec = _pad(oldIndex, newIndex, oldMap, newMap)
4274
* elif kind == 'BACKFILL':
4275
* fillVec, maskVec = _backfill(oldIndex, newIndex, oldMap, newMap) # <<<<<<<<<<<<<<
4277
* return fillVec, maskVec.astype(np.bool)
4279
__pyx_t_1 = ((PyObject *)__pyx_f_7tseries__backfill(__pyx_v_oldIndex, __pyx_v_newIndex, __pyx_v_oldMap, __pyx_v_newMap)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4280
__Pyx_GOTREF(__pyx_t_1);
4281
if (likely(__pyx_t_1 != Py_None) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
4282
PyObject* tuple = __pyx_t_1;
4283
__pyx_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_2);
4284
__pyx_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_3);
4285
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4286
__Pyx_DECREF(__pyx_v_fillVec);
4287
__pyx_v_fillVec = __pyx_2;
4289
__Pyx_DECREF(__pyx_v_maskVec);
4290
__pyx_v_maskVec = __pyx_3;
4293
__Pyx_UnpackTupleError(__pyx_t_1, 2);
4294
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4300
/* "pandas/lib/src/tseries.pyx":509
4301
* fillVec, maskVec = _backfill(oldIndex, newIndex, oldMap, newMap)
4303
* return fillVec, maskVec.astype(np.bool) # <<<<<<<<<<<<<<
4305
* def getMergeVec(ndarray values, dict indexMap):
4307
__Pyx_XDECREF(__pyx_r);
4308
__pyx_t_1 = PyObject_GetAttr(__pyx_v_maskVec, __pyx_kp_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4309
__Pyx_GOTREF(__pyx_t_1);
4310
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4311
__Pyx_GOTREF(__pyx_1);
4312
__pyx_t_3 = PyObject_GetAttr(__pyx_1, __pyx_kp_bool); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4313
__Pyx_GOTREF(__pyx_t_3);
4314
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
4315
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4316
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
4317
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
4318
__Pyx_GIVEREF(__pyx_t_3);
4320
__pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4321
__Pyx_GOTREF(__pyx_t_3);
4322
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4323
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
4324
__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4325
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
4326
__Pyx_INCREF(__pyx_v_fillVec);
4327
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_fillVec);
4328
__Pyx_GIVEREF(__pyx_v_fillVec);
4329
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
4330
__Pyx_GIVEREF(__pyx_t_3);
4332
__pyx_r = ((PyObject *)__pyx_t_4);
4336
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
4339
__Pyx_XDECREF(__pyx_1);
4340
__Pyx_XDECREF(__pyx_2);
4341
__Pyx_XDECREF(__pyx_3);
4342
__Pyx_XDECREF(__pyx_t_1);
4343
__Pyx_XDECREF(__pyx_t_3);
4344
__Pyx_XDECREF(__pyx_t_4);
4345
__Pyx_AddTraceback("tseries.getFillVec");
4348
__Pyx_DECREF(__pyx_v_fillVec);
4349
__Pyx_DECREF(__pyx_v_maskVec);
4350
__Pyx_XGIVEREF(__pyx_r);
4351
__Pyx_FinishRefcountContext();
4355
/* "pandas/lib/src/tseries.pyx":511
4356
* return fillVec, maskVec.astype(np.bool)
4358
* def getMergeVec(ndarray values, dict indexMap): # <<<<<<<<<<<<<<
4359
* cdef int *fillLocs
4363
static PyObject *__pyx_pf_7tseries_getMergeVec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4364
static PyObject *__pyx_pf_7tseries_getMergeVec(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4365
PyArrayObject *__pyx_v_values = 0;
4366
PyObject *__pyx_v_indexMap = 0;
4367
int *__pyx_v_fillLocs;
4372
PyArrayIterObject *__pyx_v_itervals;
4373
PyObject *__pyx_v_val;
4374
PyArrayObject *__pyx_v_fillVec;
4375
PyArrayObject *__pyx_v_maskVec;
4376
int __pyx_v_newLength;
4377
PyObject *__pyx_r = NULL;
4378
PyObject *__pyx_1 = 0;
4379
PyObject *__pyx_2 = 0;
4380
Py_ssize_t __pyx_t_1;
4381
PyObject *__pyx_t_2 = NULL;
4382
PyObject *__pyx_t_3 = NULL;
4383
PyObject *__pyx_t_4 = NULL;
4387
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_values,&__pyx_kp_indexMap,0};
4388
__Pyx_SetupRefcountContext("getMergeVec");
4389
__pyx_self = __pyx_self;
4390
if (unlikely(__pyx_kwds)) {
4391
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
4392
PyObject* values[2] = {0,0};
4393
switch (PyTuple_GET_SIZE(__pyx_args)) {
4394
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4395
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4397
default: goto __pyx_L5_argtuple_error;
4399
switch (PyTuple_GET_SIZE(__pyx_args)) {
4401
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_values);
4402
if (likely(values[0])) kw_args--;
4403
else goto __pyx_L5_argtuple_error;
4405
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_indexMap);
4406
if (likely(values[1])) kw_args--;
4408
__Pyx_RaiseArgtupleInvalid("getMergeVec", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4411
if (unlikely(kw_args > 0)) {
4412
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "getMergeVec") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4414
__pyx_v_values = ((PyArrayObject *)values[0]);
4415
__pyx_v_indexMap = ((PyObject *)values[1]);
4416
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
4417
goto __pyx_L5_argtuple_error;
4419
__pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
4420
__pyx_v_indexMap = ((PyObject *)PyTuple_GET_ITEM(__pyx_args, 1));
4422
goto __pyx_L4_argument_unpacking_done;
4423
__pyx_L5_argtuple_error:;
4424
__Pyx_RaiseArgtupleInvalid("getMergeVec", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4426
__Pyx_AddTraceback("tseries.getMergeVec");
4428
__pyx_L4_argument_unpacking_done:;
4429
__pyx_v_itervals = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
4430
__pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
4431
__pyx_v_fillVec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
4432
__pyx_v_maskVec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
4433
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4434
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexMap), &PyDict_Type, 1, "indexMap", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4436
/* "pandas/lib/src/tseries.pyx":521
4437
* cdef ndarray maskVec
4439
* cdef int newLength = len(values) # <<<<<<<<<<<<<<
4441
* fillVec = <ndarray> np.empty(newLength, dtype = np.int32)
4443
__pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4444
__pyx_v_newLength = __pyx_t_1;
4446
/* "pandas/lib/src/tseries.pyx":523
4447
* cdef int newLength = len(values)
4449
* fillVec = <ndarray> np.empty(newLength, dtype = np.int32) # <<<<<<<<<<<<<<
4450
* maskVec = <ndarray> np.zeros(newLength, dtype = np.int8)
4453
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4454
__Pyx_GOTREF(__pyx_1);
4455
__pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4456
__Pyx_GOTREF(__pyx_t_2);
4457
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
4458
__pyx_t_3 = PyInt_FromLong(__pyx_v_newLength); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4459
__Pyx_GOTREF(__pyx_t_3);
4460
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4461
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
4462
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
4463
__Pyx_GIVEREF(__pyx_t_3);
4465
__pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4466
__Pyx_GOTREF(((PyObject *)__pyx_1));
4467
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4468
__Pyx_GOTREF(__pyx_2);
4469
__pyx_t_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_33); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4470
__Pyx_GOTREF(__pyx_t_3);
4471
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
4472
if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4473
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4474
__pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4475
__Pyx_GOTREF(__pyx_t_3);
4476
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4477
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
4478
__Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
4479
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_3)));
4480
__Pyx_DECREF(((PyObject *)__pyx_v_fillVec));
4481
__pyx_v_fillVec = ((PyArrayObject *)__pyx_t_3);
4482
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4484
/* "pandas/lib/src/tseries.pyx":524
4486
* fillVec = <ndarray> np.empty(newLength, dtype = np.int32)
4487
* maskVec = <ndarray> np.zeros(newLength, dtype = np.int8) # <<<<<<<<<<<<<<
4489
* fillLocs = <int *> fillVec.data
4491
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4492
__Pyx_GOTREF(__pyx_2);
4493
__pyx_t_3 = PyObject_GetAttr(__pyx_2, __pyx_kp_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4494
__Pyx_GOTREF(__pyx_t_3);
4495
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
4496
__pyx_t_4 = PyInt_FromLong(__pyx_v_newLength); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4497
__Pyx_GOTREF(__pyx_t_4);
4498
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4499
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
4500
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
4501
__Pyx_GIVEREF(__pyx_t_4);
4503
__pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4504
__Pyx_GOTREF(((PyObject *)__pyx_1));
4505
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4506
__Pyx_GOTREF(__pyx_2);
4507
__pyx_t_4 = PyObject_GetAttr(__pyx_2, __pyx_kp_34); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4508
__Pyx_GOTREF(__pyx_t_4);
4509
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
4510
if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4511
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4512
__pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4513
__Pyx_GOTREF(__pyx_t_4);
4514
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4515
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
4516
__Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
4517
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_4)));
4518
__Pyx_DECREF(((PyObject *)__pyx_v_maskVec));
4519
__pyx_v_maskVec = ((PyArrayObject *)__pyx_t_4);
4520
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4522
/* "pandas/lib/src/tseries.pyx":526
4523
* maskVec = <ndarray> np.zeros(newLength, dtype = np.int8)
4525
* fillLocs = <int *> fillVec.data # <<<<<<<<<<<<<<
4526
* mask = <char *> maskVec.data
4529
__pyx_v_fillLocs = ((int *)__pyx_v_fillVec->data);
4531
/* "pandas/lib/src/tseries.pyx":527
4533
* fillLocs = <int *> fillVec.data
4534
* mask = <char *> maskVec.data # <<<<<<<<<<<<<<
4536
* length = PyArray_SIZE(values)
4538
__pyx_v_mask = ((char *)__pyx_v_maskVec->data);
4540
/* "pandas/lib/src/tseries.pyx":529
4541
* mask = <char *> maskVec.data
4543
* length = PyArray_SIZE(values) # <<<<<<<<<<<<<<
4544
* itervals = PyArray_IterNew(values)
4547
if (!(__Pyx_TypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_7tseries_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4548
__pyx_v_length = PyArray_SIZE(((PyArrayObject *)__pyx_v_values));
4550
/* "pandas/lib/src/tseries.pyx":530
4552
* length = PyArray_SIZE(values)
4553
* itervals = PyArray_IterNew(values) # <<<<<<<<<<<<<<
4555
* for i from 0 <= i < length:
4557
__pyx_t_4 = PyArray_IterNew(((PyObject *)__pyx_v_values)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4558
__Pyx_GOTREF(__pyx_t_4);
4559
if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4560
__Pyx_DECREF(((PyObject *)__pyx_v_itervals));
4561
__pyx_v_itervals = ((PyArrayIterObject *)__pyx_t_4);
4564
/* "pandas/lib/src/tseries.pyx":532
4565
* itervals = PyArray_IterNew(values)
4567
* for i from 0 <= i < length: # <<<<<<<<<<<<<<
4568
* val = PyArray_GETITEM(values, <void *> itervals.dataptr)
4569
* if val in indexMap:
4571
__pyx_t_5 = __pyx_v_length;
4572
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
4574
/* "pandas/lib/src/tseries.pyx":533
4576
* for i from 0 <= i < length:
4577
* val = PyArray_GETITEM(values, <void *> itervals.dataptr) # <<<<<<<<<<<<<<
4578
* if val in indexMap:
4581
__pyx_t_4 = PyArray_GETITEM(((PyObject *)__pyx_v_values), ((void *)__pyx_v_itervals->dataptr)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4582
__Pyx_GOTREF(__pyx_t_4);
4583
__Pyx_DECREF(__pyx_v_val);
4584
__pyx_v_val = __pyx_t_4;
4587
/* "pandas/lib/src/tseries.pyx":534
4588
* for i from 0 <= i < length:
4589
* val = PyArray_GETITEM(values, <void *> itervals.dataptr)
4590
* if val in indexMap: # <<<<<<<<<<<<<<
4594
__pyx_t_6 = (PySequence_Contains(((PyObject *)__pyx_v_indexMap), __pyx_v_val)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4597
/* "pandas/lib/src/tseries.pyx":535
4598
* val = PyArray_GETITEM(values, <void *> itervals.dataptr)
4599
* if val in indexMap:
4600
* j = indexMap[val] # <<<<<<<<<<<<<<
4604
__pyx_2 = PyObject_GetItem(((PyObject *)__pyx_v_indexMap), __pyx_v_val); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4605
__Pyx_GOTREF(__pyx_2);
4606
__pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4607
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
4608
__pyx_v_j = __pyx_t_7;
4610
/* "pandas/lib/src/tseries.pyx":536
4611
* if val in indexMap:
4613
* fillLocs[i] = j # <<<<<<<<<<<<<<
4617
(__pyx_v_fillLocs[__pyx_v_i]) = __pyx_v_j;
4619
/* "pandas/lib/src/tseries.pyx":537
4622
* mask[i] = 1 # <<<<<<<<<<<<<<
4624
* PyArray_ITER_NEXT(itervals)
4626
(__pyx_v_mask[__pyx_v_i]) = 1;
4631
/* "pandas/lib/src/tseries.pyx":539
4634
* PyArray_ITER_NEXT(itervals) # <<<<<<<<<<<<<<
4636
* for i from 0 <= i < newLength:
4638
PyArray_ITER_NEXT(__pyx_v_itervals);
4641
/* "pandas/lib/src/tseries.pyx":541
4642
* PyArray_ITER_NEXT(itervals)
4644
* for i from 0 <= i < newLength: # <<<<<<<<<<<<<<
4648
__pyx_t_5 = __pyx_v_newLength;
4649
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
4651
/* "pandas/lib/src/tseries.pyx":542
4653
* for i from 0 <= i < newLength:
4654
* if mask[i] == 0: # <<<<<<<<<<<<<<
4658
__pyx_t_6 = ((__pyx_v_mask[__pyx_v_i]) == 0);
4661
/* "pandas/lib/src/tseries.pyx":543
4662
* for i from 0 <= i < newLength:
4664
* fillLocs[i] = -1 # <<<<<<<<<<<<<<
4666
* return fillVec, maskVec.astype(np.bool)
4668
(__pyx_v_fillLocs[__pyx_v_i]) = -1;
4674
/* "pandas/lib/src/tseries.pyx":545
4677
* return fillVec, maskVec.astype(np.bool) # <<<<<<<<<<<<<<
4679
* cdef double INF = <double> np.inf
4681
__Pyx_XDECREF(__pyx_r);
4682
__pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_maskVec), __pyx_kp_astype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4683
__Pyx_GOTREF(__pyx_t_4);
4684
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4685
__Pyx_GOTREF(__pyx_1);
4686
__pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_bool); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4687
__Pyx_GOTREF(__pyx_t_2);
4688
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
4689
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4690
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
4691
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
4692
__Pyx_GIVEREF(__pyx_t_2);
4694
__pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4695
__Pyx_GOTREF(__pyx_t_2);
4696
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4697
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
4698
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4699
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
4700
__Pyx_INCREF(((PyObject *)__pyx_v_fillVec));
4701
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_fillVec));
4702
__Pyx_GIVEREF(((PyObject *)__pyx_v_fillVec));
4703
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
4704
__Pyx_GIVEREF(__pyx_t_2);
4706
__pyx_r = ((PyObject *)__pyx_t_3);
4710
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
4713
__Pyx_XDECREF(__pyx_1);
4714
__Pyx_XDECREF(__pyx_2);
4715
__Pyx_XDECREF(__pyx_t_2);
4716
__Pyx_XDECREF(__pyx_t_3);
4717
__Pyx_XDECREF(__pyx_t_4);
4718
__Pyx_AddTraceback("tseries.getMergeVec");
4721
__Pyx_DECREF((PyObject *)__pyx_v_itervals);
4722
__Pyx_DECREF(__pyx_v_val);
4723
__Pyx_DECREF((PyObject *)__pyx_v_fillVec);
4724
__Pyx_DECREF((PyObject *)__pyx_v_maskVec);
4725
__Pyx_XGIVEREF(__pyx_r);
4726
__Pyx_FinishRefcountContext();
4730
/* "pandas/lib/src/tseries.pyx":550
4731
* cdef double NEGINF = -INF
4733
* cdef inline _checknull(object val): # <<<<<<<<<<<<<<
4734
* return val is None or val != val or val == INF or val == NEGINF
4738
static INLINE PyObject *__pyx_f_7tseries__checknull(PyObject *__pyx_v_val) {
4739
PyObject *__pyx_r = NULL;
4741
PyObject *__pyx_t_2 = NULL;
4742
PyObject *__pyx_t_3 = NULL;
4743
PyObject *__pyx_t_4 = NULL;
4744
PyObject *__pyx_t_5 = NULL;
4745
PyObject *__pyx_t_6 = NULL;
4746
__Pyx_SetupRefcountContext("_checknull");
4748
/* "pandas/lib/src/tseries.pyx":551
4750
* cdef inline _checknull(object val):
4751
* return val is None or val != val or val == INF or val == NEGINF # <<<<<<<<<<<<<<
4753
* cdef ndarray _isnullobj(input):
4755
__Pyx_XDECREF(__pyx_r);
4756
__pyx_t_1 = (__pyx_v_val == Py_None);
4757
__pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4758
__Pyx_GOTREF(__pyx_t_2);
4759
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4761
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4762
__pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4763
__Pyx_GOTREF(__pyx_t_3);
4764
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4766
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4767
__pyx_t_4 = PyFloat_FromDouble(__pyx_v_7tseries_INF); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4768
__Pyx_GOTREF(__pyx_t_4);
4769
__pyx_t_5 = PyObject_RichCompare(__pyx_v_val, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4770
__Pyx_GOTREF(__pyx_t_5);
4771
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4772
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4774
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4775
__pyx_t_4 = PyFloat_FromDouble(__pyx_v_7tseries_NEGINF); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4776
__Pyx_GOTREF(__pyx_t_4);
4777
__pyx_t_6 = PyObject_RichCompare(__pyx_v_val, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4778
__Pyx_GOTREF(__pyx_t_6);
4779
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4780
__pyx_t_4 = __pyx_t_6;
4783
__pyx_t_4 = __pyx_t_5;
4786
__pyx_t_5 = __pyx_t_4;
4789
__pyx_t_5 = __pyx_t_3;
4792
__pyx_t_3 = __pyx_t_5;
4795
__pyx_t_3 = __pyx_t_2;
4798
__pyx_r = __pyx_t_3;
4802
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
4805
__Pyx_XDECREF(__pyx_t_2);
4806
__Pyx_XDECREF(__pyx_t_3);
4807
__Pyx_XDECREF(__pyx_t_4);
4808
__Pyx_XDECREF(__pyx_t_5);
4809
__Pyx_XDECREF(__pyx_t_6);
4810
__Pyx_AddTraceback("tseries._checknull");
4813
__Pyx_XGIVEREF(__pyx_r);
4814
__Pyx_FinishRefcountContext();
4818
/* "pandas/lib/src/tseries.pyx":553
4819
* return val is None or val != val or val == INF or val == NEGINF
4821
* cdef ndarray _isnullobj(input): # <<<<<<<<<<<<<<
4822
* cdef int i, length
4826
static PyArrayObject *__pyx_f_7tseries__isnullobj(PyObject *__pyx_v_input) {
4829
PyObject *__pyx_v_val;
4830
PyArrayObject *__pyx_v_result;
4831
PyArrayIterObject *__pyx_v_iter;
4832
Py_buffer __pyx_bstruct_result;
4833
Py_ssize_t __pyx_bstride_0_result = 0;
4834
Py_ssize_t __pyx_bshape_0_result = 0;
4835
PyArrayObject *__pyx_r = NULL;
4836
PyObject *__pyx_1 = 0;
4837
PyObject *__pyx_2 = 0;
4838
PyObject *__pyx_t_1 = NULL;
4839
PyObject *__pyx_t_2 = NULL;
4840
PyObject *__pyx_t_3 = NULL;
4841
PyArrayObject *__pyx_t_4 = NULL;
4843
PyObject *__pyx_t_6 = NULL;
4844
PyObject *__pyx_t_7 = NULL;
4845
PyObject *__pyx_t_8 = NULL;
4849
__Pyx_SetupRefcountContext("_isnullobj");
4850
__pyx_v_val = Py_None; __Pyx_INCREF(Py_None);
4851
__pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
4852
__pyx_v_iter = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
4853
__pyx_bstruct_result.buf = NULL;
4855
/* "pandas/lib/src/tseries.pyx":559
4856
* cdef flatiter iter
4858
* length = PyArray_SIZE(input) # <<<<<<<<<<<<<<
4860
* result = <ndarray> np.zeros(length, dtype=np.int8)
4862
if (!(__Pyx_TypeTest(__pyx_v_input, __pyx_ptype_7tseries_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4863
__pyx_v_length = PyArray_SIZE(((PyArrayObject *)__pyx_v_input));
4865
/* "pandas/lib/src/tseries.pyx":561
4866
* length = PyArray_SIZE(input)
4868
* result = <ndarray> np.zeros(length, dtype=np.int8) # <<<<<<<<<<<<<<
4870
* iter= PyArray_IterNew(input)
4872
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4873
__Pyx_GOTREF(__pyx_1);
4874
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_zeros); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4875
__Pyx_GOTREF(__pyx_t_1);
4876
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
4877
__pyx_t_2 = PyInt_FromLong(__pyx_v_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4878
__Pyx_GOTREF(__pyx_t_2);
4879
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4880
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
4881
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
4882
__Pyx_GIVEREF(__pyx_t_2);
4884
__pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4885
__Pyx_GOTREF(((PyObject *)__pyx_1));
4886
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4887
__Pyx_GOTREF(__pyx_2);
4888
__pyx_t_2 = PyObject_GetAttr(__pyx_2, __pyx_kp_34); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4889
__Pyx_GOTREF(__pyx_t_2);
4890
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
4891
if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4892
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4893
__pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4894
__Pyx_GOTREF(__pyx_t_2);
4895
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4896
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
4897
__Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
4898
__pyx_t_4 = ((PyArrayObject *)__pyx_t_2);
4900
__Pyx_BufFmt_StackElem __pyx_stack[1];
4901
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
4902
__pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn_npy_int8, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
4903
if (unlikely(__pyx_t_5 < 0)) {
4904
PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
4905
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn_npy_int8, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
4906
Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8);
4907
__Pyx_RaiseBufferFallbackError();
4909
PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
4912
__pyx_bstride_0_result = __pyx_bstruct_result.strides[0];
4913
__pyx_bshape_0_result = __pyx_bstruct_result.shape[0];
4914
if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4917
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_2)));
4918
__Pyx_DECREF(((PyObject *)__pyx_v_result));
4919
__pyx_v_result = ((PyArrayObject *)__pyx_t_2);
4920
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4922
/* "pandas/lib/src/tseries.pyx":563
4923
* result = <ndarray> np.zeros(length, dtype=np.int8)
4925
* iter= PyArray_IterNew(input) # <<<<<<<<<<<<<<
4927
* for i from 0 <= i < length:
4929
__pyx_t_2 = PyArray_IterNew(__pyx_v_input); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4930
__Pyx_GOTREF(__pyx_t_2);
4931
if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4932
__Pyx_DECREF(((PyObject *)__pyx_v_iter));
4933
__pyx_v_iter = ((PyArrayIterObject *)__pyx_t_2);
4936
/* "pandas/lib/src/tseries.pyx":565
4937
* iter= PyArray_IterNew(input)
4939
* for i from 0 <= i < length: # <<<<<<<<<<<<<<
4940
* val = PyArray_GETITEM(input, <void *> iter.dataptr)
4943
__pyx_t_5 = __pyx_v_length;
4944
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
4946
/* "pandas/lib/src/tseries.pyx":566
4948
* for i from 0 <= i < length:
4949
* val = PyArray_GETITEM(input, <void *> iter.dataptr) # <<<<<<<<<<<<<<
4951
* if _checknull(val):
4953
__pyx_t_2 = PyArray_GETITEM(__pyx_v_input, ((void *)__pyx_v_iter->dataptr)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4954
__Pyx_GOTREF(__pyx_t_2);
4955
__Pyx_DECREF(__pyx_v_val);
4956
__pyx_v_val = __pyx_t_2;
4959
/* "pandas/lib/src/tseries.pyx":568
4960
* val = PyArray_GETITEM(input, <void *> iter.dataptr)
4962
* if _checknull(val): # <<<<<<<<<<<<<<
4966
__pyx_t_2 = __pyx_f_7tseries__checknull(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4967
__Pyx_GOTREF(__pyx_t_2);
4968
__pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4969
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4972
/* "pandas/lib/src/tseries.pyx":569
4974
* if _checknull(val):
4975
* result[i] = 1 # <<<<<<<<<<<<<<
4977
* PyArray_ITER_NEXT(iter)
4979
__pyx_t_10 = __pyx_v_i;
4981
if (__pyx_t_10 < 0) {
4982
__pyx_t_10 += __pyx_bshape_0_result;
4983
if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;
4984
} else if (unlikely(__pyx_t_10 >= __pyx_bshape_0_result)) __pyx_t_11 = 0;
4985
if (unlikely(__pyx_t_11 != -1)) {
4986
__Pyx_RaiseBufferIndexError(__pyx_t_11);
4987
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4989
*__Pyx_BufPtrStrided1d(npy_int8 *, __pyx_bstruct_result.buf, __pyx_t_10, __pyx_bstride_0_result) = 1;
4994
/* "pandas/lib/src/tseries.pyx":571
4997
* PyArray_ITER_NEXT(iter) # <<<<<<<<<<<<<<
5001
PyArray_ITER_NEXT(__pyx_v_iter);
5004
/* "pandas/lib/src/tseries.pyx":573
5005
* PyArray_ITER_NEXT(iter)
5007
* return result # <<<<<<<<<<<<<<
5009
* def isnull(input):
5011
__Pyx_XDECREF(((PyObject *)__pyx_r));
5012
__Pyx_INCREF(((PyObject *)__pyx_v_result));
5013
__pyx_r = ((PyArrayObject *)__pyx_v_result);
5016
__pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
5019
__Pyx_XDECREF(__pyx_1);
5020
__Pyx_XDECREF(__pyx_2);
5021
__Pyx_XDECREF(__pyx_t_1);
5022
__Pyx_XDECREF(__pyx_t_2);
5023
__Pyx_XDECREF(__pyx_t_3);
5024
{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
5025
__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
5026
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
5027
__Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
5028
__Pyx_AddTraceback("tseries._isnullobj");
5032
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
5034
__Pyx_DECREF(__pyx_v_val);
5035
__Pyx_DECREF((PyObject *)__pyx_v_result);
5036
__Pyx_DECREF((PyObject *)__pyx_v_iter);
5037
__Pyx_XGIVEREF((PyObject *)__pyx_r);
5038
__Pyx_FinishRefcountContext();
5042
/* "pandas/lib/src/tseries.pyx":575
5045
* def isnull(input): # <<<<<<<<<<<<<<
5047
* Replacement for numpy.isnan / -numpy.isfinite which is suitable
5050
static PyObject *__pyx_pf_7tseries_isnull(PyObject *__pyx_self, PyObject *__pyx_v_input); /*proto*/
5051
static char __pyx_doc_7tseries_isnull[] = "\n Replacement for numpy.isnan / -numpy.isfinite which is suitable\n for use on object arrays.\n\n Parameters\n ----------\n arr: ndarray or object value\n \n Returns\n -------\n boolean ndarray or boolean\n ";
5052
static PyObject *__pyx_pf_7tseries_isnull(PyObject *__pyx_self, PyObject *__pyx_v_input) {
5053
PyArrayObject *__pyx_v_result;
5054
Py_buffer __pyx_bstruct_result;
5055
Py_ssize_t __pyx_bstride_0_result = 0;
5056
Py_ssize_t __pyx_bshape_0_result = 0;
5057
PyObject *__pyx_r = NULL;
5058
PyObject *__pyx_1 = 0;
5060
PyObject *__pyx_t_2 = NULL;
5061
PyObject *__pyx_t_3 = NULL;
5065
PyObject *__pyx_t_7 = NULL;
5066
PyObject *__pyx_t_8 = NULL;
5067
PyObject *__pyx_t_9 = NULL;
5068
PyObject *__pyx_t_10 = NULL;
5069
__Pyx_SetupRefcountContext("isnull");
5070
__pyx_self = __pyx_self;
5071
__pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
5072
__pyx_bstruct_result.buf = NULL;
5074
/* "pandas/lib/src/tseries.pyx":590
5075
* cdef ndarray[npy_int8, ndim=1] result
5077
* if isinstance(input, np.ndarray): # <<<<<<<<<<<<<<
5078
* if input.dtype.kind in ('O', 'S'):
5079
* result = _isnullobj(input)
5081
__pyx_t_1 = PyObject_TypeCheck(__pyx_v_input, ((PyTypeObject *)((PyObject*)__pyx_ptype_5numpy_ndarray)));
5084
/* "pandas/lib/src/tseries.pyx":591
5086
* if isinstance(input, np.ndarray):
5087
* if input.dtype.kind in ('O', 'S'): # <<<<<<<<<<<<<<
5088
* result = _isnullobj(input)
5091
__pyx_t_2 = PyObject_GetAttr(__pyx_v_input, __pyx_kp_dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5092
__Pyx_GOTREF(__pyx_t_2);
5093
__pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_kp_kind); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5094
__Pyx_GOTREF(__pyx_t_3);
5095
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5096
__pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_kp_38, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5097
__Pyx_GOTREF(__pyx_t_2);
5098
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5099
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5100
if (!((int)__pyx_t_1)) {
5101
__pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_kp_39, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5102
__Pyx_GOTREF(__pyx_t_2);
5103
__pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5104
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5105
__pyx_t_5 = ((int)__pyx_t_4);
5107
__pyx_t_5 = ((int)__pyx_t_1);
5109
__pyx_t_1 = __pyx_t_5;
5110
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5113
/* "pandas/lib/src/tseries.pyx":592
5114
* if isinstance(input, np.ndarray):
5115
* if input.dtype.kind in ('O', 'S'):
5116
* result = _isnullobj(input) # <<<<<<<<<<<<<<
5118
* return result.astype(np.bool)
5120
__pyx_t_3 = ((PyObject *)__pyx_f_7tseries__isnullobj(__pyx_v_input)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5121
__Pyx_GOTREF(__pyx_t_3);
5123
__Pyx_BufFmt_StackElem __pyx_stack[1];
5124
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
5125
__pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (PyObject*)((PyArrayObject *)__pyx_t_3), &__Pyx_TypeInfo_nn_npy_int8, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
5126
if (unlikely(__pyx_t_6 < 0)) {
5127
PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
5128
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn_npy_int8, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
5129
Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
5130
__Pyx_RaiseBufferFallbackError();
5132
PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
5135
__pyx_bstride_0_result = __pyx_bstruct_result.strides[0];
5136
__pyx_bshape_0_result = __pyx_bstruct_result.shape[0];
5137
if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5139
__Pyx_DECREF(((PyObject *)__pyx_v_result));
5140
__pyx_v_result = ((PyArrayObject *)__pyx_t_3);
5143
/* "pandas/lib/src/tseries.pyx":594
5144
* result = _isnullobj(input)
5146
* return result.astype(np.bool) # <<<<<<<<<<<<<<
5148
* return -np.isfinite(input)
5150
__Pyx_XDECREF(__pyx_r);
5151
__pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_kp_astype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5152
__Pyx_GOTREF(__pyx_t_3);
5153
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5154
__Pyx_GOTREF(__pyx_1);
5155
__pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_bool); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5156
__Pyx_GOTREF(__pyx_t_2);
5157
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
5158
__pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5159
__Pyx_GOTREF(((PyObject *)__pyx_t_10));
5160
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2);
5161
__Pyx_GIVEREF(__pyx_t_2);
5163
__pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5164
__Pyx_GOTREF(__pyx_t_2);
5165
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5166
__Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
5167
__pyx_r = __pyx_t_2;
5174
/* "pandas/lib/src/tseries.pyx":596
5175
* return result.astype(np.bool)
5177
* return -np.isfinite(input) # <<<<<<<<<<<<<<
5179
* return _checknull(input)
5181
__Pyx_XDECREF(__pyx_r);
5182
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5183
__Pyx_GOTREF(__pyx_1);
5184
__pyx_t_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_isfinite); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5185
__Pyx_GOTREF(__pyx_t_2);
5186
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
5187
__pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5188
__Pyx_GOTREF(((PyObject *)__pyx_t_10));
5189
__Pyx_INCREF(__pyx_v_input);
5190
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_input);
5191
__Pyx_GIVEREF(__pyx_v_input);
5192
__pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5193
__Pyx_GOTREF(__pyx_t_3);
5194
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5195
__Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
5196
__pyx_1 = PyNumber_Negative(__pyx_t_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5197
__Pyx_GOTREF(__pyx_1);
5198
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5208
/* "pandas/lib/src/tseries.pyx":598
5209
* return -np.isfinite(input)
5211
* return _checknull(input) # <<<<<<<<<<<<<<
5213
* def notnull(input):
5215
__Pyx_XDECREF(__pyx_r);
5216
__pyx_t_3 = __pyx_f_7tseries__checknull(__pyx_v_input); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5217
__Pyx_GOTREF(__pyx_t_3);
5218
__pyx_r = __pyx_t_3;
5224
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
5227
__Pyx_XDECREF(__pyx_1);
5228
__Pyx_XDECREF(__pyx_t_2);
5229
__Pyx_XDECREF(__pyx_t_3);
5230
__Pyx_XDECREF(__pyx_t_10);
5231
{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
5232
__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
5233
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
5234
__Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
5235
__Pyx_AddTraceback("tseries.isnull");
5239
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
5241
__Pyx_DECREF((PyObject *)__pyx_v_result);
5242
__Pyx_XGIVEREF(__pyx_r);
5243
__Pyx_FinishRefcountContext();
5247
/* "pandas/lib/src/tseries.pyx":600
5248
* return _checknull(input)
5250
* def notnull(input): # <<<<<<<<<<<<<<
5252
* Replacement for numpy.isfinite / -numpy.isnan which is suitable
5255
static PyObject *__pyx_pf_7tseries_notnull(PyObject *__pyx_self, PyObject *__pyx_v_input); /*proto*/
5256
static char __pyx_doc_7tseries_notnull[] = "\n Replacement for numpy.isfinite / -numpy.isnan which is suitable\n for use on object arrays.\n \n Parameters\n ----------\n arr: ndarray or object value\n \n Returns\n -------\n boolean ndarray or boolean\n ";
5257
static PyObject *__pyx_pf_7tseries_notnull(PyObject *__pyx_self, PyObject *__pyx_v_input) {
5258
PyObject *__pyx_r = NULL;
5259
PyObject *__pyx_1 = 0;
5261
PyObject *__pyx_t_2 = NULL;
5262
PyObject *__pyx_t_3 = NULL;
5263
__Pyx_SetupRefcountContext("notnull");
5264
__pyx_self = __pyx_self;
5266
/* "pandas/lib/src/tseries.pyx":613
5267
* boolean ndarray or boolean
5269
* if isinstance(input, np.ndarray): # <<<<<<<<<<<<<<
5270
* return -isnull(input)
5273
__pyx_t_1 = PyObject_TypeCheck(__pyx_v_input, ((PyTypeObject *)((PyObject*)__pyx_ptype_5numpy_ndarray)));
5276
/* "pandas/lib/src/tseries.pyx":614
5278
* if isinstance(input, np.ndarray):
5279
* return -isnull(input) # <<<<<<<<<<<<<<
5281
* return not bool(_checknull(input))
5283
__Pyx_XDECREF(__pyx_r);
5284
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_isnull); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5285
__Pyx_GOTREF(__pyx_1);
5286
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5287
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
5288
__Pyx_INCREF(__pyx_v_input);
5289
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_input);
5290
__Pyx_GIVEREF(__pyx_v_input);
5291
__pyx_t_3 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5292
__Pyx_GOTREF(__pyx_t_3);
5293
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
5294
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
5295
__pyx_1 = PyNumber_Negative(__pyx_t_3); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5296
__Pyx_GOTREF(__pyx_1);
5297
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5305
/* "pandas/lib/src/tseries.pyx":616
5306
* return -isnull(input)
5308
* return not bool(_checknull(input)) # <<<<<<<<<<<<<<
5310
* def reindexNew(ndarray index, ndarray arr, dict idxMap):
5312
__Pyx_XDECREF(__pyx_r);
5313
__pyx_t_3 = __pyx_f_7tseries__checknull(__pyx_v_input); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5314
__Pyx_GOTREF(__pyx_t_3);
5315
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5316
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
5317
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
5318
__Pyx_GIVEREF(__pyx_t_3);
5320
__pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyBool_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5321
__Pyx_GOTREF(__pyx_t_3);
5322
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
5323
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5324
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5325
__pyx_t_3 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5326
__Pyx_GOTREF(__pyx_t_3);
5327
__pyx_r = __pyx_t_3;
5333
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
5336
__Pyx_XDECREF(__pyx_1);
5337
__Pyx_XDECREF(__pyx_t_2);
5338
__Pyx_XDECREF(__pyx_t_3);
5339
__Pyx_AddTraceback("tseries.notnull");
5342
__Pyx_XGIVEREF(__pyx_r);
5343
__Pyx_FinishRefcountContext();
5347
/* "pandas/lib/src/tseries.pyx":618
5348
* return not bool(_checknull(input))
5350
* def reindexNew(ndarray index, ndarray arr, dict idxMap): # <<<<<<<<<<<<<<
5352
* Using the provided new index, a given array, and a mapping of index-value
5355
static PyObject *__pyx_pf_7tseries_reindexNew(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5356
static char __pyx_doc_7tseries_reindexNew[] = "\n Using the provided new index, a given array, and a mapping of index-value\n correpondences in the value array, return a new ndarray conforming to \n the new index.\n \n This is significantly faster than doing it in pure Python.\n ";
5357
static PyObject *__pyx_pf_7tseries_reindexNew(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5358
PyArrayObject *__pyx_v_index = 0;
5359
PyArrayObject *__pyx_v_arr = 0;
5360
PyObject *__pyx_v_idxMap = 0;
5361
PyArrayObject *__pyx_v_result;
5362
double *__pyx_v_result_data;
5365
PyArrayIterObject *__pyx_v_itera;
5366
PyArrayIterObject *__pyx_v_iteridx;
5368
PyObject *__pyx_v_idx;
5369
PyObject *__pyx_r = NULL;
5370
PyObject *__pyx_1 = 0;
5371
PyObject *__pyx_t_1 = NULL;
5373
PyObject *__pyx_t_3 = NULL;
5374
PyObject *__pyx_t_4 = NULL;
5375
PyObject *__pyx_t_5 = NULL;
5379
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_index,&__pyx_kp_arr,&__pyx_kp_idxMap,0};
5380
__Pyx_SetupRefcountContext("reindexNew");
5381
__pyx_self = __pyx_self;
5382
if (unlikely(__pyx_kwds)) {
5383
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
5384
PyObject* values[3] = {0,0,0};
5385
switch (PyTuple_GET_SIZE(__pyx_args)) {
5386
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
5387
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5388
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5390
default: goto __pyx_L5_argtuple_error;
5392
switch (PyTuple_GET_SIZE(__pyx_args)) {
5394
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_index);
5395
if (likely(values[0])) kw_args--;
5396
else goto __pyx_L5_argtuple_error;
5398
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_arr);
5399
if (likely(values[1])) kw_args--;
5401
__Pyx_RaiseArgtupleInvalid("reindexNew", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5404
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_idxMap);
5405
if (likely(values[2])) kw_args--;
5407
__Pyx_RaiseArgtupleInvalid("reindexNew", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5410
if (unlikely(kw_args > 0)) {
5411
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "reindexNew") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5413
__pyx_v_index = ((PyArrayObject *)values[0]);
5414
__pyx_v_arr = ((PyArrayObject *)values[1]);
5415
__pyx_v_idxMap = ((PyObject *)values[2]);
5416
} else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
5417
goto __pyx_L5_argtuple_error;
5419
__pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
5420
__pyx_v_arr = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
5421
__pyx_v_idxMap = ((PyObject *)PyTuple_GET_ITEM(__pyx_args, 2));
5423
goto __pyx_L4_argument_unpacking_done;
5424
__pyx_L5_argtuple_error:;
5425
__Pyx_RaiseArgtupleInvalid("reindexNew", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5427
__Pyx_AddTraceback("tseries.reindexNew");
5429
__pyx_L4_argument_unpacking_done:;
5430
__pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
5431
__pyx_v_itera = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
5432
__pyx_v_iteridx = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
5433
__pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
5434
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5435
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5436
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idxMap), &PyDict_Type, 1, "idxMap", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5438
/* "pandas/lib/src/tseries.pyx":633
5441
* nan = <double> np.NaN # <<<<<<<<<<<<<<
5443
* length = PyArray_SIZE(index)
5445
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5446
__Pyx_GOTREF(__pyx_1);
5447
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_NaN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5448
__Pyx_GOTREF(__pyx_t_1);
5449
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
5450
__pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5451
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5452
__pyx_v_nan = ((double)__pyx_t_2);
5454
/* "pandas/lib/src/tseries.pyx":635
5455
* nan = <double> np.NaN
5457
* length = PyArray_SIZE(index) # <<<<<<<<<<<<<<
5459
* result = <ndarray> np.empty(length, np.float64)
5461
if (!(__Pyx_TypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_7tseries_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5462
__pyx_v_length = PyArray_SIZE(((PyArrayObject *)__pyx_v_index));
5464
/* "pandas/lib/src/tseries.pyx":637
5465
* length = PyArray_SIZE(index)
5467
* result = <ndarray> np.empty(length, np.float64) # <<<<<<<<<<<<<<
5469
* result_data = <double *> result.data
5471
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5472
__Pyx_GOTREF(__pyx_1);
5473
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5474
__Pyx_GOTREF(__pyx_t_1);
5475
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
5476
__pyx_t_3 = PyInt_FromLong(__pyx_v_length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5477
__Pyx_GOTREF(__pyx_t_3);
5478
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5479
__Pyx_GOTREF(__pyx_1);
5480
__pyx_t_4 = PyObject_GetAttr(__pyx_1, __pyx_kp_32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5481
__Pyx_GOTREF(__pyx_t_4);
5482
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
5483
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5484
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
5485
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
5486
__Pyx_GIVEREF(__pyx_t_3);
5487
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
5488
__Pyx_GIVEREF(__pyx_t_4);
5491
__pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5492
__Pyx_GOTREF(__pyx_t_4);
5493
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5494
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
5495
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_4)));
5496
__Pyx_DECREF(((PyObject *)__pyx_v_result));
5497
__pyx_v_result = ((PyArrayObject *)__pyx_t_4);
5498
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5500
/* "pandas/lib/src/tseries.pyx":639
5501
* result = <ndarray> np.empty(length, np.float64)
5503
* result_data = <double *> result.data # <<<<<<<<<<<<<<
5505
* itera = PyArray_IterNew(arr)
5507
__pyx_v_result_data = ((double *)__pyx_v_result->data);
5509
/* "pandas/lib/src/tseries.pyx":641
5510
* result_data = <double *> result.data
5512
* itera = PyArray_IterNew(arr) # <<<<<<<<<<<<<<
5513
* iteridx = PyArray_IterNew(index)
5516
__pyx_t_4 = PyArray_IterNew(((PyObject *)__pyx_v_arr)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5517
__Pyx_GOTREF(__pyx_t_4);
5518
if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5519
__Pyx_DECREF(((PyObject *)__pyx_v_itera));
5520
__pyx_v_itera = ((PyArrayIterObject *)__pyx_t_4);
5523
/* "pandas/lib/src/tseries.pyx":642
5525
* itera = PyArray_IterNew(arr)
5526
* iteridx = PyArray_IterNew(index) # <<<<<<<<<<<<<<
5528
* for i from 0 <= i < length:
5530
__pyx_t_4 = PyArray_IterNew(((PyObject *)__pyx_v_index)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5531
__Pyx_GOTREF(__pyx_t_4);
5532
if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5533
__Pyx_DECREF(((PyObject *)__pyx_v_iteridx));
5534
__pyx_v_iteridx = ((PyArrayIterObject *)__pyx_t_4);
5537
/* "pandas/lib/src/tseries.pyx":644
5538
* iteridx = PyArray_IterNew(index)
5540
* for i from 0 <= i < length: # <<<<<<<<<<<<<<
5541
* idx = PyArray_GETITEM(index, <void *> iteridx.dataptr)
5542
* PyArray_ITER_NEXT(iteridx)
5544
__pyx_t_6 = __pyx_v_length;
5545
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {
5547
/* "pandas/lib/src/tseries.pyx":645
5549
* for i from 0 <= i < length:
5550
* idx = PyArray_GETITEM(index, <void *> iteridx.dataptr) # <<<<<<<<<<<<<<
5551
* PyArray_ITER_NEXT(iteridx)
5552
* if idx not in idxMap:
5554
__pyx_t_4 = PyArray_GETITEM(((PyObject *)__pyx_v_index), ((void *)__pyx_v_iteridx->dataptr)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5555
__Pyx_GOTREF(__pyx_t_4);
5556
__Pyx_DECREF(__pyx_v_idx);
5557
__pyx_v_idx = __pyx_t_4;
5560
/* "pandas/lib/src/tseries.pyx":646
5561
* for i from 0 <= i < length:
5562
* idx = PyArray_GETITEM(index, <void *> iteridx.dataptr)
5563
* PyArray_ITER_NEXT(iteridx) # <<<<<<<<<<<<<<
5564
* if idx not in idxMap:
5565
* result_data[i] = nan
5567
PyArray_ITER_NEXT(__pyx_v_iteridx);
5569
/* "pandas/lib/src/tseries.pyx":647
5570
* idx = PyArray_GETITEM(index, <void *> iteridx.dataptr)
5571
* PyArray_ITER_NEXT(iteridx)
5572
* if idx not in idxMap: # <<<<<<<<<<<<<<
5573
* result_data[i] = nan
5576
__pyx_t_7 = (!PySequence_Contains(((PyObject *)__pyx_v_idxMap), __pyx_v_idx)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5579
/* "pandas/lib/src/tseries.pyx":648
5580
* PyArray_ITER_NEXT(iteridx)
5581
* if idx not in idxMap:
5582
* result_data[i] = nan # <<<<<<<<<<<<<<
5584
* PyArray_ITER_GOTO1D(itera, idxMap[idx])
5586
(__pyx_v_result_data[__pyx_v_i]) = __pyx_v_nan;
5588
/* "pandas/lib/src/tseries.pyx":649
5589
* if idx not in idxMap:
5590
* result_data[i] = nan
5591
* continue # <<<<<<<<<<<<<<
5592
* PyArray_ITER_GOTO1D(itera, idxMap[idx])
5593
* result_data[i] = (<double *>(itera.dataptr))[0]
5595
goto __pyx_L6_continue;
5600
/* "pandas/lib/src/tseries.pyx":650
5601
* result_data[i] = nan
5603
* PyArray_ITER_GOTO1D(itera, idxMap[idx]) # <<<<<<<<<<<<<<
5604
* result_data[i] = (<double *>(itera.dataptr))[0]
5607
__pyx_1 = PyObject_GetItem(((PyObject *)__pyx_v_idxMap), __pyx_v_idx); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5608
__Pyx_GOTREF(__pyx_1);
5609
__pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5610
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
5611
PyArray_ITER_GOTO1D(__pyx_v_itera, __pyx_t_8);
5613
/* "pandas/lib/src/tseries.pyx":651
5615
* PyArray_ITER_GOTO1D(itera, idxMap[idx])
5616
* result_data[i] = (<double *>(itera.dataptr))[0] # <<<<<<<<<<<<<<
5620
(__pyx_v_result_data[__pyx_v_i]) = (((double *)__pyx_v_itera->dataptr)[0]);
5624
/* "pandas/lib/src/tseries.pyx":653
5625
* result_data[i] = (<double *>(itera.dataptr))[0]
5627
* return result # <<<<<<<<<<<<<<
5629
* cdef double __add(double a, double b):
5631
__Pyx_XDECREF(__pyx_r);
5632
__Pyx_INCREF(((PyObject *)__pyx_v_result));
5633
__pyx_r = ((PyObject *)__pyx_v_result);
5636
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
5639
__Pyx_XDECREF(__pyx_1);
5640
__Pyx_XDECREF(__pyx_t_1);
5641
__Pyx_XDECREF(__pyx_t_3);
5642
__Pyx_XDECREF(__pyx_t_4);
5643
__Pyx_XDECREF(__pyx_t_5);
5644
__Pyx_AddTraceback("tseries.reindexNew");
5647
__Pyx_DECREF((PyObject *)__pyx_v_result);
5648
__Pyx_DECREF((PyObject *)__pyx_v_itera);
5649
__Pyx_DECREF((PyObject *)__pyx_v_iteridx);
5650
__Pyx_DECREF(__pyx_v_idx);
5651
__Pyx_XGIVEREF(__pyx_r);
5652
__Pyx_FinishRefcountContext();
5656
/* "pandas/lib/src/tseries.pyx":655
5659
* cdef double __add(double a, double b): # <<<<<<<<<<<<<<
5661
* cdef double __sub(double a, double b):
5664
static double __pyx_f_7tseries___add(double __pyx_v_a, double __pyx_v_b) {
5666
__Pyx_SetupRefcountContext("__add");
5668
/* "pandas/lib/src/tseries.pyx":656
5670
* cdef double __add(double a, double b):
5671
* return a + b # <<<<<<<<<<<<<<
5672
* cdef double __sub(double a, double b):
5675
__pyx_r = (__pyx_v_a + __pyx_v_b);
5680
__Pyx_FinishRefcountContext();
5684
/* "pandas/lib/src/tseries.pyx":657
5685
* cdef double __add(double a, double b):
5687
* cdef double __sub(double a, double b): # <<<<<<<<<<<<<<
5689
* cdef double __div(double a, double b):
5692
static double __pyx_f_7tseries___sub(double __pyx_v_a, double __pyx_v_b) {
5694
__Pyx_SetupRefcountContext("__sub");
5696
/* "pandas/lib/src/tseries.pyx":658
5698
* cdef double __sub(double a, double b):
5699
* return a - b # <<<<<<<<<<<<<<
5700
* cdef double __div(double a, double b):
5703
__pyx_r = (__pyx_v_a - __pyx_v_b);
5708
__Pyx_FinishRefcountContext();
5712
/* "pandas/lib/src/tseries.pyx":659
5713
* cdef double __sub(double a, double b):
5715
* cdef double __div(double a, double b): # <<<<<<<<<<<<<<
5717
* cdef double __mul(double a, double b):
5720
static double __pyx_f_7tseries___div(double __pyx_v_a, double __pyx_v_b) {
5722
__Pyx_SetupRefcountContext("__div");
5724
/* "pandas/lib/src/tseries.pyx":660
5726
* cdef double __div(double a, double b):
5727
* return a / b # <<<<<<<<<<<<<<
5728
* cdef double __mul(double a, double b):
5731
__pyx_r = (__pyx_v_a / __pyx_v_b);
5736
__Pyx_FinishRefcountContext();
5740
/* "pandas/lib/src/tseries.pyx":661
5741
* cdef double __div(double a, double b):
5743
* cdef double __mul(double a, double b): # <<<<<<<<<<<<<<
5745
* cdef double __eq(double a, double b):
5748
static double __pyx_f_7tseries___mul(double __pyx_v_a, double __pyx_v_b) {
5750
__Pyx_SetupRefcountContext("__mul");
5752
/* "pandas/lib/src/tseries.pyx":662
5754
* cdef double __mul(double a, double b):
5755
* return a * b # <<<<<<<<<<<<<<
5756
* cdef double __eq(double a, double b):
5759
__pyx_r = (__pyx_v_a * __pyx_v_b);
5764
__Pyx_FinishRefcountContext();
5768
/* "pandas/lib/src/tseries.pyx":663
5769
* cdef double __mul(double a, double b):
5771
* cdef double __eq(double a, double b): # <<<<<<<<<<<<<<
5773
* cdef double __ne(double a, double b):
5776
static double __pyx_f_7tseries___eq(double __pyx_v_a, double __pyx_v_b) {
5778
__Pyx_SetupRefcountContext("__eq");
5780
/* "pandas/lib/src/tseries.pyx":664
5782
* cdef double __eq(double a, double b):
5783
* return a == b # <<<<<<<<<<<<<<
5784
* cdef double __ne(double a, double b):
5787
__pyx_r = (__pyx_v_a == __pyx_v_b);
5792
__Pyx_FinishRefcountContext();
5796
/* "pandas/lib/src/tseries.pyx":665
5797
* cdef double __eq(double a, double b):
5799
* cdef double __ne(double a, double b): # <<<<<<<<<<<<<<
5801
* cdef double __lt(double a, double b):
5804
static double __pyx_f_7tseries___ne(double __pyx_v_a, double __pyx_v_b) {
5806
__Pyx_SetupRefcountContext("__ne");
5808
/* "pandas/lib/src/tseries.pyx":666
5810
* cdef double __ne(double a, double b):
5811
* return a != b # <<<<<<<<<<<<<<
5812
* cdef double __lt(double a, double b):
5815
__pyx_r = (__pyx_v_a != __pyx_v_b);
5820
__Pyx_FinishRefcountContext();
5824
/* "pandas/lib/src/tseries.pyx":667
5825
* cdef double __ne(double a, double b):
5827
* cdef double __lt(double a, double b): # <<<<<<<<<<<<<<
5829
* cdef double __gt(double a, double b):
5832
static double __pyx_f_7tseries___lt(double __pyx_v_a, double __pyx_v_b) {
5834
__Pyx_SetupRefcountContext("__lt");
5836
/* "pandas/lib/src/tseries.pyx":668
5838
* cdef double __lt(double a, double b):
5839
* return a < b # <<<<<<<<<<<<<<
5840
* cdef double __gt(double a, double b):
5843
__pyx_r = (__pyx_v_a < __pyx_v_b);
5848
__Pyx_FinishRefcountContext();
5852
/* "pandas/lib/src/tseries.pyx":669
5853
* cdef double __lt(double a, double b):
5855
* cdef double __gt(double a, double b): # <<<<<<<<<<<<<<
5857
* cdef double __pow(double a, double b):
5860
static double __pyx_f_7tseries___gt(double __pyx_v_a, double __pyx_v_b) {
5862
__Pyx_SetupRefcountContext("__gt");
5864
/* "pandas/lib/src/tseries.pyx":670
5866
* cdef double __gt(double a, double b):
5867
* return a > b # <<<<<<<<<<<<<<
5868
* cdef double __pow(double a, double b):
5871
__pyx_r = (__pyx_v_a > __pyx_v_b);
5876
__Pyx_FinishRefcountContext();
5880
/* "pandas/lib/src/tseries.pyx":671
5881
* cdef double __gt(double a, double b):
5883
* cdef double __pow(double a, double b): # <<<<<<<<<<<<<<
5888
static double __pyx_f_7tseries___pow(double __pyx_v_a, double __pyx_v_b) {
5890
__Pyx_SetupRefcountContext("__pow");
5892
/* "pandas/lib/src/tseries.pyx":672
5894
* cdef double __pow(double a, double b):
5895
* return a ** b # <<<<<<<<<<<<<<
5897
* ctypedef double (* double_func)(double a, double b)
5899
__pyx_r = pow(__pyx_v_a, __pyx_v_b);
5904
__Pyx_FinishRefcountContext();
5908
/* "pandas/lib/src/tseries.pyx":676
5909
* ctypedef double (* double_func)(double a, double b)
5911
* cdef ndarray _applyFunc(double_func func, ndarray index, object ao, # <<<<<<<<<<<<<<
5912
* object bo, dict aMap, dict bMap):
5916
static PyArrayObject *__pyx_f_7tseries__applyFunc(__pyx_t_7tseries_double_func __pyx_v_func, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_ao, PyObject *__pyx_v_bo, PyObject *__pyx_v_aMap, PyObject *__pyx_v_bMap) {
5917
PyArrayObject *__pyx_v_A;
5918
PyArrayObject *__pyx_v_B;
5919
PyArrayObject *__pyx_v_result;
5920
double *__pyx_v_result_data;
5923
PyArrayIterObject *__pyx_v_itera;
5924
PyArrayIterObject *__pyx_v_iterb;
5925
PyArrayIterObject *__pyx_v_iteridx;
5927
PyObject *__pyx_v_idx;
5928
PyArrayObject *__pyx_r = NULL;
5929
PyObject *__pyx_1 = 0;
5930
PyObject *__pyx_t_1 = NULL;
5932
PyObject *__pyx_t_3 = NULL;
5933
PyObject *__pyx_t_4 = NULL;
5934
PyObject *__pyx_t_5 = NULL;
5939
Py_ssize_t __pyx_t_10;
5940
Py_ssize_t __pyx_t_11;
5941
__Pyx_SetupRefcountContext("_applyFunc");
5942
__pyx_v_A = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
5943
__pyx_v_B = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
5944
__pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
5945
__pyx_v_itera = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
5946
__pyx_v_iterb = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
5947
__pyx_v_iteridx = ((PyArrayIterObject *)Py_None); __Pyx_INCREF(Py_None);
5948
__pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
5950
/* "pandas/lib/src/tseries.pyx":690
5951
* # This is EXTREMELY important, otherwise you will get very
5952
* # undesired results
5953
* A = PyArray_ContiguousFromAny(ao, NPY_DOUBLE, 1, 1) # <<<<<<<<<<<<<<
5954
* B = PyArray_ContiguousFromAny(bo, NPY_DOUBLE, 1, 1)
5957
__pyx_t_1 = PyArray_ContiguousFromAny(__pyx_v_ao, NPY_DOUBLE, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5958
__Pyx_GOTREF(__pyx_t_1);
5959
if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5960
__Pyx_DECREF(((PyObject *)__pyx_v_A));
5961
__pyx_v_A = ((PyArrayObject *)__pyx_t_1);
5964
/* "pandas/lib/src/tseries.pyx":691
5965
* # undesired results
5966
* A = PyArray_ContiguousFromAny(ao, NPY_DOUBLE, 1, 1)
5967
* B = PyArray_ContiguousFromAny(bo, NPY_DOUBLE, 1, 1) # <<<<<<<<<<<<<<
5969
* nan = <double> np.NaN
5971
__pyx_t_1 = PyArray_ContiguousFromAny(__pyx_v_bo, NPY_DOUBLE, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5972
__Pyx_GOTREF(__pyx_t_1);
5973
if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5974
__Pyx_DECREF(((PyObject *)__pyx_v_B));
5975
__pyx_v_B = ((PyArrayObject *)__pyx_t_1);
5978
/* "pandas/lib/src/tseries.pyx":693
5979
* B = PyArray_ContiguousFromAny(bo, NPY_DOUBLE, 1, 1)
5981
* nan = <double> np.NaN # <<<<<<<<<<<<<<
5982
* length = PyArray_SIZE(index)
5985
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5986
__Pyx_GOTREF(__pyx_1);
5987
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_NaN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5988
__Pyx_GOTREF(__pyx_t_1);
5989
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
5990
__pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5991
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5992
__pyx_v_nan = ((double)__pyx_t_2);
5994
/* "pandas/lib/src/tseries.pyx":694
5996
* nan = <double> np.NaN
5997
* length = PyArray_SIZE(index) # <<<<<<<<<<<<<<
5999
* result = <ndarray> np.empty(length, np.float64)
6001
if (!(__Pyx_TypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_7tseries_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6002
__pyx_v_length = PyArray_SIZE(((PyArrayObject *)__pyx_v_index));
6004
/* "pandas/lib/src/tseries.pyx":696
6005
* length = PyArray_SIZE(index)
6007
* result = <ndarray> np.empty(length, np.float64) # <<<<<<<<<<<<<<
6008
* result_data = <double *>result.data
6011
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6012
__Pyx_GOTREF(__pyx_1);
6013
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6014
__Pyx_GOTREF(__pyx_t_1);
6015
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
6016
__pyx_t_3 = PyInt_FromLong(__pyx_v_length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6017
__Pyx_GOTREF(__pyx_t_3);
6018
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6019
__Pyx_GOTREF(__pyx_1);
6020
__pyx_t_4 = PyObject_GetAttr(__pyx_1, __pyx_kp_32); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6021
__Pyx_GOTREF(__pyx_t_4);
6022
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
6023
__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6024
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
6025
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
6026
__Pyx_GIVEREF(__pyx_t_3);
6027
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
6028
__Pyx_GIVEREF(__pyx_t_4);
6031
__pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6032
__Pyx_GOTREF(__pyx_t_4);
6033
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6034
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
6035
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_t_4)));
6036
__Pyx_DECREF(((PyObject *)__pyx_v_result));
6037
__pyx_v_result = ((PyArrayObject *)__pyx_t_4);
6038
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6040
/* "pandas/lib/src/tseries.pyx":697
6042
* result = <ndarray> np.empty(length, np.float64)
6043
* result_data = <double *>result.data # <<<<<<<<<<<<<<
6045
* itera = <flatiter> PyArray_IterNew(A)
6047
__pyx_v_result_data = ((double *)__pyx_v_result->data);
6049
/* "pandas/lib/src/tseries.pyx":699
6050
* result_data = <double *>result.data
6052
* itera = <flatiter> PyArray_IterNew(A) # <<<<<<<<<<<<<<
6053
* iterb = <flatiter> PyArray_IterNew(B)
6054
* iteridx = PyArray_IterNew(index)
6056
__pyx_t_4 = PyArray_IterNew(((PyObject *)__pyx_v_A)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6057
__Pyx_GOTREF(__pyx_t_4);
6058
__Pyx_INCREF(((PyObject *)((PyArrayIterObject *)__pyx_t_4)));
6059
__Pyx_DECREF(((PyObject *)__pyx_v_itera));
6060
__pyx_v_itera = ((PyArrayIterObject *)__pyx_t_4);
6061
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6063
/* "pandas/lib/src/tseries.pyx":700
6065
* itera = <flatiter> PyArray_IterNew(A)
6066
* iterb = <flatiter> PyArray_IterNew(B) # <<<<<<<<<<<<<<
6067
* iteridx = PyArray_IterNew(index)
6070
__pyx_t_4 = PyArray_IterNew(((PyObject *)__pyx_v_B)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6071
__Pyx_GOTREF(__pyx_t_4);
6072
__Pyx_INCREF(((PyObject *)((PyArrayIterObject *)__pyx_t_4)));
6073
__Pyx_DECREF(((PyObject *)__pyx_v_iterb));
6074
__pyx_v_iterb = ((PyArrayIterObject *)__pyx_t_4);
6075
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6077
/* "pandas/lib/src/tseries.pyx":701
6078
* itera = <flatiter> PyArray_IterNew(A)
6079
* iterb = <flatiter> PyArray_IterNew(B)
6080
* iteridx = PyArray_IterNew(index) # <<<<<<<<<<<<<<
6082
* for i from 0 <= i < length:
6084
__pyx_t_4 = PyArray_IterNew(((PyObject *)__pyx_v_index)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6085
__Pyx_GOTREF(__pyx_t_4);
6086
if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_7tseries_flatiter))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6087
__Pyx_DECREF(((PyObject *)__pyx_v_iteridx));
6088
__pyx_v_iteridx = ((PyArrayIterObject *)__pyx_t_4);
6091
/* "pandas/lib/src/tseries.pyx":703
6092
* iteridx = PyArray_IterNew(index)
6094
* for i from 0 <= i < length: # <<<<<<<<<<<<<<
6095
* idx = PyArray_GETITEM(index, <void *> iteridx.dataptr)
6096
* PyArray_ITER_NEXT(iteridx)
6098
__pyx_t_6 = __pyx_v_length;
6099
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {
6101
/* "pandas/lib/src/tseries.pyx":704
6103
* for i from 0 <= i < length:
6104
* idx = PyArray_GETITEM(index, <void *> iteridx.dataptr) # <<<<<<<<<<<<<<
6105
* PyArray_ITER_NEXT(iteridx)
6108
__pyx_t_4 = PyArray_GETITEM(((PyObject *)__pyx_v_index), ((void *)__pyx_v_iteridx->dataptr)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6109
__Pyx_GOTREF(__pyx_t_4);
6110
__Pyx_DECREF(__pyx_v_idx);
6111
__pyx_v_idx = __pyx_t_4;
6114
/* "pandas/lib/src/tseries.pyx":705
6115
* for i from 0 <= i < length:
6116
* idx = PyArray_GETITEM(index, <void *> iteridx.dataptr)
6117
* PyArray_ITER_NEXT(iteridx) # <<<<<<<<<<<<<<
6119
* if idx not in aMap or idx not in bMap:
6121
PyArray_ITER_NEXT(__pyx_v_iteridx);
6123
/* "pandas/lib/src/tseries.pyx":707
6124
* PyArray_ITER_NEXT(iteridx)
6126
* if idx not in aMap or idx not in bMap: # <<<<<<<<<<<<<<
6127
* result_data[i] = nan
6130
__pyx_t_7 = (!PySequence_Contains(((PyObject *)__pyx_v_aMap), __pyx_v_idx)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6132
__pyx_t_8 = (!PySequence_Contains(((PyObject *)__pyx_v_bMap), __pyx_v_idx)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6133
__pyx_t_9 = __pyx_t_8;
6135
__pyx_t_9 = __pyx_t_7;
6139
/* "pandas/lib/src/tseries.pyx":708
6141
* if idx not in aMap or idx not in bMap:
6142
* result_data[i] = nan # <<<<<<<<<<<<<<
6146
(__pyx_v_result_data[__pyx_v_i]) = __pyx_v_nan;
6148
/* "pandas/lib/src/tseries.pyx":709
6149
* if idx not in aMap or idx not in bMap:
6150
* result_data[i] = nan
6151
* continue # <<<<<<<<<<<<<<
6153
* result_data[i] = func((<double *>A.data)[aMap[idx]],
6155
goto __pyx_L3_continue;
6160
/* "pandas/lib/src/tseries.pyx":711
6163
* result_data[i] = func((<double *>A.data)[aMap[idx]], # <<<<<<<<<<<<<<
6164
* (<double *>B.data)[bMap[idx]])
6167
__pyx_1 = PyObject_GetItem(((PyObject *)__pyx_v_aMap), __pyx_v_idx); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6168
__Pyx_GOTREF(__pyx_1);
6169
__pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_1); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6170
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
6172
/* "pandas/lib/src/tseries.pyx":712
6174
* result_data[i] = func((<double *>A.data)[aMap[idx]],
6175
* (<double *>B.data)[bMap[idx]]) # <<<<<<<<<<<<<<
6179
__pyx_1 = PyObject_GetItem(((PyObject *)__pyx_v_bMap), __pyx_v_idx); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6180
__Pyx_GOTREF(__pyx_1);
6181
__pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_1); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6182
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
6184
/* "pandas/lib/src/tseries.pyx":711
6187
* result_data[i] = func((<double *>A.data)[aMap[idx]], # <<<<<<<<<<<<<<
6188
* (<double *>B.data)[bMap[idx]])
6191
(__pyx_v_result_data[__pyx_v_i]) = __pyx_v_func((((double *)__pyx_v_A->data)[__pyx_t_10]), (((double *)__pyx_v_B->data)[__pyx_t_11]));
6195
/* "pandas/lib/src/tseries.pyx":714
6196
* (<double *>B.data)[bMap[idx]])
6198
* return result # <<<<<<<<<<<<<<
6200
* def combineFunc(object name, ndarray index, object ao,
6202
__Pyx_XDECREF(((PyObject *)__pyx_r));
6203
__Pyx_INCREF(((PyObject *)__pyx_v_result));
6204
__pyx_r = __pyx_v_result;
6207
__pyx_r = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None);
6210
__Pyx_XDECREF(__pyx_1);
6211
__Pyx_XDECREF(__pyx_t_1);
6212
__Pyx_XDECREF(__pyx_t_3);
6213
__Pyx_XDECREF(__pyx_t_4);
6214
__Pyx_XDECREF(__pyx_t_5);
6215
__Pyx_AddTraceback("tseries._applyFunc");
6218
__Pyx_DECREF((PyObject *)__pyx_v_A);
6219
__Pyx_DECREF((PyObject *)__pyx_v_B);
6220
__Pyx_DECREF((PyObject *)__pyx_v_result);
6221
__Pyx_DECREF((PyObject *)__pyx_v_itera);
6222
__Pyx_DECREF((PyObject *)__pyx_v_iterb);
6223
__Pyx_DECREF((PyObject *)__pyx_v_iteridx);
6224
__Pyx_DECREF(__pyx_v_idx);
6225
__Pyx_XGIVEREF((PyObject *)__pyx_r);
6226
__Pyx_FinishRefcountContext();
6230
/* "pandas/lib/src/tseries.pyx":716
6233
* def combineFunc(object name, ndarray index, object ao, # <<<<<<<<<<<<<<
6234
* object bo, dict aMap, dict bMap):
6238
static PyObject *__pyx_pf_7tseries_combineFunc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6239
static char __pyx_doc_7tseries_combineFunc[] = "\n Combine two series (values and index maps for each passed in) using the \n indicated function.\n ";
6240
static PyObject *__pyx_pf_7tseries_combineFunc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6241
PyObject *__pyx_v_name = 0;
6242
PyArrayObject *__pyx_v_index = 0;
6243
PyObject *__pyx_v_ao = 0;
6244
PyObject *__pyx_v_bo = 0;
6245
PyObject *__pyx_v_aMap = 0;
6246
PyObject *__pyx_v_bMap = 0;
6247
PyObject *__pyx_r = NULL;
6248
PyObject *__pyx_t_1 = NULL;
6250
PyObject *__pyx_t_3 = NULL;
6251
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_name,&__pyx_kp_index,&__pyx_kp_ao,&__pyx_kp_bo,&__pyx_kp_aMap,&__pyx_kp_bMap,0};
6252
__Pyx_SetupRefcountContext("combineFunc");
6253
__pyx_self = __pyx_self;
6254
if (unlikely(__pyx_kwds)) {
6255
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
6256
PyObject* values[6] = {0,0,0,0,0,0};
6257
switch (PyTuple_GET_SIZE(__pyx_args)) {
6258
case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
6259
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
6260
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
6261
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
6262
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6263
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6265
default: goto __pyx_L5_argtuple_error;
6267
switch (PyTuple_GET_SIZE(__pyx_args)) {
6269
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_name);
6270
if (likely(values[0])) kw_args--;
6271
else goto __pyx_L5_argtuple_error;
6273
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_index);
6274
if (likely(values[1])) kw_args--;
6276
__Pyx_RaiseArgtupleInvalid("combineFunc", 1, 6, 6, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6279
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_ao);
6280
if (likely(values[2])) kw_args--;
6282
__Pyx_RaiseArgtupleInvalid("combineFunc", 1, 6, 6, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6285
values[3] = PyDict_GetItem(__pyx_kwds, __pyx_kp_bo);
6286
if (likely(values[3])) kw_args--;
6288
__Pyx_RaiseArgtupleInvalid("combineFunc", 1, 6, 6, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6291
values[4] = PyDict_GetItem(__pyx_kwds, __pyx_kp_aMap);
6292
if (likely(values[4])) kw_args--;
6294
__Pyx_RaiseArgtupleInvalid("combineFunc", 1, 6, 6, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6297
values[5] = PyDict_GetItem(__pyx_kwds, __pyx_kp_bMap);
6298
if (likely(values[5])) kw_args--;
6300
__Pyx_RaiseArgtupleInvalid("combineFunc", 1, 6, 6, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6303
if (unlikely(kw_args > 0)) {
6304
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "combineFunc") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6306
__pyx_v_name = values[0];
6307
__pyx_v_index = ((PyArrayObject *)values[1]);
6308
__pyx_v_ao = values[2];
6309
__pyx_v_bo = values[3];
6310
__pyx_v_aMap = ((PyObject *)values[4]);
6311
__pyx_v_bMap = ((PyObject *)values[5]);
6312
} else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
6313
goto __pyx_L5_argtuple_error;
6315
__pyx_v_name = PyTuple_GET_ITEM(__pyx_args, 0);
6316
__pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
6317
__pyx_v_ao = PyTuple_GET_ITEM(__pyx_args, 2);
6318
__pyx_v_bo = PyTuple_GET_ITEM(__pyx_args, 3);
6319
__pyx_v_aMap = ((PyObject *)PyTuple_GET_ITEM(__pyx_args, 4));
6320
__pyx_v_bMap = ((PyObject *)PyTuple_GET_ITEM(__pyx_args, 5));
6322
goto __pyx_L4_argument_unpacking_done;
6323
__pyx_L5_argtuple_error:;
6324
__Pyx_RaiseArgtupleInvalid("combineFunc", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6326
__Pyx_AddTraceback("tseries.combineFunc");
6328
__pyx_L4_argument_unpacking_done:;
6329
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6330
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_aMap), &PyDict_Type, 1, "aMap", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6331
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bMap), &PyDict_Type, 1, "bMap", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6333
/* "pandas/lib/src/tseries.pyx":722
6334
* indicated function.
6336
* if name == "__add__": # <<<<<<<<<<<<<<
6337
* return _applyFunc(__add, index, ao, bo, aMap, bMap)
6338
* elif name == "__sub__":
6340
__pyx_t_1 = PyObject_RichCompare(__pyx_v_name, __pyx_kp_40, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6341
__Pyx_GOTREF(__pyx_t_1);
6342
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6343
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6346
/* "pandas/lib/src/tseries.pyx":723
6348
* if name == "__add__":
6349
* return _applyFunc(__add, index, ao, bo, aMap, bMap) # <<<<<<<<<<<<<<
6350
* elif name == "__sub__":
6351
* return _applyFunc(__sub, index, ao, bo, aMap, bMap)
6353
__Pyx_XDECREF(__pyx_r);
6354
__pyx_t_1 = ((PyObject *)__pyx_f_7tseries__applyFunc(__pyx_f_7tseries___add, __pyx_v_index, __pyx_v_ao, __pyx_v_bo, __pyx_v_aMap, __pyx_v_bMap)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6355
__Pyx_GOTREF(__pyx_t_1);
6356
__pyx_r = __pyx_t_1;
6362
/* "pandas/lib/src/tseries.pyx":724
6363
* if name == "__add__":
6364
* return _applyFunc(__add, index, ao, bo, aMap, bMap)
6365
* elif name == "__sub__": # <<<<<<<<<<<<<<
6366
* return _applyFunc(__sub, index, ao, bo, aMap, bMap)
6367
* elif name == "__div__":
6369
__pyx_t_1 = PyObject_RichCompare(__pyx_v_name, __pyx_kp_41, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6370
__Pyx_GOTREF(__pyx_t_1);
6371
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6372
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6375
/* "pandas/lib/src/tseries.pyx":725
6376
* return _applyFunc(__add, index, ao, bo, aMap, bMap)
6377
* elif name == "__sub__":
6378
* return _applyFunc(__sub, index, ao, bo, aMap, bMap) # <<<<<<<<<<<<<<
6379
* elif name == "__div__":
6380
* return _applyFunc(__div, index, ao, bo, aMap, bMap)
6382
__Pyx_XDECREF(__pyx_r);
6383
__pyx_t_1 = ((PyObject *)__pyx_f_7tseries__applyFunc(__pyx_f_7tseries___sub, __pyx_v_index, __pyx_v_ao, __pyx_v_bo, __pyx_v_aMap, __pyx_v_bMap)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6384
__Pyx_GOTREF(__pyx_t_1);
6385
__pyx_r = __pyx_t_1;
6391
/* "pandas/lib/src/tseries.pyx":726
6392
* elif name == "__sub__":
6393
* return _applyFunc(__sub, index, ao, bo, aMap, bMap)
6394
* elif name == "__div__": # <<<<<<<<<<<<<<
6395
* return _applyFunc(__div, index, ao, bo, aMap, bMap)
6396
* elif name == "__mul__":
6398
__pyx_t_1 = PyObject_RichCompare(__pyx_v_name, __pyx_kp_42, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6399
__Pyx_GOTREF(__pyx_t_1);
6400
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6401
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6404
/* "pandas/lib/src/tseries.pyx":727
6405
* return _applyFunc(__sub, index, ao, bo, aMap, bMap)
6406
* elif name == "__div__":
6407
* return _applyFunc(__div, index, ao, bo, aMap, bMap) # <<<<<<<<<<<<<<
6408
* elif name == "__mul__":
6409
* return _applyFunc(__mul, index, ao, bo, aMap, bMap)
6411
__Pyx_XDECREF(__pyx_r);
6412
__pyx_t_1 = ((PyObject *)__pyx_f_7tseries__applyFunc(__pyx_f_7tseries___div, __pyx_v_index, __pyx_v_ao, __pyx_v_bo, __pyx_v_aMap, __pyx_v_bMap)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6413
__Pyx_GOTREF(__pyx_t_1);
6414
__pyx_r = __pyx_t_1;
6420
/* "pandas/lib/src/tseries.pyx":728
6421
* elif name == "__div__":
6422
* return _applyFunc(__div, index, ao, bo, aMap, bMap)
6423
* elif name == "__mul__": # <<<<<<<<<<<<<<
6424
* return _applyFunc(__mul, index, ao, bo, aMap, bMap)
6425
* elif name == "__eq__":
6427
__pyx_t_1 = PyObject_RichCompare(__pyx_v_name, __pyx_kp_43, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6428
__Pyx_GOTREF(__pyx_t_1);
6429
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6430
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6433
/* "pandas/lib/src/tseries.pyx":729
6434
* return _applyFunc(__div, index, ao, bo, aMap, bMap)
6435
* elif name == "__mul__":
6436
* return _applyFunc(__mul, index, ao, bo, aMap, bMap) # <<<<<<<<<<<<<<
6437
* elif name == "__eq__":
6438
* return _applyFunc(__eq, index, ao, bo, aMap, bMap)
6440
__Pyx_XDECREF(__pyx_r);
6441
__pyx_t_1 = ((PyObject *)__pyx_f_7tseries__applyFunc(__pyx_f_7tseries___mul, __pyx_v_index, __pyx_v_ao, __pyx_v_bo, __pyx_v_aMap, __pyx_v_bMap)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6442
__Pyx_GOTREF(__pyx_t_1);
6443
__pyx_r = __pyx_t_1;
6449
/* "pandas/lib/src/tseries.pyx":730
6450
* elif name == "__mul__":
6451
* return _applyFunc(__mul, index, ao, bo, aMap, bMap)
6452
* elif name == "__eq__": # <<<<<<<<<<<<<<
6453
* return _applyFunc(__eq, index, ao, bo, aMap, bMap)
6454
* elif name == "__ne__":
6456
__pyx_t_1 = PyObject_RichCompare(__pyx_v_name, __pyx_kp_44, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6457
__Pyx_GOTREF(__pyx_t_1);
6458
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6459
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6462
/* "pandas/lib/src/tseries.pyx":731
6463
* return _applyFunc(__mul, index, ao, bo, aMap, bMap)
6464
* elif name == "__eq__":
6465
* return _applyFunc(__eq, index, ao, bo, aMap, bMap) # <<<<<<<<<<<<<<
6466
* elif name == "__ne__":
6467
* return _applyFunc(__ne, index, ao, bo, aMap, bMap)
6469
__Pyx_XDECREF(__pyx_r);
6470
__pyx_t_1 = ((PyObject *)__pyx_f_7tseries__applyFunc(__pyx_f_7tseries___eq, __pyx_v_index, __pyx_v_ao, __pyx_v_bo, __pyx_v_aMap, __pyx_v_bMap)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6471
__Pyx_GOTREF(__pyx_t_1);
6472
__pyx_r = __pyx_t_1;
6478
/* "pandas/lib/src/tseries.pyx":732
6479
* elif name == "__eq__":
6480
* return _applyFunc(__eq, index, ao, bo, aMap, bMap)
6481
* elif name == "__ne__": # <<<<<<<<<<<<<<
6482
* return _applyFunc(__ne, index, ao, bo, aMap, bMap)
6483
* elif name == "__lt__":
6485
__pyx_t_1 = PyObject_RichCompare(__pyx_v_name, __pyx_kp_45, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6486
__Pyx_GOTREF(__pyx_t_1);
6487
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6488
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6491
/* "pandas/lib/src/tseries.pyx":733
6492
* return _applyFunc(__eq, index, ao, bo, aMap, bMap)
6493
* elif name == "__ne__":
6494
* return _applyFunc(__ne, index, ao, bo, aMap, bMap) # <<<<<<<<<<<<<<
6495
* elif name == "__lt__":
6496
* return _applyFunc(__lt, index, ao, bo, aMap, bMap)
6498
__Pyx_XDECREF(__pyx_r);
6499
__pyx_t_1 = ((PyObject *)__pyx_f_7tseries__applyFunc(__pyx_f_7tseries___ne, __pyx_v_index, __pyx_v_ao, __pyx_v_bo, __pyx_v_aMap, __pyx_v_bMap)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6500
__Pyx_GOTREF(__pyx_t_1);
6501
__pyx_r = __pyx_t_1;
6507
/* "pandas/lib/src/tseries.pyx":734
6508
* elif name == "__ne__":
6509
* return _applyFunc(__ne, index, ao, bo, aMap, bMap)
6510
* elif name == "__lt__": # <<<<<<<<<<<<<<
6511
* return _applyFunc(__lt, index, ao, bo, aMap, bMap)
6512
* elif name == "__gt__":
6514
__pyx_t_1 = PyObject_RichCompare(__pyx_v_name, __pyx_kp_46, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6515
__Pyx_GOTREF(__pyx_t_1);
6516
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6517
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6520
/* "pandas/lib/src/tseries.pyx":735
6521
* return _applyFunc(__ne, index, ao, bo, aMap, bMap)
6522
* elif name == "__lt__":
6523
* return _applyFunc(__lt, index, ao, bo, aMap, bMap) # <<<<<<<<<<<<<<
6524
* elif name == "__gt__":
6525
* return _applyFunc(__gt, index, ao, bo, aMap, bMap)
6527
__Pyx_XDECREF(__pyx_r);
6528
__pyx_t_1 = ((PyObject *)__pyx_f_7tseries__applyFunc(__pyx_f_7tseries___lt, __pyx_v_index, __pyx_v_ao, __pyx_v_bo, __pyx_v_aMap, __pyx_v_bMap)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6529
__Pyx_GOTREF(__pyx_t_1);
6530
__pyx_r = __pyx_t_1;
6536
/* "pandas/lib/src/tseries.pyx":736
6537
* elif name == "__lt__":
6538
* return _applyFunc(__lt, index, ao, bo, aMap, bMap)
6539
* elif name == "__gt__": # <<<<<<<<<<<<<<
6540
* return _applyFunc(__gt, index, ao, bo, aMap, bMap)
6541
* elif name == "__pow__":
6543
__pyx_t_1 = PyObject_RichCompare(__pyx_v_name, __pyx_kp_47, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6544
__Pyx_GOTREF(__pyx_t_1);
6545
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6546
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6549
/* "pandas/lib/src/tseries.pyx":737
6550
* return _applyFunc(__lt, index, ao, bo, aMap, bMap)
6551
* elif name == "__gt__":
6552
* return _applyFunc(__gt, index, ao, bo, aMap, bMap) # <<<<<<<<<<<<<<
6553
* elif name == "__pow__":
6554
* return _applyFunc(__pow, index, ao, bo, aMap, bMap)
6556
__Pyx_XDECREF(__pyx_r);
6557
__pyx_t_1 = ((PyObject *)__pyx_f_7tseries__applyFunc(__pyx_f_7tseries___gt, __pyx_v_index, __pyx_v_ao, __pyx_v_bo, __pyx_v_aMap, __pyx_v_bMap)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6558
__Pyx_GOTREF(__pyx_t_1);
6559
__pyx_r = __pyx_t_1;
6565
/* "pandas/lib/src/tseries.pyx":738
6566
* elif name == "__gt__":
6567
* return _applyFunc(__gt, index, ao, bo, aMap, bMap)
6568
* elif name == "__pow__": # <<<<<<<<<<<<<<
6569
* return _applyFunc(__pow, index, ao, bo, aMap, bMap)
6572
__pyx_t_1 = PyObject_RichCompare(__pyx_v_name, __pyx_kp_48, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6573
__Pyx_GOTREF(__pyx_t_1);
6574
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6575
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6578
/* "pandas/lib/src/tseries.pyx":739
6579
* return _applyFunc(__gt, index, ao, bo, aMap, bMap)
6580
* elif name == "__pow__":
6581
* return _applyFunc(__pow, index, ao, bo, aMap, bMap) # <<<<<<<<<<<<<<
6583
* raise Exception('bad funcname requested of Cython code')
6585
__Pyx_XDECREF(__pyx_r);
6586
__pyx_t_1 = ((PyObject *)__pyx_f_7tseries__applyFunc(__pyx_f_7tseries___pow, __pyx_v_index, __pyx_v_ao, __pyx_v_bo, __pyx_v_aMap, __pyx_v_bMap)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6587
__Pyx_GOTREF(__pyx_t_1);
6588
__pyx_r = __pyx_t_1;
6595
/* "pandas/lib/src/tseries.pyx":741
6596
* return _applyFunc(__pow, index, ao, bo, aMap, bMap)
6598
* raise Exception('bad funcname requested of Cython code') # <<<<<<<<<<<<<<
6600
* #-------------------------------------------------------------------------------
6602
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6603
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
6604
__Pyx_INCREF(__pyx_kp_49);
6605
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_49);
6606
__Pyx_GIVEREF(__pyx_kp_49);
6607
__pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6608
__Pyx_GOTREF(__pyx_t_3);
6609
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
6610
__Pyx_Raise(__pyx_t_3, 0, 0);
6611
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6612
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6616
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
6619
__Pyx_XDECREF(__pyx_t_1);
6620
__Pyx_XDECREF(__pyx_t_3);
6621
__Pyx_AddTraceback("tseries.combineFunc");
6624
__Pyx_XGIVEREF(__pyx_r);
6625
__Pyx_FinishRefcountContext();
6629
/* "pandas/lib/src/tseries.pyx":747
6631
* @cython.boundscheck(False)
6632
* def arrmap(ndarray[object, ndim=1] index, object func): # <<<<<<<<<<<<<<
6633
* cdef int length = index.shape[0]
6637
static PyObject *__pyx_pf_7tseries_arrmap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6638
static PyObject *__pyx_pf_7tseries_arrmap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6639
PyArrayObject *__pyx_v_index = 0;
6640
PyObject *__pyx_v_func = 0;
6643
PyArrayObject *__pyx_v_result = 0;
6644
Py_buffer __pyx_bstruct_index;
6645
Py_ssize_t __pyx_bstride_0_index = 0;
6646
Py_ssize_t __pyx_bshape_0_index = 0;
6647
Py_buffer __pyx_bstruct_result;
6648
Py_ssize_t __pyx_bstride_0_result = 0;
6649
Py_ssize_t __pyx_bshape_0_result = 0;
6650
PyObject *__pyx_r = NULL;
6651
PyObject *__pyx_1 = 0;
6652
PyObject *__pyx_2 = 0;
6653
PyObject *__pyx_t_1 = NULL;
6654
PyObject *__pyx_t_2 = NULL;
6655
PyObject *__pyx_t_3 = NULL;
6656
PyArrayObject *__pyx_t_4 = NULL;
6660
PyObject **__pyx_t_8;
6661
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_index,&__pyx_kp_func,0};
6662
__Pyx_SetupRefcountContext("arrmap");
6663
__pyx_self = __pyx_self;
6664
if (unlikely(__pyx_kwds)) {
6665
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
6666
PyObject* values[2] = {0,0};
6667
switch (PyTuple_GET_SIZE(__pyx_args)) {
6668
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6669
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6671
default: goto __pyx_L5_argtuple_error;
6673
switch (PyTuple_GET_SIZE(__pyx_args)) {
6675
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_index);
6676
if (likely(values[0])) kw_args--;
6677
else goto __pyx_L5_argtuple_error;
6679
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_func);
6680
if (likely(values[1])) kw_args--;
6682
__Pyx_RaiseArgtupleInvalid("arrmap", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6685
if (unlikely(kw_args > 0)) {
6686
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "arrmap") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6688
__pyx_v_index = ((PyArrayObject *)values[0]);
6689
__pyx_v_func = values[1];
6690
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
6691
goto __pyx_L5_argtuple_error;
6693
__pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
6694
__pyx_v_func = PyTuple_GET_ITEM(__pyx_args, 1);
6696
goto __pyx_L4_argument_unpacking_done;
6697
__pyx_L5_argtuple_error:;
6698
__Pyx_RaiseArgtupleInvalid("arrmap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6700
__Pyx_AddTraceback("tseries.arrmap");
6702
__pyx_L4_argument_unpacking_done:;
6703
__pyx_bstruct_result.buf = NULL;
6704
__pyx_bstruct_index.buf = NULL;
6705
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6707
__Pyx_BufFmt_StackElem __pyx_stack[1];
6708
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6710
__pyx_bstride_0_index = __pyx_bstruct_index.strides[0];
6711
__pyx_bshape_0_index = __pyx_bstruct_index.shape[0];
6713
/* "pandas/lib/src/tseries.pyx":748
6714
* @cython.boundscheck(False)
6715
* def arrmap(ndarray[object, ndim=1] index, object func):
6716
* cdef int length = index.shape[0] # <<<<<<<<<<<<<<
6720
__pyx_v_length = (__pyx_v_index->dimensions[0]);
6722
/* "pandas/lib/src/tseries.pyx":749
6723
* def arrmap(ndarray[object, ndim=1] index, object func):
6724
* cdef int length = index.shape[0]
6725
* cdef int i = 0 # <<<<<<<<<<<<<<
6727
* cdef ndarray[object, ndim=1] result = np.empty(length, dtype=np.object_)
6731
/* "pandas/lib/src/tseries.pyx":751
6734
* cdef ndarray[object, ndim=1] result = np.empty(length, dtype=np.object_) # <<<<<<<<<<<<<<
6736
* for i from 0 <= i < length:
6738
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6739
__Pyx_GOTREF(__pyx_1);
6740
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6741
__Pyx_GOTREF(__pyx_t_1);
6742
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
6743
__pyx_t_2 = PyInt_FromLong(__pyx_v_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6744
__Pyx_GOTREF(__pyx_t_2);
6745
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6746
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
6747
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
6748
__Pyx_GIVEREF(__pyx_t_2);
6750
__pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6751
__Pyx_GOTREF(((PyObject *)__pyx_1));
6752
__pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6753
__Pyx_GOTREF(__pyx_2);
6754
__pyx_t_2 = PyObject_GetAttr(__pyx_2, __pyx_kp_object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6755
__Pyx_GOTREF(__pyx_t_2);
6756
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
6757
if (PyDict_SetItem(__pyx_1, __pyx_kp_dtype, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6758
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6759
__pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6760
__Pyx_GOTREF(__pyx_t_2);
6761
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6762
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
6763
__Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
6764
if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6765
__pyx_t_4 = ((PyArrayObject *)__pyx_t_2);
6767
__Pyx_BufFmt_StackElem __pyx_stack[1];
6768
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_result, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
6769
__pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_result.buf = NULL;
6770
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6771
} else {__pyx_bstride_0_result = __pyx_bstruct_result.strides[0];
6772
__pyx_bshape_0_result = __pyx_bstruct_result.shape[0];
6776
__pyx_v_result = ((PyArrayObject *)__pyx_t_2);
6779
/* "pandas/lib/src/tseries.pyx":753
6780
* cdef ndarray[object, ndim=1] result = np.empty(length, dtype=np.object_)
6782
* for i from 0 <= i < length: # <<<<<<<<<<<<<<
6783
* result[i] = func(index[i])
6786
__pyx_t_5 = __pyx_v_length;
6787
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
6789
/* "pandas/lib/src/tseries.pyx":754
6791
* for i from 0 <= i < length:
6792
* result[i] = func(index[i]) # <<<<<<<<<<<<<<
6796
__pyx_t_6 = __pyx_v_i;
6797
if (__pyx_t_6 < 0) __pyx_t_6 += __pyx_bshape_0_index;
6798
__pyx_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index.buf, __pyx_t_6, __pyx_bstride_0_index);
6799
__Pyx_INCREF((PyObject*)__pyx_2);
6800
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6801
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
6802
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_2);
6803
__Pyx_GIVEREF(__pyx_2);
6805
__pyx_t_3 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6806
__Pyx_GOTREF(__pyx_t_3);
6807
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
6808
__pyx_t_7 = __pyx_v_i;
6809
if (__pyx_t_7 < 0) __pyx_t_7 += __pyx_bshape_0_result;
6810
__pyx_t_8 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_result.buf, __pyx_t_7, __pyx_bstride_0_result);
6811
__Pyx_GOTREF(*__pyx_t_8);
6812
__Pyx_DECREF(*__pyx_t_8); __Pyx_INCREF(__pyx_t_3);
6813
*__pyx_t_8 = __pyx_t_3;
6814
__Pyx_GIVEREF(*__pyx_t_8);
6815
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6818
/* "pandas/lib/src/tseries.pyx":756
6819
* result[i] = func(index[i])
6821
* return result # <<<<<<<<<<<<<<
6823
* @cython.boundscheck(False)
6825
__Pyx_XDECREF(__pyx_r);
6826
__Pyx_INCREF(((PyObject *)__pyx_v_result));
6827
__pyx_r = ((PyObject *)__pyx_v_result);
6830
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
6833
__Pyx_XDECREF(__pyx_1);
6834
__Pyx_XDECREF(__pyx_2);
6835
__Pyx_XDECREF(__pyx_t_1);
6836
__Pyx_XDECREF(__pyx_t_2);
6837
__Pyx_XDECREF(__pyx_t_3);
6838
{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
6839
__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
6840
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
6841
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
6842
__Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
6843
__Pyx_AddTraceback("tseries.arrmap");
6847
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
6848
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_result);
6850
__Pyx_XDECREF((PyObject *)__pyx_v_result);
6851
__Pyx_XGIVEREF(__pyx_r);
6852
__Pyx_FinishRefcountContext();
6856
/* "pandas/lib/src/tseries.pyx":759
6858
* @cython.boundscheck(False)
6859
* def groupby_withnull_old(ndarray[object, ndim = 1] index, object keyfunc): # <<<<<<<<<<<<<<
6861
* cdef int length = index.shape[0]
6864
static PyObject *__pyx_pf_7tseries_groupby_withnull_old(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6865
static PyObject *__pyx_pf_7tseries_groupby_withnull_old(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6866
PyArrayObject *__pyx_v_index = 0;
6867
PyObject *__pyx_v_keyfunc = 0;
6868
PyObject *__pyx_v_groups;
6870
PyObject *__pyx_v_idx;
6871
PyObject *__pyx_v_curKey;
6872
PyObject *__pyx_v_key;
6873
PyObject *__pyx_v_members;
6874
PyArrayObject *__pyx_v_mapped_index = 0;
6875
PyArrayObject *__pyx_v_null_mask = 0;
6876
PyObject *__pyx_v_bool_mask;
6877
PyObject *__pyx_v_null_values;
6879
Py_buffer __pyx_bstruct_index;
6880
Py_ssize_t __pyx_bstride_0_index = 0;
6881
Py_ssize_t __pyx_bshape_0_index = 0;
6882
Py_buffer __pyx_bstruct_null_mask;
6883
Py_ssize_t __pyx_bstride_0_null_mask = 0;
6884
Py_ssize_t __pyx_bshape_0_null_mask = 0;
6885
Py_buffer __pyx_bstruct_mapped_index;
6886
Py_ssize_t __pyx_bstride_0_mapped_index = 0;
6887
Py_ssize_t __pyx_bshape_0_mapped_index = 0;
6888
PyObject *__pyx_r = NULL;
6889
PyObject *__pyx_1 = 0;
6890
PyObject *__pyx_t_1 = NULL;
6892
PyObject *__pyx_t_3 = NULL;
6893
PyArrayObject *__pyx_t_4 = NULL;
6894
PyObject *__pyx_t_5 = NULL;
6902
PyObject *__pyx_t_13;
6907
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_index,&__pyx_kp_keyfunc,0};
6908
__Pyx_SetupRefcountContext("groupby_withnull_old");
6909
__pyx_self = __pyx_self;
6910
if (unlikely(__pyx_kwds)) {
6911
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
6912
PyObject* values[2] = {0,0};
6913
switch (PyTuple_GET_SIZE(__pyx_args)) {
6914
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6915
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6917
default: goto __pyx_L5_argtuple_error;
6919
switch (PyTuple_GET_SIZE(__pyx_args)) {
6921
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_index);
6922
if (likely(values[0])) kw_args--;
6923
else goto __pyx_L5_argtuple_error;
6925
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_keyfunc);
6926
if (likely(values[1])) kw_args--;
6928
__Pyx_RaiseArgtupleInvalid("groupby_withnull_old", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6931
if (unlikely(kw_args > 0)) {
6932
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "groupby_withnull_old") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6934
__pyx_v_index = ((PyArrayObject *)values[0]);
6935
__pyx_v_keyfunc = values[1];
6936
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
6937
goto __pyx_L5_argtuple_error;
6939
__pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
6940
__pyx_v_keyfunc = PyTuple_GET_ITEM(__pyx_args, 1);
6942
goto __pyx_L4_argument_unpacking_done;
6943
__pyx_L5_argtuple_error:;
6944
__Pyx_RaiseArgtupleInvalid("groupby_withnull_old", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
6946
__Pyx_AddTraceback("tseries.groupby_withnull_old");
6948
__pyx_L4_argument_unpacking_done:;
6949
__pyx_v_groups = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
6950
__pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
6951
__pyx_v_curKey = Py_None; __Pyx_INCREF(Py_None);
6952
__pyx_v_key = Py_None; __Pyx_INCREF(Py_None);
6953
__pyx_v_members = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
6954
__pyx_v_bool_mask = Py_None; __Pyx_INCREF(Py_None);
6955
__pyx_v_null_values = Py_None; __Pyx_INCREF(Py_None);
6956
__pyx_bstruct_mapped_index.buf = NULL;
6957
__pyx_bstruct_null_mask.buf = NULL;
6958
__pyx_bstruct_index.buf = NULL;
6959
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6961
__Pyx_BufFmt_StackElem __pyx_stack[1];
6962
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6964
__pyx_bstride_0_index = __pyx_bstruct_index.strides[0];
6965
__pyx_bshape_0_index = __pyx_bstruct_index.shape[0];
6967
/* "pandas/lib/src/tseries.pyx":761
6968
* def groupby_withnull_old(ndarray[object, ndim = 1] index, object keyfunc):
6970
* cdef int length = index.shape[0] # <<<<<<<<<<<<<<
6972
* cdef object curKey, key
6974
__pyx_v_length = (__pyx_v_index->dimensions[0]);
6976
/* "pandas/lib/src/tseries.pyx":766
6979
* groups = PyDict_New() # <<<<<<<<<<<<<<
6981
* if length != index.shape[0]:
6983
__pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6984
__Pyx_GOTREF(__pyx_t_1);
6985
if (!(likely(PyDict_CheckExact(__pyx_t_1)) || (__pyx_t_1) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected dict, got %s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6986
__Pyx_DECREF(((PyObject *)__pyx_v_groups));
6987
__pyx_v_groups = ((PyObject *)__pyx_t_1);
6990
/* "pandas/lib/src/tseries.pyx":768
6991
* groups = PyDict_New()
6993
* if length != index.shape[0]: # <<<<<<<<<<<<<<
6994
* raise Exception('Dates and values were not the same length!')
6997
__pyx_t_2 = (__pyx_v_length != (__pyx_v_index->dimensions[0]));
7000
/* "pandas/lib/src/tseries.pyx":769
7002
* if length != index.shape[0]:
7003
* raise Exception('Dates and values were not the same length!') # <<<<<<<<<<<<<<
7005
* cdef ndarray[object, ndim=1] mapped_index = arrmap(index, keyfunc)
7007
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7008
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
7009
__Pyx_INCREF(__pyx_kp_50);
7010
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_50);
7011
__Pyx_GIVEREF(__pyx_kp_50);
7012
__pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7013
__Pyx_GOTREF(__pyx_t_3);
7014
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
7015
__Pyx_Raise(__pyx_t_3, 0, 0);
7016
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7017
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7022
/* "pandas/lib/src/tseries.pyx":771
7023
* raise Exception('Dates and values were not the same length!')
7025
* cdef ndarray[object, ndim=1] mapped_index = arrmap(index, keyfunc) # <<<<<<<<<<<<<<
7027
* cdef ndarray[npy_int8, ndim=1] null_mask = _isnullobj(mapped_index)
7029
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_arrmap); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7030
__Pyx_GOTREF(__pyx_1);
7031
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7032
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
7033
__Pyx_INCREF(((PyObject *)__pyx_v_index));
7034
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_index));
7035
__Pyx_GIVEREF(((PyObject *)__pyx_v_index));
7036
__Pyx_INCREF(__pyx_v_keyfunc);
7037
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_keyfunc);
7038
__Pyx_GIVEREF(__pyx_v_keyfunc);
7039
__pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7040
__Pyx_GOTREF(__pyx_t_1);
7041
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
7042
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
7043
if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7044
__pyx_t_4 = ((PyArrayObject *)__pyx_t_1);
7046
__Pyx_BufFmt_StackElem __pyx_stack[1];
7047
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mapped_index, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
7048
__pyx_v_mapped_index = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_mapped_index.buf = NULL;
7049
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7050
} else {__pyx_bstride_0_mapped_index = __pyx_bstruct_mapped_index.strides[0];
7051
__pyx_bshape_0_mapped_index = __pyx_bstruct_mapped_index.shape[0];
7055
__pyx_v_mapped_index = ((PyArrayObject *)__pyx_t_1);
7058
/* "pandas/lib/src/tseries.pyx":773
7059
* cdef ndarray[object, ndim=1] mapped_index = arrmap(index, keyfunc)
7061
* cdef ndarray[npy_int8, ndim=1] null_mask = _isnullobj(mapped_index) # <<<<<<<<<<<<<<
7063
* bool_mask = null_mask.astype(bool)
7065
__pyx_t_1 = ((PyObject *)__pyx_f_7tseries__isnullobj(((PyObject *)__pyx_v_mapped_index))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7066
__Pyx_GOTREF(__pyx_t_1);
7068
__Pyx_BufFmt_StackElem __pyx_stack[1];
7069
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_null_mask, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn_npy_int8, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
7070
__pyx_v_null_mask = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_null_mask.buf = NULL;
7071
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7072
} else {__pyx_bstride_0_null_mask = __pyx_bstruct_null_mask.strides[0];
7073
__pyx_bshape_0_null_mask = __pyx_bstruct_null_mask.shape[0];
7076
__pyx_v_null_mask = ((PyArrayObject *)__pyx_t_1);
7079
/* "pandas/lib/src/tseries.pyx":775
7080
* cdef ndarray[npy_int8, ndim=1] null_mask = _isnullobj(mapped_index)
7082
* bool_mask = null_mask.astype(bool) # <<<<<<<<<<<<<<
7084
* null_values = np.asarray(index)[bool_mask]
7086
__pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_null_mask), __pyx_kp_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7087
__Pyx_GOTREF(__pyx_t_1);
7088
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7089
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
7090
__Pyx_INCREF(((PyObject *)((PyObject*)&PyBool_Type)));
7091
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)&PyBool_Type)));
7092
__Pyx_GIVEREF(((PyObject *)((PyObject*)&PyBool_Type)));
7093
__pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7094
__Pyx_GOTREF(__pyx_t_5);
7095
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7096
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
7097
__Pyx_DECREF(__pyx_v_bool_mask);
7098
__pyx_v_bool_mask = __pyx_t_5;
7101
/* "pandas/lib/src/tseries.pyx":777
7102
* bool_mask = null_mask.astype(bool)
7104
* null_values = np.asarray(index)[bool_mask] # <<<<<<<<<<<<<<
7106
* if null_values.any():
7108
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7109
__Pyx_GOTREF(__pyx_1);
7110
__pyx_t_5 = PyObject_GetAttr(__pyx_1, __pyx_kp_asarray); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7111
__Pyx_GOTREF(__pyx_t_5);
7112
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
7113
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7114
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
7115
__Pyx_INCREF(((PyObject *)__pyx_v_index));
7116
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_index));
7117
__Pyx_GIVEREF(((PyObject *)__pyx_v_index));
7118
__pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7119
__Pyx_GOTREF(__pyx_t_1);
7120
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7121
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
7122
__pyx_1 = PyObject_GetItem(__pyx_t_1, __pyx_v_bool_mask); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7123
__Pyx_GOTREF(__pyx_1);
7124
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7125
__Pyx_DECREF(__pyx_v_null_values);
7126
__pyx_v_null_values = __pyx_1;
7129
/* "pandas/lib/src/tseries.pyx":779
7130
* null_values = np.asarray(index)[bool_mask]
7132
* if null_values.any(): # <<<<<<<<<<<<<<
7133
* PyDict_SetItem(groups, np.NaN, null_values)
7136
__pyx_t_1 = PyObject_GetAttr(__pyx_v_null_values, __pyx_kp_any); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7137
__Pyx_GOTREF(__pyx_t_1);
7138
__pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7139
__Pyx_GOTREF(__pyx_t_3);
7140
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7141
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7142
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7145
/* "pandas/lib/src/tseries.pyx":780
7147
* if null_values.any():
7148
* PyDict_SetItem(groups, np.NaN, null_values) # <<<<<<<<<<<<<<
7152
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7153
__Pyx_GOTREF(__pyx_1);
7154
__pyx_t_3 = PyObject_GetAttr(__pyx_1, __pyx_kp_NaN); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7155
__Pyx_GOTREF(__pyx_t_3);
7156
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
7157
PyDict_SetItem(((PyObject *)__pyx_v_groups), __pyx_t_3, __pyx_v_null_values);
7158
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7163
/* "pandas/lib/src/tseries.pyx":782
7164
* PyDict_SetItem(groups, np.NaN, null_values)
7166
* cdef int i = 0 # <<<<<<<<<<<<<<
7168
* key = mapped_index[0]
7172
/* "pandas/lib/src/tseries.pyx":783
7175
* idx = index[0] # <<<<<<<<<<<<<<
7176
* key = mapped_index[0]
7180
if (__pyx_t_6 < 0) __pyx_t_6 += __pyx_bshape_0_index;
7181
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index.buf, __pyx_t_6, __pyx_bstride_0_index);
7182
__Pyx_INCREF((PyObject*)__pyx_1);
7183
__Pyx_DECREF(__pyx_v_idx);
7184
__pyx_v_idx = __pyx_1;
7187
/* "pandas/lib/src/tseries.pyx":784
7190
* key = mapped_index[0] # <<<<<<<<<<<<<<
7195
if (__pyx_t_7 < 0) __pyx_t_7 += __pyx_bshape_0_mapped_index;
7196
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_mapped_index.buf, __pyx_t_7, __pyx_bstride_0_mapped_index);
7197
__Pyx_INCREF((PyObject*)__pyx_1);
7198
__Pyx_DECREF(__pyx_v_key);
7199
__pyx_v_key = __pyx_1;
7202
/* "pandas/lib/src/tseries.pyx":790
7203
* # 'lazily' evaluates
7205
* while i < length: # <<<<<<<<<<<<<<
7206
* if not PyDict_Contains(groups, key):
7210
__pyx_t_2 = (__pyx_v_i < __pyx_v_length);
7211
if (!__pyx_t_2) break;
7213
/* "pandas/lib/src/tseries.pyx":791
7216
* if not PyDict_Contains(groups, key): # <<<<<<<<<<<<<<
7218
* PyDict_SetItem(groups, key, members)
7220
__pyx_t_2 = (!PyDict_Contains(((PyObject *)__pyx_v_groups), __pyx_v_key));
7223
/* "pandas/lib/src/tseries.pyx":792
7225
* if not PyDict_Contains(groups, key):
7226
* members = [idx] # <<<<<<<<<<<<<<
7227
* PyDict_SetItem(groups, key, members)
7230
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7231
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
7232
__Pyx_INCREF(__pyx_v_idx);
7233
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_idx);
7234
__Pyx_GIVEREF(__pyx_v_idx);
7235
__Pyx_DECREF(((PyObject *)__pyx_v_members));
7236
__pyx_v_members = __pyx_t_3;
7239
/* "pandas/lib/src/tseries.pyx":793
7240
* if not PyDict_Contains(groups, key):
7242
* PyDict_SetItem(groups, key, members) # <<<<<<<<<<<<<<
7246
PyDict_SetItem(((PyObject *)__pyx_v_groups), __pyx_v_key, ((PyObject *)__pyx_v_members));
7248
/* "pandas/lib/src/tseries.pyx":794
7250
* PyDict_SetItem(groups, key, members)
7251
* i += 1 # <<<<<<<<<<<<<<
7257
/* "pandas/lib/src/tseries.pyx":795
7258
* PyDict_SetItem(groups, key, members)
7260
* curKey = key # <<<<<<<<<<<<<<
7264
__Pyx_INCREF(__pyx_v_key);
7265
__Pyx_DECREF(__pyx_v_curKey);
7266
__pyx_v_curKey = __pyx_v_key;
7268
/* "pandas/lib/src/tseries.pyx":796
7271
* while i < length: # <<<<<<<<<<<<<<
7276
__pyx_t_2 = (__pyx_v_i < __pyx_v_length);
7277
if (!__pyx_t_2) break;
7279
/* "pandas/lib/src/tseries.pyx":797
7282
* if null_mask[i]: # <<<<<<<<<<<<<<
7286
__pyx_t_8 = __pyx_v_i;
7287
if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_bshape_0_null_mask;
7288
__pyx_t_9 = (*__Pyx_BufPtrStrided1d(npy_int8 *, __pyx_bstruct_null_mask.buf, __pyx_t_8, __pyx_bstride_0_null_mask));
7291
/* "pandas/lib/src/tseries.pyx":798
7294
* i += 1 # <<<<<<<<<<<<<<
7300
/* "pandas/lib/src/tseries.pyx":799
7303
* continue # <<<<<<<<<<<<<<
7307
goto __pyx_L11_continue;
7312
/* "pandas/lib/src/tseries.pyx":801
7315
* idx = index[i] # <<<<<<<<<<<<<<
7316
* key = mapped_index[i]
7319
__pyx_t_10 = __pyx_v_i;
7320
if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_bshape_0_index;
7321
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index.buf, __pyx_t_10, __pyx_bstride_0_index);
7322
__Pyx_INCREF((PyObject*)__pyx_1);
7323
__Pyx_DECREF(__pyx_v_idx);
7324
__pyx_v_idx = __pyx_1;
7327
/* "pandas/lib/src/tseries.pyx":802
7330
* key = mapped_index[i] # <<<<<<<<<<<<<<
7332
* members.append(idx)
7334
__pyx_t_11 = __pyx_v_i;
7335
if (__pyx_t_11 < 0) __pyx_t_11 += __pyx_bshape_0_mapped_index;
7336
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_mapped_index.buf, __pyx_t_11, __pyx_bstride_0_mapped_index);
7337
__Pyx_INCREF((PyObject*)__pyx_1);
7338
__Pyx_DECREF(__pyx_v_key);
7339
__pyx_v_key = __pyx_1;
7342
/* "pandas/lib/src/tseries.pyx":803
7344
* key = mapped_index[i]
7345
* if key == curKey: # <<<<<<<<<<<<<<
7346
* members.append(idx)
7349
__pyx_t_3 = PyObject_RichCompare(__pyx_v_key, __pyx_v_curKey, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7350
__Pyx_GOTREF(__pyx_t_3);
7351
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7352
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7355
/* "pandas/lib/src/tseries.pyx":804
7356
* key = mapped_index[i]
7358
* members.append(idx) # <<<<<<<<<<<<<<
7362
__pyx_t_12 = PyList_Append(((PyObject *)__pyx_v_members), __pyx_v_idx); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7364
/* "pandas/lib/src/tseries.pyx":805
7366
* members.append(idx)
7367
* i += 1 # <<<<<<<<<<<<<<
7376
/* "pandas/lib/src/tseries.pyx":807
7379
* break # <<<<<<<<<<<<<<
7381
* members = <list> PyDict_GetItem(groups, key)
7383
goto __pyx_L12_break;
7386
__pyx_L11_continue:;
7393
/* "pandas/lib/src/tseries.pyx":809
7396
* members = <list> PyDict_GetItem(groups, key) # <<<<<<<<<<<<<<
7397
* members.append(idx)
7400
__pyx_t_13 = PyDict_GetItem(((PyObject *)__pyx_v_groups), __pyx_v_key);
7401
__Pyx_INCREF(((PyObject *)((PyObject *)__pyx_t_13)));
7402
__Pyx_DECREF(((PyObject *)__pyx_v_members));
7403
__pyx_v_members = ((PyObject *)__pyx_t_13);
7405
/* "pandas/lib/src/tseries.pyx":810
7407
* members = <list> PyDict_GetItem(groups, key)
7408
* members.append(idx) # <<<<<<<<<<<<<<
7412
__pyx_t_12 = PyList_Append(((PyObject *)__pyx_v_members), __pyx_v_idx); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7414
/* "pandas/lib/src/tseries.pyx":811
7415
* members = <list> PyDict_GetItem(groups, key)
7416
* members.append(idx)
7417
* i += 1 # <<<<<<<<<<<<<<
7419
* while null_mask[i] and i < length:
7423
/* "pandas/lib/src/tseries.pyx":812
7424
* members.append(idx)
7426
* curKey = key # <<<<<<<<<<<<<<
7427
* while null_mask[i] and i < length:
7430
__Pyx_INCREF(__pyx_v_key);
7431
__Pyx_DECREF(__pyx_v_curKey);
7432
__pyx_v_curKey = __pyx_v_key;
7434
/* "pandas/lib/src/tseries.pyx":813
7437
* while null_mask[i] and i < length: # <<<<<<<<<<<<<<
7442
__pyx_t_12 = __pyx_v_i;
7443
if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_bshape_0_null_mask;
7444
if ((*__Pyx_BufPtrStrided1d(npy_int8 *, __pyx_bstruct_null_mask.buf, __pyx_t_12, __pyx_bstride_0_null_mask))) {
7445
__pyx_t_2 = (__pyx_v_i < __pyx_v_length);
7447
__pyx_t_2 = (*__Pyx_BufPtrStrided1d(npy_int8 *, __pyx_bstruct_null_mask.buf, __pyx_t_12, __pyx_bstride_0_null_mask));
7449
if (!__pyx_t_2) break;
7451
/* "pandas/lib/src/tseries.pyx":814
7453
* while null_mask[i] and i < length:
7454
* i += 1 # <<<<<<<<<<<<<<
7461
/* "pandas/lib/src/tseries.pyx":816
7464
* while i < length: # <<<<<<<<<<<<<<
7469
__pyx_t_2 = (__pyx_v_i < __pyx_v_length);
7470
if (!__pyx_t_2) break;
7472
/* "pandas/lib/src/tseries.pyx":817
7475
* if null_mask[i]: # <<<<<<<<<<<<<<
7479
__pyx_t_14 = __pyx_v_i;
7480
if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_bshape_0_null_mask;
7481
__pyx_t_9 = (*__Pyx_BufPtrStrided1d(npy_int8 *, __pyx_bstruct_null_mask.buf, __pyx_t_14, __pyx_bstride_0_null_mask));
7484
/* "pandas/lib/src/tseries.pyx":818
7487
* i += 1 # <<<<<<<<<<<<<<
7493
/* "pandas/lib/src/tseries.pyx":819
7496
* continue # <<<<<<<<<<<<<<
7500
goto __pyx_L17_continue;
7505
/* "pandas/lib/src/tseries.pyx":821
7508
* idx = index[i] # <<<<<<<<<<<<<<
7509
* key = mapped_index[i]
7512
__pyx_t_15 = __pyx_v_i;
7513
if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_bshape_0_index;
7514
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index.buf, __pyx_t_15, __pyx_bstride_0_index);
7515
__Pyx_INCREF((PyObject*)__pyx_1);
7516
__Pyx_DECREF(__pyx_v_idx);
7517
__pyx_v_idx = __pyx_1;
7520
/* "pandas/lib/src/tseries.pyx":822
7523
* key = mapped_index[i] # <<<<<<<<<<<<<<
7525
* members.append(idx)
7527
__pyx_t_16 = __pyx_v_i;
7528
if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_bshape_0_mapped_index;
7529
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_mapped_index.buf, __pyx_t_16, __pyx_bstride_0_mapped_index);
7530
__Pyx_INCREF((PyObject*)__pyx_1);
7531
__Pyx_DECREF(__pyx_v_key);
7532
__pyx_v_key = __pyx_1;
7535
/* "pandas/lib/src/tseries.pyx":823
7537
* key = mapped_index[i]
7538
* if key == curKey: # <<<<<<<<<<<<<<
7539
* members.append(idx)
7542
__pyx_t_3 = PyObject_RichCompare(__pyx_v_key, __pyx_v_curKey, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7543
__Pyx_GOTREF(__pyx_t_3);
7544
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7545
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7548
/* "pandas/lib/src/tseries.pyx":824
7549
* key = mapped_index[i]
7551
* members.append(idx) # <<<<<<<<<<<<<<
7555
__pyx_t_17 = PyList_Append(((PyObject *)__pyx_v_members), __pyx_v_idx); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7557
/* "pandas/lib/src/tseries.pyx":825
7559
* members.append(idx)
7560
* i += 1 # <<<<<<<<<<<<<<
7569
/* "pandas/lib/src/tseries.pyx":827
7572
* break # <<<<<<<<<<<<<<
7576
goto __pyx_L18_break;
7579
__pyx_L17_continue:;
7586
/* "pandas/lib/src/tseries.pyx":829
7589
* return groups # <<<<<<<<<<<<<<
7591
* @cython.boundscheck(False)
7593
__Pyx_XDECREF(__pyx_r);
7594
__Pyx_INCREF(((PyObject *)__pyx_v_groups));
7595
__pyx_r = ((PyObject *)__pyx_v_groups);
7598
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
7601
__Pyx_XDECREF(__pyx_1);
7602
__Pyx_XDECREF(__pyx_t_1);
7603
__Pyx_XDECREF(__pyx_t_3);
7604
__Pyx_XDECREF(__pyx_t_5);
7605
{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
7606
__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
7607
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
7608
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_null_mask);
7609
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_mapped_index);
7610
__Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
7611
__Pyx_AddTraceback("tseries.groupby_withnull_old");
7615
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
7616
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_null_mask);
7617
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_mapped_index);
7619
__Pyx_DECREF(__pyx_v_groups);
7620
__Pyx_DECREF(__pyx_v_idx);
7621
__Pyx_DECREF(__pyx_v_curKey);
7622
__Pyx_DECREF(__pyx_v_key);
7623
__Pyx_DECREF(__pyx_v_members);
7624
__Pyx_XDECREF((PyObject *)__pyx_v_mapped_index);
7625
__Pyx_XDECREF((PyObject *)__pyx_v_null_mask);
7626
__Pyx_DECREF(__pyx_v_bool_mask);
7627
__Pyx_DECREF(__pyx_v_null_values);
7628
__Pyx_XGIVEREF(__pyx_r);
7629
__Pyx_FinishRefcountContext();
7633
/* "pandas/lib/src/tseries.pyx":832
7635
* @cython.boundscheck(False)
7636
* def groupby_withnull(ndarray[object, ndim = 1] index, object keyfunc): # <<<<<<<<<<<<<<
7638
* cdef int length = index.shape[0]
7641
static PyObject *__pyx_pf_7tseries_groupby_withnull(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7642
static PyObject *__pyx_pf_7tseries_groupby_withnull(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7643
PyArrayObject *__pyx_v_index = 0;
7644
PyObject *__pyx_v_keyfunc = 0;
7645
PyObject *__pyx_v_groups;
7647
PyObject *__pyx_v_idx;
7648
PyObject *__pyx_v_curKey;
7649
PyObject *__pyx_v_key;
7650
PyObject *__pyx_v_members;
7651
PyArrayObject *__pyx_v_mapped_index = 0;
7652
PyArrayObject *__pyx_v_null_mask = 0;
7653
PyObject *__pyx_v_bool_mask;
7654
PyObject *__pyx_v_null_values;
7656
Py_buffer __pyx_bstruct_index;
7657
Py_ssize_t __pyx_bstride_0_index = 0;
7658
Py_ssize_t __pyx_bshape_0_index = 0;
7659
Py_buffer __pyx_bstruct_null_mask;
7660
Py_ssize_t __pyx_bstride_0_null_mask = 0;
7661
Py_ssize_t __pyx_bshape_0_null_mask = 0;
7662
Py_buffer __pyx_bstruct_mapped_index;
7663
Py_ssize_t __pyx_bstride_0_mapped_index = 0;
7664
Py_ssize_t __pyx_bshape_0_mapped_index = 0;
7665
PyObject *__pyx_r = NULL;
7666
PyObject *__pyx_1 = 0;
7667
PyObject *__pyx_t_1 = NULL;
7669
PyObject *__pyx_t_3 = NULL;
7670
PyArrayObject *__pyx_t_4 = NULL;
7671
PyObject *__pyx_t_5 = NULL;
7683
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_index,&__pyx_kp_keyfunc,0};
7684
__Pyx_SetupRefcountContext("groupby_withnull");
7685
__pyx_self = __pyx_self;
7686
if (unlikely(__pyx_kwds)) {
7687
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
7688
PyObject* values[2] = {0,0};
7689
switch (PyTuple_GET_SIZE(__pyx_args)) {
7690
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7691
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7693
default: goto __pyx_L5_argtuple_error;
7695
switch (PyTuple_GET_SIZE(__pyx_args)) {
7697
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_index);
7698
if (likely(values[0])) kw_args--;
7699
else goto __pyx_L5_argtuple_error;
7701
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_keyfunc);
7702
if (likely(values[1])) kw_args--;
7704
__Pyx_RaiseArgtupleInvalid("groupby_withnull", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
7707
if (unlikely(kw_args > 0)) {
7708
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "groupby_withnull") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
7710
__pyx_v_index = ((PyArrayObject *)values[0]);
7711
__pyx_v_keyfunc = values[1];
7712
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
7713
goto __pyx_L5_argtuple_error;
7715
__pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
7716
__pyx_v_keyfunc = PyTuple_GET_ITEM(__pyx_args, 1);
7718
goto __pyx_L4_argument_unpacking_done;
7719
__pyx_L5_argtuple_error:;
7720
__Pyx_RaiseArgtupleInvalid("groupby_withnull", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
7722
__Pyx_AddTraceback("tseries.groupby_withnull");
7724
__pyx_L4_argument_unpacking_done:;
7725
__pyx_v_groups = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
7726
__pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
7727
__pyx_v_curKey = Py_None; __Pyx_INCREF(Py_None);
7728
__pyx_v_key = Py_None; __Pyx_INCREF(Py_None);
7729
__pyx_v_members = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
7730
__pyx_v_bool_mask = Py_None; __Pyx_INCREF(Py_None);
7731
__pyx_v_null_values = Py_None; __Pyx_INCREF(Py_None);
7732
__pyx_bstruct_mapped_index.buf = NULL;
7733
__pyx_bstruct_null_mask.buf = NULL;
7734
__pyx_bstruct_index.buf = NULL;
7735
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7737
__Pyx_BufFmt_StackElem __pyx_stack[1];
7738
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7740
__pyx_bstride_0_index = __pyx_bstruct_index.strides[0];
7741
__pyx_bshape_0_index = __pyx_bstruct_index.shape[0];
7743
/* "pandas/lib/src/tseries.pyx":834
7744
* def groupby_withnull(ndarray[object, ndim = 1] index, object keyfunc):
7746
* cdef int length = index.shape[0] # <<<<<<<<<<<<<<
7748
* cdef object curKey, key
7750
__pyx_v_length = (__pyx_v_index->dimensions[0]);
7752
/* "pandas/lib/src/tseries.pyx":839
7755
* groups = PyDict_New() # <<<<<<<<<<<<<<
7757
* if length != index.shape[0]:
7759
__pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7760
__Pyx_GOTREF(__pyx_t_1);
7761
if (!(likely(PyDict_CheckExact(__pyx_t_1)) || (__pyx_t_1) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected dict, got %s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7762
__Pyx_DECREF(((PyObject *)__pyx_v_groups));
7763
__pyx_v_groups = ((PyObject *)__pyx_t_1);
7766
/* "pandas/lib/src/tseries.pyx":841
7767
* groups = PyDict_New()
7769
* if length != index.shape[0]: # <<<<<<<<<<<<<<
7770
* raise Exception('Dates and values were not the same length!')
7773
__pyx_t_2 = (__pyx_v_length != (__pyx_v_index->dimensions[0]));
7776
/* "pandas/lib/src/tseries.pyx":842
7778
* if length != index.shape[0]:
7779
* raise Exception('Dates and values were not the same length!') # <<<<<<<<<<<<<<
7781
* cdef ndarray[object, ndim=1] mapped_index = arrmap(index, keyfunc)
7783
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7784
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
7785
__Pyx_INCREF(__pyx_kp_51);
7786
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_51);
7787
__Pyx_GIVEREF(__pyx_kp_51);
7788
__pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7789
__Pyx_GOTREF(__pyx_t_3);
7790
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
7791
__Pyx_Raise(__pyx_t_3, 0, 0);
7792
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7793
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7798
/* "pandas/lib/src/tseries.pyx":844
7799
* raise Exception('Dates and values were not the same length!')
7801
* cdef ndarray[object, ndim=1] mapped_index = arrmap(index, keyfunc) # <<<<<<<<<<<<<<
7803
* cdef ndarray[npy_int8, ndim=1] null_mask = _isnullobj(mapped_index)
7805
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_arrmap); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7806
__Pyx_GOTREF(__pyx_1);
7807
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7808
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
7809
__Pyx_INCREF(((PyObject *)__pyx_v_index));
7810
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_index));
7811
__Pyx_GIVEREF(((PyObject *)__pyx_v_index));
7812
__Pyx_INCREF(__pyx_v_keyfunc);
7813
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_keyfunc);
7814
__Pyx_GIVEREF(__pyx_v_keyfunc);
7815
__pyx_t_1 = PyObject_Call(__pyx_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7816
__Pyx_GOTREF(__pyx_t_1);
7817
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
7818
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
7819
if (!(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7820
__pyx_t_4 = ((PyArrayObject *)__pyx_t_1);
7822
__Pyx_BufFmt_StackElem __pyx_stack[1];
7823
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_mapped_index, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
7824
__pyx_v_mapped_index = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_mapped_index.buf = NULL;
7825
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7826
} else {__pyx_bstride_0_mapped_index = __pyx_bstruct_mapped_index.strides[0];
7827
__pyx_bshape_0_mapped_index = __pyx_bstruct_mapped_index.shape[0];
7831
__pyx_v_mapped_index = ((PyArrayObject *)__pyx_t_1);
7834
/* "pandas/lib/src/tseries.pyx":846
7835
* cdef ndarray[object, ndim=1] mapped_index = arrmap(index, keyfunc)
7837
* cdef ndarray[npy_int8, ndim=1] null_mask = _isnullobj(mapped_index) # <<<<<<<<<<<<<<
7839
* bool_mask = null_mask.astype(bool)
7841
__pyx_t_1 = ((PyObject *)__pyx_f_7tseries__isnullobj(((PyObject *)__pyx_v_mapped_index))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7842
__Pyx_GOTREF(__pyx_t_1);
7844
__Pyx_BufFmt_StackElem __pyx_stack[1];
7845
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_null_mask, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn_npy_int8, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
7846
__pyx_v_null_mask = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_bstruct_null_mask.buf = NULL;
7847
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7848
} else {__pyx_bstride_0_null_mask = __pyx_bstruct_null_mask.strides[0];
7849
__pyx_bshape_0_null_mask = __pyx_bstruct_null_mask.shape[0];
7852
__pyx_v_null_mask = ((PyArrayObject *)__pyx_t_1);
7855
/* "pandas/lib/src/tseries.pyx":848
7856
* cdef ndarray[npy_int8, ndim=1] null_mask = _isnullobj(mapped_index)
7858
* bool_mask = null_mask.astype(bool) # <<<<<<<<<<<<<<
7860
* null_values = np.asarray(index)[bool_mask]
7862
__pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_null_mask), __pyx_kp_astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7863
__Pyx_GOTREF(__pyx_t_1);
7864
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7865
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
7866
__Pyx_INCREF(((PyObject *)((PyObject*)&PyBool_Type)));
7867
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)&PyBool_Type)));
7868
__Pyx_GIVEREF(((PyObject *)((PyObject*)&PyBool_Type)));
7869
__pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7870
__Pyx_GOTREF(__pyx_t_5);
7871
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7872
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
7873
__Pyx_DECREF(__pyx_v_bool_mask);
7874
__pyx_v_bool_mask = __pyx_t_5;
7877
/* "pandas/lib/src/tseries.pyx":850
7878
* bool_mask = null_mask.astype(bool)
7880
* null_values = np.asarray(index)[bool_mask] # <<<<<<<<<<<<<<
7882
* if null_values.any():
7884
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7885
__Pyx_GOTREF(__pyx_1);
7886
__pyx_t_5 = PyObject_GetAttr(__pyx_1, __pyx_kp_asarray); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7887
__Pyx_GOTREF(__pyx_t_5);
7888
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
7889
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7890
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
7891
__Pyx_INCREF(((PyObject *)__pyx_v_index));
7892
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_index));
7893
__Pyx_GIVEREF(((PyObject *)__pyx_v_index));
7894
__pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7895
__Pyx_GOTREF(__pyx_t_1);
7896
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7897
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
7898
__pyx_1 = PyObject_GetItem(__pyx_t_1, __pyx_v_bool_mask); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7899
__Pyx_GOTREF(__pyx_1);
7900
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7901
__Pyx_DECREF(__pyx_v_null_values);
7902
__pyx_v_null_values = __pyx_1;
7905
/* "pandas/lib/src/tseries.pyx":852
7906
* null_values = np.asarray(index)[bool_mask]
7908
* if null_values.any(): # <<<<<<<<<<<<<<
7909
* PyDict_SetItem(groups, np.NaN, null_values)
7912
__pyx_t_1 = PyObject_GetAttr(__pyx_v_null_values, __pyx_kp_any); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7913
__Pyx_GOTREF(__pyx_t_1);
7914
__pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7915
__Pyx_GOTREF(__pyx_t_3);
7916
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7917
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7918
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7921
/* "pandas/lib/src/tseries.pyx":853
7923
* if null_values.any():
7924
* PyDict_SetItem(groups, np.NaN, null_values) # <<<<<<<<<<<<<<
7928
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7929
__Pyx_GOTREF(__pyx_1);
7930
__pyx_t_3 = PyObject_GetAttr(__pyx_1, __pyx_kp_NaN); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7931
__Pyx_GOTREF(__pyx_t_3);
7932
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
7933
PyDict_SetItem(((PyObject *)__pyx_v_groups), __pyx_t_3, __pyx_v_null_values);
7934
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7939
/* "pandas/lib/src/tseries.pyx":855
7940
* PyDict_SetItem(groups, np.NaN, null_values)
7942
* cdef int i = 0 # <<<<<<<<<<<<<<
7944
* key = mapped_index[0]
7948
/* "pandas/lib/src/tseries.pyx":856
7951
* idx = index[0] # <<<<<<<<<<<<<<
7952
* key = mapped_index[0]
7956
if (__pyx_t_6 < 0) __pyx_t_6 += __pyx_bshape_0_index;
7957
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index.buf, __pyx_t_6, __pyx_bstride_0_index);
7958
__Pyx_INCREF((PyObject*)__pyx_1);
7959
__Pyx_DECREF(__pyx_v_idx);
7960
__pyx_v_idx = __pyx_1;
7963
/* "pandas/lib/src/tseries.pyx":857
7966
* key = mapped_index[0] # <<<<<<<<<<<<<<
7971
if (__pyx_t_7 < 0) __pyx_t_7 += __pyx_bshape_0_mapped_index;
7972
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_mapped_index.buf, __pyx_t_7, __pyx_bstride_0_mapped_index);
7973
__Pyx_INCREF((PyObject*)__pyx_1);
7974
__Pyx_DECREF(__pyx_v_key);
7975
__pyx_v_key = __pyx_1;
7978
/* "pandas/lib/src/tseries.pyx":863
7979
* # 'lazily' evaluates
7981
* while i < length: # <<<<<<<<<<<<<<
7982
* if key not in groups:
7986
__pyx_t_2 = (__pyx_v_i < __pyx_v_length);
7987
if (!__pyx_t_2) break;
7989
/* "pandas/lib/src/tseries.pyx":864
7992
* if key not in groups: # <<<<<<<<<<<<<<
7994
* groups[key] = members
7996
__pyx_t_2 = (!PySequence_Contains(((PyObject *)__pyx_v_groups), __pyx_v_key)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7999
/* "pandas/lib/src/tseries.pyx":865
8001
* if key not in groups:
8002
* members = [idx] # <<<<<<<<<<<<<<
8003
* groups[key] = members
8006
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8007
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
8008
__Pyx_INCREF(__pyx_v_idx);
8009
PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_idx);
8010
__Pyx_GIVEREF(__pyx_v_idx);
8011
__Pyx_DECREF(((PyObject *)__pyx_v_members));
8012
__pyx_v_members = __pyx_t_3;
8015
/* "pandas/lib/src/tseries.pyx":866
8016
* if key not in groups:
8018
* groups[key] = members # <<<<<<<<<<<<<<
8022
if (PyDict_SetItem(((PyObject *)__pyx_v_groups), __pyx_v_key, ((PyObject *)__pyx_v_members)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8024
/* "pandas/lib/src/tseries.pyx":867
8026
* groups[key] = members
8027
* i += 1 # <<<<<<<<<<<<<<
8033
/* "pandas/lib/src/tseries.pyx":868
8034
* groups[key] = members
8036
* curKey = key # <<<<<<<<<<<<<<
8040
__Pyx_INCREF(__pyx_v_key);
8041
__Pyx_DECREF(__pyx_v_curKey);
8042
__pyx_v_curKey = __pyx_v_key;
8044
/* "pandas/lib/src/tseries.pyx":869
8047
* while i < length: # <<<<<<<<<<<<<<
8052
__pyx_t_2 = (__pyx_v_i < __pyx_v_length);
8053
if (!__pyx_t_2) break;
8055
/* "pandas/lib/src/tseries.pyx":870
8058
* if null_mask[i]: # <<<<<<<<<<<<<<
8062
__pyx_t_8 = __pyx_v_i;
8063
if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_bshape_0_null_mask;
8064
__pyx_t_9 = (*__Pyx_BufPtrStrided1d(npy_int8 *, __pyx_bstruct_null_mask.buf, __pyx_t_8, __pyx_bstride_0_null_mask));
8067
/* "pandas/lib/src/tseries.pyx":871
8070
* i += 1 # <<<<<<<<<<<<<<
8076
/* "pandas/lib/src/tseries.pyx":872
8079
* continue # <<<<<<<<<<<<<<
8083
goto __pyx_L11_continue;
8088
/* "pandas/lib/src/tseries.pyx":874
8091
* idx = index[i] # <<<<<<<<<<<<<<
8092
* key = mapped_index[i]
8095
__pyx_t_10 = __pyx_v_i;
8096
if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_bshape_0_index;
8097
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index.buf, __pyx_t_10, __pyx_bstride_0_index);
8098
__Pyx_INCREF((PyObject*)__pyx_1);
8099
__Pyx_DECREF(__pyx_v_idx);
8100
__pyx_v_idx = __pyx_1;
8103
/* "pandas/lib/src/tseries.pyx":875
8106
* key = mapped_index[i] # <<<<<<<<<<<<<<
8108
* members.append(idx)
8110
__pyx_t_11 = __pyx_v_i;
8111
if (__pyx_t_11 < 0) __pyx_t_11 += __pyx_bshape_0_mapped_index;
8112
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_mapped_index.buf, __pyx_t_11, __pyx_bstride_0_mapped_index);
8113
__Pyx_INCREF((PyObject*)__pyx_1);
8114
__Pyx_DECREF(__pyx_v_key);
8115
__pyx_v_key = __pyx_1;
8118
/* "pandas/lib/src/tseries.pyx":876
8120
* key = mapped_index[i]
8121
* if key == curKey: # <<<<<<<<<<<<<<
8122
* members.append(idx)
8125
__pyx_t_3 = PyObject_RichCompare(__pyx_v_key, __pyx_v_curKey, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8126
__Pyx_GOTREF(__pyx_t_3);
8127
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8128
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8131
/* "pandas/lib/src/tseries.pyx":877
8132
* key = mapped_index[i]
8134
* members.append(idx) # <<<<<<<<<<<<<<
8138
__pyx_t_12 = PyList_Append(((PyObject *)__pyx_v_members), __pyx_v_idx); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8140
/* "pandas/lib/src/tseries.pyx":878
8142
* members.append(idx)
8143
* i += 1 # <<<<<<<<<<<<<<
8152
/* "pandas/lib/src/tseries.pyx":880
8155
* break # <<<<<<<<<<<<<<
8157
* members = <list> groups[key]
8159
goto __pyx_L12_break;
8162
__pyx_L11_continue:;
8169
/* "pandas/lib/src/tseries.pyx":882
8172
* members = <list> groups[key] # <<<<<<<<<<<<<<
8173
* members.append(idx)
8176
__pyx_1 = PyObject_GetItem(((PyObject *)__pyx_v_groups), __pyx_v_key); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8177
__Pyx_GOTREF(__pyx_1);
8178
__Pyx_INCREF(((PyObject *)((PyObject *)__pyx_1)));
8179
__Pyx_DECREF(((PyObject *)__pyx_v_members));
8180
__pyx_v_members = ((PyObject *)__pyx_1);
8181
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
8183
/* "pandas/lib/src/tseries.pyx":883
8185
* members = <list> groups[key]
8186
* members.append(idx) # <<<<<<<<<<<<<<
8190
__pyx_t_12 = PyList_Append(((PyObject *)__pyx_v_members), __pyx_v_idx); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8192
/* "pandas/lib/src/tseries.pyx":884
8193
* members = <list> groups[key]
8194
* members.append(idx)
8195
* i += 1 # <<<<<<<<<<<<<<
8197
* while null_mask[i] and i < length:
8201
/* "pandas/lib/src/tseries.pyx":885
8202
* members.append(idx)
8204
* curKey = key # <<<<<<<<<<<<<<
8205
* while null_mask[i] and i < length:
8208
__Pyx_INCREF(__pyx_v_key);
8209
__Pyx_DECREF(__pyx_v_curKey);
8210
__pyx_v_curKey = __pyx_v_key;
8212
/* "pandas/lib/src/tseries.pyx":886
8215
* while null_mask[i] and i < length: # <<<<<<<<<<<<<<
8220
__pyx_t_12 = __pyx_v_i;
8221
if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_bshape_0_null_mask;
8222
if ((*__Pyx_BufPtrStrided1d(npy_int8 *, __pyx_bstruct_null_mask.buf, __pyx_t_12, __pyx_bstride_0_null_mask))) {
8223
__pyx_t_2 = (__pyx_v_i < __pyx_v_length);
8225
__pyx_t_2 = (*__Pyx_BufPtrStrided1d(npy_int8 *, __pyx_bstruct_null_mask.buf, __pyx_t_12, __pyx_bstride_0_null_mask));
8227
if (!__pyx_t_2) break;
8229
/* "pandas/lib/src/tseries.pyx":887
8231
* while null_mask[i] and i < length:
8232
* i += 1 # <<<<<<<<<<<<<<
8239
/* "pandas/lib/src/tseries.pyx":889
8242
* while i < length: # <<<<<<<<<<<<<<
8247
__pyx_t_2 = (__pyx_v_i < __pyx_v_length);
8248
if (!__pyx_t_2) break;
8250
/* "pandas/lib/src/tseries.pyx":890
8253
* if null_mask[i]: # <<<<<<<<<<<<<<
8257
__pyx_t_13 = __pyx_v_i;
8258
if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_bshape_0_null_mask;
8259
__pyx_t_9 = (*__Pyx_BufPtrStrided1d(npy_int8 *, __pyx_bstruct_null_mask.buf, __pyx_t_13, __pyx_bstride_0_null_mask));
8262
/* "pandas/lib/src/tseries.pyx":891
8265
* i += 1 # <<<<<<<<<<<<<<
8271
/* "pandas/lib/src/tseries.pyx":892
8274
* continue # <<<<<<<<<<<<<<
8278
goto __pyx_L17_continue;
8283
/* "pandas/lib/src/tseries.pyx":894
8286
* idx = index[i] # <<<<<<<<<<<<<<
8287
* key = mapped_index[i]
8290
__pyx_t_14 = __pyx_v_i;
8291
if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_bshape_0_index;
8292
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index.buf, __pyx_t_14, __pyx_bstride_0_index);
8293
__Pyx_INCREF((PyObject*)__pyx_1);
8294
__Pyx_DECREF(__pyx_v_idx);
8295
__pyx_v_idx = __pyx_1;
8298
/* "pandas/lib/src/tseries.pyx":895
8301
* key = mapped_index[i] # <<<<<<<<<<<<<<
8303
* members.append(idx)
8305
__pyx_t_15 = __pyx_v_i;
8306
if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_bshape_0_mapped_index;
8307
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_mapped_index.buf, __pyx_t_15, __pyx_bstride_0_mapped_index);
8308
__Pyx_INCREF((PyObject*)__pyx_1);
8309
__Pyx_DECREF(__pyx_v_key);
8310
__pyx_v_key = __pyx_1;
8313
/* "pandas/lib/src/tseries.pyx":896
8315
* key = mapped_index[i]
8316
* if key == curKey: # <<<<<<<<<<<<<<
8317
* members.append(idx)
8320
__pyx_t_3 = PyObject_RichCompare(__pyx_v_key, __pyx_v_curKey, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8321
__Pyx_GOTREF(__pyx_t_3);
8322
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8323
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8326
/* "pandas/lib/src/tseries.pyx":897
8327
* key = mapped_index[i]
8329
* members.append(idx) # <<<<<<<<<<<<<<
8333
__pyx_t_16 = PyList_Append(((PyObject *)__pyx_v_members), __pyx_v_idx); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8335
/* "pandas/lib/src/tseries.pyx":898
8337
* members.append(idx)
8338
* i += 1 # <<<<<<<<<<<<<<
8347
/* "pandas/lib/src/tseries.pyx":900
8350
* break # <<<<<<<<<<<<<<
8354
goto __pyx_L18_break;
8357
__pyx_L17_continue:;
8364
/* "pandas/lib/src/tseries.pyx":902
8367
* return groups # <<<<<<<<<<<<<<
8369
* @cython.boundscheck(False)
8371
__Pyx_XDECREF(__pyx_r);
8372
__Pyx_INCREF(((PyObject *)__pyx_v_groups));
8373
__pyx_r = ((PyObject *)__pyx_v_groups);
8376
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
8379
__Pyx_XDECREF(__pyx_1);
8380
__Pyx_XDECREF(__pyx_t_1);
8381
__Pyx_XDECREF(__pyx_t_3);
8382
__Pyx_XDECREF(__pyx_t_5);
8383
{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
8384
__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
8385
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
8386
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_null_mask);
8387
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_mapped_index);
8388
__Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
8389
__Pyx_AddTraceback("tseries.groupby_withnull");
8393
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
8394
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_null_mask);
8395
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_mapped_index);
8397
__Pyx_DECREF(__pyx_v_groups);
8398
__Pyx_DECREF(__pyx_v_idx);
8399
__Pyx_DECREF(__pyx_v_curKey);
8400
__Pyx_DECREF(__pyx_v_key);
8401
__Pyx_DECREF(__pyx_v_members);
8402
__Pyx_XDECREF((PyObject *)__pyx_v_mapped_index);
8403
__Pyx_XDECREF((PyObject *)__pyx_v_null_mask);
8404
__Pyx_DECREF(__pyx_v_bool_mask);
8405
__Pyx_DECREF(__pyx_v_null_values);
8406
__Pyx_XGIVEREF(__pyx_r);
8407
__Pyx_FinishRefcountContext();
8411
/* "pandas/lib/src/tseries.pyx":905
8413
* @cython.boundscheck(False)
8414
* def groupby(ndarray[object, ndim = 1] index, object keyfunc): # <<<<<<<<<<<<<<
8416
* cdef int length = index.shape[0]
8419
static PyObject *__pyx_pf_7tseries_groupby(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8420
static PyObject *__pyx_pf_7tseries_groupby(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8421
PyArrayObject *__pyx_v_index = 0;
8422
PyObject *__pyx_v_keyfunc = 0;
8423
PyObject *__pyx_v_groups;
8425
PyObject *__pyx_v_idx;
8426
PyObject *__pyx_v_curKey;
8427
PyObject *__pyx_v_key;
8428
PyObject *__pyx_v_members;
8430
Py_buffer __pyx_bstruct_index;
8431
Py_ssize_t __pyx_bstride_0_index = 0;
8432
Py_ssize_t __pyx_bshape_0_index = 0;
8433
PyObject *__pyx_r = NULL;
8434
PyObject *__pyx_1 = 0;
8435
PyObject *__pyx_t_1 = NULL;
8437
PyObject *__pyx_t_3 = NULL;
8441
PyObject *__pyx_t_7;
8443
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_index,&__pyx_kp_keyfunc,0};
8444
__Pyx_SetupRefcountContext("groupby");
8445
__pyx_self = __pyx_self;
8446
if (unlikely(__pyx_kwds)) {
8447
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
8448
PyObject* values[2] = {0,0};
8449
switch (PyTuple_GET_SIZE(__pyx_args)) {
8450
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8451
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8453
default: goto __pyx_L5_argtuple_error;
8455
switch (PyTuple_GET_SIZE(__pyx_args)) {
8457
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_index);
8458
if (likely(values[0])) kw_args--;
8459
else goto __pyx_L5_argtuple_error;
8461
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_keyfunc);
8462
if (likely(values[1])) kw_args--;
8464
__Pyx_RaiseArgtupleInvalid("groupby", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8467
if (unlikely(kw_args > 0)) {
8468
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "groupby") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8470
__pyx_v_index = ((PyArrayObject *)values[0]);
8471
__pyx_v_keyfunc = values[1];
8472
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
8473
goto __pyx_L5_argtuple_error;
8475
__pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
8476
__pyx_v_keyfunc = PyTuple_GET_ITEM(__pyx_args, 1);
8478
goto __pyx_L4_argument_unpacking_done;
8479
__pyx_L5_argtuple_error:;
8480
__Pyx_RaiseArgtupleInvalid("groupby", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8482
__Pyx_AddTraceback("tseries.groupby");
8484
__pyx_L4_argument_unpacking_done:;
8485
__pyx_v_groups = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
8486
__pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
8487
__pyx_v_curKey = Py_None; __Pyx_INCREF(Py_None);
8488
__pyx_v_key = Py_None; __Pyx_INCREF(Py_None);
8489
__pyx_v_members = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
8490
__pyx_bstruct_index.buf = NULL;
8491
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8493
__Pyx_BufFmt_StackElem __pyx_stack[1];
8494
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8496
__pyx_bstride_0_index = __pyx_bstruct_index.strides[0];
8497
__pyx_bshape_0_index = __pyx_bstruct_index.shape[0];
8499
/* "pandas/lib/src/tseries.pyx":907
8500
* def groupby(ndarray[object, ndim = 1] index, object keyfunc):
8502
* cdef int length = index.shape[0] # <<<<<<<<<<<<<<
8504
* cdef object curKey, key
8506
__pyx_v_length = (__pyx_v_index->dimensions[0]);
8508
/* "pandas/lib/src/tseries.pyx":912
8511
* groups = PyDict_New() # <<<<<<<<<<<<<<
8513
* if length != index.shape[0]:
8515
__pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8516
__Pyx_GOTREF(__pyx_t_1);
8517
if (!(likely(PyDict_CheckExact(__pyx_t_1)) || (__pyx_t_1) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected dict, got %s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8518
__Pyx_DECREF(((PyObject *)__pyx_v_groups));
8519
__pyx_v_groups = ((PyObject *)__pyx_t_1);
8522
/* "pandas/lib/src/tseries.pyx":914
8523
* groups = PyDict_New()
8525
* if length != index.shape[0]: # <<<<<<<<<<<<<<
8526
* raise Exception('Dates and values were not the same length!')
8529
__pyx_t_2 = (__pyx_v_length != (__pyx_v_index->dimensions[0]));
8532
/* "pandas/lib/src/tseries.pyx":915
8534
* if length != index.shape[0]:
8535
* raise Exception('Dates and values were not the same length!') # <<<<<<<<<<<<<<
8539
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8540
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
8541
__Pyx_INCREF(__pyx_kp_52);
8542
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_52);
8543
__Pyx_GIVEREF(__pyx_kp_52);
8544
__pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8545
__Pyx_GOTREF(__pyx_t_3);
8546
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
8547
__Pyx_Raise(__pyx_t_3, 0, 0);
8548
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8549
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8554
/* "pandas/lib/src/tseries.pyx":917
8555
* raise Exception('Dates and values were not the same length!')
8557
* cdef int i = 0 # <<<<<<<<<<<<<<
8559
* key = keyfunc(idx)
8563
/* "pandas/lib/src/tseries.pyx":918
8566
* idx = index[i] # <<<<<<<<<<<<<<
8567
* key = keyfunc(idx)
8570
__pyx_t_4 = __pyx_v_i;
8571
if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_bshape_0_index;
8572
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index.buf, __pyx_t_4, __pyx_bstride_0_index);
8573
__Pyx_INCREF((PyObject*)__pyx_1);
8574
__Pyx_DECREF(__pyx_v_idx);
8575
__pyx_v_idx = __pyx_1;
8578
/* "pandas/lib/src/tseries.pyx":919
8581
* key = keyfunc(idx) # <<<<<<<<<<<<<<
8585
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8586
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
8587
__Pyx_INCREF(__pyx_v_idx);
8588
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_idx);
8589
__Pyx_GIVEREF(__pyx_v_idx);
8590
__pyx_t_1 = PyObject_Call(__pyx_v_keyfunc, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8591
__Pyx_GOTREF(__pyx_t_1);
8592
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
8593
__Pyx_DECREF(__pyx_v_key);
8594
__pyx_v_key = __pyx_t_1;
8597
/* "pandas/lib/src/tseries.pyx":924
8598
* # - Tries to reduce the number of calls to PyDict_GetItem, 'lazily' evaluates
8600
* while i < length: # <<<<<<<<<<<<<<
8601
* if not PyDict_Contains(groups, key):
8605
__pyx_t_2 = (__pyx_v_i < __pyx_v_length);
8606
if (!__pyx_t_2) break;
8608
/* "pandas/lib/src/tseries.pyx":925
8611
* if not PyDict_Contains(groups, key): # <<<<<<<<<<<<<<
8613
* PyDict_SetItem(groups, key, members)
8615
__pyx_t_2 = (!PyDict_Contains(((PyObject *)__pyx_v_groups), __pyx_v_key));
8618
/* "pandas/lib/src/tseries.pyx":926
8620
* if not PyDict_Contains(groups, key):
8621
* members = [idx] # <<<<<<<<<<<<<<
8622
* PyDict_SetItem(groups, key, members)
8625
__pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8626
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
8627
__Pyx_INCREF(__pyx_v_idx);
8628
PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx);
8629
__Pyx_GIVEREF(__pyx_v_idx);
8630
__Pyx_DECREF(((PyObject *)__pyx_v_members));
8631
__pyx_v_members = __pyx_t_1;
8634
/* "pandas/lib/src/tseries.pyx":927
8635
* if not PyDict_Contains(groups, key):
8637
* PyDict_SetItem(groups, key, members) # <<<<<<<<<<<<<<
8641
PyDict_SetItem(((PyObject *)__pyx_v_groups), __pyx_v_key, ((PyObject *)__pyx_v_members));
8643
/* "pandas/lib/src/tseries.pyx":928
8645
* PyDict_SetItem(groups, key, members)
8646
* i += 1 # <<<<<<<<<<<<<<
8652
/* "pandas/lib/src/tseries.pyx":929
8653
* PyDict_SetItem(groups, key, members)
8655
* curKey = key # <<<<<<<<<<<<<<
8659
__Pyx_INCREF(__pyx_v_key);
8660
__Pyx_DECREF(__pyx_v_curKey);
8661
__pyx_v_curKey = __pyx_v_key;
8663
/* "pandas/lib/src/tseries.pyx":930
8666
* while i < length: # <<<<<<<<<<<<<<
8668
* key = trycall(keyfunc, idx)
8671
__pyx_t_2 = (__pyx_v_i < __pyx_v_length);
8672
if (!__pyx_t_2) break;
8674
/* "pandas/lib/src/tseries.pyx":931
8677
* idx = index[i] # <<<<<<<<<<<<<<
8678
* key = trycall(keyfunc, idx)
8681
__pyx_t_5 = __pyx_v_i;
8682
if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_bshape_0_index;
8683
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index.buf, __pyx_t_5, __pyx_bstride_0_index);
8684
__Pyx_INCREF((PyObject*)__pyx_1);
8685
__Pyx_DECREF(__pyx_v_idx);
8686
__pyx_v_idx = __pyx_1;
8689
/* "pandas/lib/src/tseries.pyx":932
8692
* key = trycall(keyfunc, idx) # <<<<<<<<<<<<<<
8694
* members.append(idx)
8696
__pyx_t_1 = __pyx_f_7tseries_trycall(__pyx_v_keyfunc, __pyx_v_idx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8697
__Pyx_GOTREF(__pyx_t_1);
8698
__Pyx_DECREF(__pyx_v_key);
8699
__pyx_v_key = __pyx_t_1;
8702
/* "pandas/lib/src/tseries.pyx":933
8704
* key = trycall(keyfunc, idx)
8705
* if key == curKey: # <<<<<<<<<<<<<<
8706
* members.append(idx)
8709
__pyx_t_1 = PyObject_RichCompare(__pyx_v_key, __pyx_v_curKey, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8710
__Pyx_GOTREF(__pyx_t_1);
8711
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8712
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8715
/* "pandas/lib/src/tseries.pyx":934
8716
* key = trycall(keyfunc, idx)
8718
* members.append(idx) # <<<<<<<<<<<<<<
8722
__pyx_t_6 = PyList_Append(((PyObject *)__pyx_v_members), __pyx_v_idx); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8724
/* "pandas/lib/src/tseries.pyx":935
8726
* members.append(idx)
8727
* i += 1 # <<<<<<<<<<<<<<
8736
/* "pandas/lib/src/tseries.pyx":937
8739
* break # <<<<<<<<<<<<<<
8741
* members = <list> PyDict_GetItem(groups, key)
8743
goto __pyx_L11_break;
8752
/* "pandas/lib/src/tseries.pyx":939
8755
* members = <list> PyDict_GetItem(groups, key) # <<<<<<<<<<<<<<
8756
* members.append(idx)
8759
__pyx_t_7 = PyDict_GetItem(((PyObject *)__pyx_v_groups), __pyx_v_key);
8760
__Pyx_INCREF(((PyObject *)((PyObject *)__pyx_t_7)));
8761
__Pyx_DECREF(((PyObject *)__pyx_v_members));
8762
__pyx_v_members = ((PyObject *)__pyx_t_7);
8764
/* "pandas/lib/src/tseries.pyx":940
8766
* members = <list> PyDict_GetItem(groups, key)
8767
* members.append(idx) # <<<<<<<<<<<<<<
8771
__pyx_t_6 = PyList_Append(((PyObject *)__pyx_v_members), __pyx_v_idx); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8773
/* "pandas/lib/src/tseries.pyx":941
8774
* members = <list> PyDict_GetItem(groups, key)
8775
* members.append(idx)
8776
* i += 1 # <<<<<<<<<<<<<<
8782
/* "pandas/lib/src/tseries.pyx":942
8783
* members.append(idx)
8785
* curKey = key # <<<<<<<<<<<<<<
8789
__Pyx_INCREF(__pyx_v_key);
8790
__Pyx_DECREF(__pyx_v_curKey);
8791
__pyx_v_curKey = __pyx_v_key;
8793
/* "pandas/lib/src/tseries.pyx":943
8796
* while i < length: # <<<<<<<<<<<<<<
8798
* key = trycall(keyfunc, idx)
8801
__pyx_t_2 = (__pyx_v_i < __pyx_v_length);
8802
if (!__pyx_t_2) break;
8804
/* "pandas/lib/src/tseries.pyx":944
8807
* idx = index[i] # <<<<<<<<<<<<<<
8808
* key = trycall(keyfunc, idx)
8811
__pyx_t_6 = __pyx_v_i;
8812
if (__pyx_t_6 < 0) __pyx_t_6 += __pyx_bshape_0_index;
8813
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index.buf, __pyx_t_6, __pyx_bstride_0_index);
8814
__Pyx_INCREF((PyObject*)__pyx_1);
8815
__Pyx_DECREF(__pyx_v_idx);
8816
__pyx_v_idx = __pyx_1;
8819
/* "pandas/lib/src/tseries.pyx":945
8822
* key = trycall(keyfunc, idx) # <<<<<<<<<<<<<<
8824
* members.append(idx)
8826
__pyx_t_1 = __pyx_f_7tseries_trycall(__pyx_v_keyfunc, __pyx_v_idx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8827
__Pyx_GOTREF(__pyx_t_1);
8828
__Pyx_DECREF(__pyx_v_key);
8829
__pyx_v_key = __pyx_t_1;
8832
/* "pandas/lib/src/tseries.pyx":946
8834
* key = trycall(keyfunc, idx)
8835
* if key == curKey: # <<<<<<<<<<<<<<
8836
* members.append(idx)
8839
__pyx_t_1 = PyObject_RichCompare(__pyx_v_key, __pyx_v_curKey, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8840
__Pyx_GOTREF(__pyx_t_1);
8841
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8842
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8845
/* "pandas/lib/src/tseries.pyx":947
8846
* key = trycall(keyfunc, idx)
8848
* members.append(idx) # <<<<<<<<<<<<<<
8852
__pyx_t_8 = PyList_Append(((PyObject *)__pyx_v_members), __pyx_v_idx); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8854
/* "pandas/lib/src/tseries.pyx":948
8856
* members.append(idx)
8857
* i += 1 # <<<<<<<<<<<<<<
8866
/* "pandas/lib/src/tseries.pyx":950
8869
* break # <<<<<<<<<<<<<<
8873
goto __pyx_L14_break;
8882
/* "pandas/lib/src/tseries.pyx":952
8885
* return groups # <<<<<<<<<<<<<<
8887
* @cython.boundscheck(False)
8889
__Pyx_XDECREF(__pyx_r);
8890
__Pyx_INCREF(((PyObject *)__pyx_v_groups));
8891
__pyx_r = ((PyObject *)__pyx_v_groups);
8894
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
8897
__Pyx_XDECREF(__pyx_1);
8898
__Pyx_XDECREF(__pyx_t_1);
8899
__Pyx_XDECREF(__pyx_t_3);
8900
{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
8901
__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
8902
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
8903
__Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
8904
__Pyx_AddTraceback("tseries.groupby");
8908
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
8910
__Pyx_DECREF(__pyx_v_groups);
8911
__Pyx_DECREF(__pyx_v_idx);
8912
__Pyx_DECREF(__pyx_v_curKey);
8913
__Pyx_DECREF(__pyx_v_key);
8914
__Pyx_DECREF(__pyx_v_members);
8915
__Pyx_XGIVEREF(__pyx_r);
8916
__Pyx_FinishRefcountContext();
8920
/* "pandas/lib/src/tseries.pyx":955
8922
* @cython.boundscheck(False)
8923
* def groupbyfunc(ndarray[object, ndim = 1] index, # <<<<<<<<<<<<<<
8924
* ndarray[npy_float64, ndim = 1] values,
8925
* object keyfunc, object applyfunc):
8928
static PyObject *__pyx_pf_7tseries_groupbyfunc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8929
static char __pyx_doc_7tseries_groupbyfunc[] = "\n Doing this proper in Cython\n Not sure how much it will really speed things up\n ";
8930
static PyObject *__pyx_pf_7tseries_groupbyfunc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8931
PyArrayObject *__pyx_v_index = 0;
8932
PyArrayObject *__pyx_v_values = 0;
8933
PyObject *__pyx_v_keyfunc = 0;
8934
PyObject *__pyx_v_applyfunc = 0;
8935
PyObject *__pyx_v_groups;
8937
PyObject *__pyx_v_idx;
8938
PyObject *__pyx_v_curKey;
8939
PyObject *__pyx_v_key;
8940
PyObject *__pyx_v_members;
8941
PyObject *__pyx_v_grouplist;
8943
Py_buffer __pyx_bstruct_index;
8944
Py_ssize_t __pyx_bstride_0_index = 0;
8945
Py_ssize_t __pyx_bshape_0_index = 0;
8946
Py_buffer __pyx_bstruct_values;
8947
Py_ssize_t __pyx_bstride_0_values = 0;
8948
Py_ssize_t __pyx_bshape_0_values = 0;
8949
PyObject *__pyx_r = NULL;
8950
PyObject *__pyx_1 = 0;
8951
PyObject *__pyx_t_1 = NULL;
8953
PyObject *__pyx_t_3 = NULL;
8959
PyObject *__pyx_t_9;
8963
Py_ssize_t __pyx_t_13;
8964
PyObject *__pyx_t_14 = NULL;
8965
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_index,&__pyx_kp_values,&__pyx_kp_keyfunc,&__pyx_kp_applyfunc,0};
8966
__Pyx_SetupRefcountContext("groupbyfunc");
8967
__pyx_self = __pyx_self;
8968
if (unlikely(__pyx_kwds)) {
8969
Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
8970
PyObject* values[4] = {0,0,0,0};
8971
switch (PyTuple_GET_SIZE(__pyx_args)) {
8972
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8973
case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8974
case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8975
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8977
default: goto __pyx_L5_argtuple_error;
8979
switch (PyTuple_GET_SIZE(__pyx_args)) {
8981
values[0] = PyDict_GetItem(__pyx_kwds, __pyx_kp_index);
8982
if (likely(values[0])) kw_args--;
8983
else goto __pyx_L5_argtuple_error;
8985
values[1] = PyDict_GetItem(__pyx_kwds, __pyx_kp_values);
8986
if (likely(values[1])) kw_args--;
8988
__Pyx_RaiseArgtupleInvalid("groupbyfunc", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8991
values[2] = PyDict_GetItem(__pyx_kwds, __pyx_kp_keyfunc);
8992
if (likely(values[2])) kw_args--;
8994
__Pyx_RaiseArgtupleInvalid("groupbyfunc", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
8997
values[3] = PyDict_GetItem(__pyx_kwds, __pyx_kp_applyfunc);
8998
if (likely(values[3])) kw_args--;
9000
__Pyx_RaiseArgtupleInvalid("groupbyfunc", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
9003
if (unlikely(kw_args > 0)) {
9004
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "groupbyfunc") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
9006
__pyx_v_index = ((PyArrayObject *)values[0]);
9007
__pyx_v_values = ((PyArrayObject *)values[1]);
9008
__pyx_v_keyfunc = values[2];
9009
__pyx_v_applyfunc = values[3];
9010
} else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
9011
goto __pyx_L5_argtuple_error;
9013
__pyx_v_index = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 0));
9014
__pyx_v_values = ((PyArrayObject *)PyTuple_GET_ITEM(__pyx_args, 1));
9015
__pyx_v_keyfunc = PyTuple_GET_ITEM(__pyx_args, 2);
9016
__pyx_v_applyfunc = PyTuple_GET_ITEM(__pyx_args, 3);
9018
goto __pyx_L4_argument_unpacking_done;
9019
__pyx_L5_argtuple_error:;
9020
__Pyx_RaiseArgtupleInvalid("groupbyfunc", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
9022
__Pyx_AddTraceback("tseries.groupbyfunc");
9024
__pyx_L4_argument_unpacking_done:;
9025
__pyx_v_groups = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
9026
__pyx_v_idx = Py_None; __Pyx_INCREF(Py_None);
9027
__pyx_v_curKey = Py_None; __Pyx_INCREF(Py_None);
9028
__pyx_v_key = Py_None; __Pyx_INCREF(Py_None);
9029
__pyx_v_members = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
9030
__pyx_v_grouplist = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
9031
__pyx_bstruct_index.buf = NULL;
9032
__pyx_bstruct_values.buf = NULL;
9033
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9034
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9036
__Pyx_BufFmt_StackElem __pyx_stack[1];
9037
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_index, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9039
__pyx_bstride_0_index = __pyx_bstruct_index.strides[0];
9040
__pyx_bshape_0_index = __pyx_bstruct_index.shape[0];
9042
__Pyx_BufFmt_StackElem __pyx_stack[1];
9043
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_bstruct_values, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn_npy_float64, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9045
__pyx_bstride_0_values = __pyx_bstruct_values.strides[0];
9046
__pyx_bshape_0_values = __pyx_bstruct_values.shape[0];
9048
/* "pandas/lib/src/tseries.pyx":963
9051
* cdef int length = values.shape[0] # <<<<<<<<<<<<<<
9053
* cdef object curKey, key
9055
__pyx_v_length = (__pyx_v_values->dimensions[0]);
9057
/* "pandas/lib/src/tseries.pyx":968
9058
* cdef list members, grouplist
9060
* groups = PyDict_New() # <<<<<<<<<<<<<<
9062
* if length != index.shape[0]:
9064
__pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9065
__Pyx_GOTREF(__pyx_t_1);
9066
if (!(likely(PyDict_CheckExact(__pyx_t_1)) || (__pyx_t_1) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected dict, got %s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9067
__Pyx_DECREF(((PyObject *)__pyx_v_groups));
9068
__pyx_v_groups = ((PyObject *)__pyx_t_1);
9071
/* "pandas/lib/src/tseries.pyx":970
9072
* groups = PyDict_New()
9074
* if length != index.shape[0]: # <<<<<<<<<<<<<<
9075
* raise Exception('Dates and values were not the same length!')
9078
__pyx_t_2 = (__pyx_v_length != (__pyx_v_index->dimensions[0]));
9081
/* "pandas/lib/src/tseries.pyx":971
9083
* if length != index.shape[0]:
9084
* raise Exception('Dates and values were not the same length!') # <<<<<<<<<<<<<<
9088
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9089
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
9090
__Pyx_INCREF(__pyx_kp_53);
9091
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_53);
9092
__Pyx_GIVEREF(__pyx_kp_53);
9093
__pyx_t_3 = PyObject_Call(__pyx_builtin_Exception, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9094
__Pyx_GOTREF(__pyx_t_3);
9095
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
9096
__Pyx_Raise(__pyx_t_3, 0, 0);
9097
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9098
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9103
/* "pandas/lib/src/tseries.pyx":973
9104
* raise Exception('Dates and values were not the same length!')
9106
* cdef int i = 0 # <<<<<<<<<<<<<<
9108
* key = trycall(keyfunc, idx)
9112
/* "pandas/lib/src/tseries.pyx":974
9115
* idx = index[i] # <<<<<<<<<<<<<<
9116
* key = trycall(keyfunc, idx)
9119
__pyx_t_4 = __pyx_v_i;
9120
if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_bshape_0_index;
9121
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index.buf, __pyx_t_4, __pyx_bstride_0_index);
9122
__Pyx_INCREF((PyObject*)__pyx_1);
9123
__Pyx_DECREF(__pyx_v_idx);
9124
__pyx_v_idx = __pyx_1;
9127
/* "pandas/lib/src/tseries.pyx":975
9130
* key = trycall(keyfunc, idx) # <<<<<<<<<<<<<<
9134
__pyx_t_3 = __pyx_f_7tseries_trycall(__pyx_v_keyfunc, __pyx_v_idx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9135
__Pyx_GOTREF(__pyx_t_3);
9136
__Pyx_DECREF(__pyx_v_key);
9137
__pyx_v_key = __pyx_t_3;
9140
/* "pandas/lib/src/tseries.pyx":981
9141
* # 'lazily' evaluates
9143
* while i < length: # <<<<<<<<<<<<<<
9144
* if not PyDict_Contains(groups, key):
9145
* members = [values[i]]
9148
__pyx_t_2 = (__pyx_v_i < __pyx_v_length);
9149
if (!__pyx_t_2) break;
9151
/* "pandas/lib/src/tseries.pyx":982
9154
* if not PyDict_Contains(groups, key): # <<<<<<<<<<<<<<
9155
* members = [values[i]]
9156
* PyDict_SetItem(groups, key, members)
9158
__pyx_t_2 = (!PyDict_Contains(((PyObject *)__pyx_v_groups), __pyx_v_key));
9161
/* "pandas/lib/src/tseries.pyx":983
9163
* if not PyDict_Contains(groups, key):
9164
* members = [values[i]] # <<<<<<<<<<<<<<
9165
* PyDict_SetItem(groups, key, members)
9168
__pyx_t_5 = __pyx_v_i;
9169
if (__pyx_t_5 < 0) __pyx_t_5 += __pyx_bshape_0_values;
9170
__pyx_t_3 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(npy_float64 *, __pyx_bstruct_values.buf, __pyx_t_5, __pyx_bstride_0_values))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9171
__Pyx_GOTREF(__pyx_t_3);
9172
__pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9173
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
9174
PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
9175
__Pyx_GIVEREF(__pyx_t_3);
9177
__Pyx_DECREF(((PyObject *)__pyx_v_members));
9178
__pyx_v_members = __pyx_t_1;
9181
/* "pandas/lib/src/tseries.pyx":984
9182
* if not PyDict_Contains(groups, key):
9183
* members = [values[i]]
9184
* PyDict_SetItem(groups, key, members) # <<<<<<<<<<<<<<
9188
PyDict_SetItem(((PyObject *)__pyx_v_groups), __pyx_v_key, ((PyObject *)__pyx_v_members));
9190
/* "pandas/lib/src/tseries.pyx":985
9191
* members = [values[i]]
9192
* PyDict_SetItem(groups, key, members)
9193
* i += 1 # <<<<<<<<<<<<<<
9199
/* "pandas/lib/src/tseries.pyx":986
9200
* PyDict_SetItem(groups, key, members)
9202
* curKey = key # <<<<<<<<<<<<<<
9206
__Pyx_INCREF(__pyx_v_key);
9207
__Pyx_DECREF(__pyx_v_curKey);
9208
__pyx_v_curKey = __pyx_v_key;
9210
/* "pandas/lib/src/tseries.pyx":987
9213
* while i < length: # <<<<<<<<<<<<<<
9215
* key = trycall(keyfunc, idx)
9218
__pyx_t_2 = (__pyx_v_i < __pyx_v_length);
9219
if (!__pyx_t_2) break;
9221
/* "pandas/lib/src/tseries.pyx":988
9224
* idx = index[i] # <<<<<<<<<<<<<<
9225
* key = trycall(keyfunc, idx)
9228
__pyx_t_6 = __pyx_v_i;
9229
if (__pyx_t_6 < 0) __pyx_t_6 += __pyx_bshape_0_index;
9230
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index.buf, __pyx_t_6, __pyx_bstride_0_index);
9231
__Pyx_INCREF((PyObject*)__pyx_1);
9232
__Pyx_DECREF(__pyx_v_idx);
9233
__pyx_v_idx = __pyx_1;
9236
/* "pandas/lib/src/tseries.pyx":989
9239
* key = trycall(keyfunc, idx) # <<<<<<<<<<<<<<
9241
* members.append(values[i])
9243
__pyx_t_1 = __pyx_f_7tseries_trycall(__pyx_v_keyfunc, __pyx_v_idx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9244
__Pyx_GOTREF(__pyx_t_1);
9245
__Pyx_DECREF(__pyx_v_key);
9246
__pyx_v_key = __pyx_t_1;
9249
/* "pandas/lib/src/tseries.pyx":990
9251
* key = trycall(keyfunc, idx)
9252
* if key == curKey: # <<<<<<<<<<<<<<
9253
* members.append(values[i])
9256
__pyx_t_1 = PyObject_RichCompare(__pyx_v_key, __pyx_v_curKey, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9257
__Pyx_GOTREF(__pyx_t_1);
9258
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9259
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9262
/* "pandas/lib/src/tseries.pyx":991
9263
* key = trycall(keyfunc, idx)
9265
* members.append(values[i]) # <<<<<<<<<<<<<<
9269
__pyx_t_7 = __pyx_v_i;
9270
if (__pyx_t_7 < 0) __pyx_t_7 += __pyx_bshape_0_values;
9271
__pyx_t_1 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(npy_float64 *, __pyx_bstruct_values.buf, __pyx_t_7, __pyx_bstride_0_values))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9272
__Pyx_GOTREF(__pyx_t_1);
9273
__pyx_t_8 = PyList_Append(((PyObject *)__pyx_v_members), __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9274
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9276
/* "pandas/lib/src/tseries.pyx":992
9278
* members.append(values[i])
9279
* i += 1 # <<<<<<<<<<<<<<
9288
/* "pandas/lib/src/tseries.pyx":994
9291
* break # <<<<<<<<<<<<<<
9293
* members = <list> PyDict_GetItem(groups, key)
9295
goto __pyx_L11_break;
9304
/* "pandas/lib/src/tseries.pyx":996
9307
* members = <list> PyDict_GetItem(groups, key) # <<<<<<<<<<<<<<
9308
* members.append(values[i])
9311
__pyx_t_9 = PyDict_GetItem(((PyObject *)__pyx_v_groups), __pyx_v_key);
9312
__Pyx_INCREF(((PyObject *)((PyObject *)__pyx_t_9)));
9313
__Pyx_DECREF(((PyObject *)__pyx_v_members));
9314
__pyx_v_members = ((PyObject *)__pyx_t_9);
9316
/* "pandas/lib/src/tseries.pyx":997
9318
* members = <list> PyDict_GetItem(groups, key)
9319
* members.append(values[i]) # <<<<<<<<<<<<<<
9323
__pyx_t_8 = __pyx_v_i;
9324
if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_bshape_0_values;
9325
__pyx_t_1 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(npy_float64 *, __pyx_bstruct_values.buf, __pyx_t_8, __pyx_bstride_0_values))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9326
__Pyx_GOTREF(__pyx_t_1);
9327
__pyx_t_10 = PyList_Append(((PyObject *)__pyx_v_members), __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9328
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9330
/* "pandas/lib/src/tseries.pyx":998
9331
* members = <list> PyDict_GetItem(groups, key)
9332
* members.append(values[i])
9333
* i += 1 # <<<<<<<<<<<<<<
9339
/* "pandas/lib/src/tseries.pyx":999
9340
* members.append(values[i])
9342
* curKey = key # <<<<<<<<<<<<<<
9346
__Pyx_INCREF(__pyx_v_key);
9347
__Pyx_DECREF(__pyx_v_curKey);
9348
__pyx_v_curKey = __pyx_v_key;
9350
/* "pandas/lib/src/tseries.pyx":1000
9353
* while i < length: # <<<<<<<<<<<<<<
9355
* key = trycall(keyfunc, idx)
9358
__pyx_t_2 = (__pyx_v_i < __pyx_v_length);
9359
if (!__pyx_t_2) break;
9361
/* "pandas/lib/src/tseries.pyx":1001
9364
* idx = index[i] # <<<<<<<<<<<<<<
9365
* key = trycall(keyfunc, idx)
9368
__pyx_t_10 = __pyx_v_i;
9369
if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_bshape_0_index;
9370
__pyx_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_bstruct_index.buf, __pyx_t_10, __pyx_bstride_0_index);
9371
__Pyx_INCREF((PyObject*)__pyx_1);
9372
__Pyx_DECREF(__pyx_v_idx);
9373
__pyx_v_idx = __pyx_1;
9376
/* "pandas/lib/src/tseries.pyx":1002
9379
* key = trycall(keyfunc, idx) # <<<<<<<<<<<<<<
9381
* members.append(values[i])
9383
__pyx_t_1 = __pyx_f_7tseries_trycall(__pyx_v_keyfunc, __pyx_v_idx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9384
__Pyx_GOTREF(__pyx_t_1);
9385
__Pyx_DECREF(__pyx_v_key);
9386
__pyx_v_key = __pyx_t_1;
9389
/* "pandas/lib/src/tseries.pyx":1003
9391
* key = trycall(keyfunc, idx)
9392
* if key == curKey: # <<<<<<<<<<<<<<
9393
* members.append(values[i])
9396
__pyx_t_1 = PyObject_RichCompare(__pyx_v_key, __pyx_v_curKey, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9397
__Pyx_GOTREF(__pyx_t_1);
9398
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9399
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9402
/* "pandas/lib/src/tseries.pyx":1004
9403
* key = trycall(keyfunc, idx)
9405
* members.append(values[i]) # <<<<<<<<<<<<<<
9409
__pyx_t_11 = __pyx_v_i;
9410
if (__pyx_t_11 < 0) __pyx_t_11 += __pyx_bshape_0_values;
9411
__pyx_t_1 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(npy_float64 *, __pyx_bstruct_values.buf, __pyx_t_11, __pyx_bstride_0_values))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9412
__Pyx_GOTREF(__pyx_t_1);
9413
__pyx_t_12 = PyList_Append(((PyObject *)__pyx_v_members), __pyx_t_1); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9414
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9416
/* "pandas/lib/src/tseries.pyx":1005
9418
* members.append(values[i])
9419
* i += 1 # <<<<<<<<<<<<<<
9428
/* "pandas/lib/src/tseries.pyx":1007
9431
* break # <<<<<<<<<<<<<<
9433
* grouplist = PyDict_Keys(groups)
9435
goto __pyx_L14_break;
9444
/* "pandas/lib/src/tseries.pyx":1009
9447
* grouplist = PyDict_Keys(groups) # <<<<<<<<<<<<<<
9451
__pyx_t_1 = PyDict_Keys(((PyObject *)__pyx_v_groups)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9452
__Pyx_GOTREF(__pyx_t_1);
9453
if (!(likely(PyList_CheckExact(__pyx_t_1)) || (__pyx_t_1) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected list, got %s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9454
__Pyx_DECREF(((PyObject *)__pyx_v_grouplist));
9455
__pyx_v_grouplist = ((PyObject *)__pyx_t_1);
9458
/* "pandas/lib/src/tseries.pyx":1011
9459
* grouplist = PyDict_Keys(groups)
9461
* i = 0 # <<<<<<<<<<<<<<
9462
* length = len(grouplist)
9463
* for i from 0 <= i < length:
9467
/* "pandas/lib/src/tseries.pyx":1012
9470
* length = len(grouplist) # <<<<<<<<<<<<<<
9471
* for i from 0 <= i < length:
9472
* key = grouplist[i]
9474
__pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_grouplist)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9475
__pyx_v_length = __pyx_t_13;
9477
/* "pandas/lib/src/tseries.pyx":1013
9479
* length = len(grouplist)
9480
* for i from 0 <= i < length: # <<<<<<<<<<<<<<
9481
* key = grouplist[i]
9482
* members = <list> PyDict_GetItem(groups, key)
9484
__pyx_t_12 = __pyx_v_length;
9485
for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_12; __pyx_v_i++) {
9487
/* "pandas/lib/src/tseries.pyx":1014
9488
* length = len(grouplist)
9489
* for i from 0 <= i < length:
9490
* key = grouplist[i] # <<<<<<<<<<<<<<
9491
* members = <list> PyDict_GetItem(groups, key)
9492
* PyDict_SetItem(groups, key, applyfunc(np.asarray(members)))
9494
__pyx_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_grouplist), __pyx_v_i, sizeof(int), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9495
__Pyx_GOTREF(__pyx_1);
9496
__Pyx_DECREF(__pyx_v_key);
9497
__pyx_v_key = __pyx_1;
9500
/* "pandas/lib/src/tseries.pyx":1015
9501
* for i from 0 <= i < length:
9502
* key = grouplist[i]
9503
* members = <list> PyDict_GetItem(groups, key) # <<<<<<<<<<<<<<
9504
* PyDict_SetItem(groups, key, applyfunc(np.asarray(members)))
9507
__pyx_t_9 = PyDict_GetItem(((PyObject *)__pyx_v_groups), __pyx_v_key);
9508
__Pyx_INCREF(((PyObject *)((PyObject *)__pyx_t_9)));
9509
__Pyx_DECREF(((PyObject *)__pyx_v_members));
9510
__pyx_v_members = ((PyObject *)__pyx_t_9);
9512
/* "pandas/lib/src/tseries.pyx":1016
9513
* key = grouplist[i]
9514
* members = <list> PyDict_GetItem(groups, key)
9515
* PyDict_SetItem(groups, key, applyfunc(np.asarray(members))) # <<<<<<<<<<<<<<
9519
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9520
__Pyx_GOTREF(__pyx_1);
9521
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9522
__Pyx_GOTREF(__pyx_t_1);
9523
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
9524
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9525
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
9526
__Pyx_INCREF(((PyObject *)__pyx_v_members));
9527
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_members));
9528
__Pyx_GIVEREF(((PyObject *)__pyx_v_members));
9529
__pyx_t_14 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9530
__Pyx_GOTREF(__pyx_t_14);
9531
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9532
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
9533
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9534
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
9535
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_14);
9536
__Pyx_GIVEREF(__pyx_t_14);
9538
__pyx_t_14 = PyObject_Call(__pyx_v_applyfunc, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9539
__Pyx_GOTREF(__pyx_t_14);
9540
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
9541
PyDict_SetItem(((PyObject *)__pyx_v_groups), __pyx_v_key, __pyx_t_14);
9542
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
9545
/* "pandas/lib/src/tseries.pyx":1018
9546
* PyDict_SetItem(groups, key, applyfunc(np.asarray(members)))
9548
* return groups # <<<<<<<<<<<<<<
9551
__Pyx_XDECREF(__pyx_r);
9552
__Pyx_INCREF(((PyObject *)__pyx_v_groups));
9553
__pyx_r = ((PyObject *)__pyx_v_groups);
9556
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
9559
__Pyx_XDECREF(__pyx_1);
9560
__Pyx_XDECREF(__pyx_t_1);
9561
__Pyx_XDECREF(__pyx_t_3);
9562
__Pyx_XDECREF(__pyx_t_14);
9563
{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
9564
__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
9565
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
9566
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
9567
__Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
9568
__Pyx_AddTraceback("tseries.groupbyfunc");
9572
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_index);
9573
__Pyx_SafeReleaseBuffer(&__pyx_bstruct_values);
9575
__Pyx_DECREF(__pyx_v_groups);
9576
__Pyx_DECREF(__pyx_v_idx);
9577
__Pyx_DECREF(__pyx_v_curKey);
9578
__Pyx_DECREF(__pyx_v_key);
9579
__Pyx_DECREF(__pyx_v_members);
9580
__Pyx_DECREF(__pyx_v_grouplist);
9581
__Pyx_XGIVEREF(__pyx_r);
9582
__Pyx_FinishRefcountContext();
9586
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":65
9587
* # experimental exception made for __getbuffer__ and __releasebuffer__
9588
* # -- the details of this may change.
9589
* def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
9590
* # This implementation of getbuffer is geared towards Cython
9591
* # requirements, and does not yet fullfill the PEP.
9594
static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
9595
static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
9596
int __pyx_v_copy_shape;
9599
int __pyx_v_endian_detector;
9600
int __pyx_v_little_endian;
9603
PyArray_Descr *__pyx_v_descr = 0;
9605
int __pyx_v_hasfields;
9608
PyObject *__pyx_t_2 = NULL;
9609
PyObject *__pyx_t_3 = NULL;
9614
__Pyx_SetupRefcountContext("__getbuffer__");
9615
if (__pyx_v_info == NULL) return 0;
9616
__pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
9617
__Pyx_GIVEREF(__pyx_v_info->obj);
9619
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":71
9621
* cdef int copy_shape, i, ndim
9622
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
9623
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
9626
__pyx_v_endian_detector = 1;
9628
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":72
9629
* cdef int copy_shape, i, ndim
9630
* cdef int endian_detector = 1
9631
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
9633
* ndim = PyArray_NDIM(self)
9635
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
9637
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":74
9638
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
9640
* ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
9642
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
9644
__pyx_v_ndim = PyArray_NDIM(((PyArrayObject *)__pyx_v_self));
9646
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":76
9647
* ndim = PyArray_NDIM(self)
9649
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
9653
__pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
9656
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":77
9658
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
9659
* copy_shape = 1 # <<<<<<<<<<<<<<
9663
__pyx_v_copy_shape = 1;
9668
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":79
9671
* copy_shape = 0 # <<<<<<<<<<<<<<
9673
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
9675
__pyx_v_copy_shape = 0;
9679
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":81
9682
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
9683
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
9684
* raise ValueError("ndarray is not C contiguous")
9686
if (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS)) {
9688
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":82
9690
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
9691
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
9692
* raise ValueError("ndarray is not C contiguous")
9695
__pyx_t_1 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_C_CONTIGUOUS));
9697
__pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS);
9701
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":83
9702
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
9703
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
9704
* raise ValueError("ndarray is not C contiguous") # <<<<<<<<<<<<<<
9706
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
9708
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9709
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
9710
__Pyx_INCREF(__pyx_kp_1);
9711
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_1);
9712
__Pyx_GIVEREF(__pyx_kp_1);
9713
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9714
__Pyx_GOTREF(__pyx_t_3);
9715
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
9716
__Pyx_Raise(__pyx_t_3, 0, 0);
9717
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9718
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9723
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":85
9724
* raise ValueError("ndarray is not C contiguous")
9726
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
9727
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
9728
* raise ValueError("ndarray is not Fortran contiguous")
9730
if (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS)) {
9732
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":86
9734
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
9735
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
9736
* raise ValueError("ndarray is not Fortran contiguous")
9739
__pyx_t_1 = (!PyArray_CHKFLAGS(((PyArrayObject *)__pyx_v_self), NPY_F_CONTIGUOUS));
9741
__pyx_t_1 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS);
9745
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":87
9746
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
9747
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
9748
* raise ValueError("ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
9750
* info.buf = PyArray_DATA(self)
9752
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9753
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
9754
__Pyx_INCREF(__pyx_kp_2);
9755
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_2);
9756
__Pyx_GIVEREF(__pyx_kp_2);
9757
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9758
__Pyx_GOTREF(__pyx_t_2);
9759
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
9760
__Pyx_Raise(__pyx_t_2, 0, 0);
9761
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9762
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9767
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":89
9768
* raise ValueError("ndarray is not Fortran contiguous")
9770
* info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
9774
__pyx_v_info->buf = PyArray_DATA(((PyArrayObject *)__pyx_v_self));
9776
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":90
9778
* info.buf = PyArray_DATA(self)
9779
* info.ndim = ndim # <<<<<<<<<<<<<<
9781
* # Allocate new buffer for strides and shape info. This is allocated
9783
__pyx_v_info->ndim = __pyx_v_ndim;
9785
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":91
9786
* info.buf = PyArray_DATA(self)
9788
* if copy_shape: # <<<<<<<<<<<<<<
9789
* # Allocate new buffer for strides and shape info. This is allocated
9790
* # as one block, strides first.
9792
__pyx_t_4 = __pyx_v_copy_shape;
9795
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":94
9796
* # Allocate new buffer for strides and shape info. This is allocated
9797
* # as one block, strides first.
9798
* info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<<
9799
* info.shape = info.strides + ndim
9800
* for i in range(ndim):
9802
__pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * __pyx_v_ndim) * 2)));
9804
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":95
9805
* # as one block, strides first.
9806
* info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
9807
* info.shape = info.strides + ndim # <<<<<<<<<<<<<<
9808
* for i in range(ndim):
9809
* info.strides[i] = PyArray_STRIDES(self)[i]
9811
__pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
9813
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":96
9814
* info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2)
9815
* info.shape = info.strides + ndim
9816
* for i in range(ndim): # <<<<<<<<<<<<<<
9817
* info.strides[i] = PyArray_STRIDES(self)[i]
9818
* info.shape[i] = PyArray_DIMS(self)[i]
9820
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_v_ndim; __pyx_t_4+=1) {
9821
__pyx_v_i = __pyx_t_4;
9823
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":97
9824
* info.shape = info.strides + ndim
9825
* for i in range(ndim):
9826
* info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
9827
* info.shape[i] = PyArray_DIMS(self)[i]
9830
(__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(((PyArrayObject *)__pyx_v_self))[__pyx_v_i]);
9832
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":98
9833
* for i in range(ndim):
9834
* info.strides[i] = PyArray_STRIDES(self)[i]
9835
* info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
9837
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
9839
(__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(((PyArrayObject *)__pyx_v_self))[__pyx_v_i]);
9845
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":100
9846
* info.shape[i] = PyArray_DIMS(self)[i]
9848
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
9849
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
9850
* info.suboffsets = NULL
9852
__pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(((PyArrayObject *)__pyx_v_self)));
9854
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":101
9856
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
9857
* info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
9858
* info.suboffsets = NULL
9859
* info.itemsize = PyArray_ITEMSIZE(self)
9861
__pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(((PyArrayObject *)__pyx_v_self)));
9865
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":102
9866
* info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
9867
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
9868
* info.suboffsets = NULL # <<<<<<<<<<<<<<
9869
* info.itemsize = PyArray_ITEMSIZE(self)
9870
* info.readonly = not PyArray_ISWRITEABLE(self)
9872
__pyx_v_info->suboffsets = NULL;
9874
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":103
9875
* info.shape = <Py_ssize_t*>PyArray_DIMS(self)
9876
* info.suboffsets = NULL
9877
* info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
9878
* info.readonly = not PyArray_ISWRITEABLE(self)
9881
__pyx_v_info->itemsize = PyArray_ITEMSIZE(((PyArrayObject *)__pyx_v_self));
9883
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":104
9884
* info.suboffsets = NULL
9885
* info.itemsize = PyArray_ITEMSIZE(self)
9886
* info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
9890
__pyx_v_info->readonly = (!PyArray_ISWRITEABLE(((PyArrayObject *)__pyx_v_self)));
9892
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":107
9895
* cdef char* f = NULL # <<<<<<<<<<<<<<
9896
* cdef dtype descr = self.descr
9901
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":108
9903
* cdef char* f = NULL
9904
* cdef dtype descr = self.descr # <<<<<<<<<<<<<<
9908
__Pyx_INCREF(((PyObject *)((PyArrayObject *)__pyx_v_self)->descr));
9909
__pyx_v_descr = ((PyArrayObject *)__pyx_v_self)->descr;
9911
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":112
9914
* cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<<
9916
* if not hasfields and not copy_shape:
9918
__pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);
9920
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":114
9921
* cdef bint hasfields = PyDataType_HASFIELDS(descr)
9923
* if not hasfields and not copy_shape: # <<<<<<<<<<<<<<
9924
* # do not call releasebuffer
9927
if ((!__pyx_v_hasfields)) {
9928
__pyx_t_1 = (!__pyx_v_copy_shape);
9930
__pyx_t_1 = (!__pyx_v_hasfields);
9934
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":116
9935
* if not hasfields and not copy_shape:
9936
* # do not call releasebuffer
9937
* info.obj = None # <<<<<<<<<<<<<<
9939
* # need to call releasebuffer
9941
__Pyx_INCREF(Py_None);
9942
__Pyx_GIVEREF(Py_None);
9943
__Pyx_GOTREF(__pyx_v_info->obj);
9944
__Pyx_DECREF(__pyx_v_info->obj);
9945
__pyx_v_info->obj = Py_None;
9950
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":119
9952
* # need to call releasebuffer
9953
* info.obj = self # <<<<<<<<<<<<<<
9957
__Pyx_INCREF(__pyx_v_self);
9958
__Pyx_GIVEREF(__pyx_v_self);
9959
__Pyx_GOTREF(__pyx_v_info->obj);
9960
__Pyx_DECREF(__pyx_v_info->obj);
9961
__pyx_v_info->obj = __pyx_v_self;
9965
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":121
9968
* if not hasfields: # <<<<<<<<<<<<<<
9969
* t = descr.type_num
9970
* if ((descr.byteorder == '>' and little_endian) or
9972
__pyx_t_1 = (!__pyx_v_hasfields);
9975
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":122
9978
* t = descr.type_num # <<<<<<<<<<<<<<
9979
* if ((descr.byteorder == '>' and little_endian) or
9980
* (descr.byteorder == '<' and not little_endian)):
9982
__pyx_v_t = __pyx_v_descr->type_num;
9984
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":123
9986
* t = descr.type_num
9987
* if ((descr.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<<
9988
* (descr.byteorder == '<' and not little_endian)):
9989
* raise ValueError("Non-native byte order not supported")
9991
if ((__pyx_v_descr->byteorder == '>')) {
9992
__pyx_t_1 = __pyx_v_little_endian;
9994
__pyx_t_1 = (__pyx_v_descr->byteorder == '>');
9998
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":124
9999
* t = descr.type_num
10000
* if ((descr.byteorder == '>' and little_endian) or
10001
* (descr.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<<
10002
* raise ValueError("Non-native byte order not supported")
10003
* if t == NPY_BYTE: f = "b"
10005
if ((__pyx_v_descr->byteorder == '<')) {
10006
__pyx_t_5 = (!__pyx_v_little_endian);
10008
__pyx_t_5 = (__pyx_v_descr->byteorder == '<');
10010
__pyx_t_6 = __pyx_t_5;
10012
__pyx_t_6 = __pyx_t_1;
10016
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":125
10017
* if ((descr.byteorder == '>' and little_endian) or
10018
* (descr.byteorder == '<' and not little_endian)):
10019
* raise ValueError("Non-native byte order not supported") # <<<<<<<<<<<<<<
10020
* if t == NPY_BYTE: f = "b"
10021
* elif t == NPY_UBYTE: f = "B"
10023
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10024
__Pyx_GOTREF(((PyObject *)__pyx_t_2));
10025
__Pyx_INCREF(__pyx_kp_5);
10026
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_5);
10027
__Pyx_GIVEREF(__pyx_kp_5);
10028
__pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10029
__Pyx_GOTREF(__pyx_t_3);
10030
__Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
10031
__Pyx_Raise(__pyx_t_3, 0, 0);
10032
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10033
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10038
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":126
10039
* (descr.byteorder == '<' and not little_endian)):
10040
* raise ValueError("Non-native byte order not supported")
10041
* if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
10042
* elif t == NPY_UBYTE: f = "B"
10043
* elif t == NPY_SHORT: f = "h"
10045
switch (__pyx_v_t) {
10047
__pyx_v_f = __pyx_k_6;
10050
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":127
10051
* raise ValueError("Non-native byte order not supported")
10052
* if t == NPY_BYTE: f = "b"
10053
* elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
10054
* elif t == NPY_SHORT: f = "h"
10055
* elif t == NPY_USHORT: f = "H"
10058
__pyx_v_f = __pyx_k_7;
10061
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":128
10062
* if t == NPY_BYTE: f = "b"
10063
* elif t == NPY_UBYTE: f = "B"
10064
* elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
10065
* elif t == NPY_USHORT: f = "H"
10066
* elif t == NPY_INT: f = "i"
10069
__pyx_v_f = __pyx_k_8;
10072
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":129
10073
* elif t == NPY_UBYTE: f = "B"
10074
* elif t == NPY_SHORT: f = "h"
10075
* elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
10076
* elif t == NPY_INT: f = "i"
10077
* elif t == NPY_UINT: f = "I"
10080
__pyx_v_f = __pyx_k_9;
10083
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":130
10084
* elif t == NPY_SHORT: f = "h"
10085
* elif t == NPY_USHORT: f = "H"
10086
* elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
10087
* elif t == NPY_UINT: f = "I"
10088
* elif t == NPY_LONG: f = "l"
10091
__pyx_v_f = __pyx_k_10;
10094
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":131
10095
* elif t == NPY_USHORT: f = "H"
10096
* elif t == NPY_INT: f = "i"
10097
* elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
10098
* elif t == NPY_LONG: f = "l"
10099
* elif t == NPY_ULONG: f = "L"
10102
__pyx_v_f = __pyx_k_11;
10105
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":132
10106
* elif t == NPY_INT: f = "i"
10107
* elif t == NPY_UINT: f = "I"
10108
* elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
10109
* elif t == NPY_ULONG: f = "L"
10110
* elif t == NPY_LONGLONG: f = "q"
10113
__pyx_v_f = __pyx_k_12;
10116
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":133
10117
* elif t == NPY_UINT: f = "I"
10118
* elif t == NPY_LONG: f = "l"
10119
* elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
10120
* elif t == NPY_LONGLONG: f = "q"
10121
* elif t == NPY_ULONGLONG: f = "Q"
10124
__pyx_v_f = __pyx_k_13;
10127
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":134
10128
* elif t == NPY_LONG: f = "l"
10129
* elif t == NPY_ULONG: f = "L"
10130
* elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
10131
* elif t == NPY_ULONGLONG: f = "Q"
10132
* elif t == NPY_FLOAT: f = "f"
10135
__pyx_v_f = __pyx_k_14;
10138
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":135
10139
* elif t == NPY_ULONG: f = "L"
10140
* elif t == NPY_LONGLONG: f = "q"
10141
* elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
10142
* elif t == NPY_FLOAT: f = "f"
10143
* elif t == NPY_DOUBLE: f = "d"
10145
case NPY_ULONGLONG:
10146
__pyx_v_f = __pyx_k_15;
10149
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":136
10150
* elif t == NPY_LONGLONG: f = "q"
10151
* elif t == NPY_ULONGLONG: f = "Q"
10152
* elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
10153
* elif t == NPY_DOUBLE: f = "d"
10154
* elif t == NPY_LONGDOUBLE: f = "g"
10157
__pyx_v_f = __pyx_k_16;
10160
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":137
10161
* elif t == NPY_ULONGLONG: f = "Q"
10162
* elif t == NPY_FLOAT: f = "f"
10163
* elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
10164
* elif t == NPY_LONGDOUBLE: f = "g"
10165
* elif t == NPY_CFLOAT: f = "Zf"
10168
__pyx_v_f = __pyx_k_17;
10171
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":138
10172
* elif t == NPY_FLOAT: f = "f"
10173
* elif t == NPY_DOUBLE: f = "d"
10174
* elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
10175
* elif t == NPY_CFLOAT: f = "Zf"
10176
* elif t == NPY_CDOUBLE: f = "Zd"
10178
case NPY_LONGDOUBLE:
10179
__pyx_v_f = __pyx_k_18;
10182
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":139
10183
* elif t == NPY_DOUBLE: f = "d"
10184
* elif t == NPY_LONGDOUBLE: f = "g"
10185
* elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
10186
* elif t == NPY_CDOUBLE: f = "Zd"
10187
* elif t == NPY_CLONGDOUBLE: f = "Zg"
10190
__pyx_v_f = __pyx_k_19;
10193
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":140
10194
* elif t == NPY_LONGDOUBLE: f = "g"
10195
* elif t == NPY_CFLOAT: f = "Zf"
10196
* elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
10197
* elif t == NPY_CLONGDOUBLE: f = "Zg"
10198
* elif t == NPY_OBJECT: f = "O"
10201
__pyx_v_f = __pyx_k_20;
10204
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":141
10205
* elif t == NPY_CFLOAT: f = "Zf"
10206
* elif t == NPY_CDOUBLE: f = "Zd"
10207
* elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
10208
* elif t == NPY_OBJECT: f = "O"
10211
case NPY_CLONGDOUBLE:
10212
__pyx_v_f = __pyx_k_21;
10215
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":142
10216
* elif t == NPY_CDOUBLE: f = "Zd"
10217
* elif t == NPY_CLONGDOUBLE: f = "Zg"
10218
* elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
10220
* raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
10223
__pyx_v_f = __pyx_k_22;
10227
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":144
10228
* elif t == NPY_OBJECT: f = "O"
10230
* raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
10234
__pyx_t_3 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10235
__Pyx_GOTREF(__pyx_t_3);
10236
__pyx_t_2 = PyNumber_Remainder(__pyx_kp_23, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10237
__Pyx_GOTREF(__pyx_t_2);
10238
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10239
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10240
__Pyx_GOTREF(((PyObject *)__pyx_t_3));
10241
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
10242
__Pyx_GIVEREF(__pyx_t_2);
10244
__pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10245
__Pyx_GOTREF(__pyx_t_2);
10246
__Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
10247
__Pyx_Raise(__pyx_t_2, 0, 0);
10248
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10249
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10253
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":145
10255
* raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
10256
* info.format = f # <<<<<<<<<<<<<<
10260
__pyx_v_info->format = __pyx_v_f;
10262
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":146
10263
* raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
10265
* return # <<<<<<<<<<<<<<
10267
* info.format = <char*>stdlib.malloc(_buffer_format_string_len)
10275
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":148
10278
* info.format = <char*>stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
10279
* info.format[0] = '^' # Native data types, manual alignment
10282
__pyx_v_info->format = ((char *)malloc(255));
10284
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":149
10286
* info.format = <char*>stdlib.malloc(_buffer_format_string_len)
10287
* info.format[0] = '^' # Native data types, manual alignment # <<<<<<<<<<<<<<
10289
* f = _util_dtypestring(descr, info.format + 1,
10291
(__pyx_v_info->format[0]) = '^';
10293
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":150
10294
* info.format = <char*>stdlib.malloc(_buffer_format_string_len)
10295
* info.format[0] = '^' # Native data types, manual alignment
10296
* offset = 0 # <<<<<<<<<<<<<<
10297
* f = _util_dtypestring(descr, info.format + 1,
10298
* info.format + _buffer_format_string_len,
10300
__pyx_v_offset = 0;
10302
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":153
10303
* f = _util_dtypestring(descr, info.format + 1,
10304
* info.format + _buffer_format_string_len,
10305
* &offset) # <<<<<<<<<<<<<<
10306
* f[0] = 0 # Terminate format string
10309
__pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10310
__pyx_v_f = __pyx_t_7;
10312
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":154
10313
* info.format + _buffer_format_string_len,
10315
* f[0] = 0 # Terminate format string # <<<<<<<<<<<<<<
10317
* def __releasebuffer__(ndarray self, Py_buffer* info):
10319
(__pyx_v_f[0]) = 0;
10326
__Pyx_XDECREF(__pyx_t_2);
10327
__Pyx_XDECREF(__pyx_t_3);
10328
__Pyx_AddTraceback("numpy.ndarray.__getbuffer__");
10330
__Pyx_GOTREF(__pyx_v_info->obj);
10331
__Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
10334
if (__pyx_v_info->obj == Py_None) {
10335
__Pyx_GOTREF(Py_None);
10336
__Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
10339
__Pyx_XDECREF((PyObject *)__pyx_v_descr);
10340
__Pyx_FinishRefcountContext();
10344
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":156
10345
* f[0] = 0 # Terminate format string
10347
* def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
10348
* if PyArray_HASFIELDS(self):
10349
* stdlib.free(info.format)
10352
static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
10353
static void __pyx_pf_5numpy_7ndarray___releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
10356
__Pyx_SetupRefcountContext("__releasebuffer__");
10358
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":157
10360
* def __releasebuffer__(ndarray self, Py_buffer* info):
10361
* if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
10362
* stdlib.free(info.format)
10363
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
10365
__pyx_t_1 = PyArray_HASFIELDS(((PyArrayObject *)__pyx_v_self));
10368
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":158
10369
* def __releasebuffer__(ndarray self, Py_buffer* info):
10370
* if PyArray_HASFIELDS(self):
10371
* stdlib.free(info.format) # <<<<<<<<<<<<<<
10372
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
10373
* stdlib.free(info.strides)
10375
free(__pyx_v_info->format);
10380
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":159
10381
* if PyArray_HASFIELDS(self):
10382
* stdlib.free(info.format)
10383
* if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
10384
* stdlib.free(info.strides)
10385
* # info.shape was stored after info.strides in the same block
10387
__pyx_t_2 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
10390
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":160
10391
* stdlib.free(info.format)
10392
* if sizeof(npy_intp) != sizeof(Py_ssize_t):
10393
* stdlib.free(info.strides) # <<<<<<<<<<<<<<
10394
* # info.shape was stored after info.strides in the same block
10397
free(__pyx_v_info->strides);
10402
__Pyx_FinishRefcountContext();
10405
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":277
10406
* ctypedef npy_cdouble complex_t
10408
* cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
10409
* # Recursive utility function used in __getbuffer__ to get format
10410
* # string. The new location in the format string is returned.
10413
static INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
10414
PyArray_Descr *__pyx_v_child;
10415
PyObject *__pyx_v_i;
10416
int __pyx_v_endian_detector;
10417
int __pyx_v_little_endian;
10418
PyObject *__pyx_v_new_offset;
10419
PyObject *__pyx_v_t;
10421
PyObject *__pyx_1 = 0;
10422
Py_ssize_t __pyx_t_1;
10423
PyObject *__pyx_t_2 = NULL;
10424
PyObject *__pyx_t_3 = NULL;
10425
PyObject *__pyx_t_4 = NULL;
10426
PyObject *__pyx_t_5 = NULL;
10431
__Pyx_SetupRefcountContext("_util_dtypestring");
10432
__pyx_v_child = ((PyArray_Descr *)Py_None); __Pyx_INCREF(Py_None);
10433
__pyx_v_i = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
10434
__pyx_v_new_offset = Py_None; __Pyx_INCREF(Py_None);
10435
__pyx_v_t = Py_None; __Pyx_INCREF(Py_None);
10437
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":284
10438
* cdef int delta_offset
10440
* cdef int endian_detector = 1 # <<<<<<<<<<<<<<
10441
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
10444
__pyx_v_endian_detector = 1;
10446
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":285
10448
* cdef int endian_detector = 1
10449
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
10451
* for i in descr.fields.itervalues():
10453
__pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
10455
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":287
10456
* cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
10458
* for i in descr.fields.itervalues(): # <<<<<<<<<<<<<<
10460
* new_offset = i[1]
10462
__pyx_t_2 = PyObject_GetAttr(__pyx_v_descr->fields, __pyx_kp_itervalues); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10463
__Pyx_GOTREF(__pyx_t_2);
10464
__pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10465
__Pyx_GOTREF(__pyx_t_3);
10466
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10467
if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
10468
__pyx_t_1 = 0; __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
10470
__pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10471
__Pyx_GOTREF(__pyx_t_2);
10473
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10475
if (likely(PyList_CheckExact(__pyx_t_2))) {
10476
if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break;
10477
__pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++;
10478
} else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
10479
if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
10480
__pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++;
10482
__pyx_t_3 = PyIter_Next(__pyx_t_2);
10484
if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10487
__Pyx_GOTREF(__pyx_t_3);
10489
if (!(likely(PyTuple_CheckExact(__pyx_t_3)) || (__pyx_t_3) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected tuple, got %s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10490
__Pyx_DECREF(((PyObject *)__pyx_v_i));
10491
__pyx_v_i = ((PyObject *)__pyx_t_3);
10494
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":288
10496
* for i in descr.fields.itervalues():
10497
* child = i[0] # <<<<<<<<<<<<<<
10498
* new_offset = i[1]
10501
__pyx_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_i), 0, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10502
__Pyx_GOTREF(__pyx_1);
10503
if (!(__Pyx_TypeTest(__pyx_1, __pyx_ptype_5numpy_dtype))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10504
__Pyx_DECREF(((PyObject *)__pyx_v_child));
10505
__pyx_v_child = ((PyArray_Descr *)__pyx_1);
10508
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":289
10509
* for i in descr.fields.itervalues():
10511
* new_offset = i[1] # <<<<<<<<<<<<<<
10513
* if (end - f) - (new_offset - offset[0]) < 15:
10515
__pyx_1 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_i), 1, sizeof(long), PyInt_FromLong); if (!__pyx_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10516
__Pyx_GOTREF(__pyx_1);
10517
__Pyx_DECREF(__pyx_v_new_offset);
10518
__pyx_v_new_offset = __pyx_1;
10521
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":291
10522
* new_offset = i[1]
10524
* if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
10525
* raise RuntimeError("Format string allocated too short, see comment in numpy.pxd")
10528
__pyx_t_3 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10529
__Pyx_GOTREF(__pyx_t_3);
10530
__pyx_t_4 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10531
__Pyx_GOTREF(__pyx_t_4);
10532
__pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10533
__Pyx_GOTREF(__pyx_t_5);
10534
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10535
__pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10536
__Pyx_GOTREF(__pyx_t_4);
10537
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10538
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10539
__pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10540
__Pyx_GOTREF(__pyx_t_5);
10541
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10542
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10543
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10546
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":292
10548
* if (end - f) - (new_offset - offset[0]) < 15:
10549
* raise RuntimeError("Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
10551
* if ((child.byteorder == '>' and little_endian) or
10553
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10554
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
10555
__Pyx_INCREF(__pyx_kp_25);
10556
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_25);
10557
__Pyx_GIVEREF(__pyx_kp_25);
10558
__pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10559
__Pyx_GOTREF(__pyx_t_4);
10560
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
10561
__Pyx_Raise(__pyx_t_4, 0, 0);
10562
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10563
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10568
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":294
10569
* raise RuntimeError("Format string allocated too short, see comment in numpy.pxd")
10571
* if ((child.byteorder == '>' and little_endian) or # <<<<<<<<<<<<<<
10572
* (child.byteorder == '<' and not little_endian)):
10573
* raise ValueError("Non-native byte order not supported")
10575
if ((__pyx_v_child->byteorder == '>')) {
10576
__pyx_t_6 = __pyx_v_little_endian;
10578
__pyx_t_6 = (__pyx_v_child->byteorder == '>');
10582
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":295
10584
* if ((child.byteorder == '>' and little_endian) or
10585
* (child.byteorder == '<' and not little_endian)): # <<<<<<<<<<<<<<
10586
* raise ValueError("Non-native byte order not supported")
10587
* # One could encode it in the format string and have Cython
10589
if ((__pyx_v_child->byteorder == '<')) {
10590
__pyx_t_7 = (!__pyx_v_little_endian);
10592
__pyx_t_7 = (__pyx_v_child->byteorder == '<');
10594
__pyx_t_8 = __pyx_t_7;
10596
__pyx_t_8 = __pyx_t_6;
10600
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":296
10601
* if ((child.byteorder == '>' and little_endian) or
10602
* (child.byteorder == '<' and not little_endian)):
10603
* raise ValueError("Non-native byte order not supported") # <<<<<<<<<<<<<<
10604
* # One could encode it in the format string and have Cython
10605
* # complain instead, BUT: < and > in format strings also imply
10607
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10608
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
10609
__Pyx_INCREF(__pyx_kp_28);
10610
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_28);
10611
__Pyx_GIVEREF(__pyx_kp_28);
10612
__pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10613
__Pyx_GOTREF(__pyx_t_5);
10614
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
10615
__Pyx_Raise(__pyx_t_5, 0, 0);
10616
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10617
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10622
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":306
10624
* # Output padding bytes
10625
* while offset[0] < new_offset: # <<<<<<<<<<<<<<
10626
* f[0] = 120 # "x"; pad byte
10630
__pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10631
__Pyx_GOTREF(__pyx_t_5);
10632
__pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10633
__Pyx_GOTREF(__pyx_t_4);
10634
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10635
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10636
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10637
if (!__pyx_t_8) break;
10639
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":307
10640
* # Output padding bytes
10641
* while offset[0] < new_offset:
10642
* f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
10646
(__pyx_v_f[0]) = 120;
10648
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":308
10649
* while offset[0] < new_offset:
10650
* f[0] = 120 # "x"; pad byte
10651
* f += 1 # <<<<<<<<<<<<<<
10657
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":309
10658
* f[0] = 120 # "x"; pad byte
10660
* offset[0] += 1 # <<<<<<<<<<<<<<
10662
* offset[0] += child.itemsize
10664
(__pyx_v_offset[0]) += 1;
10667
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":311
10670
* offset[0] += child.itemsize # <<<<<<<<<<<<<<
10672
* if not PyDataType_HASFIELDS(child):
10674
(__pyx_v_offset[0]) += __pyx_v_child->elsize;
10676
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":313
10677
* offset[0] += child.itemsize
10679
* if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
10680
* t = child.type_num
10683
__pyx_t_8 = (!PyDataType_HASFIELDS(__pyx_v_child));
10686
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":314
10688
* if not PyDataType_HASFIELDS(child):
10689
* t = child.type_num # <<<<<<<<<<<<<<
10691
* raise RuntimeError("Format string allocated too short.")
10693
__pyx_t_4 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10694
__Pyx_GOTREF(__pyx_t_4);
10695
__Pyx_DECREF(__pyx_v_t);
10696
__pyx_v_t = __pyx_t_4;
10699
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":315
10700
* if not PyDataType_HASFIELDS(child):
10701
* t = child.type_num
10702
* if end - f < 5: # <<<<<<<<<<<<<<
10703
* raise RuntimeError("Format string allocated too short.")
10706
__pyx_t_8 = ((__pyx_v_end - __pyx_v_f) < 5);
10709
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":316
10710
* t = child.type_num
10712
* raise RuntimeError("Format string allocated too short.") # <<<<<<<<<<<<<<
10714
* # Until ticket #99 is fixed, use integers to avoid warnings
10716
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10717
__Pyx_GOTREF(((PyObject *)__pyx_t_4));
10718
__Pyx_INCREF(__pyx_kp_29);
10719
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_29);
10720
__Pyx_GIVEREF(__pyx_kp_29);
10721
__pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10722
__Pyx_GOTREF(__pyx_t_5);
10723
__Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
10724
__Pyx_Raise(__pyx_t_5, 0, 0);
10725
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10726
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10731
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":319
10733
* # Until ticket #99 is fixed, use integers to avoid warnings
10734
* if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
10735
* elif t == NPY_UBYTE: f[0] = 66 #"B"
10736
* elif t == NPY_SHORT: f[0] = 104 #"h"
10738
__pyx_t_5 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10739
__Pyx_GOTREF(__pyx_t_5);
10740
__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10741
__Pyx_GOTREF(__pyx_t_4);
10742
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10743
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10744
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10746
(__pyx_v_f[0]) = 98;
10750
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":320
10751
* # Until ticket #99 is fixed, use integers to avoid warnings
10752
* if t == NPY_BYTE: f[0] = 98 #"b"
10753
* elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
10754
* elif t == NPY_SHORT: f[0] = 104 #"h"
10755
* elif t == NPY_USHORT: f[0] = 72 #"H"
10757
__pyx_t_4 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10758
__Pyx_GOTREF(__pyx_t_4);
10759
__pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10760
__Pyx_GOTREF(__pyx_t_5);
10761
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10762
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10763
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10765
(__pyx_v_f[0]) = 66;
10769
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":321
10770
* if t == NPY_BYTE: f[0] = 98 #"b"
10771
* elif t == NPY_UBYTE: f[0] = 66 #"B"
10772
* elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
10773
* elif t == NPY_USHORT: f[0] = 72 #"H"
10774
* elif t == NPY_INT: f[0] = 105 #"i"
10776
__pyx_t_5 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10777
__Pyx_GOTREF(__pyx_t_5);
10778
__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10779
__Pyx_GOTREF(__pyx_t_4);
10780
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10781
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10782
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10784
(__pyx_v_f[0]) = 104;
10788
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":322
10789
* elif t == NPY_UBYTE: f[0] = 66 #"B"
10790
* elif t == NPY_SHORT: f[0] = 104 #"h"
10791
* elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
10792
* elif t == NPY_INT: f[0] = 105 #"i"
10793
* elif t == NPY_UINT: f[0] = 73 #"I"
10795
__pyx_t_4 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10796
__Pyx_GOTREF(__pyx_t_4);
10797
__pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10798
__Pyx_GOTREF(__pyx_t_5);
10799
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10800
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10801
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10803
(__pyx_v_f[0]) = 72;
10807
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":323
10808
* elif t == NPY_SHORT: f[0] = 104 #"h"
10809
* elif t == NPY_USHORT: f[0] = 72 #"H"
10810
* elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
10811
* elif t == NPY_UINT: f[0] = 73 #"I"
10812
* elif t == NPY_LONG: f[0] = 108 #"l"
10814
__pyx_t_5 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10815
__Pyx_GOTREF(__pyx_t_5);
10816
__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10817
__Pyx_GOTREF(__pyx_t_4);
10818
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10819
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10820
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10822
(__pyx_v_f[0]) = 105;
10826
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":324
10827
* elif t == NPY_USHORT: f[0] = 72 #"H"
10828
* elif t == NPY_INT: f[0] = 105 #"i"
10829
* elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
10830
* elif t == NPY_LONG: f[0] = 108 #"l"
10831
* elif t == NPY_ULONG: f[0] = 76 #"L"
10833
__pyx_t_4 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10834
__Pyx_GOTREF(__pyx_t_4);
10835
__pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10836
__Pyx_GOTREF(__pyx_t_5);
10837
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10838
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10839
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10841
(__pyx_v_f[0]) = 73;
10845
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":325
10846
* elif t == NPY_INT: f[0] = 105 #"i"
10847
* elif t == NPY_UINT: f[0] = 73 #"I"
10848
* elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
10849
* elif t == NPY_ULONG: f[0] = 76 #"L"
10850
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
10852
__pyx_t_5 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10853
__Pyx_GOTREF(__pyx_t_5);
10854
__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10855
__Pyx_GOTREF(__pyx_t_4);
10856
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10857
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10858
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10860
(__pyx_v_f[0]) = 108;
10864
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":326
10865
* elif t == NPY_UINT: f[0] = 73 #"I"
10866
* elif t == NPY_LONG: f[0] = 108 #"l"
10867
* elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
10868
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
10869
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
10871
__pyx_t_4 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10872
__Pyx_GOTREF(__pyx_t_4);
10873
__pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10874
__Pyx_GOTREF(__pyx_t_5);
10875
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10876
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10877
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10879
(__pyx_v_f[0]) = 76;
10883
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":327
10884
* elif t == NPY_LONG: f[0] = 108 #"l"
10885
* elif t == NPY_ULONG: f[0] = 76 #"L"
10886
* elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
10887
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
10888
* elif t == NPY_FLOAT: f[0] = 102 #"f"
10890
__pyx_t_5 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10891
__Pyx_GOTREF(__pyx_t_5);
10892
__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10893
__Pyx_GOTREF(__pyx_t_4);
10894
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10895
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10896
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10898
(__pyx_v_f[0]) = 113;
10902
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":328
10903
* elif t == NPY_ULONG: f[0] = 76 #"L"
10904
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
10905
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
10906
* elif t == NPY_FLOAT: f[0] = 102 #"f"
10907
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
10909
__pyx_t_4 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10910
__Pyx_GOTREF(__pyx_t_4);
10911
__pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10912
__Pyx_GOTREF(__pyx_t_5);
10913
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10914
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10915
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10917
(__pyx_v_f[0]) = 81;
10921
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":329
10922
* elif t == NPY_LONGLONG: f[0] = 113 #"q"
10923
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
10924
* elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
10925
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
10926
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
10928
__pyx_t_5 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10929
__Pyx_GOTREF(__pyx_t_5);
10930
__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10931
__Pyx_GOTREF(__pyx_t_4);
10932
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10933
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10934
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10936
(__pyx_v_f[0]) = 102;
10940
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":330
10941
* elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
10942
* elif t == NPY_FLOAT: f[0] = 102 #"f"
10943
* elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
10944
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
10945
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
10947
__pyx_t_4 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10948
__Pyx_GOTREF(__pyx_t_4);
10949
__pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10950
__Pyx_GOTREF(__pyx_t_5);
10951
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10952
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10953
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10955
(__pyx_v_f[0]) = 100;
10959
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":331
10960
* elif t == NPY_FLOAT: f[0] = 102 #"f"
10961
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
10962
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
10963
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
10964
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
10966
__pyx_t_5 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10967
__Pyx_GOTREF(__pyx_t_5);
10968
__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10969
__Pyx_GOTREF(__pyx_t_4);
10970
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10971
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10972
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10974
(__pyx_v_f[0]) = 103;
10978
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":332
10979
* elif t == NPY_DOUBLE: f[0] = 100 #"d"
10980
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
10981
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
10982
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
10983
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
10985
__pyx_t_4 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10986
__Pyx_GOTREF(__pyx_t_4);
10987
__pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10988
__Pyx_GOTREF(__pyx_t_5);
10989
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10990
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10991
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10993
(__pyx_v_f[0]) = 90;
10994
(__pyx_v_f[1]) = 102;
10999
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":333
11000
* elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
11001
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
11002
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
11003
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
11004
* elif t == NPY_OBJECT: f[0] = 79 #"O"
11006
__pyx_t_5 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11007
__Pyx_GOTREF(__pyx_t_5);
11008
__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11009
__Pyx_GOTREF(__pyx_t_4);
11010
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11011
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11012
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11014
(__pyx_v_f[0]) = 90;
11015
(__pyx_v_f[1]) = 100;
11020
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":334
11021
* elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
11022
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
11023
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
11024
* elif t == NPY_OBJECT: f[0] = 79 #"O"
11027
__pyx_t_4 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11028
__Pyx_GOTREF(__pyx_t_4);
11029
__pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11030
__Pyx_GOTREF(__pyx_t_5);
11031
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11032
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11033
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11035
(__pyx_v_f[0]) = 90;
11036
(__pyx_v_f[1]) = 103;
11041
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":335
11042
* elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
11043
* elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
11044
* elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
11046
* raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
11048
__pyx_t_5 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11049
__Pyx_GOTREF(__pyx_t_5);
11050
__pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11051
__Pyx_GOTREF(__pyx_t_4);
11052
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11053
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11054
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11056
(__pyx_v_f[0]) = 79;
11061
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":337
11062
* elif t == NPY_OBJECT: f[0] = 79 #"O"
11064
* raise ValueError("unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
11068
__pyx_t_4 = PyNumber_Remainder(__pyx_kp_30, __pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11069
__Pyx_GOTREF(__pyx_t_4);
11070
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11071
__Pyx_GOTREF(((PyObject *)__pyx_t_5));
11072
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
11073
__Pyx_GIVEREF(__pyx_t_4);
11075
__pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11076
__Pyx_GOTREF(__pyx_t_4);
11077
__Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
11078
__Pyx_Raise(__pyx_t_4, 0, 0);
11079
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11080
{__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11084
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":338
11086
* raise ValueError("unknown dtype code in numpy.pxd (%d)" % t)
11087
* f += 1 # <<<<<<<<<<<<<<
11089
* # Cython ignores struct boundary information ("T{...}"),
11096
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":342
11097
* # Cython ignores struct boundary information ("T{...}"),
11098
* # so don't output it
11099
* f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
11103
__pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11104
__pyx_v_f = __pyx_t_9;
11108
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11110
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/numpy.pxd":343
11111
* # so don't output it
11112
* f = _util_dtypestring(child, f, end, offset)
11113
* return f # <<<<<<<<<<<<<<
11116
__pyx_r = __pyx_v_f;
11122
__Pyx_XDECREF(__pyx_1);
11123
__Pyx_XDECREF(__pyx_t_2);
11124
__Pyx_XDECREF(__pyx_t_3);
11125
__Pyx_XDECREF(__pyx_t_4);
11126
__Pyx_XDECREF(__pyx_t_5);
11127
__Pyx_AddTraceback("numpy._util_dtypestring");
11130
__Pyx_DECREF((PyObject *)__pyx_v_child);
11131
__Pyx_DECREF(__pyx_v_i);
11132
__Pyx_DECREF(__pyx_v_new_offset);
11133
__Pyx_DECREF(__pyx_v_t);
11134
__Pyx_FinishRefcountContext();
11138
static struct PyMethodDef __pyx_methods[] = {
11139
{__Pyx_NAMESTR("map_indices"), (PyCFunction)__pyx_pf_7tseries_map_indices, METH_O, __Pyx_DOCSTR(__pyx_doc_7tseries_map_indices)},
11140
{__Pyx_NAMESTR("match"), (PyCFunction)__pyx_pf_7tseries_match, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7tseries_match)},
11141
{__Pyx_NAMESTR("reindex"), (PyCFunction)__pyx_pf_7tseries_reindex, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7tseries_reindex)},
11142
{__Pyx_NAMESTR("reindexObj"), (PyCFunction)__pyx_pf_7tseries_reindexObj, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7tseries_reindexObj)},
11143
{__Pyx_NAMESTR("reindexObject"), (PyCFunction)__pyx_pf_7tseries_reindexObject, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7tseries_reindexObject)},
11144
{__Pyx_NAMESTR("getFillVec"), (PyCFunction)__pyx_pf_7tseries_getFillVec, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
11145
{__Pyx_NAMESTR("getMergeVec"), (PyCFunction)__pyx_pf_7tseries_getMergeVec, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
11146
{__Pyx_NAMESTR("isnull"), (PyCFunction)__pyx_pf_7tseries_isnull, METH_O, __Pyx_DOCSTR(__pyx_doc_7tseries_isnull)},
11147
{__Pyx_NAMESTR("notnull"), (PyCFunction)__pyx_pf_7tseries_notnull, METH_O, __Pyx_DOCSTR(__pyx_doc_7tseries_notnull)},
11148
{__Pyx_NAMESTR("reindexNew"), (PyCFunction)__pyx_pf_7tseries_reindexNew, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7tseries_reindexNew)},
11149
{__Pyx_NAMESTR("combineFunc"), (PyCFunction)__pyx_pf_7tseries_combineFunc, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7tseries_combineFunc)},
11150
{__Pyx_NAMESTR("arrmap"), (PyCFunction)__pyx_pf_7tseries_arrmap, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
11151
{__Pyx_NAMESTR("groupby_withnull_old"), (PyCFunction)__pyx_pf_7tseries_groupby_withnull_old, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
11152
{__Pyx_NAMESTR("groupby_withnull"), (PyCFunction)__pyx_pf_7tseries_groupby_withnull, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
11153
{__Pyx_NAMESTR("groupby"), (PyCFunction)__pyx_pf_7tseries_groupby, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
11154
{__Pyx_NAMESTR("groupbyfunc"), (PyCFunction)__pyx_pf_7tseries_groupbyfunc, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_7tseries_groupbyfunc)},
11158
static void __pyx_init_filenames(void); /*proto*/
11160
#if PY_MAJOR_VERSION >= 3
11161
static struct PyModuleDef __pyx_moduledef = {
11162
PyModuleDef_HEAD_INIT,
11163
__Pyx_NAMESTR("tseries"),
11166
__pyx_methods /* m_methods */,
11167
NULL, /* m_reload */
11168
NULL, /* m_traverse */
11169
NULL, /* m_clear */
11174
static __Pyx_StringTabEntry __pyx_string_tab[] = {
11175
{&__pyx_kp___main__, __pyx_k___main__, sizeof(__pyx_k___main__), 1, 1, 1},
11176
{&__pyx_kp_index, __pyx_k_index, sizeof(__pyx_k_index), 1, 1, 1},
11177
{&__pyx_kp_A, __pyx_k_A, sizeof(__pyx_k_A), 1, 1, 1},
11178
{&__pyx_kp_B, __pyx_k_B, sizeof(__pyx_k_B), 1, 1, 1},
11179
{&__pyx_kp_arr, __pyx_k_arr, sizeof(__pyx_k_arr), 1, 1, 1},
11180
{&__pyx_kp_idxMap, __pyx_k_idxMap, sizeof(__pyx_k_idxMap), 1, 1, 1},
11181
{&__pyx_kp_oldIndex, __pyx_k_oldIndex, sizeof(__pyx_k_oldIndex), 1, 1, 1},
11182
{&__pyx_kp_newIndex, __pyx_k_newIndex, sizeof(__pyx_k_newIndex), 1, 1, 1},
11183
{&__pyx_kp_oldMap, __pyx_k_oldMap, sizeof(__pyx_k_oldMap), 1, 1, 1},
11184
{&__pyx_kp_newMap, __pyx_k_newMap, sizeof(__pyx_k_newMap), 1, 1, 1},
11185
{&__pyx_kp_kind, __pyx_k_kind, sizeof(__pyx_k_kind), 1, 1, 1},
11186
{&__pyx_kp_values, __pyx_k_values, sizeof(__pyx_k_values), 1, 1, 1},
11187
{&__pyx_kp_indexMap, __pyx_k_indexMap, sizeof(__pyx_k_indexMap), 1, 1, 1},
11188
{&__pyx_kp_input, __pyx_k_input, sizeof(__pyx_k_input), 1, 1, 1},
11189
{&__pyx_kp_name, __pyx_k_name, sizeof(__pyx_k_name), 1, 1, 1},
11190
{&__pyx_kp_ao, __pyx_k_ao, sizeof(__pyx_k_ao), 1, 1, 1},
11191
{&__pyx_kp_bo, __pyx_k_bo, sizeof(__pyx_k_bo), 1, 1, 1},
11192
{&__pyx_kp_aMap, __pyx_k_aMap, sizeof(__pyx_k_aMap), 1, 1, 1},
11193
{&__pyx_kp_bMap, __pyx_k_bMap, sizeof(__pyx_k_bMap), 1, 1, 1},
11194
{&__pyx_kp_func, __pyx_k_func, sizeof(__pyx_k_func), 1, 1, 1},
11195
{&__pyx_kp_keyfunc, __pyx_k_keyfunc, sizeof(__pyx_k_keyfunc), 1, 1, 1},
11196
{&__pyx_kp_applyfunc, __pyx_k_applyfunc, sizeof(__pyx_k_applyfunc), 1, 1, 1},
11197
{&__pyx_kp_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 1, 1, 1},
11198
{&__pyx_kp_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 1, 1},
11199
{&__pyx_kp_isnan, __pyx_k_isnan, sizeof(__pyx_k_isnan), 1, 1, 1},
11200
{&__pyx_kp_NaN, __pyx_k_NaN, sizeof(__pyx_k_NaN), 1, 1, 1},
11201
{&__pyx_kp_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 1, 1, 1},
11202
{&__pyx_kp_pydatetime, __pyx_k_pydatetime, sizeof(__pyx_k_pydatetime), 0, 1, 1},
11203
{&__pyx_kp_inf, __pyx_k_inf, sizeof(__pyx_k_inf), 1, 1, 1},
11204
{&__pyx_kp_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 1, 1, 1},
11205
{&__pyx_kp_map_indices, __pyx_k_map_indices, sizeof(__pyx_k_map_indices), 1, 1, 1},
11206
{&__pyx_kp_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 1, 1, 1},
11207
{&__pyx_kp_32, __pyx_k_32, sizeof(__pyx_k_32), 1, 1, 1},
11208
{&__pyx_kp_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 1, 1, 1},
11209
{&__pyx_kp_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 1, 1, 1},
11210
{&__pyx_kp_object_, __pyx_k_object_, sizeof(__pyx_k_object_), 1, 1, 1},
11211
{&__pyx_kp_object, __pyx_k_object, sizeof(__pyx_k_object), 1, 1, 1},
11212
{&__pyx_kp_33, __pyx_k_33, sizeof(__pyx_k_33), 1, 1, 1},
11213
{&__pyx_kp_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 1, 1, 1},
11214
{&__pyx_kp_34, __pyx_k_34, sizeof(__pyx_k_34), 1, 1, 1},
11215
{&__pyx_kp_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 1, 0},
11216
{&__pyx_kp_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 1, 0},
11217
{&__pyx_kp_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 1, 1, 1},
11218
{&__pyx_kp_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 1, 0},
11219
{&__pyx_kp_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 1, 0},
11220
{&__pyx_kp_isfinite, __pyx_k_isfinite, sizeof(__pyx_k_isfinite), 1, 1, 1},
11221
{&__pyx_kp_isnull, __pyx_k_isnull, sizeof(__pyx_k_isnull), 1, 1, 1},
11222
{&__pyx_kp_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 1, 0},
11223
{&__pyx_kp_41, __pyx_k_41, sizeof(__pyx_k_41), 0, 1, 0},
11224
{&__pyx_kp_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 1, 0},
11225
{&__pyx_kp_43, __pyx_k_43, sizeof(__pyx_k_43), 0, 1, 0},
11226
{&__pyx_kp_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 1, 0},
11227
{&__pyx_kp_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 1, 0},
11228
{&__pyx_kp_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 1, 0},
11229
{&__pyx_kp_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 1, 0},
11230
{&__pyx_kp_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 1, 0},
11231
{&__pyx_kp_arrmap, __pyx_k_arrmap, sizeof(__pyx_k_arrmap), 1, 1, 1},
11232
{&__pyx_kp_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 1, 1, 1},
11233
{&__pyx_kp_any, __pyx_k_any, sizeof(__pyx_k_any), 1, 1, 1},
11234
{&__pyx_kp_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 0},
11235
{&__pyx_kp_35, __pyx_k_35, sizeof(__pyx_k_35), 0, 0, 0},
11236
{&__pyx_kp_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 0},
11237
{&__pyx_kp_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 0},
11238
{&__pyx_kp_51, __pyx_k_51, sizeof(__pyx_k_51), 0, 0, 0},
11239
{&__pyx_kp_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 0},
11240
{&__pyx_kp_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 0},
11241
{&__pyx_kp___getbuffer__, __pyx_k___getbuffer__, sizeof(__pyx_k___getbuffer__), 1, 1, 1},
11242
{&__pyx_kp___releasebuffer__, __pyx_k___releasebuffer__, sizeof(__pyx_k___releasebuffer__), 1, 1, 1},
11243
{&__pyx_kp_info, __pyx_k_info, sizeof(__pyx_k_info), 1, 1, 1},
11244
{&__pyx_kp_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 1, 1, 1},
11245
{&__pyx_kp_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 1, 1, 1},
11246
{&__pyx_kp_range, __pyx_k_range, sizeof(__pyx_k_range), 1, 1, 1},
11247
{&__pyx_kp_itervalues, __pyx_k_itervalues, sizeof(__pyx_k_itervalues), 1, 1, 1},
11248
{&__pyx_kp_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 1, 1, 1},
11249
{&__pyx_kp_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 0},
11250
{&__pyx_kp_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 0},
11251
{&__pyx_kp_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 0},
11252
{&__pyx_kp_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 0},
11253
{&__pyx_kp_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 0},
11254
{&__pyx_kp_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 0},
11255
{&__pyx_kp_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 0},
11256
{&__pyx_kp_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 0},
11259
static int __Pyx_InitCachedBuiltins(void) {
11260
__pyx_builtin_Exception = __Pyx_GetName(__pyx_b, __pyx_kp_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11261
__pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_kp_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11262
__pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_kp_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11263
__pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_kp_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11264
__pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_kp_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11270
static int __Pyx_InitGlobals(void) {
11271
__pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
11272
__pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
11273
if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
11279
#if PY_MAJOR_VERSION < 3
11280
PyMODINIT_FUNC inittseries(void); /*proto*/
11281
PyMODINIT_FUNC inittseries(void)
11283
PyMODINIT_FUNC PyInit_tseries(void); /*proto*/
11284
PyMODINIT_FUNC PyInit_tseries(void)
11287
PyObject *__pyx_1 = 0;
11288
PyObject *__pyx_2 = 0;
11289
PyObject *__pyx_t_1 = NULL;
11291
#ifdef CYTHON_REFNANNY
11292
void* __pyx_refchk = NULL;
11293
__Pyx_Refnanny = __Pyx_ImportRefcountAPI("refnanny");
11294
if (!__Pyx_Refnanny) {
11296
__Pyx_Refnanny = __Pyx_ImportRefcountAPI("Cython.Runtime.refnanny");
11297
if (!__Pyx_Refnanny)
11298
Py_FatalError("failed to import refnanny module");
11300
__pyx_refchk = __Pyx_Refnanny->NewContext("PyMODINIT_FUNC PyInit_tseries(void)", __LINE__, __FILE__);
11302
__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11303
/*--- Library function declarations ---*/
11304
__pyx_init_filenames();
11305
/*--- Threads initialization code ---*/
11306
#if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
11307
#ifdef WITH_THREAD /* Python build with threading support? */
11308
PyEval_InitThreads();
11311
/*--- Initialize various global constants etc. ---*/
11312
if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11313
/*--- Module creation code ---*/
11314
#if PY_MAJOR_VERSION < 3
11315
__pyx_m = Py_InitModule4(__Pyx_NAMESTR("tseries"), __pyx_methods, 0, 0, PYTHON_API_VERSION);
11317
__pyx_m = PyModule_Create(&__pyx_moduledef);
11319
if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
11320
#if PY_MAJOR_VERSION < 3
11321
Py_INCREF(__pyx_m);
11323
__pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
11324
if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
11325
if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
11326
if (__pyx_module_is_main_tseries) {
11327
if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_kp___main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
11329
/*--- Builtin init code ---*/
11330
if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11331
__pyx_skip_dispatch = 0;
11332
/*--- Global init code ---*/
11333
/*--- Function export code ---*/
11334
/*--- Type init code ---*/
11335
__pyx_ptype_7tseries_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr)); if (unlikely(!__pyx_ptype_7tseries_dtype)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11336
__pyx_ptype_7tseries_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject)); if (unlikely(!__pyx_ptype_7tseries_ndarray)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11337
__pyx_ptype_7tseries_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject)); if (unlikely(!__pyx_ptype_7tseries_flatiter)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11338
__pyx_ptype_7tseries_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject)); if (unlikely(!__pyx_ptype_7tseries_broadcast)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11339
__pyx_ptype_7tseries_datetime = __Pyx_ImportType("datetime", "datetime", sizeof(PyDateTime_DateTime)); if (unlikely(!__pyx_ptype_7tseries_datetime)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11340
/*--- Type import code ---*/
11341
__pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr)); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11342
__pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject)); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11343
/*--- Function import code ---*/
11344
/*--- Execution code ---*/
11346
/* "pandas/lib/src/tseries.pyx":6
11348
* # initialize numpy
11349
* import_array() # <<<<<<<<<<<<<<
11351
* import numpy as np
11355
/* "pandas/lib/src/tseries.pyx":8
11358
* import numpy as np # <<<<<<<<<<<<<<
11359
* cimport numpy as np
11362
__pyx_1 = __Pyx_Import(__pyx_kp_numpy, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11363
__Pyx_GOTREF(__pyx_1);
11364
if (PyObject_SetAttr(__pyx_m, __pyx_kp_np, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11365
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
11367
/* "pandas/lib/src/tseries.pyx":11
11368
* cimport numpy as np
11370
* isnan = np.isnan # <<<<<<<<<<<<<<
11371
* cdef double NaN = <double> np.NaN
11374
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11375
__Pyx_GOTREF(__pyx_1);
11376
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_isnan); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11377
__Pyx_GOTREF(__pyx_t_1);
11378
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
11379
if (PyObject_SetAttr(__pyx_m, __pyx_kp_isnan, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11380
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11382
/* "pandas/lib/src/tseries.pyx":12
11385
* cdef double NaN = <double> np.NaN # <<<<<<<<<<<<<<
11387
* from datetime import datetime as pydatetime
11389
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11390
__Pyx_GOTREF(__pyx_1);
11391
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_NaN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11392
__Pyx_GOTREF(__pyx_t_1);
11393
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
11394
__pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11395
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11396
__pyx_v_7tseries_NaN = ((double)__pyx_t_2);
11398
/* "pandas/lib/src/tseries.pyx":14
11399
* cdef double NaN = <double> np.NaN
11401
* from datetime import datetime as pydatetime # <<<<<<<<<<<<<<
11403
* from python_dict cimport *
11405
__pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11406
__Pyx_GOTREF(((PyObject *)__pyx_t_1));
11407
__Pyx_INCREF(__pyx_kp_datetime);
11408
PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_datetime);
11409
__Pyx_GIVEREF(__pyx_kp_datetime);
11410
__pyx_1 = __Pyx_Import(__pyx_kp_datetime, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11411
__Pyx_GOTREF(__pyx_1);
11412
__Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
11413
__pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_datetime); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11414
__Pyx_GOTREF(__pyx_2);
11415
if (PyObject_SetAttr(__pyx_m, __pyx_kp_pydatetime, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11416
__Pyx_DECREF(__pyx_2); __pyx_2 = 0;
11417
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
11419
/* "pandas/lib/src/tseries.pyx":547
11420
* return fillVec, maskVec.astype(np.bool)
11422
* cdef double INF = <double> np.inf # <<<<<<<<<<<<<<
11423
* cdef double NEGINF = -INF
11426
__pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_np); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11427
__Pyx_GOTREF(__pyx_1);
11428
__pyx_t_1 = PyObject_GetAttr(__pyx_1, __pyx_kp_inf); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11429
__Pyx_GOTREF(__pyx_t_1);
11430
__Pyx_DECREF(__pyx_1); __pyx_1 = 0;
11431
__pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11432
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11433
__pyx_v_7tseries_INF = ((double)__pyx_t_2);
11435
/* "pandas/lib/src/tseries.pyx":548
11437
* cdef double INF = <double> np.inf
11438
* cdef double NEGINF = -INF # <<<<<<<<<<<<<<
11440
* cdef inline _checknull(object val):
11442
__pyx_v_7tseries_NEGINF = (-__pyx_v_7tseries_INF);
11444
/* "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Cython-0.11.2-py2.5-macosx-10.3-i386.egg/Cython/Includes/stdlib.pxd":2
11446
* cdef extern from "stdlib.h" nogil: # <<<<<<<<<<<<<<
11447
* void free(void *ptr)
11448
* void *malloc(size_t size)
11452
__Pyx_XDECREF(__pyx_1);
11453
__Pyx_XDECREF(__pyx_2);
11454
__Pyx_XDECREF(__pyx_t_1);
11455
__Pyx_AddTraceback("tseries");
11456
Py_DECREF(__pyx_m); __pyx_m = 0;
11458
__Pyx_FinishRefcountContext();
11459
#if PY_MAJOR_VERSION < 3
11466
static const char *__pyx_filenames[] = {
11473
/* Runtime support code */
11475
static void __pyx_init_filenames(void) {
11476
__pyx_f = __pyx_filenames;
11479
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
11480
PyObject *tmp_type, *tmp_value, *tmp_tb;
11481
PyThreadState *tstate = PyThreadState_GET();
11482
*type = tstate->curexc_type;
11483
*value = tstate->curexc_value;
11484
*tb = tstate->curexc_traceback;
11485
tstate->curexc_type = 0;
11486
tstate->curexc_value = 0;
11487
tstate->curexc_traceback = 0;
11488
PyErr_NormalizeException(type, value, tb);
11489
if (PyErr_Occurred())
11494
tmp_type = tstate->exc_type;
11495
tmp_value = tstate->exc_value;
11496
tmp_tb = tstate->exc_traceback;
11497
tstate->exc_type = *type;
11498
tstate->exc_value = *value;
11499
tstate->exc_traceback = *tb;
11500
/* Make sure tstate is in a consistent state when we XDECREF
11501
these objects (XDECREF may run arbitrary code). */
11502
Py_XDECREF(tmp_type);
11503
Py_XDECREF(tmp_value);
11504
Py_XDECREF(tmp_tb);
11508
Py_XDECREF(*value);
11514
static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
11516
PyErr_Format(PyExc_SystemError, "Missing type object");
11519
if (obj == Py_None || PyObject_TypeCheck(obj, type))
11521
PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s",
11522
Py_TYPE(obj)->tp_name, type->tp_name);
11526
static void __Pyx_RaiseDoubleKeywordsError(
11527
const char* func_name,
11530
PyErr_Format(PyExc_TypeError,
11531
#if PY_MAJOR_VERSION >= 3
11532
"%s() got multiple values for keyword argument '%U'", func_name, kw_name);
11534
"%s() got multiple values for keyword argument '%s'", func_name,
11535
PyString_AS_STRING(kw_name));
11539
static void __Pyx_RaiseArgtupleInvalid(
11540
const char* func_name,
11542
Py_ssize_t num_min,
11543
Py_ssize_t num_max,
11544
Py_ssize_t num_found)
11546
Py_ssize_t num_expected;
11547
const char *number, *more_or_less;
11549
if (num_found < num_min) {
11550
num_expected = num_min;
11551
more_or_less = "at least";
11553
num_expected = num_max;
11554
more_or_less = "at most";
11557
more_or_less = "exactly";
11559
number = (num_expected == 1) ? "" : "s";
11560
PyErr_Format(PyExc_TypeError,
11561
#if PY_VERSION_HEX < 0x02050000
11562
"%s() takes %s %d positional argument%s (%d given)",
11564
"%s() takes %s %zd positional argument%s (%zd given)",
11566
func_name, more_or_less, num_expected, number, num_found);
11569
static int __Pyx_ParseOptionalKeywords(
11571
PyObject **argnames[],
11573
PyObject *values[],
11574
Py_ssize_t num_pos_args,
11575
const char* function_name)
11577
PyObject *key = 0, *value = 0;
11578
Py_ssize_t pos = 0;
11580
PyObject*** first_kw_arg = argnames + num_pos_args;
11582
while (PyDict_Next(kwds, &pos, &key, &value)) {
11583
name = first_kw_arg;
11584
while (*name && (**name != key)) name++;
11586
values[name-argnames] = value;
11588
#if PY_MAJOR_VERSION < 3
11589
if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
11591
if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
11593
goto invalid_keyword_type;
11595
for (name = first_kw_arg; *name; name++) {
11596
#if PY_MAJOR_VERSION >= 3
11597
if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
11598
PyUnicode_Compare(**name, key) == 0) break;
11600
if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
11601
_PyString_Eq(**name, key)) break;
11605
values[name-argnames] = value;
11607
/* unexpected keyword found */
11608
for (name=argnames; name != first_kw_arg; name++) {
11609
if (**name == key) goto arg_passed_twice;
11610
#if PY_MAJOR_VERSION >= 3
11611
if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
11612
PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
11614
if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
11615
_PyString_Eq(**name, key)) goto arg_passed_twice;
11619
if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
11621
goto invalid_keyword;
11629
__Pyx_RaiseDoubleKeywordsError(function_name, **name);
11631
invalid_keyword_type:
11632
PyErr_Format(PyExc_TypeError,
11633
"%s() keywords must be strings", function_name);
11636
PyErr_Format(PyExc_TypeError,
11637
#if PY_MAJOR_VERSION < 3
11638
"%s() got an unexpected keyword argument '%s'",
11639
function_name, PyString_AsString(key));
11641
"%s() got an unexpected keyword argument '%U'",
11642
function_name, key);
11648
static INLINE int __Pyx_IsLittleEndian(void) {
11649
unsigned int n = 1;
11650
return *(unsigned char*)(&n) != 0;
11654
__Pyx_StructField root;
11655
__Pyx_BufFmt_StackElem* head;
11657
int new_count, enc_count;
11661
} __Pyx_BufFmt_Context;
11663
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
11664
__Pyx_BufFmt_StackElem* stack,
11665
__Pyx_TypeInfo* type) {
11666
stack[0].field = &ctx->root;
11667
stack[0].parent_offset = 0;
11668
ctx->root.type = type;
11669
ctx->root.name = "buffer dtype";
11670
ctx->root.offset = 0;
11672
ctx->head->field = &ctx->root;
11673
ctx->fmt_offset = 0;
11674
ctx->head->parent_offset = 0;
11675
ctx->packmode = '@';
11676
ctx->new_count = 1;
11677
ctx->enc_count = 0;
11679
ctx->is_complex = 0;
11680
while (type->typegroup == 'S') {
11682
ctx->head->field = type->fields;
11683
ctx->head->parent_offset = 0;
11684
type = type->fields->type;
11688
static int __Pyx_BufFmt_ParseNumber(const char** ts) {
11690
const char* t = *ts;
11691
if (*t < '0' || *t > '9') {
11694
count = *t++ - '0';
11695
while (*t >= '0' && *t < '9') {
11697
count += *t++ - '0';
11704
static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
11705
char msg[] = {ch, 0};
11706
PyErr_Format(PyExc_ValueError, "Unexpected format string character: '%s'", msg);
11709
static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
11711
case 'b': return "'char'";
11712
case 'B': return "'unsigned char'";
11713
case 'h': return "'short'";
11714
case 'H': return "'unsigned short'";
11715
case 'i': return "'int'";
11716
case 'I': return "'unsigned int'";
11717
case 'l': return "'long'";
11718
case 'L': return "'unsigned long'";
11719
case 'q': return "'long long'";
11720
case 'Q': return "'unsigned long long'";
11721
case 'f': return (is_complex ? "'complex float'" : "'float'");
11722
case 'd': return (is_complex ? "'complex double'" : "'double'");
11723
case 'g': return (is_complex ? "'complex long double'" : "'long double'");
11724
case 'T': return "a struct";
11725
case 'O': return "Python object";
11726
case 'P': return "a pointer";
11727
case 0: return "end";
11728
default: return "unparseable format string";
11732
static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
11734
case '?': case 'c': case 'b': case 'B': return 1;
11735
case 'h': case 'H': return 2;
11736
case 'i': case 'I': case 'l': case 'L': return 4;
11737
case 'q': case 'Q': return 8;
11738
case 'f': return (is_complex ? 8 : 4);
11739
case 'd': return (is_complex ? 16 : 8);
11741
PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
11744
case 'O': case 'P': return sizeof(void*);
11746
__Pyx_BufFmt_RaiseUnexpectedChar(ch);
11751
static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
11753
case 'c': case 'b': case 'B': return 1;
11754
case 'h': case 'H': return sizeof(short);
11755
case 'i': case 'I': return sizeof(int);
11756
case 'l': case 'L': return sizeof(long);
11757
#ifdef HAVE_LONG_LONG
11758
case 'q': case 'Q': return sizeof(PY_LONG_LONG);
11760
case 'f': return sizeof(float) * (is_complex ? 2 : 1);
11761
case 'd': return sizeof(double) * (is_complex ? 2 : 1);
11762
case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
11763
case 'O': case 'P': return sizeof(void*);
11765
__Pyx_BufFmt_RaiseUnexpectedChar(ch);
11771
typedef struct { char c; short x; } __Pyx_st_short;
11772
typedef struct { char c; int x; } __Pyx_st_int;
11773
typedef struct { char c; long x; } __Pyx_st_long;
11774
typedef struct { char c; float x; } __Pyx_st_float;
11775
typedef struct { char c; double x; } __Pyx_st_double;
11776
typedef struct { char c; long double x; } __Pyx_st_longdouble;
11777
typedef struct { char c; void *x; } __Pyx_st_void_p;
11778
#ifdef HAVE_LONG_LONG
11779
typedef struct { char c; PY_LONG_LONG x; } __Pyx_s_long_long;
11782
static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) {
11784
case '?': case 'c': case 'b': case 'B': return 1;
11785
case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
11786
case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
11787
case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
11788
#ifdef HAVE_LONG_LONG
11789
case 'q': case 'Q': return sizeof(__Pyx_s_long_long) - sizeof(PY_LONG_LONG);
11791
case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
11792
case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
11793
case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
11794
case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
11796
__Pyx_BufFmt_RaiseUnexpectedChar(ch);
11801
static size_t __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
11803
case 'c': case 'b': case 'h': case 'i': case 'l': case 'q': return 'I';
11804
case 'B': case 'H': case 'I': case 'L': case 'Q': return 'U';
11805
case 'f': case 'd': case 'g': return (is_complex ? 'C' : 'R');
11806
case 'O': return 'O';
11807
case 'P': return 'P';
11809
__Pyx_BufFmt_RaiseUnexpectedChar(ch);
11815
static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
11816
if (ctx->head == NULL || ctx->head->field == &ctx->root) {
11817
const char* expected;
11819
if (ctx->head == NULL) {
11823
expected = ctx->head->field->type->name;
11826
PyErr_Format(PyExc_ValueError,
11827
"Buffer dtype mismatch, expected %s%s%s but got %s",
11828
quote, expected, quote,
11829
__Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
11831
__Pyx_StructField* field = ctx->head->field;
11832
__Pyx_StructField* parent = (ctx->head - 1)->field;
11833
PyErr_Format(PyExc_ValueError,
11834
"Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
11835
field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
11836
parent->type->name, field->name);
11840
static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
11842
size_t size, offset;
11843
if (ctx->enc_type == 0) return 0;
11844
group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
11846
__Pyx_StructField* field = ctx->head->field;
11847
__Pyx_TypeInfo* type = field->type;
11849
if (ctx->packmode == '@' || ctx->packmode == '^') {
11850
size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
11852
size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
11854
if (ctx->packmode == '@') {
11855
int align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
11856
int align_mod_offset;
11857
if (align_at == 0) return -1;
11858
align_mod_offset = ctx->fmt_offset % align_at;
11859
if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
11862
if (type->size != size || type->typegroup != group) {
11863
if (type->typegroup == 'C' && type->fields != NULL) {
11864
/* special case -- treat as struct rather than complex number */
11865
size_t parent_offset = ctx->head->parent_offset + field->offset;
11867
ctx->head->field = type->fields;
11868
ctx->head->parent_offset = parent_offset;
11872
__Pyx_BufFmt_RaiseExpected(ctx);
11876
offset = ctx->head->parent_offset + field->offset;
11877
if (ctx->fmt_offset != offset) {
11878
PyErr_Format(PyExc_ValueError,
11879
"Buffer dtype mismatch; next field is at offset %"PY_FORMAT_SIZE_T"d "
11880
"but %"PY_FORMAT_SIZE_T"d expected", ctx->fmt_offset, offset);
11884
ctx->fmt_offset += size;
11886
--ctx->enc_count; /* Consume from buffer string */
11888
/* Done checking, move to next field, pushing or popping struct stack if needed */
11890
if (field == &ctx->root) {
11892
if (ctx->enc_count != 0) {
11893
__Pyx_BufFmt_RaiseExpected(ctx);
11896
break; /* breaks both loops as ctx->enc_count == 0 */
11898
ctx->head->field = ++field;
11899
if (field->type == NULL) {
11901
field = ctx->head->field;
11903
} else if (field->type->typegroup == 'S') {
11904
size_t parent_offset = ctx->head->parent_offset + field->offset;
11905
if (field->type->fields->type == NULL) continue; /* empty struct */
11906
field = field->type->fields;
11908
ctx->head->field = field;
11909
ctx->head->parent_offset = parent_offset;
11915
} while (ctx->enc_count);
11917
ctx->is_complex = 0;
11921
static int __Pyx_BufFmt_FirstPack(__Pyx_BufFmt_Context* ctx) {
11922
if (ctx->enc_type != 0 || ctx->packmode != '@') {
11923
PyErr_SetString(PyExc_ValueError, "Buffer packing mode currently only allowed at beginning of format string (this is a defect)");
11929
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
11934
if (ctx->enc_type != 0 && ctx->head == NULL) {
11935
__Pyx_BufFmt_RaiseExpected(ctx);
11938
if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
11939
if (ctx->head != NULL) {
11940
__Pyx_BufFmt_RaiseExpected(ctx);
11950
if (!__Pyx_IsLittleEndian()) {
11951
PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
11954
if (__Pyx_BufFmt_FirstPack(ctx) == -1) return NULL;
11955
ctx->packmode = '=';
11960
if (__Pyx_IsLittleEndian()) {
11961
PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
11964
if (__Pyx_BufFmt_FirstPack(ctx) == -1) return NULL;
11965
ctx->packmode = '=';
11971
if (__Pyx_BufFmt_FirstPack(ctx) == -1) return NULL;
11972
ctx->packmode = *ts++;
11974
case 'T': /* substruct */
11977
const char* ts_after_sub;
11978
int struct_count = ctx->new_count;
11979
ctx->new_count = 1;
11982
PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
11987
for (i = 0; i != struct_count; ++i) {
11988
ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
11989
if (!ts_after_sub) return NULL;
11994
case '}': /* end of substruct; either repeat or move on */
11998
if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
11999
ctx->fmt_offset += ctx->new_count;
12000
ctx->new_count = 1;
12001
ctx->enc_count = 0;
12008
if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
12009
__Pyx_BufFmt_RaiseUnexpectedChar('Z');
12011
} /* fall through */
12012
case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
12013
case 'l': case 'L': case 'q': case 'Q':
12014
case 'f': case 'd': case 'g':
12016
if (ctx->enc_type == *ts && got_Z == ctx->is_complex) {
12017
/* Continue pooling same type */
12018
ctx->enc_count += ctx->new_count;
12021
if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
12022
ctx->enc_count = ctx->new_count;
12023
ctx->enc_type = *ts;
12024
ctx->is_complex = got_Z;
12027
ctx->new_count = 1;
12032
ctx->new_count = __Pyx_BufFmt_ParseNumber(&ts);
12033
if (ctx->new_count == -1) { /* First char was not a digit */
12034
char msg[2] = { *ts, 0 };
12035
PyErr_Format(PyExc_ValueError,
12036
"Does not understand character buffer dtype format string ('%s')", msg);
12045
static INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) {
12048
buf->strides = __Pyx_zeros;
12049
buf->shape = __Pyx_zeros;
12050
buf->suboffsets = __Pyx_minusones;
12053
static int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) {
12054
if (obj == Py_None) {
12055
__Pyx_ZeroBuffer(buf);
12059
if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail;
12060
if (buf->ndim != nd) {
12061
PyErr_Format(PyExc_ValueError,
12062
"Buffer has wrong number of dimensions (expected %d, got %d)",
12067
__Pyx_BufFmt_Context ctx;
12068
__Pyx_BufFmt_Init(&ctx, stack, dtype);
12069
if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
12071
if ((unsigned)buf->itemsize != dtype->size) {
12072
PyErr_Format(PyExc_ValueError,
12073
"Item size of buffer (%"PY_FORMAT_SIZE_T"d byte%s) does not match size of '%s' (%"PY_FORMAT_SIZE_T"d byte%s)",
12074
buf->itemsize, (buf->itemsize > 1) ? "s" : "",
12076
dtype->size, (dtype->size > 1) ? "s" : "");
12079
if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;
12082
__Pyx_ZeroBuffer(buf);
12086
static INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
12087
if (info->buf == NULL) return;
12088
if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
12089
__Pyx_ReleaseBuffer(info);
12092
static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
12093
PyObject *tmp_type, *tmp_value, *tmp_tb;
12094
PyThreadState *tstate = PyThreadState_GET();
12096
#if PY_MAJOR_VERSION >= 3
12097
/* Note: this is a temporary work-around to prevent crashes in Python 3.0 */
12098
if ((tstate->exc_type != NULL) & (tstate->exc_type != Py_None)) {
12099
tmp_type = tstate->exc_type;
12100
tmp_value = tstate->exc_value;
12101
tmp_tb = tstate->exc_traceback;
12102
PyErr_NormalizeException(&type, &value, &tb);
12103
PyErr_NormalizeException(&tmp_type, &tmp_value, &tmp_tb);
12104
tstate->exc_type = 0;
12105
tstate->exc_value = 0;
12106
tstate->exc_traceback = 0;
12107
PyException_SetContext(value, tmp_value);
12108
Py_DECREF(tmp_type);
12109
Py_XDECREF(tmp_tb);
12113
tmp_type = tstate->curexc_type;
12114
tmp_value = tstate->curexc_value;
12115
tmp_tb = tstate->curexc_traceback;
12116
tstate->curexc_type = type;
12117
tstate->curexc_value = value;
12118
tstate->curexc_traceback = tb;
12119
Py_XDECREF(tmp_type);
12120
Py_XDECREF(tmp_value);
12121
Py_XDECREF(tmp_tb);
12124
static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
12125
PyThreadState *tstate = PyThreadState_GET();
12126
*type = tstate->curexc_type;
12127
*value = tstate->curexc_value;
12128
*tb = tstate->curexc_traceback;
12130
tstate->curexc_type = 0;
12131
tstate->curexc_value = 0;
12132
tstate->curexc_traceback = 0;
12136
static INLINE void __Pyx_RaiseNoneNotIterableError(void) {
12137
PyErr_SetString(PyExc_TypeError, "'NoneType' object is iterable");
12140
static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
12141
PyErr_Format(PyExc_ValueError,
12142
#if PY_VERSION_HEX < 0x02050000
12143
"need more than %d value%s to unpack", (int)index,
12145
"need more than %zd value%s to unpack", index,
12147
(index == 1) ? "" : "s");
12150
static INLINE void __Pyx_RaiseTooManyValuesError(void) {
12151
PyErr_SetString(PyExc_ValueError, "too many values to unpack");
12154
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
12155
if (t == Py_None) {
12156
__Pyx_RaiseNoneNotIterableError();
12157
} else if (PyTuple_GET_SIZE(t) < index) {
12158
__Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
12160
__Pyx_RaiseTooManyValuesError();
12164
static void __Pyx_RaiseBufferFallbackError(void) {
12165
PyErr_Format(PyExc_ValueError,
12166
"Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!");
12169
static void __Pyx_RaiseBufferIndexError(int axis) {
12170
PyErr_Format(PyExc_IndexError,
12171
"Out of bounds on buffer access (axis %d)", axis);
12176
static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
12177
const char *name, int exact)
12180
PyErr_Format(PyExc_SystemError, "Missing type object");
12183
if (none_allowed && obj == Py_None) return 1;
12185
if (Py_TYPE(obj) == type) return 1;
12188
if (PyObject_TypeCheck(obj, type)) return 1;
12190
PyErr_Format(PyExc_TypeError,
12191
"Argument '%s' has incorrect type (expected %s, got %s)",
12192
name, type->tp_name, Py_TYPE(obj)->tp_name);
12196
static INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
12197
PyThreadState *tstate = PyThreadState_GET();
12198
*type = tstate->exc_type;
12199
*value = tstate->exc_value;
12200
*tb = tstate->exc_traceback;
12202
Py_XINCREF(*value);
12206
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
12207
PyObject *tmp_type, *tmp_value, *tmp_tb;
12208
PyThreadState *tstate = PyThreadState_GET();
12209
tmp_type = tstate->exc_type;
12210
tmp_value = tstate->exc_value;
12211
tmp_tb = tstate->exc_traceback;
12212
tstate->exc_type = type;
12213
tstate->exc_value = value;
12214
tstate->exc_traceback = tb;
12215
Py_XDECREF(tmp_type);
12216
Py_XDECREF(tmp_value);
12217
Py_XDECREF(tmp_tb);
12220
#if PY_MAJOR_VERSION < 3
12221
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
12222
#if PY_VERSION_HEX >= 0x02060000
12223
if (Py_TYPE(obj)->tp_flags & Py_TPFLAGS_HAVE_NEWBUFFER)
12224
return PyObject_GetBuffer(obj, view, flags);
12226
if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pf_5numpy_7ndarray___getbuffer__(obj, view, flags);
12228
PyErr_Format(PyExc_TypeError, "'%100s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
12233
static void __Pyx_ReleaseBuffer(Py_buffer *view) {
12234
PyObject* obj = view->obj;
12236
if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pf_5numpy_7ndarray___releasebuffer__(obj, view);
12244
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
12245
PyObject *__import__ = 0;
12246
PyObject *empty_list = 0;
12247
PyObject *module = 0;
12248
PyObject *global_dict = 0;
12249
PyObject *empty_dict = 0;
12251
__import__ = __Pyx_GetAttrString(__pyx_b, "__import__");
12257
empty_list = PyList_New(0);
12262
global_dict = PyModule_GetDict(__pyx_m);
12265
empty_dict = PyDict_New();
12268
module = PyObject_CallFunctionObjArgs(__import__,
12269
name, global_dict, empty_dict, list, NULL);
12271
Py_XDECREF(empty_list);
12272
Py_XDECREF(__import__);
12273
Py_XDECREF(empty_dict);
12277
static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
12279
result = PyObject_GetAttr(dict, name);
12281
PyErr_SetObject(PyExc_NameError, name);
12285
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
12289
/* First, check the traceback argument, replacing None with NULL. */
12290
if (tb == Py_None) {
12294
else if (tb != NULL && !PyTraceBack_Check(tb)) {
12295
PyErr_SetString(PyExc_TypeError,
12296
"raise: arg 3 must be a traceback or None");
12299
/* Next, replace a missing value with None */
12300
if (value == NULL) {
12304
#if PY_VERSION_HEX < 0x02050000
12305
if (!PyClass_Check(type))
12307
if (!PyType_Check(type))
12310
/* Raising an instance. The value should be a dummy. */
12311
if (value != Py_None) {
12312
PyErr_SetString(PyExc_TypeError,
12313
"instance exception may not have a separate value");
12316
/* Normalize to raise <class>, <instance> */
12319
#if PY_VERSION_HEX < 0x02050000
12320
if (PyInstance_Check(type)) {
12321
type = (PyObject*) ((PyInstanceObject*)type)->in_class;
12326
PyErr_SetString(PyExc_TypeError,
12327
"raise: exception must be an old-style class or instance");
12331
type = (PyObject*) Py_TYPE(type);
12333
if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
12334
PyErr_SetString(PyExc_TypeError,
12335
"raise: exception class must be a subclass of BaseException");
12340
__Pyx_ErrRestore(type, value, tb);
12349
static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
12351
if (!(item = PyIter_Next(iter))) {
12352
if (!PyErr_Occurred()) {
12353
__Pyx_RaiseNeedMoreValuesError(index);
12359
static int __Pyx_EndUnpack(PyObject *iter) {
12361
if ((item = PyIter_Next(iter))) {
12363
__Pyx_RaiseTooManyValuesError();
12366
else if (!PyErr_Occurred())
12372
static INLINE int __Pyx_StrEq(const char *s1, const char *s2) {
12373
while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
12377
static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
12378
if (sizeof(unsigned char) < sizeof(long)) {
12379
long val = __Pyx_PyInt_AsLong(x);
12380
if (unlikely(val != (long)(unsigned char)val)) {
12381
if (unlikely(val == -1 && PyErr_Occurred()))
12382
return (unsigned char)-1;
12383
if (unlikely(val < 0)) {
12384
PyErr_SetString(PyExc_OverflowError,
12385
"can't convert negative value to unsigned char");
12386
return (unsigned char)-1;
12388
PyErr_SetString(PyExc_OverflowError,
12389
"value too large to convert to unsigned char");
12390
return (unsigned char)-1;
12392
return (unsigned char)val;
12394
return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
12397
static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
12398
if (sizeof(unsigned short) < sizeof(long)) {
12399
long val = __Pyx_PyInt_AsLong(x);
12400
if (unlikely(val != (long)(unsigned short)val)) {
12401
if (unlikely(val == -1 && PyErr_Occurred()))
12402
return (unsigned short)-1;
12403
if (unlikely(val < 0)) {
12404
PyErr_SetString(PyExc_OverflowError,
12405
"can't convert negative value to unsigned short");
12406
return (unsigned short)-1;
12408
PyErr_SetString(PyExc_OverflowError,
12409
"value too large to convert to unsigned short");
12410
return (unsigned short)-1;
12412
return (unsigned short)val;
12414
return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
12417
static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
12418
if (sizeof(unsigned int) < sizeof(long)) {
12419
long val = __Pyx_PyInt_AsLong(x);
12420
if (unlikely(val != (long)(unsigned int)val)) {
12421
if (unlikely(val == -1 && PyErr_Occurred()))
12422
return (unsigned int)-1;
12423
if (unlikely(val < 0)) {
12424
PyErr_SetString(PyExc_OverflowError,
12425
"can't convert negative value to unsigned int");
12426
return (unsigned int)-1;
12428
PyErr_SetString(PyExc_OverflowError,
12429
"value too large to convert to unsigned int");
12430
return (unsigned int)-1;
12432
return (unsigned int)val;
12434
return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
12437
static INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
12438
if (sizeof(char) < sizeof(long)) {
12439
long val = __Pyx_PyInt_AsLong(x);
12440
if (unlikely(val != (long)(char)val)) {
12441
if (unlikely(val == -1 && PyErr_Occurred()))
12443
PyErr_SetString(PyExc_OverflowError,
12444
"value too large to convert to char");
12449
return (char)__Pyx_PyInt_AsLong(x);
12452
static INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
12453
if (sizeof(short) < sizeof(long)) {
12454
long val = __Pyx_PyInt_AsLong(x);
12455
if (unlikely(val != (long)(short)val)) {
12456
if (unlikely(val == -1 && PyErr_Occurred()))
12458
PyErr_SetString(PyExc_OverflowError,
12459
"value too large to convert to short");
12464
return (short)__Pyx_PyInt_AsLong(x);
12467
static INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
12468
if (sizeof(int) < sizeof(long)) {
12469
long val = __Pyx_PyInt_AsLong(x);
12470
if (unlikely(val != (long)(int)val)) {
12471
if (unlikely(val == -1 && PyErr_Occurred()))
12473
PyErr_SetString(PyExc_OverflowError,
12474
"value too large to convert to int");
12479
return (int)__Pyx_PyInt_AsLong(x);
12482
static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
12483
if (sizeof(signed char) < sizeof(long)) {
12484
long val = __Pyx_PyInt_AsLong(x);
12485
if (unlikely(val != (long)(signed char)val)) {
12486
if (unlikely(val == -1 && PyErr_Occurred()))
12487
return (signed char)-1;
12488
PyErr_SetString(PyExc_OverflowError,
12489
"value too large to convert to signed char");
12490
return (signed char)-1;
12492
return (signed char)val;
12494
return (signed char)__Pyx_PyInt_AsSignedLong(x);
12497
static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
12498
if (sizeof(signed short) < sizeof(long)) {
12499
long val = __Pyx_PyInt_AsLong(x);
12500
if (unlikely(val != (long)(signed short)val)) {
12501
if (unlikely(val == -1 && PyErr_Occurred()))
12502
return (signed short)-1;
12503
PyErr_SetString(PyExc_OverflowError,
12504
"value too large to convert to signed short");
12505
return (signed short)-1;
12507
return (signed short)val;
12509
return (signed short)__Pyx_PyInt_AsSignedLong(x);
12512
static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
12513
if (sizeof(signed int) < sizeof(long)) {
12514
long val = __Pyx_PyInt_AsLong(x);
12515
if (unlikely(val != (long)(signed int)val)) {
12516
if (unlikely(val == -1 && PyErr_Occurred()))
12517
return (signed int)-1;
12518
PyErr_SetString(PyExc_OverflowError,
12519
"value too large to convert to signed int");
12520
return (signed int)-1;
12522
return (signed int)val;
12524
return (signed int)__Pyx_PyInt_AsSignedLong(x);
12527
static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
12528
#if PY_VERSION_HEX < 0x03000000
12529
if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
12530
long val = PyInt_AS_LONG(x);
12531
if (unlikely(val < 0)) {
12532
PyErr_SetString(PyExc_OverflowError,
12533
"can't convert negative value to unsigned long");
12534
return (unsigned long)-1;
12536
return (unsigned long)val;
12539
if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
12540
if (unlikely(Py_SIZE(x) < 0)) {
12541
PyErr_SetString(PyExc_OverflowError,
12542
"can't convert negative value to unsigned long");
12543
return (unsigned long)-1;
12545
return PyLong_AsUnsignedLong(x);
12548
PyObject *tmp = __Pyx_PyNumber_Int(x);
12549
if (!tmp) return (unsigned long)-1;
12550
val = __Pyx_PyInt_AsUnsignedLong(tmp);
12556
static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
12557
#if PY_VERSION_HEX < 0x03000000
12558
if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
12559
long val = PyInt_AS_LONG(x);
12560
if (unlikely(val < 0)) {
12561
PyErr_SetString(PyExc_OverflowError,
12562
"can't convert negative value to unsigned PY_LONG_LONG");
12563
return (unsigned PY_LONG_LONG)-1;
12565
return (unsigned PY_LONG_LONG)val;
12568
if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
12569
if (unlikely(Py_SIZE(x) < 0)) {
12570
PyErr_SetString(PyExc_OverflowError,
12571
"can't convert negative value to unsigned PY_LONG_LONG");
12572
return (unsigned PY_LONG_LONG)-1;
12574
return PyLong_AsUnsignedLongLong(x);
12576
unsigned PY_LONG_LONG val;
12577
PyObject *tmp = __Pyx_PyNumber_Int(x);
12578
if (!tmp) return (unsigned PY_LONG_LONG)-1;
12579
val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
12585
static INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
12586
#if PY_VERSION_HEX < 0x03000000
12587
if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
12588
long val = PyInt_AS_LONG(x);
12592
if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
12593
return PyLong_AsLong(x);
12596
PyObject *tmp = __Pyx_PyNumber_Int(x);
12597
if (!tmp) return (long)-1;
12598
val = __Pyx_PyInt_AsLong(tmp);
12604
static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
12605
#if PY_VERSION_HEX < 0x03000000
12606
if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
12607
long val = PyInt_AS_LONG(x);
12608
return (PY_LONG_LONG)val;
12611
if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
12612
return PyLong_AsLongLong(x);
12615
PyObject *tmp = __Pyx_PyNumber_Int(x);
12616
if (!tmp) return (PY_LONG_LONG)-1;
12617
val = __Pyx_PyInt_AsLongLong(tmp);
12623
static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
12624
#if PY_VERSION_HEX < 0x03000000
12625
if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
12626
long val = PyInt_AS_LONG(x);
12627
return (signed long)val;
12630
if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
12631
return PyLong_AsLong(x);
12634
PyObject *tmp = __Pyx_PyNumber_Int(x);
12635
if (!tmp) return (signed long)-1;
12636
val = __Pyx_PyInt_AsSignedLong(tmp);
12642
static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
12643
#if PY_VERSION_HEX < 0x03000000
12644
if (likely(PyInt_CheckExact(x) || PyInt_Check(x))) {
12645
long val = PyInt_AS_LONG(x);
12646
return (signed PY_LONG_LONG)val;
12649
if (likely(PyLong_CheckExact(x) || PyLong_Check(x))) {
12650
return PyLong_AsLongLong(x);
12652
signed PY_LONG_LONG val;
12653
PyObject *tmp = __Pyx_PyNumber_Int(x);
12654
if (!tmp) return (signed PY_LONG_LONG)-1;
12655
val = __Pyx_PyInt_AsSignedLongLong(tmp);
12661
#ifndef __PYX_HAVE_RT_ImportType
12662
#define __PYX_HAVE_RT_ImportType
12663
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
12666
PyObject *py_module = 0;
12667
PyObject *result = 0;
12668
PyObject *py_name = 0;
12670
py_module = __Pyx_ImportModule(module_name);
12673
#if PY_MAJOR_VERSION < 3
12674
py_name = PyString_FromString(class_name);
12676
py_name = PyUnicode_FromString(class_name);
12680
result = PyObject_GetAttr(py_module, py_name);
12681
Py_DECREF(py_name);
12683
Py_DECREF(py_module);
12687
if (!PyType_Check(result)) {
12688
PyErr_Format(PyExc_TypeError,
12689
"%s.%s is not a type object",
12690
module_name, class_name);
12693
if (((PyTypeObject *)result)->tp_basicsize != size) {
12694
PyErr_Format(PyExc_ValueError,
12695
"%s.%s does not appear to be the correct type object",
12696
module_name, class_name);
12699
return (PyTypeObject *)result;
12701
Py_XDECREF(py_module);
12702
Py_XDECREF(result);
12707
#ifndef __PYX_HAVE_RT_ImportModule
12708
#define __PYX_HAVE_RT_ImportModule
12709
static PyObject *__Pyx_ImportModule(const char *name) {
12710
PyObject *py_name = 0;
12711
PyObject *py_module = 0;
12713
#if PY_MAJOR_VERSION < 3
12714
py_name = PyString_FromString(name);
12716
py_name = PyUnicode_FromString(name);
12720
py_module = PyImport_Import(py_name);
12721
Py_DECREF(py_name);
12724
Py_XDECREF(py_name);
12729
#include "compile.h"
12730
#include "frameobject.h"
12731
#include "traceback.h"
12733
static void __Pyx_AddTraceback(const char *funcname) {
12734
PyObject *py_srcfile = 0;
12735
PyObject *py_funcname = 0;
12736
PyObject *py_globals = 0;
12737
PyObject *empty_string = 0;
12738
PyCodeObject *py_code = 0;
12739
PyFrameObject *py_frame = 0;
12741
#if PY_MAJOR_VERSION < 3
12742
py_srcfile = PyString_FromString(__pyx_filename);
12744
py_srcfile = PyUnicode_FromString(__pyx_filename);
12746
if (!py_srcfile) goto bad;
12747
if (__pyx_clineno) {
12748
#if PY_MAJOR_VERSION < 3
12749
py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
12751
py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
12755
#if PY_MAJOR_VERSION < 3
12756
py_funcname = PyString_FromString(funcname);
12758
py_funcname = PyUnicode_FromString(funcname);
12761
if (!py_funcname) goto bad;
12762
py_globals = PyModule_GetDict(__pyx_m);
12763
if (!py_globals) goto bad;
12764
#if PY_MAJOR_VERSION < 3
12765
empty_string = PyString_FromStringAndSize("", 0);
12767
empty_string = PyBytes_FromStringAndSize("", 0);
12769
if (!empty_string) goto bad;
12770
py_code = PyCode_New(
12771
0, /*int argcount,*/
12772
#if PY_MAJOR_VERSION >= 3
12773
0, /*int kwonlyargcount,*/
12775
0, /*int nlocals,*/
12776
0, /*int stacksize,*/
12778
empty_string, /*PyObject *code,*/
12779
__pyx_empty_tuple, /*PyObject *consts,*/
12780
__pyx_empty_tuple, /*PyObject *names,*/
12781
__pyx_empty_tuple, /*PyObject *varnames,*/
12782
__pyx_empty_tuple, /*PyObject *freevars,*/
12783
__pyx_empty_tuple, /*PyObject *cellvars,*/
12784
py_srcfile, /*PyObject *filename,*/
12785
py_funcname, /*PyObject *name,*/
12786
__pyx_lineno, /*int firstlineno,*/
12787
empty_string /*PyObject *lnotab*/
12789
if (!py_code) goto bad;
12790
py_frame = PyFrame_New(
12791
PyThreadState_GET(), /*PyThreadState *tstate,*/
12792
py_code, /*PyCodeObject *code,*/
12793
py_globals, /*PyObject *globals,*/
12794
0 /*PyObject *locals*/
12796
if (!py_frame) goto bad;
12797
py_frame->f_lineno = __pyx_lineno;
12798
PyTraceBack_Here(py_frame);
12800
Py_XDECREF(py_srcfile);
12801
Py_XDECREF(py_funcname);
12802
Py_XDECREF(empty_string);
12803
Py_XDECREF(py_code);
12804
Py_XDECREF(py_frame);
12807
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
12809
#if PY_MAJOR_VERSION < 3
12810
if (t->is_unicode && (!t->is_identifier)) {
12811
*t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
12812
} else if (t->intern) {
12813
*t->p = PyString_InternFromString(t->s);
12815
*t->p = PyString_FromStringAndSize(t->s, t->n - 1);
12817
#else /* Python 3+ has unicode identifiers */
12818
if (t->is_identifier || (t->is_unicode && t->intern)) {
12819
*t->p = PyUnicode_InternFromString(t->s);
12820
} else if (t->is_unicode) {
12821
*t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
12823
*t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
12833
/* Type Conversion Functions */
12835
static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
12836
if (x == Py_True) return 1;
12837
else if ((x == Py_False) | (x == Py_None)) return 0;
12838
else return PyObject_IsTrue(x);
12841
static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
12842
PyNumberMethods *m;
12843
const char *name = NULL;
12844
PyObject *res = NULL;
12845
#if PY_VERSION_HEX < 0x03000000
12846
if (PyInt_Check(x) || PyLong_Check(x))
12848
if (PyLong_Check(x))
12850
return Py_INCREF(x), x;
12851
m = Py_TYPE(x)->tp_as_number;
12852
#if PY_VERSION_HEX < 0x03000000
12853
if (m && m->nb_int) {
12855
res = PyNumber_Int(x);
12857
else if (m && m->nb_long) {
12859
res = PyNumber_Long(x);
12862
if (m && m->nb_int) {
12864
res = PyNumber_Long(x);
12868
#if PY_VERSION_HEX < 0x03000000
12869
if (!PyInt_Check(res) && !PyLong_Check(res)) {
12871
if (!PyLong_Check(res)) {
12873
PyErr_Format(PyExc_TypeError,
12874
"__%s__ returned non-%s (type %.200s)",
12875
name, name, Py_TYPE(res)->tp_name);
12880
else if (!PyErr_Occurred()) {
12881
PyErr_SetString(PyExc_TypeError,
12882
"an integer is required");
12887
static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
12889
PyObject* x = PyNumber_Index(b);
12891
ival = PyInt_AsSsize_t(x);
12896
static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
12897
#if PY_VERSION_HEX < 0x02050000
12898
if (ival <= LONG_MAX)
12899
return PyInt_FromLong((long)ival);
12901
unsigned char *bytes = (unsigned char *) &ival;
12902
int one = 1; int little = (int)*(unsigned char*)&one;
12903
return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
12906
return PyInt_FromSize_t(ival);
12910
static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
12911
unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
12912
if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
12914
} else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
12915
PyErr_SetString(PyExc_OverflowError,
12916
"value too large to convert to size_t");
12919
return (size_t)val;