/* Generated by Cython 0.15.1+ on Fri Mar 16 15:54:40 2012 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02040000
    #error Cython requires Python 2.4+.
#else
#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif

#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif

#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif

#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif

#if PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PY_FORMAT_SIZE_T ""
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
  #define PyNumber_Index(o)    PyNumber_Int(o)
  #define PyIndex_Check(o)     PyNumber_Check(o)
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
#endif

#if PY_VERSION_HEX < 0x02060000
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  #define PyVarObject_HEAD_INIT(type, size) \
          PyObject_HEAD_INIT(type) size,
  #define PyType_Modified(t)

  typedef struct {
     void *buf;
     PyObject *obj;
     Py_ssize_t len;
     Py_ssize_t itemsize;
     int readonly;
     int ndim;
     char *format;
     Py_ssize_t *shape;
     Py_ssize_t *strides;
     Py_ssize_t *suboffsets;
     void *internal;
  } Py_buffer;

  #define PyBUF_SIMPLE 0
  #define PyBUF_WRITABLE 0x0001
  #define PyBUF_FORMAT 0x0004
  #define PyBUF_ND 0x0008
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
  #define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
  #define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)

#endif

#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif

#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6
  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
#endif

#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif

#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif


#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_GET_LENGTH)
  #define CYTHON_PEP393_ENABLED
  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
#else
  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif

#if PY_VERSION_HEX < 0x02060000
  #define PyBytesObject                PyStringObject
  #define PyBytes_Type                 PyString_Type
  #define PyBytes_Check                PyString_Check
  #define PyBytes_CheckExact           PyString_CheckExact
  #define PyBytes_FromString           PyString_FromString
  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
  #define PyBytes_FromFormat           PyString_FromFormat
  #define PyBytes_DecodeEscape         PyString_DecodeEscape
  #define PyBytes_AsString             PyString_AsString
  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
  #define PyBytes_Size                 PyString_Size
  #define PyBytes_AS_STRING            PyString_AS_STRING
  #define PyBytes_GET_SIZE             PyString_GET_SIZE
  #define PyBytes_Repr                 PyString_Repr
  #define PyBytes_Concat               PyString_Concat
  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
#endif

#if PY_VERSION_HEX < 0x02060000
  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif

#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)

#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif

#if PY_VERSION_HEX < 0x03020000
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif

#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif

#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
#else
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
#endif

#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_NAMESTR(n) ((char *)(n))
  #define __Pyx_DOCSTR(n)  ((char *)(n))
#else
  #define __Pyx_NAMESTR(n) (n)
  #define __Pyx_DOCSTR(n)  (n)
#endif


#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE__pandas___tseries
#define __PYX_HAVE_API__pandas___tseries
#include "stdio.h"
#include "stdlib.h"
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
#include "pythread.h"
#include "numpy_helper.h"
#include "math.h"
#include "datetime.h"
#include "skiplist.h"
#include "khash.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif


/* inline attribute */
#ifndef CYTHON_INLINE
  #if defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

/* unused attribute */
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif

typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/


/* Type Conversion Predeclarations */

#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))

#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);

#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))

#ifdef __GNUC__
  /* Test for GCC > 2.95 */
  #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
    #define likely(x)   __builtin_expect(!!(x), 1)
    #define unlikely(x) __builtin_expect(!!(x), 0)
  #else /* __GNUC__ > 2 ... */
    #define likely(x)   (x)
    #define unlikely(x) (x)
  #endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
    
static PyObject *__pyx_m;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;

#if !defined(CYTHON_CCOMPLEX)
  #if defined(__cplusplus)
    #define CYTHON_CCOMPLEX 1
  #elif defined(_Complex_I)
    #define CYTHON_CCOMPLEX 1
  #else
    #define CYTHON_CCOMPLEX 0
  #endif
#endif
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #include <complex>
  #else
    #include <complex.h>
  #endif
#endif
#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
  #undef _Complex_I
  #define _Complex_I 1.0fj
#endif


static const char *__pyx_f[] = {
  "stats.pyx",
  "inference.pyx",
  "tseries.pyx",
  "properties.pyx",
  "skiplist.pyx",
  "groupby.pyx",
  "moments.pyx",
  "reindex.pyx",
  "generated.pyx",
  "reduce.pyx",
  "internals.pyx",
  "hashtable.pyx",
  "join.pyx",
  "numpy.pxd",
  "util.pxd",
  "bool.pxd",
  "complex.pxd",
};

/* "numpy.pxd":722
 * # in Cython to enable them only on the right systems.
 * 
 * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 */
typedef npy_int8 __pyx_t_5numpy_int8_t;

/* "numpy.pxd":723
 * 
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t
 */
typedef npy_int16 __pyx_t_5numpy_int16_t;

/* "numpy.pxd":724
 * ctypedef npy_int8       int8_t
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_int64      int64_t
 * #ctypedef npy_int96      int96_t
 */
typedef npy_int32 __pyx_t_5numpy_int32_t;

/* "numpy.pxd":725
 * ctypedef npy_int16      int16_t
 * ctypedef npy_int32      int32_t
 * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_int96      int96_t
 * #ctypedef npy_int128     int128_t
 */
typedef npy_int64 __pyx_t_5numpy_int64_t;

/* "numpy.pxd":729
 * #ctypedef npy_int128     int128_t
 * 
 * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 */
typedef npy_uint8 __pyx_t_5numpy_uint8_t;

/* "numpy.pxd":730
 * 
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t
 */
typedef npy_uint16 __pyx_t_5numpy_uint16_t;

/* "numpy.pxd":731
 * ctypedef npy_uint8      uint8_t
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uint64     uint64_t
 * #ctypedef npy_uint96     uint96_t
 */
typedef npy_uint32 __pyx_t_5numpy_uint32_t;

/* "numpy.pxd":732
 * ctypedef npy_uint16     uint16_t
 * ctypedef npy_uint32     uint32_t
 * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_uint96     uint96_t
 * #ctypedef npy_uint128    uint128_t
 */
typedef npy_uint64 __pyx_t_5numpy_uint64_t;

/* "numpy.pxd":736
 * #ctypedef npy_uint128    uint128_t
 * 
 * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
 * ctypedef npy_float64    float64_t
 * #ctypedef npy_float80    float80_t
 */
typedef npy_float32 __pyx_t_5numpy_float32_t;

/* "numpy.pxd":737
 * 
 * ctypedef npy_float32    float32_t
 * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
 * #ctypedef npy_float80    float80_t
 * #ctypedef npy_float128   float128_t
 */
typedef npy_float64 __pyx_t_5numpy_float64_t;

/* "numpy.pxd":746
 * # The int types are mapped a bit surprising --
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t
 */
typedef npy_long __pyx_t_5numpy_int_t;

/* "numpy.pxd":747
 * # numpy.int corresponds to 'l' and numpy.long to 'q'
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longlong   longlong_t
 * 
 */
typedef npy_longlong __pyx_t_5numpy_long_t;

/* "numpy.pxd":748
 * ctypedef npy_long       int_t
 * ctypedef npy_longlong   long_t
 * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_ulong      uint_t
 */
typedef npy_longlong __pyx_t_5numpy_longlong_t;

/* "numpy.pxd":750
 * ctypedef npy_longlong   longlong_t
 * 
 * ctypedef npy_ulong      uint_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t
 */
typedef npy_ulong __pyx_t_5numpy_uint_t;

/* "numpy.pxd":751
 * 
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t             # <<<<<<<<<<<<<<
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 */
typedef npy_ulonglong __pyx_t_5numpy_ulong_t;

/* "numpy.pxd":752
 * ctypedef npy_ulong      uint_t
 * ctypedef npy_ulonglong  ulong_t
 * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_intp       intp_t
 */
typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;

/* "numpy.pxd":754
 * ctypedef npy_ulonglong  ulonglong_t
 * 
 * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
 * ctypedef npy_uintp      uintp_t
 * 
 */
typedef npy_intp __pyx_t_5numpy_intp_t;

/* "numpy.pxd":755
 * 
 * ctypedef npy_intp       intp_t
 * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_double     float_t
 */
typedef npy_uintp __pyx_t_5numpy_uintp_t;

/* "numpy.pxd":757
 * ctypedef npy_uintp      uintp_t
 * 
 * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t
 */
typedef npy_double __pyx_t_5numpy_float_t;

/* "numpy.pxd":758
 * 
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
 * ctypedef npy_longdouble longdouble_t
 * 
 */
typedef npy_double __pyx_t_5numpy_double_t;

/* "numpy.pxd":759
 * ctypedef npy_double     float_t
 * ctypedef npy_double     double_t
 * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cfloat      cfloat_t
 */
typedef npy_longdouble __pyx_t_5numpy_longdouble_t;

/* "pandas/src/tseries.pyx":24
 * cdef inline int int_min(int a, int b): return a if a <= b else b
 * 
 * ctypedef unsigned char UChar             # <<<<<<<<<<<<<<
 * 
 * cimport util
 */
typedef unsigned char __pyx_t_6pandas_8_tseries_UChar;
#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< float > __pyx_t_float_complex;
  #else
    typedef float _Complex __pyx_t_float_complex;
  #endif
#else
    typedef struct { float real, imag; } __pyx_t_float_complex;
#endif

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    typedef ::std::complex< double > __pyx_t_double_complex;
  #else
    typedef double _Complex __pyx_t_double_complex;
  #endif
#else
    typedef struct { double real, imag; } __pyx_t_double_complex;
#endif


/*--- Type declarations ---*/
struct __pyx_obj_6pandas_8_tseries_Reducer;
struct __pyx_obj_6pandas_8_tseries_Float64HashTable;
struct __pyx_obj_6pandas_8_tseries_SeriesGrouper;
struct __pyx_obj_6pandas_8_tseries_cache_readonly;
struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates;
struct __pyx_obj_6pandas_8_tseries_ValuesProperty;
struct __pyx_obj_6pandas_8_tseries_Int64Factorizer;
struct __pyx_obj_6pandas_8_tseries_StringHashTable;
struct __pyx_obj_6pandas_8_tseries_Slider;
struct __pyx_obj_6pandas_8_tseries_Int32HashTable;
struct __pyx_obj_6pandas_8_tseries_Factorizer;
struct __pyx_obj_6pandas_8_tseries_DictFactorizer;
struct __pyx_obj_6pandas_8_tseries_Node;
struct __pyx_obj_6pandas_8_tseries_MultiMap;
struct __pyx_obj_6pandas_8_tseries_AxisProperty;
struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable;
struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist;
struct __pyx_obj_6pandas_8_tseries_Int64HashTable;
struct __pyx_obj_6pandas_8_tseries_SeriesIndex;

/* "numpy.pxd":761
 * ctypedef npy_longdouble longdouble_t
 * 
 * ctypedef npy_cfloat      cfloat_t             # <<<<<<<<<<<<<<
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t
 */
typedef npy_cfloat __pyx_t_5numpy_cfloat_t;

/* "numpy.pxd":762
 * 
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t             # <<<<<<<<<<<<<<
 * ctypedef npy_clongdouble clongdouble_t
 * 
 */
typedef npy_cdouble __pyx_t_5numpy_cdouble_t;

/* "numpy.pxd":763
 * ctypedef npy_cfloat      cfloat_t
 * ctypedef npy_cdouble     cdouble_t
 * ctypedef npy_clongdouble clongdouble_t             # <<<<<<<<<<<<<<
 * 
 * ctypedef npy_cdouble     complex_t
 */
typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;

/* "numpy.pxd":765
 * ctypedef npy_clongdouble clongdouble_t
 * 
 * ctypedef npy_cdouble     complex_t             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 */
typedef npy_cdouble __pyx_t_5numpy_complex_t;

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":399
 * # Rolling median, min, max
 * 
 * ctypedef double_t (* skiplist_f)(object sl, int n, int p)             # <<<<<<<<<<<<<<
 * 
 * cdef _roll_skiplist_op(ndarray arg, int win, int minp, skiplist_f op):
 */
typedef __pyx_t_5numpy_double_t (*__pyx_t_6pandas_8_tseries_skiplist_f)(PyObject *, int, int);

/* "/home/wesm/code/pandas/pandas/src/reduce.pyx":4
 * import numpy as np
 * 
 * cdef class Reducer:             # <<<<<<<<<<<<<<
 *     '''
 *     Performs generic reduction operation on a C or Fortran-contiguous ndarray
 */
struct __pyx_obj_6pandas_8_tseries_Reducer {
  PyObject_HEAD
  Py_ssize_t increment;
  Py_ssize_t chunksize;
  Py_ssize_t nresults;
  PyObject *arr;
  PyObject *dummy;
  PyObject *f;
};


/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":620
 * ONAN = np.nan
 * 
 * cdef class Float64HashTable:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */
struct __pyx_obj_6pandas_8_tseries_Float64HashTable {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pandas_8_tseries_Float64HashTable *__pyx_vtab;
  kh_float64_t *table;
};


/* "/home/wesm/code/pandas/pandas/src/reduce.pyx":91
 *         return result
 * 
 * cdef class SeriesGrouper:             # <<<<<<<<<<<<<<
 *     '''
 *     Performs generic grouping operation while avoiding ndarray construction
 */
struct __pyx_obj_6pandas_8_tseries_SeriesGrouper {
  PyObject_HEAD
  Py_ssize_t nresults;
  Py_ssize_t ngroups;
  int passed_dummy;
  PyObject *arr;
  PyObject *index;
  PyObject *dummy;
  PyObject *f;
  PyObject *labels;
};


/* "/home/wesm/code/pandas/pandas/src/properties.pyx":3
 * from cpython cimport PyDict_Contains, PyDict_GetItem, PyDict_GetItem
 * 
 * cdef class cache_readonly(object):             # <<<<<<<<<<<<<<
 * 
 *     cdef readonly:
 */
struct __pyx_obj_6pandas_8_tseries_cache_readonly {
  PyObject_HEAD
  PyObject *fget;
  PyObject *name;
};


/* "/home/wesm/code/pandas/pandas/src/inference.pyx":335
 *     return maybe_convert_objects(x, try_float=1)
 * 
 * def try_parse_dates(ndarray[object] values, parser=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates {
  PyObject_HEAD
  PyObject *__pyx_v_datetime;
};


/* "/home/wesm/code/pandas/pandas/src/properties.pyx":61
 *         obj._index = self._check_type(value)
 * 
 * cdef class ValuesProperty(object):             # <<<<<<<<<<<<<<
 * 
 *     def __get__(self, obj, type):
 */
struct __pyx_obj_6pandas_8_tseries_ValuesProperty {
  PyObject_HEAD
};


/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":933
 *         return self.table.unique(values)
 * 
 * cdef class Int64Factorizer:             # <<<<<<<<<<<<<<
 * 
 *     cdef public:
 */
struct __pyx_obj_6pandas_8_tseries_Int64Factorizer {
  PyObject_HEAD
  struct __pyx_obj_6pandas_8_tseries_Int64HashTable *table;
  PyObject *uniques;
  Py_ssize_t count;
};


/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":157
 *     return np.sort(uniques[:j])
 * 
 * cdef class StringHashTable:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */
struct __pyx_obj_6pandas_8_tseries_StringHashTable {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pandas_8_tseries_StringHashTable *__pyx_vtab;
  kh_str_t *table;
};


/* "/home/wesm/code/pandas/pandas/src/reduce.pyx":197
 *         return result
 * 
 * cdef class Slider:             # <<<<<<<<<<<<<<
 *     '''
 *     Only handles contiguous data for now
 */
struct __pyx_obj_6pandas_8_tseries_Slider {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pandas_8_tseries_Slider *__pyx_vtab;
  PyArrayObject *values;
  PyArrayObject *buf;
  Py_ssize_t stride;
  Py_ssize_t orig_len;
  char *orig_data;
};


/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":283
 *         return reverse, labels, counts[:count].copy()
 * 
 * cdef class Int32HashTable:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */
struct __pyx_obj_6pandas_8_tseries_Int32HashTable {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pandas_8_tseries_Int32HashTable *__pyx_vtab;
  kh_int32_t *table;
};


/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":898
 *     #             count += 1
 * 
 * cdef class Factorizer:             # <<<<<<<<<<<<<<
 * 
 *     cdef public:
 */
struct __pyx_obj_6pandas_8_tseries_Factorizer {
  PyObject_HEAD
  struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *table;
  PyObject *uniques;
  Py_ssize_t count;
};


/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":964
 *         return labels, counts
 * 
 * cdef class DictFactorizer:             # <<<<<<<<<<<<<<
 * 
 *     cdef public:
 */
struct __pyx_obj_6pandas_8_tseries_DictFactorizer {
  PyObject_HEAD
  PyObject *table;
  PyObject *uniques;
  Py_ssize_t count;
};


/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":32
 * # TODO: optimize this, make less messy
 * 
 * cdef class Node:             # <<<<<<<<<<<<<<
 *     cdef public:
 *         double_t value
 */
struct __pyx_obj_6pandas_8_tseries_Node {
  PyObject_HEAD
  __pyx_t_5numpy_double_t value;
  PyObject *next;
  PyObject *width;
};


/* "pandas/src/tseries.pyx":85
 * from libc.stdlib cimport malloc, free
 * 
 * cdef class MultiMap:             # <<<<<<<<<<<<<<
 *     '''
 *     Need to come up with a better data structure for multi-level indexing
 */
struct __pyx_obj_6pandas_8_tseries_MultiMap {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pandas_8_tseries_MultiMap *__pyx_vtab;
  PyObject *store;
  Py_ssize_t depth;
  Py_ssize_t length;
};


/* "/home/wesm/code/pandas/pandas/src/properties.pyx":31
 *             return val
 * 
 * cdef class AxisProperty(object):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t axis
 */
struct __pyx_obj_6pandas_8_tseries_AxisProperty {
  PyObject_HEAD
  Py_ssize_t axis;
};


/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":731
 *         return uniques
 * 
 * cdef class PyObjectHashTable:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */
struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pandas_8_tseries_PyObjectHashTable *__pyx_vtab;
  kh_pymap_t *table;
};


/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":46
 * NIL = Node(np.inf, [], [])
 * 
 * cdef class IndexableSkiplist:             # <<<<<<<<<<<<<<
 *     '''
 *     Sorted collection supporting O(lg n) insertion, removal, and
 */
struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *__pyx_vtab;
  Py_ssize_t size;
  Py_ssize_t maxlevels;
  struct __pyx_obj_6pandas_8_tseries_Node *head;
};


/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":389
 *         return reverse, labels, counts[:count].copy()
 * 
 * cdef class Int64HashTable:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */
struct __pyx_obj_6pandas_8_tseries_Int64HashTable {
  PyObject_HEAD
  struct __pyx_vtabstruct_6pandas_8_tseries_Int64HashTable *__pyx_vtab;
  kh_int64_t *table;
};


/* "/home/wesm/code/pandas/pandas/src/properties.pyx":45
 *         obj._set_axis(self.axis, value)
 * 
 * cdef class SeriesIndex(object):             # <<<<<<<<<<<<<<
 *     cdef:
 *         object _check_type
 */
struct __pyx_obj_6pandas_8_tseries_SeriesIndex {
  PyObject_HEAD
  PyObject *_check_type;
};



/* "/home/wesm/code/pandas/pandas/src/reduce.pyx":197
 *         return result
 * 
 * cdef class Slider:             # <<<<<<<<<<<<<<
 *     '''
 *     Only handles contiguous data for now
 */

struct __pyx_vtabstruct_6pandas_8_tseries_Slider {
  PyObject *(*advance)(struct __pyx_obj_6pandas_8_tseries_Slider *, Py_ssize_t);
  PyObject *(*set_length)(struct __pyx_obj_6pandas_8_tseries_Slider *, Py_ssize_t);
  PyObject *(*cleanup)(struct __pyx_obj_6pandas_8_tseries_Slider *);
};
static struct __pyx_vtabstruct_6pandas_8_tseries_Slider *__pyx_vtabptr_6pandas_8_tseries_Slider;
static PyObject *__pyx_f_6pandas_8_tseries_6Slider_advance(struct __pyx_obj_6pandas_8_tseries_Slider *, Py_ssize_t);
static PyObject *__pyx_f_6pandas_8_tseries_6Slider_set_length(struct __pyx_obj_6pandas_8_tseries_Slider *, Py_ssize_t);
static PyObject *__pyx_f_6pandas_8_tseries_6Slider_cleanup(struct __pyx_obj_6pandas_8_tseries_Slider *);


/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":157
 *     return np.sort(uniques[:j])
 * 
 * cdef class StringHashTable:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */

struct __pyx_vtabstruct_6pandas_8_tseries_StringHashTable {
  int (*check_type)(struct __pyx_obj_6pandas_8_tseries_StringHashTable *, PyObject *);
  PyObject *(*get_item)(struct __pyx_obj_6pandas_8_tseries_StringHashTable *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*set_item)(struct __pyx_obj_6pandas_8_tseries_StringHashTable *, PyObject *, Py_ssize_t, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_8_tseries_StringHashTable *__pyx_vtabptr_6pandas_8_tseries_StringHashTable;
static int __pyx_f_6pandas_8_tseries_15StringHashTable_check_type(struct __pyx_obj_6pandas_8_tseries_StringHashTable *, PyObject *);


/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":389
 *         return reverse, labels, counts[:count].copy()
 * 
 * cdef class Int64HashTable:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */

struct __pyx_vtabstruct_6pandas_8_tseries_Int64HashTable {
  int (*has_key)(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *, __pyx_t_5numpy_int64_t);
  PyObject *(*get_item)(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch);
  PyObject *(*set_item)(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *, __pyx_t_5numpy_int64_t, Py_ssize_t, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_8_tseries_Int64HashTable *__pyx_vtabptr_6pandas_8_tseries_Int64HashTable;
static int __pyx_f_6pandas_8_tseries_14Int64HashTable_has_key(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *, __pyx_t_5numpy_int64_t);


/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":46
 * NIL = Node(np.inf, [], [])
 * 
 * cdef class IndexableSkiplist:             # <<<<<<<<<<<<<<
 *     '''
 *     Sorted collection supporting O(lg n) insertion, removal, and
 */

struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist {
  PyObject *(*get)(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *, Py_ssize_t, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *, double, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *, double, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *__pyx_vtabptr_6pandas_8_tseries_IndexableSkiplist;


/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":620
 * ONAN = np.nan
 * 
 * cdef class Float64HashTable:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */

struct __pyx_vtabstruct_6pandas_8_tseries_Float64HashTable {
  PyObject *(*get_labels)(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *, PyArrayObject *, PyObject *, Py_ssize_t, __pyx_t_5numpy_int32_t, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_8_tseries_Float64HashTable *__pyx_vtabptr_6pandas_8_tseries_Float64HashTable;


/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":731
 *         return uniques
 * 
 * cdef class PyObjectHashTable:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */

struct __pyx_vtabstruct_6pandas_8_tseries_PyObjectHashTable {
  PyObject *(*destroy)(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *, int __pyx_skip_dispatch);
  PyObject *(*get_item)(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*set_item)(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *, PyObject *, Py_ssize_t, int __pyx_skip_dispatch);
  PyObject *(*get_labels)(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *, PyArrayObject *, PyObject *, Py_ssize_t, __pyx_t_5numpy_int32_t, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_8_tseries_PyObjectHashTable *__pyx_vtabptr_6pandas_8_tseries_PyObjectHashTable;


/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":283
 *         return reverse, labels, counts[:count].copy()
 * 
 * cdef class Int32HashTable:             # <<<<<<<<<<<<<<
 * 
 *     cdef:
 */

struct __pyx_vtabstruct_6pandas_8_tseries_Int32HashTable {
  int (*check_type)(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *, PyObject *);
  PyObject *(*get_item)(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *, __pyx_t_5numpy_int32_t, int __pyx_skip_dispatch);
  PyObject *(*set_item)(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *, __pyx_t_5numpy_int32_t, Py_ssize_t, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_8_tseries_Int32HashTable *__pyx_vtabptr_6pandas_8_tseries_Int32HashTable;
static int __pyx_f_6pandas_8_tseries_14Int32HashTable_check_type(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *, PyObject *);


/* "pandas/src/tseries.pyx":85
 * from libc.stdlib cimport malloc, free
 * 
 * cdef class MultiMap:             # <<<<<<<<<<<<<<
 *     '''
 *     Need to come up with a better data structure for multi-level indexing
 */

struct __pyx_vtabstruct_6pandas_8_tseries_MultiMap {
  PyObject *(*populate)(struct __pyx_obj_6pandas_8_tseries_MultiMap *, __pyx_t_5numpy_int32_t **);
  PyObject *(*get)(struct __pyx_obj_6pandas_8_tseries_MultiMap *, PyObject *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6pandas_8_tseries_MultiMap *__pyx_vtabptr_6pandas_8_tseries_MultiMap;
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
  #define __Pyx_RefNannySetupContext(name)           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
  #define __Pyx_RefNannyFinishContext()           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif /* CYTHON_REFNANNY */
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/

static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/

static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
    const char* function_name); /*proto*/

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_List_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
    if (likely(o != Py_None)) {
        if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
            PyObject *r = PyList_GET_ITEM(o, i);
            Py_INCREF(r);
            return r;
        }
        else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
            PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
            Py_INCREF(r);
            return r;
        }
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}
#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Tuple_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
    if (likely(o != Py_None)) {
        if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, i);
            Py_INCREF(r);
            return r;
        }
        else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
            PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
            Py_INCREF(r);
            return r;
        }
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}
#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_GetItemInt_Fast(o, i) : \
                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
    if (PyList_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (likely(i >= 0)) {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            return m->sq_item(o, i);
        }
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact); /*proto*/

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/

#define IS_UNSIGNED(type) (((type) -1) > 0)
struct __Pyx_StructField_;
#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
typedef struct {
  const char* name; /* for error messages only */
  struct __Pyx_StructField_* fields;
  size_t size;     /* sizeof(type) */
  size_t arraysize[8]; /* length of array in each dimension */
  int ndim;
  char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject */
  char is_unsigned;
  int flags;
} __Pyx_TypeInfo;
typedef struct __Pyx_StructField_ {
  __Pyx_TypeInfo* type;
  const char* name;
  size_t offset;
} __Pyx_StructField;
typedef struct {
  __Pyx_StructField* field;
  size_t parent_offset;
} __Pyx_BufFmt_StackElem;
typedef struct {
  __Pyx_StructField root;
  __Pyx_BufFmt_StackElem* head;
  size_t fmt_offset;
  size_t new_count, enc_count;
  size_t struct_alignment;
  int is_complex;
  char enc_type;
  char new_packmode;
  char enc_packmode;
  char is_valid_array;
} __Pyx_BufFmt_Context;

static CYTHON_INLINE int  __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj,
    __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);

static void __Pyx_RaiseBufferFallbackError(void); /*proto*/

static CYTHON_INLINE int __Pyx_NegateNonNeg(int b) {
    return unlikely(b < 0) ? b : !b;
}
static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) {
    return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b);
}

static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/

#define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0)
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/

#define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1)
static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void);

#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    if (unlikely(d == Py_None)) {
        __Pyx_RaiseNoneIndexingError();
        return NULL;
    }
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred())
            PyErr_SetObject(PyExc_KeyError, key);
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#else
    #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#endif

#define __Pyx_SetItemInt(o, i, v, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
                                                    __Pyx_SetItemInt_Fast(o, i, v) : \
                                                    __Pyx_SetItemInt_Generic(o, to_py_func(i), v))
static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (!j) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v) {
    if (PyList_CheckExact(o)) {
        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    }
    else if (likely(i >= 0)) {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_ass_item)) {
            return m->sq_ass_item(o, i, v);
        }
    }
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static CYTHON_INLINE long __Pyx_mod_long(long, long); /* proto */

static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */

static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */

static CYTHON_INLINE Py_ssize_t __Pyx_mod_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /*proto*/

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/

static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
#define __Pyx_PyObject_AsDouble(obj) \
((likely(PyFloat_CheckExact(obj))) ? \
 PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/

typedef struct {
  Py_ssize_t shape, strides, suboffsets;
} __Pyx_Buf_DimInfo;
typedef struct {
  size_t refcount;
  Py_buffer pybuffer;
} __Pyx_Buffer;
typedef struct {
  __Pyx_Buffer *rcbuffer;
  char *data;
  __Pyx_Buf_DimInfo diminfo[8];
} __Pyx_LocalBuf_ND;

#if PY_MAJOR_VERSION < 3
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
static void __Pyx_ReleaseBuffer(Py_buffer *view);
#else
#define __Pyx_GetBuffer PyObject_GetBuffer
#define __Pyx_ReleaseBuffer PyBuffer_Release
#endif
Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0};
Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1};

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/

static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name);

#define __Pyx_CyFunction_USED 1
#include <structmember.h>
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CyFunction_GetClosure(f) \
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#define __Pyx_CyFunction_GetClassObj(f) \
    (((__pyx_CyFunctionObject *) (f))->func_classobj)
#define __Pyx_CyFunction_Defaults(type, f) \
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
typedef struct {
    PyCFunctionObject func;
    int flags;
    PyObject *func_dict;
    PyObject *func_weakreflist;
    PyObject *func_name;
    PyObject *func_doc;
    PyObject *func_code;
    PyObject *func_closure;
    PyObject *func_classobj; /* No-args super() class cell */
    void *defaults;
    int defaults_pyobjects;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
#define __Pyx_CyFunction_NewEx(ml, flags, self, module, code) \
    __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, self, module, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *,
                                      PyMethodDef *ml, int flags,
                                      PyObject *self, PyObject *module,
                                      PyObject* code);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static int __Pyx_CyFunction_init(void);

static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/

static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
                                   PyObject *modname); /*proto*/

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64);

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32);

static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject *);

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_uint8(npy_uint8);

static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject *);

static CYTHON_INLINE npy_uint8 __Pyx_PyInt_from_py_npy_uint8(PyObject *);

#include <string.h>

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/

static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/

#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

static CYTHON_INLINE npy_uint32 __Pyx_PyInt_from_py_npy_uint32(PyObject *);

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_uint32(npy_uint32);

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    #define __Pyx_CREAL(z) ((z).real())
    #define __Pyx_CIMAG(z) ((z).imag())
  #else
    #define __Pyx_CREAL(z) (__real__(z))
    #define __Pyx_CIMAG(z) (__imag__(z))
  #endif
#else
    #define __Pyx_CREAL(z) ((z).real)
    #define __Pyx_CIMAG(z) ((z).imag)
#endif
#if defined(_WIN32) && defined(__cplusplus) && CYTHON_CCOMPLEX
    #define __Pyx_SET_CREAL(z,x) ((z).real(x))
    #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
#else
    #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
    #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
#endif

static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);

#if CYTHON_CCOMPLEX
    #define __Pyx_c_eqf(a, b)   ((a)==(b))
    #define __Pyx_c_sumf(a, b)  ((a)+(b))
    #define __Pyx_c_difff(a, b) ((a)-(b))
    #define __Pyx_c_prodf(a, b) ((a)*(b))
    #define __Pyx_c_quotf(a, b) ((a)/(b))
    #define __Pyx_c_negf(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zerof(z) ((z)==(float)0)
    #define __Pyx_c_conjf(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_absf(z)     (::std::abs(z))
        #define __Pyx_c_powf(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zerof(z) ((z)==0)
    #define __Pyx_c_conjf(z)    (conjf(z))
    #if 1
        #define __Pyx_c_absf(z)     (cabsf(z))
        #define __Pyx_c_powf(a, b)  (cpowf(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex, __pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex);
    static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex);
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex);
    #if 1
        static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex);
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex, __pyx_t_float_complex);
    #endif
#endif

static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);

#if CYTHON_CCOMPLEX
    #define __Pyx_c_eq(a, b)   ((a)==(b))
    #define __Pyx_c_sum(a, b)  ((a)+(b))
    #define __Pyx_c_diff(a, b) ((a)-(b))
    #define __Pyx_c_prod(a, b) ((a)*(b))
    #define __Pyx_c_quot(a, b) ((a)/(b))
    #define __Pyx_c_neg(a)     (-(a))
  #ifdef __cplusplus
    #define __Pyx_c_is_zero(z) ((z)==(double)0)
    #define __Pyx_c_conj(z)    (::std::conj(z))
    #if 1
        #define __Pyx_c_abs(z)     (::std::abs(z))
        #define __Pyx_c_pow(a, b)  (::std::pow(a, b))
    #endif
  #else
    #define __Pyx_c_is_zero(z) ((z)==0)
    #define __Pyx_c_conj(z)    (conj(z))
    #if 1
        #define __Pyx_c_abs(z)     (cabs(z))
        #define __Pyx_c_pow(a, b)  (cpow(a, b))
    #endif
 #endif
#else
    static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex, __pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex);
    static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex);
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex);
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex);
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex, __pyx_t_double_complex);
    #endif
#endif

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);

static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename); /*proto*/

static int __Pyx_check_binary_version(void);

static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);  /*proto*/

static PyObject *__Pyx_ImportModule(const char *name); /*proto*/

static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/

static void __Pyx_AddTraceback(const char *funcname, int __pyx_clineno,
                               int __pyx_lineno, const char *__pyx_filename); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/


/* Module declarations from 'cpython.buffer' */

/* Module declarations from 'cpython.ref' */

/* Module declarations from 'libc.stdio' */

/* Module declarations from 'cpython.object' */

/* Module declarations from 'libc.stdlib' */

/* Module declarations from 'numpy' */

/* Module declarations from 'numpy' */
static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *); /*proto*/

/* Module declarations from 'cython' */

/* Module declarations from 'cpython.version' */

/* Module declarations from 'cpython.exc' */

/* Module declarations from 'cpython.module' */

/* Module declarations from 'cpython.mem' */

/* Module declarations from 'cpython.tuple' */

/* Module declarations from 'cpython.list' */

/* Module declarations from 'cpython.sequence' */

/* Module declarations from 'cpython.mapping' */

/* Module declarations from 'cpython.iterator' */

/* Module declarations from 'cpython.type' */

/* Module declarations from 'cpython.number' */

/* Module declarations from 'cpython.int' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.bool' */
static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;

/* Module declarations from 'cpython.long' */

/* Module declarations from 'cpython.float' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.complex' */
static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;

/* Module declarations from 'cpython.string' */

/* Module declarations from 'cpython.unicode' */

/* Module declarations from 'cpython.dict' */

/* Module declarations from 'cpython.instance' */

/* Module declarations from 'cpython.function' */

/* Module declarations from 'cpython.method' */

/* Module declarations from 'cpython.weakref' */

/* Module declarations from 'cpython.getargs' */

/* Module declarations from 'cpython.pythread' */

/* Module declarations from 'cpython.pystate' */

/* Module declarations from 'cpython.cobject' */

/* Module declarations from 'cpython.oldbuffer' */

/* Module declarations from 'cpython.set' */

/* Module declarations from 'cpython.bytes' */

/* Module declarations from 'cpython.pycapsule' */

/* Module declarations from 'cpython' */

/* Module declarations from 'util' */
static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *); /*proto*/

/* Module declarations from 'datetime' */

/* Module declarations from 'skiplist' */

/* Module declarations from 'khash' */

/* Module declarations from 'pandas._tseries' */
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_datetime = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_MultiMap = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_Node = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_IndexableSkiplist = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_Reducer = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_SeriesGrouper = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_Slider = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_cache_readonly = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_AxisProperty = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_SeriesIndex = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_ValuesProperty = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_StringHashTable = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_Int32HashTable = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_Int64HashTable = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_Float64HashTable = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_PyObjectHashTable = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_Factorizer = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_Int64Factorizer = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries_DictFactorizer = 0;
static PyTypeObject *__pyx_ptype_6pandas_8_tseries___pyx_scope_struct__try_parse_dates = 0;
static double __pyx_v_6pandas_8_tseries_NaN;
static double __pyx_v_6pandas_8_tseries_nan;
static int __pyx_v_6pandas_8_tseries__EPOCH_ORD;
static double __pyx_v_6pandas_8_tseries_INF;
static double __pyx_v_6pandas_8_tseries_NEGINF;
static __pyx_t_5numpy_float64_t __pyx_v_6pandas_8_tseries_FP_ERR;
static int __pyx_v_6pandas_8_tseries_TIEBREAK_AVERAGE;
static int __pyx_v_6pandas_8_tseries_TIEBREAK_MIN;
static int __pyx_v_6pandas_8_tseries_TIEBREAK_MAX;
static int __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST;
static int __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST_DESCENDING;
static CYTHON_INLINE int __pyx_f_6pandas_8_tseries_int_max(int, int); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_map_indices_list(PyObject *, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_8_tseries_gmtime(PyObject *); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_to_datetime(__pyx_t_5numpy_int64_t, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_to_timestamp(PyObject *, int __pyx_skip_dispatch); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_8_tseries__checknull(PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_8_tseries__checknan(PyObject *); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_checknull(PyObject *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_6pandas_8_tseries_Log2(double); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_groupby_indices_naive(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries__roll_skiplist_op(PyArrayObject *, int, int, __pyx_t_6pandas_8_tseries_skiplist_f); /*proto*/
static __pyx_t_5numpy_double_t __pyx_f_6pandas_8_tseries__get_median(PyObject *, int, int); /*proto*/
static __pyx_t_5numpy_double_t __pyx_f_6pandas_8_tseries__get_max(PyObject *, int, int); /*proto*/
static __pyx_t_5numpy_double_t __pyx_f_6pandas_8_tseries__get_min(PyObject *, int, int); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_map_indices_float64(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_map_indices_object(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_map_indices_int32(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_map_indices_int64(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_map_indices_bool(PyArrayObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries__take_2d_float64(PyArrayObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries__take_2d_int64(PyArrayObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries__take_2d_object(PyArrayObject *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_6pandas_8_tseries_are_diff(PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE int __pyx_f_6pandas_8_tseries_is_datetime(PyObject *); /*proto*/
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t = { "uint8_t", NULL, sizeof(__pyx_t_5numpy_uint8_t), { 0 }, 0, 'U', IS_UNSIGNED(__pyx_t_5numpy_uint8_t), 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_object = { "Python object", NULL, sizeof(PyObject *), { 0 }, 0, 'O', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t = { "int64_t", NULL, sizeof(__pyx_t_5numpy_int64_t), { 0 }, 0, 'I', IS_UNSIGNED(__pyx_t_5numpy_int64_t), 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), { 0 }, 0, 'R', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), { 0 }, 0, 'R', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t = { "int8_t", NULL, sizeof(__pyx_t_5numpy_int8_t), { 0 }, 0, 'I', IS_UNSIGNED(__pyx_t_5numpy_int8_t), 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t = { "int32_t", NULL, sizeof(__pyx_t_5numpy_int32_t), { 0 }, 0, 'I', IS_UNSIGNED(__pyx_t_5numpy_int32_t), 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_double_t = { "double_t", NULL, sizeof(__pyx_t_5numpy_double_t), { 0 }, 0, 'R', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_Py_ssize_t = { "Py_ssize_t", NULL, sizeof(Py_ssize_t), { 0 }, 0, 'I', IS_UNSIGNED(Py_ssize_t), 0 };
#define __Pyx_MODULE_NAME "pandas._tseries"
int __pyx_module_is_main_pandas___tseries = 0;

/* Implementation of 'pandas._tseries' */
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_Exception;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_AssertionError;
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_lambda_funcdef_6pandas_8_tseries_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_lambda_funcdef_6pandas_8_tseries_lambda2(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_map_indices_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index); /* proto */
static int __pyx_pf_6pandas_8_tseries_8MultiMap___init__(struct __pyx_obj_6pandas_8_tseries_MultiMap *__pyx_v_self, PyObject *__pyx_v_label_arrays); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_8MultiMap_2get(struct __pyx_obj_6pandas_8_tseries_MultiMap *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_2ismember(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_4to_datetime(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_timestamp); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_6to_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_8array_to_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_10array_to_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_12checknull(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14isnullobj(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_16isnullobj2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_18list_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_20fast_unique(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_22fast_unique_multiple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrays); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_24fast_unique_multiple_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lists); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_26fast_unique_multiple_list_gen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gen); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_28dicts_to_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dicts, PyObject *__pyx_v_columns); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_30fast_zip(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ndarrays); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_32has_infs_f4(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_34has_infs_f8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_36convert_timestamps(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_38scalar_compare(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val, PyObject *__pyx_v_op); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_40vec_compare(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyObject *__pyx_v_op); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_42scalar_binop(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val, PyObject *__pyx_v_op); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_44vec_binop(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyObject *__pyx_v_op); /* proto */
static int __pyx_pf_6pandas_8_tseries_4Node___init__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self, __pyx_t_5numpy_double_t __pyx_v_value, PyObject *__pyx_v_next, PyObject *__pyx_v_width); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_4Node_5value___get__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_4Node_5value_2__set__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_4Node_4next___get__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_4Node_4next_2__set__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_8_tseries_4Node_4next_4__del__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_4Node_5width___get__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_4Node_5width_2__set__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_8_tseries_4Node_5width_4__del__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_17IndexableSkiplist___init__(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_self, PyObject *__pyx_v_expected_size); /* proto */
static Py_ssize_t __pyx_pf_6pandas_8_tseries_17IndexableSkiplist_2__len__(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_17IndexableSkiplist_4__getitem__(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_17IndexableSkiplist_6get(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_self, Py_ssize_t __pyx_v_i); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_17IndexableSkiplist_8insert(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_self, double __pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_17IndexableSkiplist_10remove(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_self, double __pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_46arrmap(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_48groupby_func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyObject *__pyx_v_mapper); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_50func_groupby_indices(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyObject *__pyx_v_mapper); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_52groupby_indices_naive(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_54groupby_indices(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_56is_lexsorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_58group_labels(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_60get_unique_labels(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_idMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_62groupsort_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, Py_ssize_t __pyx_v_ngroups); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_64group_add(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_66group_mean(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_68group_var(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_70group_count(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, Py_ssize_t __pyx_v_size); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_72lookup_values(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_mapping); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_74reduce_mean(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indices, PyArrayObject *__pyx_v_buckets, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_inclusive); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_76_bucket_locs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyObject *__pyx_v_buckets, PyObject *__pyx_v_inclusive); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_78count_level_1d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_80count_level_2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_82duplicated(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values, PyObject *__pyx_v_take_last); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_84generate_slices(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_86ts_upsample_generic(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indices, PyArrayObject *__pyx_v_buckets, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_aggfunc, PyObject *__pyx_v_inclusive); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_88kth_smallest(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, Py_ssize_t __pyx_v_k); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_90median(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_92roll_sum(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_94roll_mean(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_96ewma(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, __pyx_t_5numpy_double_t __pyx_v_com); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_98_check_minp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_minp, PyObject *__pyx_v_N); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_100roll_var(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_102roll_skew(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_104roll_kurt(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_106roll_median_c(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arg, int __pyx_v_win, int __pyx_v_minp); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_108roll_median_cython(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_110roll_max(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_112roll_min(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_114roll_quantile(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp, double __pyx_v_quantile); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_116roll_generic(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_118pad_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_120get_pad_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_122get_backfill_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_124backfill_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_126ordered_left_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_128left_join_2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyArrayObject *__pyx_v_lvalues, PyArrayObject *__pyx_v_rvalues, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_130left_join_1d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyArrayObject *__pyx_v_lvalues, PyArrayObject *__pyx_v_rvalues, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_132take_join_contiguous(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_lvalues, PyArrayObject *__pyx_v_rvalues, PyArrayObject *__pyx_v_lindexer, PyArrayObject *__pyx_v_rindexer, PyArrayObject *__pyx_v_out); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_134merge_indexer_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values, PyObject *__pyx_v_oldMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_136map_indices_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_138map_indices_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_140map_indices_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_142map_indices_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_144map_indices_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_146merge_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_oldMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_148merge_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_oldMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_150merge_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_oldMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_152merge_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_oldMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_154merge_indexer_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_oldMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_156pad_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_158pad_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_160pad_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_162pad_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_164pad_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_166backfill_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_168backfill_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_170backfill_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_172backfill_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_174backfill_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_176pad_2d_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_178pad_2d_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_180pad_2d_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_182pad_2d_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_184pad_2d_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_186backfill_2d_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_188backfill_2d_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_190backfill_2d_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_192backfill_2d_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_194backfill_2d_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_196take_1d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_198take_1d_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_200take_1d_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_202take_1d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_204take_1d_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_206is_monotonic_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_208is_monotonic_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_210is_monotonic_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_212is_monotonic_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_214is_monotonic_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_216groupby_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_218groupby_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_220groupby_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_222groupby_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_224groupby_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_226arrmap_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_228arrmap_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_230arrmap_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_232arrmap_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_234arrmap_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_236take_2d_axis0_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_238take_2d_axis0_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_240take_2d_axis0_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_242take_2d_axis0_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_244take_2d_axis0_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_246take_2d_axis1_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_248take_2d_axis1_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_250take_2d_axis1_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_252take_2d_axis1_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_254take_2d_axis1_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_256left_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_258left_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_260left_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_262left_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_264outer_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_266outer_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_268outer_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_270outer_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_272inner_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_274inner_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_276inner_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_278inner_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right); /* proto */
static int __pyx_pf_6pandas_8_tseries_7Reducer___init__(struct __pyx_obj_6pandas_8_tseries_Reducer *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_f, PyObject *__pyx_v_axis, PyObject *__pyx_v_dummy); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_7Reducer_2_check_dummy(struct __pyx_obj_6pandas_8_tseries_Reducer *__pyx_v_self, PyObject *__pyx_v_dummy); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_7Reducer_4get_result(struct __pyx_obj_6pandas_8_tseries_Reducer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_7Reducer_6_get_result_array(struct __pyx_obj_6pandas_8_tseries_Reducer *__pyx_v_self, PyObject *__pyx_v_res); /* proto */
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper___init__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_series, PyObject *__pyx_v_f, PyObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups, PyObject *__pyx_v_dummy); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_2_check_dummy(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_dummy); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_4get_result(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_6_get_result_array(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_res); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_3arr___get__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_3arr_2__set__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_3arr_4__del__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index___get__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index_2__set__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index_4__del__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy___get__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy_2__set__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy_4__del__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f___get__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f_2__set__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f_4__del__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels___get__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels_2__set__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels_4__del__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_6Slider___init__(struct __pyx_obj_6pandas_8_tseries_Slider *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_buf); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_280reduce(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_f, PyObject *__pyx_v_axis, PyObject *__pyx_v_dummy); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_282rank_1d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_284rank_1d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_286rank_2d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_288rank_2d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_290rank_1d_generic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, int __pyx_v_retry, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_292rank_2d_generic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending); /* proto */
static int __pyx_pf_6pandas_8_tseries_14cache_readonly___init__(struct __pyx_obj_6pandas_8_tseries_cache_readonly *__pyx_v_self, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14cache_readonly_2__get__(struct __pyx_obj_6pandas_8_tseries_cache_readonly *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14cache_readonly_4fget___get__(struct __pyx_obj_6pandas_8_tseries_cache_readonly *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14cache_readonly_4name___get__(struct __pyx_obj_6pandas_8_tseries_cache_readonly *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_12AxisProperty___init__(struct __pyx_obj_6pandas_8_tseries_AxisProperty *__pyx_v_self, PyObject *__pyx_v_axis); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_12AxisProperty_2__get__(struct __pyx_obj_6pandas_8_tseries_AxisProperty *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type); /* proto */
static int __pyx_pf_6pandas_8_tseries_12AxisProperty_4__set__(struct __pyx_obj_6pandas_8_tseries_AxisProperty *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_8_tseries_11SeriesIndex___init__(struct __pyx_obj_6pandas_8_tseries_SeriesIndex *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_11SeriesIndex_2__get__(CYTHON_UNUSED struct __pyx_obj_6pandas_8_tseries_SeriesIndex *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type); /* proto */
static int __pyx_pf_6pandas_8_tseries_11SeriesIndex_4__set__(struct __pyx_obj_6pandas_8_tseries_SeriesIndex *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14ValuesProperty___get__(CYTHON_UNUSED struct __pyx_obj_6pandas_8_tseries_ValuesProperty *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_294infer_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_296infer_dtype_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_298is_bool_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_300is_integer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_302is_integer_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_304is_float_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_306is_string_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_308is_datetime_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_310maybe_convert_numeric(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_na_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_312maybe_convert_objects(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_objects, int __pyx_v_try_float, int __pyx_v_safe); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_314convert_sql_column(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_15try_parse_dates_parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_316try_parse_dates(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_parser); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_318sanitize_objects(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_na_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_320maybe_convert_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_322map_infer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_f); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_324to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rows); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_326tuples_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tuples); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_328to_object_array_tuples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rows); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_330fast_multiget(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mapping, PyArrayObject *__pyx_v_keys, PyObject *__pyx_v_default); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_332get_reverse_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer, Py_ssize_t __pyx_v_length); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_334test(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, Py_ssize_t __pyx_v_size_hint); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_336test_str(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, Py_ssize_t __pyx_v_size_hint); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_338obj_unique(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_340int64_unique(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr); /* proto */
static int __pyx_pf_6pandas_8_tseries_15StringHashTable___init__(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */
static int __pyx_pf_6pandas_8_tseries_15StringHashTable_2__cinit__(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self); /* proto */
static void __pyx_pf_6pandas_8_tseries_15StringHashTable_4__dealloc__(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_6get_item(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_8get_iter_test(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_iterations); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_10set_item(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_12get_indexer(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_14unique(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_16factorize(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static int __pyx_pf_6pandas_8_tseries_14Int32HashTable___init__(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */
static int __pyx_pf_6pandas_8_tseries_14Int32HashTable_2__cinit__(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self); /* proto */
static void __pyx_pf_6pandas_8_tseries_14Int32HashTable_4__dealloc__(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_6get_item(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_8get_iter_test(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, CYTHON_UNUSED __pyx_t_5numpy_int32_t __pyx_v_key, Py_ssize_t __pyx_v_iterations); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_10set_item(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_key, Py_ssize_t __pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_12map_locations(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_14lookup(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_16factorize(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static int __pyx_pf_6pandas_8_tseries_14Int64HashTable___init__(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */
static int __pyx_pf_6pandas_8_tseries_14Int64HashTable_2__cinit__(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self); /* proto */
static void __pyx_pf_6pandas_8_tseries_14Int64HashTable_4__dealloc__(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_6get_item(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_8get_iter_test(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_key, Py_ssize_t __pyx_v_iterations); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_10set_item(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_key, Py_ssize_t __pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_12map(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_keys, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_14map_locations(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_16lookup(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_18lookup_i4(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_20factorize(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_22get_labels(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, CYTHON_UNUSED Py_ssize_t __pyx_v_na_sentinel); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_24get_labels_groupby(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_uniques); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_26unique(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_342value_count_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static int __pyx_pf_6pandas_8_tseries_16Float64HashTable___init__(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */
static int __pyx_pf_6pandas_8_tseries_16Float64HashTable_2__cinit__(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self); /* proto */
static void __pyx_pf_6pandas_8_tseries_16Float64HashTable_4__dealloc__(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_16Float64HashTable_6factorize(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_16Float64HashTable_8get_labels(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, __pyx_t_5numpy_int32_t __pyx_v_na_sentinel); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_16Float64HashTable_10map_locations(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_16Float64HashTable_12lookup(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_16Float64HashTable_14unique(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static int __pyx_pf_6pandas_8_tseries_17PyObjectHashTable___init__(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */
static void __pyx_pf_6pandas_8_tseries_17PyObjectHashTable_2__dealloc__(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_4destroy(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_6get_item(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_8get_iter_test(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_iterations); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_10set_item(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_12map_locations(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_14lookup(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_16lookup2(CYTHON_UNUSED struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_18unique(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_20get_labels(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, __pyx_t_5numpy_int32_t __pyx_v_na_sentinel); /* proto */
static int __pyx_pf_6pandas_8_tseries_10Factorizer___init__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_2get_count(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_4factorize(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_sort, PyObject *__pyx_v_na_sentinel); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_6unique(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_5table___get__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_10Factorizer_5table_2__set__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_8_tseries_10Factorizer_5table_4__del__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_7uniques___get__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_10Factorizer_7uniques_2__set__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_8_tseries_10Factorizer_7uniques_4__del__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_5count___get__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_10Factorizer_5count_2__set__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer___init__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_size_hint); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_2get_count(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_4factorize(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_sort); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table___get__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table_2__set__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table_4__del__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques___get__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques_2__set__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques_4__del__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_5count___get__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5count_2__set__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_8_tseries_14DictFactorizer___init__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self, PyObject *__pyx_v_table, PyObject *__pyx_v_uniques); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_2get_count(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_4get_labels(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_6factorize(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_sort); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_8unique(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_10unique_int64(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_5table___get__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_5table_2__set__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_5table_4__del__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques___get__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques_2__set__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques_4__del__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_5count___get__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self); /* proto */
static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_5count_2__set__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_344lookup2(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_346inner_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_348left_outer_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups, PyObject *__pyx_v_sort); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_350full_outer_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_352_get_result_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sorter, PyObject *__pyx_v_indexer); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_354join_sorter(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, Py_ssize_t __pyx_v_ngroups); /* proto */
static PyObject *__pyx_pf_6pandas_8_tseries_356_big_join_sorter(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_index); /* proto */
static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
static char __pyx_k_1[] = "all arrays but be same length";
static char __pyx_k_3[] = "Unrecognized operator";
static char __pyx_k_6[] = "Not Found";
static char __pyx_k_8[] = "maybe_convert_objects";
static char __pyx_k_13[] = "min_periods must be >= 0";
static char __pyx_k_28[] = "No NA values allowed";
static char __pyx_k_60[] = "Dummy array must be same dtype";
static char __pyx_k_62[] = "Dummy array must be length %d";
static char __pyx_k_63[] = "function does not reduce";
static char __pyx_k_91[] = "first not supported for non-numeric data";
static char __pyx_k__A[] = "A";
static char __pyx_k__B[] = "B";
static char __pyx_k__C[] = "C";
static char __pyx_k__D[] = "D";
static char __pyx_k__F[] = "F";
static char __pyx_k__H[] = "H";
static char __pyx_k__I[] = "I";
static char __pyx_k__K[] = "K";
static char __pyx_k__L[] = "L";
static char __pyx_k__N[] = "N";
static char __pyx_k__O[] = "O";
static char __pyx_k__Q[] = "Q";
static char __pyx_k__R[] = "R";
static char __pyx_k__T[] = "T";
static char __pyx_k__a[] = "a";
static char __pyx_k__b[] = "b";
static char __pyx_k__d[] = "d";
static char __pyx_k__f[] = "f";
static char __pyx_k__g[] = "g";
static char __pyx_k__h[] = "h";
static char __pyx_k__i[] = "i";
static char __pyx_k__j[] = "j";
static char __pyx_k__k[] = "k";
static char __pyx_k__l[] = "l";
static char __pyx_k__m[] = "m";
static char __pyx_k__n[] = "n";
static char __pyx_k__o[] = "o";
static char __pyx_k__q[] = "q";
static char __pyx_k__s[] = "s";
static char __pyx_k__t[] = "t";
static char __pyx_k__x[] = "x";
static char __pyx_k__y[] = "y";
static char __pyx_k__z[] = "z";
static char __pyx_k_101[] = "pandas.core.index";
static char __pyx_k_102[] = "Index length did not match values";
static char __pyx_k_104[] = "list_to_object_array";
static char __pyx_k_106[] = "mixed-integer";
static char __pyx_k_107[] = ".";
static char __pyx_k_108[] = "%m/%d/%Y";
static char __pyx_k_111[] = "/home/wesm/code/pandas/pandas/src/inference.pyx";
static char __pyx_k_112[] = "pandas._tseries";
static char __pyx_k_113[] = "";
static char __pyx_k_121[] = "ndarray is not C contiguous";
static char __pyx_k_123[] = "ndarray is not Fortran contiguous";
static char __pyx_k_125[] = "Non-native byte order not supported";
static char __pyx_k_127[] = "unknown dtype code in numpy.pxd (%d)";
static char __pyx_k_128[] = "Format string allocated too short, see comment in numpy.pxd";
static char __pyx_k_131[] = "Format string allocated too short.";
static char __pyx_k_133[] = "index out of bounds";
static char __pyx_k_138[] = "/home/wesm/code/pandas/pandas/src/tseries.pyx";
static char __pyx_k_153[] = "fast_unique_multiple";
static char __pyx_k_156[] = "fast_unique_multiple_list";
static char __pyx_k_159[] = "fast_unique_multiple_list_gen";
static char __pyx_k_180[] = "/home/wesm/code/pandas/pandas/src/groupby.pyx";
static char __pyx_k_185[] = "func_groupby_indices";
static char __pyx_k_222[] = "/home/wesm/code/pandas/pandas/src/moments.pyx";
static char __pyx_k_253[] = "/home/wesm/code/pandas/pandas/src/reindex.pyx";
static char __pyx_k_258[] = "get_backfill_indexer";
static char __pyx_k_261[] = "backfill_inplace_float64";
static char __pyx_k_270[] = "take_join_contiguous";
static char __pyx_k_275[] = "merge_indexer_float64";
static char __pyx_k_276[] = "/home/wesm/code/pandas/pandas/src/generated.pyx";
static char __pyx_k_279[] = "merge_indexer_object";
static char __pyx_k_308[] = "pad_2d_inplace_float64";
static char __pyx_k_311[] = "pad_2d_inplace_object";
static char __pyx_k_314[] = "pad_2d_inplace_int32";
static char __pyx_k_317[] = "pad_2d_inplace_int64";
static char __pyx_k_322[] = "backfill_2d_inplace_float64";
static char __pyx_k_325[] = "backfill_2d_inplace_object";
static char __pyx_k_328[] = "backfill_2d_inplace_int32";
static char __pyx_k_331[] = "backfill_2d_inplace_int64";
static char __pyx_k_334[] = "backfill_2d_inplace_bool";
static char __pyx_k_347[] = "is_monotonic_float64";
static char __pyx_k_378[] = "take_2d_axis0_float64";
static char __pyx_k_381[] = "take_2d_axis0_object";
static char __pyx_k_390[] = "take_2d_axis1_float64";
static char __pyx_k_393[] = "take_2d_axis1_object";
static char __pyx_k_402[] = "left_join_indexer_float64";
static char __pyx_k_405[] = "left_join_indexer_object";
static char __pyx_k_408[] = "left_join_indexer_int32";
static char __pyx_k_411[] = "left_join_indexer_int64";
static char __pyx_k_414[] = "outer_join_indexer_float64";
static char __pyx_k_417[] = "outer_join_indexer_object";
static char __pyx_k_420[] = "outer_join_indexer_int32";
static char __pyx_k_423[] = "outer_join_indexer_int64";
static char __pyx_k_426[] = "inner_join_indexer_float64";
static char __pyx_k_429[] = "inner_join_indexer_object";
static char __pyx_k_432[] = "inner_join_indexer_int32";
static char __pyx_k_435[] = "inner_join_indexer_int64";
static char __pyx_k_438[] = "/home/wesm/code/pandas/pandas/src/reduce.pyx";
static char __pyx_k_441[] = "/home/wesm/code/pandas/pandas/src/stats.pyx";
static char __pyx_k_470[] = "maybe_convert_numeric";
static char __pyx_k_487[] = "tuples_to_object_array";
static char __pyx_k_490[] = "to_object_array_tuples";
static char __pyx_k_495[] = "/home/wesm/code/pandas/pandas/src/internals.pyx";
static char __pyx_k_498[] = "/home/wesm/code/pandas/pandas/src/hashtable.pyx";
static char __pyx_k_511[] = "/home/wesm/code/pandas/pandas/src/join.pyx";
static char __pyx_k__Zd[] = "Zd";
static char __pyx_k__Zf[] = "Zf";
static char __pyx_k__Zg[] = "Zg";
static char __pyx_k__ct[] = "ct";
static char __pyx_k__eq[] = "eq";
static char __pyx_k__f8[] = "f8";
static char __pyx_k__fv[] = "fv";
static char __pyx_k__ge[] = "ge";
static char __pyx_k__gt[] = "gt";
static char __pyx_k__i4[] = "i4";
static char __pyx_k__i8[] = "i8";
static char __pyx_k__it[] = "it";
static char __pyx_k__lc[] = "lc";
static char __pyx_k__le[] = "le";
static char __pyx_k__lk[] = "lk";
static char __pyx_k__lt[] = "lt";
static char __pyx_k__ne[] = "ne";
static char __pyx_k__np[] = "np";
static char __pyx_k__op[] = "op";
static char __pyx_k__rc[] = "rc";
static char __pyx_k__rk[] = "rk";
static char __pyx_k__sl[] = "sl";
static char __pyx_k__xx[] = "xx";
static char __pyx_k__NIL[] = "NIL";
static char __pyx_k__NaN[] = "NaN";
static char __pyx_k___as[] = "_as";
static char __pyx_k__adj[] = "adj";
static char __pyx_k__arg[] = "arg";
static char __pyx_k__arr[] = "arr";
static char __pyx_k__buf[] = "buf";
static char __pyx_k__col[] = "col";
static char __pyx_k__com[] = "com";
static char __pyx_k__cur[] = "cur";
static char __pyx_k__gen[] = "gen";
static char __pyx_k__get[] = "get";
static char __pyx_k__ids[] = "ids";
static char __pyx_k__idx[] = "idx";
static char __pyx_k__inf[] = "inf";
static char __pyx_k__key[] = "key";
static char __pyx_k__lab[] = "lab";
static char __pyx_k__loc[] = "loc";
static char __pyx_k__max[] = "max";
static char __pyx_k__min[] = "min";
static char __pyx_k__nan[] = "nan";
static char __pyx_k__obj[] = "obj";
static char __pyx_k__out[] = "out";
static char __pyx_k__pre[] = "pre";
static char __pyx_k__put[] = "put";
static char __pyx_k__res[] = "res";
static char __pyx_k__ret[] = "ret";
static char __pyx_k__rev[] = "rev";
static char __pyx_k__row[] = "row";
static char __pyx_k__tmp[] = "tmp";
static char __pyx_k__tup[] = "tup";
static char __pyx_k__val[] = "val";
static char __pyx_k__win[] = "win";
static char __pyx_k__xxx[] = "xxx";
static char __pyx_k__ONAN[] = "ONAN";
static char __pyx_k__True[] = "True";
static char __pyx_k__args[] = "args";
static char __pyx_k__axes[] = "axes";
static char __pyx_k__axis[] = "axis";
static char __pyx_k__copy[] = "copy";
static char __pyx_k__data[] = "data";
static char __pyx_k__date[] = "date";
static char __pyx_k__done[] = "done";
static char __pyx_k__dups[] = "dups";
static char __pyx_k__ends[] = "ends";
static char __pyx_k__ewma[] = "ewma";
static char __pyx_k__fill[] = "fill";
static char __pyx_k__flag[] = "flag";
static char __pyx_k__fnan[] = "fnan";
static char __pyx_k__func[] = "func";
static char __pyx_k__fval[] = "fval";
static char __pyx_k__hval[] = "hval";
static char __pyx_k__infs[] = "infs";
static char __pyx_k__int8[] = "int8";
static char __pyx_k__int_[] = "int_";
static char __pyx_k__ints[] = "ints";
static char __pyx_k__item[] = "item";
static char __pyx_k__keys[] = "keys";
static char __pyx_k__kind[] = "kind";
static char __pyx_k__left[] = "left";
static char __pyx_k__lidx[] = "lidx";
static char __pyx_k__locs[] = "locs";
static char __pyx_k__lval[] = "lval";
static char __pyx_k__mask[] = "mask";
static char __pyx_k__memo[] = "memo";
static char __pyx_k__minp[] = "minp";
static char __pyx_k__ndim[] = "ndim";
static char __pyx_k__neww[] = "neww";
static char __pyx_k__next[] = "next";
static char __pyx_k__nobs[] = "nobs";
static char __pyx_k__oldw[] = "oldw";
static char __pyx_k__onan[] = "onan";
static char __pyx_k__ones[] = "ones";
static char __pyx_k__prev[] = "prev";
static char __pyx_k__ridx[] = "ridx";
static char __pyx_k__rows[] = "rows";
static char __pyx_k__rval[] = "rval";
static char __pyx_k__safe[] = "safe";
static char __pyx_k__seen[] = "seen";
static char __pyx_k__self[] = "self";
static char __pyx_k__side[] = "side";
static char __pyx_k__size[] = "size";
static char __pyx_k__sort[] = "sort";
static char __pyx_k__stub[] = "stub";
static char __pyx_k__sumx[] = "sumx";
static char __pyx_k__take[] = "take";
static char __pyx_k__test[] = "test";
static char __pyx_k__time[] = "time";
static char __pyx_k__type[] = "type";
static char __pyx_k__vecs[] = "vecs";
static char __pyx_k__view[] = "view";
static char __pyx_k__xxxx[] = "xxxx";
static char __pyx_k__False[] = "False";
static char __pyx_k___data[] = "_data";
static char __pyx_k__array[] = "array";
static char __pyx_k__bool_[] = "bool_";
static char __pyx_k__bools[] = "bools";
static char __pyx_k__cache[] = "cache";
static char __pyx_k__count[] = "count";
static char __pyx_k__dicts[] = "dicts";
static char __pyx_k__dtype[] = "dtype";
static char __pyx_k__dummy[] = "dummy";
static char __pyx_k__empty[] = "empty";
static char __pyx_k__first[] = "first";
static char __pyx_k__flags[] = "flags";
static char __pyx_k__idMap[] = "idMap";
static char __pyx_k__index[] = "index";
static char __pyx_k__input[] = "input";
static char __pyx_k__int16[] = "int16";
static char __pyx_k__int32[] = "int32";
static char __pyx_k__int64[] = "int64";
static char __pyx_k__isnan[] = "isnan";
static char __pyx_k__kleft[] = "kleft";
static char __pyx_k__label[] = "label";
static char __pyx_k__lists[] = "lists";
static char __pyx_k__mixed[] = "mixed";
static char __pyx_k__nleft[] = "nleft";
static char __pyx_k__numpy[] = "numpy";
static char __pyx_k__other[] = "other";
static char __pyx_k__parse[] = "parse";
static char __pyx_k__range[] = "range";
static char __pyx_k__ranks[] = "ranks";
static char __pyx_k__retry[] = "retry";
static char __pyx_k__right[] = "right";
static char __pyx_k__shape[] = "shape";
static char __pyx_k__slobj[] = "slobj";
static char __pyx_k__start[] = "start";
static char __pyx_k__sum_x[] = "sum_x";
static char __pyx_k__sumxx[] = "sumxx";
static char __pyx_k__table[] = "table";
static char __pyx_k__uint8[] = "uint8";
static char __pyx_k__value[] = "value";
static char __pyx_k__where[] = "where";
static char __pyx_k__width[] = "width";
static char __pyx_k__zeros[] = "zeros";
static char __pyx_k____eq__[] = "__eq__";
static char __pyx_k____ge__[] = "__ge__";
static char __pyx_k____gt__[] = "__gt__";
static char __pyx_k____le__[] = "__le__";
static char __pyx_k____lt__[] = "__lt__";
static char __pyx_k____ne__[] = "__ne__";
static char __pyx_k___cache[] = "_cache";
static char __pyx_k___index[] = "_index";
static char __pyx_k__arange[] = "arange";
static char __pyx_k__arrays[] = "arrays";
static char __pyx_k__arrmap[] = "arrmap";
static char __pyx_k__astype[] = "astype";
static char __pyx_k__bufarr[] = "bufarr";
static char __pyx_k__counts[] = "counts";
static char __pyx_k__curLoc[] = "curLoc";
static char __pyx_k__curOld[] = "curOld";
static char __pyx_k__floats[] = "floats";
static char __pyx_k__in_arr[] = "in_arr";
static char __pyx_k__insert[] = "insert";
static char __pyx_k__jstart[] = "jstart";
static char __pyx_k__kright[] = "kright";
static char __pyx_k__labels[] = "labels";
static char __pyx_k__length[] = "length";
static char __pyx_k__mapper[] = "mapper";
static char __pyx_k__median[] = "median";
static char __pyx_k__neginf[] = "neginf";
static char __pyx_k__newMap[] = "newMap";
static char __pyx_k__newPos[] = "newPos";
static char __pyx_k__nright[] = "nright";
static char __pyx_k__objbuf[] = "objbuf";
static char __pyx_k__object[] = "object";
static char __pyx_k__offset[] = "offset";
static char __pyx_k__oldMap[] = "oldMap";
static char __pyx_k__oldPos[] = "oldPos";
static char __pyx_k__oldbuf[] = "oldbuf";
static char __pyx_k__outbuf[] = "outbuf";
static char __pyx_k__output[] = "output";
static char __pyx_k__parser[] = "parser";
static char __pyx_k__pydate[] = "pydate";
static char __pyx_k__random[] = "random";
static char __pyx_k__reduce[] = "reduce";
static char __pyx_k__remove[] = "remove";
static char __pyx_k__result[] = "result";
static char __pyx_k__series[] = "series";
static char __pyx_k__sorter[] = "sorter";
static char __pyx_k__starts[] = "starts";
static char __pyx_k__string[] = "string";
static char __pyx_k__sum_xx[] = "sum_xx";
static char __pyx_k__tuples[] = "tuples";
static char __pyx_k__uint16[] = "uint16";
static char __pyx_k__uint32[] = "uint32";
static char __pyx_k__uint64[] = "uint64";
static char __pyx_k__unique[] = "unique";
static char __pyx_k__values[] = "values";
static char __pyx_k____cmp__[] = "__cmp__";
static char __pyx_k___values[] = "_values";
static char __pyx_k__aggfunc[] = "aggfunc";
static char __pyx_k__argsort[] = "argsort";
static char __pyx_k__asarray[] = "asarray";
static char __pyx_k__average[] = "average";
static char __pyx_k__boolean[] = "boolean";
static char __pyx_k__buckets[] = "buckets";
static char __pyx_k__columns[] = "columns";
static char __pyx_k__complex[] = "complex";
static char __pyx_k__default[] = "default";
static char __pyx_k__destroy[] = "destroy";
static char __pyx_k__fillVec[] = "fillVec";
static char __pyx_k__float16[] = "float16";
static char __pyx_k__float32[] = "float32";
static char __pyx_k__float64[] = "float64";
static char __pyx_k__indexer[] = "indexer";
static char __pyx_k__indices[] = "indices";
static char __pyx_k__integer[] = "integer";
static char __pyx_k__lookup2[] = "lookup2";
static char __pyx_k__lvalues[] = "lvalues";
static char __pyx_k__mapping[] = "mapping";
static char __pyx_k__max_bin[] = "max_bin";
static char __pyx_k__members[] = "members";
static char __pyx_k__nextOld[] = "nextOld";
static char __pyx_k__ngroups[] = "ngroups";
static char __pyx_k__nlevels[] = "nlevels";
static char __pyx_k__nonzero[] = "nonzero";
static char __pyx_k__nvalues[] = "nvalues";
static char __pyx_k__object_[] = "object_";
static char __pyx_k__objects[] = "objects";
static char __pyx_k__prevOld[] = "prevOld";
static char __pyx_k__putmask[] = "putmask";
static char __pyx_k__reducer[] = "reducer";
static char __pyx_k__reverse[] = "reverse";
static char __pyx_k__rvalues[] = "rvalues";
static char __pyx_k__string_[] = "string_";
static char __pyx_k__the_sum[] = "the_sum";
static char __pyx_k__unicode[] = "unicode";
static char __pyx_k__uniques[] = "uniques";
static char __pyx_k__Infinity[] = "Infinity";
static char __pyx_k__KeyError[] = "KeyError";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____name__[] = "__name__";
static char __pyx_k____test__[] = "__test__";
static char __pyx_k__datetime[] = "datetime";
static char __pyx_k__dateutil[] = "dateutil";
static char __pyx_k__fast_zip[] = "fast_zip";
static char __pyx_k__fill_vec[] = "fill_vec";
static char __pyx_k__float128[] = "float128";
static char __pyx_k__floating[] = "floating";
static char __pyx_k__get_item[] = "get_item";
static char __pyx_k__isfinite[] = "isfinite";
static char __pyx_k__ismember[] = "ismember";
static char __pyx_k__itemsize[] = "itemsize";
static char __pyx_k__left_pos[] = "left_pos";
static char __pyx_k__lindexer[] = "lindexer";
static char __pyx_k__midpoint[] = "midpoint";
static char __pyx_k__na_count[] = "na_count";
static char __pyx_k__nbuckets[] = "nbuckets";
static char __pyx_k__ndarrays[] = "ndarrays";
static char __pyx_k__newIndex[] = "newIndex";
static char __pyx_k__oldIndex[] = "oldIndex";
static char __pyx_k__operator[] = "operator";
static char __pyx_k__pad_bool[] = "pad_bool";
static char __pyx_k__position[] = "position";
static char __pyx_k__quantile[] = "quantile";
static char __pyx_k__rindexer[] = "rindexer";
static char __pyx_k__roll_max[] = "roll_max";
static char __pyx_k__roll_min[] = "roll_min";
static char __pyx_k__roll_sum[] = "roll_sum";
static char __pyx_k__roll_var[] = "roll_var";
static char __pyx_k__seen_int[] = "seen_int";
static char __pyx_k__set_item[] = "set_item";
static char __pyx_k__skiplist[] = "skiplist";
static char __pyx_k__strptime[] = "strptime";
static char __pyx_k__test_str[] = "test_str";
static char __pyx_k__tiebreak[] = "tiebreak";
static char __pyx_k__unicode_[] = "unicode_";
static char __pyx_k__val_kind[] = "val_kind";
static char __pyx_k__Exception[] = "Exception";
static char __pyx_k__TypeError[] = "TypeError";
static char __pyx_k___TYPE_MAP[] = "_TYPE_MAP";
static char __pyx_k___set_axis[] = "_set_axis";
static char __pyx_k__argsorted[] = "argsorted";
static char __pyx_k__ascending[] = "ascending";
static char __pyx_k__complex64[] = "complex64";
static char __pyx_k__group_add[] = "group_add";
static char __pyx_k__group_var[] = "group_var";
static char __pyx_k__inclusive[] = "inclusive";
static char __pyx_k__index_buf[] = "index_buf";
static char __pyx_k__isnullobj[] = "isnullobj";
static char __pyx_k__map_infer[] = "map_infer";
static char __pyx_k__mergesort[] = "mergesort";
static char __pyx_k__na_values[] = "na_values";
static char __pyx_k__nan_value[] = "nan_value";
static char __pyx_k__newLength[] = "newLength";
static char __pyx_k__oldLength[] = "oldLength";
static char __pyx_k__pad_int32[] = "pad_int32";
static char __pyx_k__pad_int64[] = "pad_int64";
static char __pyx_k__right_pos[] = "right_pos";
static char __pyx_k__roll_kurt[] = "roll_kurt";
static char __pyx_k__roll_mean[] = "roll_mean";
static char __pyx_k__roll_skew[] = "roll_skew";
static char __pyx_k__seen_bool[] = "seen_bool";
static char __pyx_k__seen_null[] = "seen_null";
static char __pyx_k__size_hint[] = "size_hint";
static char __pyx_k__sum_ranks[] = "sum_ranks";
static char __pyx_k__take_last[] = "take_last";
static char __pyx_k__toordinal[] = "toordinal";
static char __pyx_k__try_float[] = "try_float";
static char __pyx_k__vec_binop[] = "vec_binop";
static char __pyx_k__IndexError[] = "IndexError";
static char __pyx_k__ValueError[] = "ValueError";
static char __pyx_k__complex128[] = "complex128";
static char __pyx_k__complex256[] = "complex256";
static char __pyx_k__contiguous[] = "contiguous";
static char __pyx_k__datetime64[] = "datetime64";
static char __pyx_k__duplicated[] = "duplicated";
static char __pyx_k__empty_like[] = "empty_like";
static char __pyx_k__fill_value[] = "fill_value";
static char __pyx_k__get_labels[] = "get_labels";
static char __pyx_k__get_result[] = "get_result";
static char __pyx_k__group_mean[] = "group_mean";
static char __pyx_k__group_size[] = "group_size";
static char __pyx_k__inner_join[] = "inner_join";
static char __pyx_k__is_integer[] = "is_integer";
static char __pyx_k__iterations[] = "iterations";
static char __pyx_k__left_count[] = "left_count";
static char __pyx_k__max_groups[] = "max_groups";
static char __pyx_k__next_bound[] = "next_bound";
static char __pyx_k__obj_unique[] = "obj_unique";
static char __pyx_k__pad_object[] = "pad_object";
static char __pyx_k__parse_date[] = "parse_date";
static char __pyx_k__pydatetime[] = "pydatetime";
static char __pyx_k__seen_float[] = "seen_float";
static char __pyx_k__valid_locs[] = "valid_locs";
static char __pyx_k__zeros_like[] = "zeros_like";
static char __pyx_k__ImportError[] = "ImportError";
static char __pyx_k__NegInfinity[] = "NegInfinity";
static char __pyx_k___check_minp[] = "_check_minp";
static char __pyx_k__arrmap_bool[] = "arrmap_bool";
static char __pyx_k__count_prior[] = "count_prior";
static char __pyx_k__fast_unique[] = "fast_unique";
static char __pyx_k__group_count[] = "group_count";
static char __pyx_k__has_infs_f4[] = "has_infs_f4";
static char __pyx_k__has_infs_f8[] = "has_infs_f8";
static char __pyx_k__infer_dtype[] = "infer_dtype";
static char __pyx_k__isnullobj2d[] = "isnullobj2d";
static char __pyx_k__join_sorter[] = "join_sorter";
static char __pyx_k__left_sorter[] = "left_sorter";
static char __pyx_k__na_sentinel[] = "na_sentinel";
static char __pyx_k__pad_float64[] = "pad_float64";
static char __pyx_k__reduce_mean[] = "reduce_mean";
static char __pyx_k__result_keys[] = "result_keys";
static char __pyx_k__rev_indexer[] = "rev_indexer";
static char __pyx_k__right_count[] = "right_count";
static char __pyx_k__seen_object[] = "seen_object";
static char __pyx_k__sorted_data[] = "sorted_data";
static char __pyx_k__tiebreakers[] = "tiebreakers";
static char __pyx_k__ties_method[] = "ties_method";
static char __pyx_k__vec_compare[] = "vec_compare";
static char __pyx_k__RuntimeError[] = "RuntimeError";
static char __pyx_k___bucket_locs[] = "_bucket_locs";
static char __pyx_k___check_dummy[] = "_check_dummy";
static char __pyx_k___return_true[] = "_return_true";
static char __pyx_k__arrmap_int32[] = "arrmap_int32";
static char __pyx_k__arrmap_int64[] = "arrmap_int64";
static char __pyx_k__c_contiguous[] = "c_contiguous";
static char __pyx_k__f_contiguous[] = "f_contiguous";
static char __pyx_k__group_labels[] = "group_labels";
static char __pyx_k__groupby_bool[] = "groupby_bool";
static char __pyx_k__groupby_func[] = "groupby_func";
static char __pyx_k__int64_unique[] = "int64_unique";
static char __pyx_k__is_lexsorted[] = "is_lexsorted";
static char __pyx_k__kth_smallest[] = "kth_smallest";
static char __pyx_k__label_arrays[] = "label_arrays";
static char __pyx_k__left_indexer[] = "left_indexer";
static char __pyx_k__left_join_1d[] = "left_join_1d";
static char __pyx_k__left_join_2d[] = "left_join_2d";
static char __pyx_k__mapped_index[] = "mapped_index";
static char __pyx_k__right_sorter[] = "right_sorter";
static char __pyx_k__roll_generic[] = "roll_generic";
static char __pyx_k__scalar_binop[] = "scalar_binop";
static char __pyx_k__searchsorted[] = "searchsorted";
static char __pyx_k__take_1d_bool[] = "take_1d_bool";
static char __pyx_k___ensure_index[] = "_ensure_index";
static char __pyx_k___return_false[] = "_return_false";
static char __pyx_k__arrmap_object[] = "arrmap_object";
static char __pyx_k__backfill_bool[] = "backfill_bool";
static char __pyx_k__expected_size[] = "expected_size";
static char __pyx_k__fast_multiget[] = "fast_multiget";
static char __pyx_k__fromtimestamp[] = "fromtimestamp";
static char __pyx_k__groupby_int32[] = "groupby_int32";
static char __pyx_k__groupby_int64[] = "groupby_int64";
static char __pyx_k__is_bool_array[] = "is_bool_array";
static char __pyx_k__lookup_values[] = "lookup_values";
static char __pyx_k__rank_1d_int64[] = "rank_1d_int64";
static char __pyx_k__rank_2d_int64[] = "rank_2d_int64";
static char __pyx_k__result_counts[] = "result_counts";
static char __pyx_k__right_indexer[] = "right_indexer";
static char __pyx_k__roll_median_c[] = "roll_median_c";
static char __pyx_k__roll_quantile[] = "roll_quantile";
static char __pyx_k__take_1d_int32[] = "take_1d_int32";
static char __pyx_k__take_1d_int64[] = "take_1d_int64";
static char __pyx_k__AssertionError[] = "AssertionError";
static char __pyx_k__AttributeError[] = "AttributeError";
static char __pyx_k__arrmap_float64[] = "arrmap_float64";
static char __pyx_k__backfill_int32[] = "backfill_int32";
static char __pyx_k__backfill_int64[] = "backfill_int64";
static char __pyx_k__count_level_1d[] = "count_level_1d";
static char __pyx_k__count_level_2d[] = "count_level_2d";
static char __pyx_k__dicts_to_array[] = "dicts_to_array";
static char __pyx_k__groupby_object[] = "groupby_object";
static char __pyx_k__is_float_array[] = "is_float_array";
static char __pyx_k__list_of_arrays[] = "list_of_arrays";
static char __pyx_k__scalar_compare[] = "scalar_compare";
static char __pyx_k__take_1d_object[] = "take_1d_object";
static char __pyx_k__backfill_object[] = "backfill_object";
static char __pyx_k__full_outer_join[] = "full_outer_join";
static char __pyx_k__generate_slices[] = "generate_slices";
static char __pyx_k__get_pad_indexer[] = "get_pad_indexer";
static char __pyx_k__groupby_float64[] = "groupby_float64";
static char __pyx_k__groupby_indices[] = "groupby_indices";
static char __pyx_k__is_string_array[] = "is_string_array";
static char __pyx_k__left_outer_join[] = "left_outer_join";
static char __pyx_k__rank_1d_float64[] = "rank_1d_float64";
static char __pyx_k__rank_1d_generic[] = "rank_1d_generic";
static char __pyx_k__rank_2d_float64[] = "rank_2d_float64";
static char __pyx_k__rank_2d_generic[] = "rank_2d_generic";
static char __pyx_k__take_1d_float64[] = "take_1d_float64";
static char __pyx_k__to_object_array[] = "to_object_array";
static char __pyx_k__try_parse_dates[] = "try_parse_dates";
static char __pyx_k___big_join_sorter[] = "_big_join_sorter";
static char __pyx_k__backfill_float64[] = "backfill_float64";
static char __pyx_k__infer_dtype_list[] = "infer_dtype_list";
static char __pyx_k__is_integer_array[] = "is_integer_array";
static char __pyx_k__sanitize_objects[] = "sanitize_objects";
static char __pyx_k__utcfromtimestamp[] = "utcfromtimestamp";
static char __pyx_k___get_result_array[] = "_get_result_array";
static char __pyx_k__array_to_datetime[] = "array_to_datetime";
static char __pyx_k__get_unique_labels[] = "get_unique_labels";
static char __pyx_k__groupsort_indexer[] = "groupsort_indexer";
static char __pyx_k__is_datetime_array[] = "is_datetime_array";
static char __pyx_k__is_monotonic_bool[] = "is_monotonic_bool";
static char __pyx_k__ordered_left_join[] = "ordered_left_join";
static char __pyx_k__value_count_int64[] = "value_count_int64";
static char __pyx_k__array_to_timestamp[] = "array_to_timestamp";
static char __pyx_k__convert_sql_column[] = "convert_sql_column";
static char __pyx_k__convert_timestamps[] = "convert_timestamps";
static char __pyx_k__is_monotonic_int32[] = "is_monotonic_int32";
static char __pyx_k__is_monotonic_int64[] = "is_monotonic_int64";
static char __pyx_k__maybe_convert_bool[] = "maybe_convert_bool";
static char __pyx_k__merge_indexer_bool[] = "merge_indexer_bool";
static char __pyx_k__merge_indexer_list[] = "merge_indexer_list";
static char __pyx_k__roll_median_cython[] = "roll_median_cython";
static char __pyx_k__take_2d_axis0_bool[] = "take_2d_axis0_bool";
static char __pyx_k__take_2d_axis1_bool[] = "take_2d_axis1_bool";
static char __pyx_k___get_result_indexer[] = "_get_result_indexer";
static char __pyx_k__get_reverse_indexer[] = "get_reverse_indexer";
static char __pyx_k__is_monotonic_object[] = "is_monotonic_object";
static char __pyx_k__merge_indexer_int32[] = "merge_indexer_int32";
static char __pyx_k__merge_indexer_int64[] = "merge_indexer_int64";
static char __pyx_k__pad_2d_inplace_bool[] = "pad_2d_inplace_bool";
static char __pyx_k__pad_inplace_float64[] = "pad_inplace_float64";
static char __pyx_k__take_2d_axis0_int32[] = "take_2d_axis0_int32";
static char __pyx_k__take_2d_axis0_int64[] = "take_2d_axis0_int64";
static char __pyx_k__take_2d_axis1_int32[] = "take_2d_axis1_int32";
static char __pyx_k__take_2d_axis1_int64[] = "take_2d_axis1_int64";
static char __pyx_k__ts_upsample_generic[] = "ts_upsample_generic";
static PyObject *__pyx_kp_s_1;
static PyObject *__pyx_n_s_101;
static PyObject *__pyx_kp_s_102;
static PyObject *__pyx_n_s_104;
static PyObject *__pyx_kp_s_106;
static PyObject *__pyx_kp_s_107;
static PyObject *__pyx_kp_s_108;
static PyObject *__pyx_kp_s_111;
static PyObject *__pyx_n_s_112;
static PyObject *__pyx_kp_s_113;
static PyObject *__pyx_kp_u_121;
static PyObject *__pyx_kp_u_123;
static PyObject *__pyx_kp_u_125;
static PyObject *__pyx_kp_u_127;
static PyObject *__pyx_kp_u_128;
static PyObject *__pyx_kp_s_13;
static PyObject *__pyx_kp_u_131;
static PyObject *__pyx_kp_s_133;
static PyObject *__pyx_kp_s_138;
static PyObject *__pyx_n_s_153;
static PyObject *__pyx_n_s_156;
static PyObject *__pyx_n_s_159;
static PyObject *__pyx_kp_s_180;
static PyObject *__pyx_n_s_185;
static PyObject *__pyx_kp_s_222;
static PyObject *__pyx_kp_s_253;
static PyObject *__pyx_n_s_258;
static PyObject *__pyx_n_s_261;
static PyObject *__pyx_n_s_270;
static PyObject *__pyx_n_s_275;
static PyObject *__pyx_kp_s_276;
static PyObject *__pyx_n_s_279;
static PyObject *__pyx_kp_s_28;
static PyObject *__pyx_kp_s_3;
static PyObject *__pyx_n_s_308;
static PyObject *__pyx_n_s_311;
static PyObject *__pyx_n_s_314;
static PyObject *__pyx_n_s_317;
static PyObject *__pyx_n_s_322;
static PyObject *__pyx_n_s_325;
static PyObject *__pyx_n_s_328;
static PyObject *__pyx_n_s_331;
static PyObject *__pyx_n_s_334;
static PyObject *__pyx_n_s_347;
static PyObject *__pyx_n_s_378;
static PyObject *__pyx_n_s_381;
static PyObject *__pyx_n_s_390;
static PyObject *__pyx_n_s_393;
static PyObject *__pyx_n_s_402;
static PyObject *__pyx_n_s_405;
static PyObject *__pyx_n_s_408;
static PyObject *__pyx_n_s_411;
static PyObject *__pyx_n_s_414;
static PyObject *__pyx_n_s_417;
static PyObject *__pyx_n_s_420;
static PyObject *__pyx_n_s_423;
static PyObject *__pyx_n_s_426;
static PyObject *__pyx_n_s_429;
static PyObject *__pyx_n_s_432;
static PyObject *__pyx_n_s_435;
static PyObject *__pyx_kp_s_438;
static PyObject *__pyx_kp_s_441;
static PyObject *__pyx_n_s_470;
static PyObject *__pyx_n_s_487;
static PyObject *__pyx_n_s_490;
static PyObject *__pyx_kp_s_495;
static PyObject *__pyx_kp_s_498;
static PyObject *__pyx_kp_s_511;
static PyObject *__pyx_kp_s_6;
static PyObject *__pyx_kp_s_60;
static PyObject *__pyx_kp_s_62;
static PyObject *__pyx_kp_s_63;
static PyObject *__pyx_n_s_8;
static PyObject *__pyx_kp_s_91;
static PyObject *__pyx_n_s__A;
static PyObject *__pyx_n_s__AssertionError;
static PyObject *__pyx_n_s__AttributeError;
static PyObject *__pyx_n_s__B;
static PyObject *__pyx_n_s__C;
static PyObject *__pyx_n_s__D;
static PyObject *__pyx_n_s__Exception;
static PyObject *__pyx_n_s__F;
static PyObject *__pyx_n_s__False;
static PyObject *__pyx_n_s__ImportError;
static PyObject *__pyx_n_s__IndexError;
static PyObject *__pyx_n_s__Infinity;
static PyObject *__pyx_n_s__K;
static PyObject *__pyx_n_s__KeyError;
static PyObject *__pyx_n_s__N;
static PyObject *__pyx_n_s__NIL;
static PyObject *__pyx_n_s__NaN;
static PyObject *__pyx_n_s__NegInfinity;
static PyObject *__pyx_n_s__O;
static PyObject *__pyx_n_s__ONAN;
static PyObject *__pyx_n_s__R;
static PyObject *__pyx_n_s__RuntimeError;
static PyObject *__pyx_n_s__T;
static PyObject *__pyx_n_s__True;
static PyObject *__pyx_n_s__TypeError;
static PyObject *__pyx_n_s__ValueError;
static PyObject *__pyx_n_s___TYPE_MAP;
static PyObject *__pyx_n_s____cmp__;
static PyObject *__pyx_n_s____eq__;
static PyObject *__pyx_n_s____ge__;
static PyObject *__pyx_n_s____gt__;
static PyObject *__pyx_n_s____le__;
static PyObject *__pyx_n_s____lt__;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____name__;
static PyObject *__pyx_n_s____ne__;
static PyObject *__pyx_n_s____test__;
static PyObject *__pyx_n_s___as;
static PyObject *__pyx_n_s___big_join_sorter;
static PyObject *__pyx_n_s___bucket_locs;
static PyObject *__pyx_n_s___cache;
static PyObject *__pyx_n_s___check_dummy;
static PyObject *__pyx_n_s___check_minp;
static PyObject *__pyx_n_s___data;
static PyObject *__pyx_n_s___ensure_index;
static PyObject *__pyx_n_s___get_result_array;
static PyObject *__pyx_n_s___get_result_indexer;
static PyObject *__pyx_n_s___index;
static PyObject *__pyx_n_s___return_false;
static PyObject *__pyx_n_s___return_true;
static PyObject *__pyx_n_s___set_axis;
static PyObject *__pyx_n_s___values;
static PyObject *__pyx_n_s__a;
static PyObject *__pyx_n_s__adj;
static PyObject *__pyx_n_s__aggfunc;
static PyObject *__pyx_n_s__arange;
static PyObject *__pyx_n_s__arg;
static PyObject *__pyx_n_s__args;
static PyObject *__pyx_n_s__argsort;
static PyObject *__pyx_n_s__argsorted;
static PyObject *__pyx_n_s__arr;
static PyObject *__pyx_n_s__array;
static PyObject *__pyx_n_s__array_to_datetime;
static PyObject *__pyx_n_s__array_to_timestamp;
static PyObject *__pyx_n_s__arrays;
static PyObject *__pyx_n_s__arrmap;
static PyObject *__pyx_n_s__arrmap_bool;
static PyObject *__pyx_n_s__arrmap_float64;
static PyObject *__pyx_n_s__arrmap_int32;
static PyObject *__pyx_n_s__arrmap_int64;
static PyObject *__pyx_n_s__arrmap_object;
static PyObject *__pyx_n_s__asarray;
static PyObject *__pyx_n_s__ascending;
static PyObject *__pyx_n_s__astype;
static PyObject *__pyx_n_s__average;
static PyObject *__pyx_n_s__axes;
static PyObject *__pyx_n_s__axis;
static PyObject *__pyx_n_s__backfill_bool;
static PyObject *__pyx_n_s__backfill_float64;
static PyObject *__pyx_n_s__backfill_int32;
static PyObject *__pyx_n_s__backfill_int64;
static PyObject *__pyx_n_s__backfill_object;
static PyObject *__pyx_n_s__bool_;
static PyObject *__pyx_n_s__boolean;
static PyObject *__pyx_n_s__bools;
static PyObject *__pyx_n_s__buckets;
static PyObject *__pyx_n_s__buf;
static PyObject *__pyx_n_s__bufarr;
static PyObject *__pyx_n_s__c_contiguous;
static PyObject *__pyx_n_s__cache;
static PyObject *__pyx_n_s__col;
static PyObject *__pyx_n_s__columns;
static PyObject *__pyx_n_s__com;
static PyObject *__pyx_n_s__complex;
static PyObject *__pyx_n_s__complex128;
static PyObject *__pyx_n_s__complex256;
static PyObject *__pyx_n_s__complex64;
static PyObject *__pyx_n_s__contiguous;
static PyObject *__pyx_n_s__convert_sql_column;
static PyObject *__pyx_n_s__convert_timestamps;
static PyObject *__pyx_n_s__copy;
static PyObject *__pyx_n_s__count;
static PyObject *__pyx_n_s__count_level_1d;
static PyObject *__pyx_n_s__count_level_2d;
static PyObject *__pyx_n_s__count_prior;
static PyObject *__pyx_n_s__counts;
static PyObject *__pyx_n_s__ct;
static PyObject *__pyx_n_s__cur;
static PyObject *__pyx_n_s__curLoc;
static PyObject *__pyx_n_s__curOld;
static PyObject *__pyx_n_s__data;
static PyObject *__pyx_n_s__date;
static PyObject *__pyx_n_s__datetime;
static PyObject *__pyx_n_s__datetime64;
static PyObject *__pyx_n_s__dateutil;
static PyObject *__pyx_n_s__default;
static PyObject *__pyx_n_s__destroy;
static PyObject *__pyx_n_s__dicts;
static PyObject *__pyx_n_s__dicts_to_array;
static PyObject *__pyx_n_s__done;
static PyObject *__pyx_n_s__dtype;
static PyObject *__pyx_n_s__dummy;
static PyObject *__pyx_n_s__duplicated;
static PyObject *__pyx_n_s__dups;
static PyObject *__pyx_n_s__empty;
static PyObject *__pyx_n_s__empty_like;
static PyObject *__pyx_n_s__ends;
static PyObject *__pyx_n_s__eq;
static PyObject *__pyx_n_s__ewma;
static PyObject *__pyx_n_s__expected_size;
static PyObject *__pyx_n_s__f;
static PyObject *__pyx_n_s__f8;
static PyObject *__pyx_n_s__f_contiguous;
static PyObject *__pyx_n_s__fast_multiget;
static PyObject *__pyx_n_s__fast_unique;
static PyObject *__pyx_n_s__fast_zip;
static PyObject *__pyx_n_s__fill;
static PyObject *__pyx_n_s__fillVec;
static PyObject *__pyx_n_s__fill_value;
static PyObject *__pyx_n_s__fill_vec;
static PyObject *__pyx_n_s__first;
static PyObject *__pyx_n_s__flag;
static PyObject *__pyx_n_s__flags;
static PyObject *__pyx_n_s__float128;
static PyObject *__pyx_n_s__float16;
static PyObject *__pyx_n_s__float32;
static PyObject *__pyx_n_s__float64;
static PyObject *__pyx_n_s__floating;
static PyObject *__pyx_n_s__floats;
static PyObject *__pyx_n_s__fnan;
static PyObject *__pyx_n_s__fromtimestamp;
static PyObject *__pyx_n_s__full_outer_join;
static PyObject *__pyx_n_s__func;
static PyObject *__pyx_n_s__fv;
static PyObject *__pyx_n_s__fval;
static PyObject *__pyx_n_s__ge;
static PyObject *__pyx_n_s__gen;
static PyObject *__pyx_n_s__generate_slices;
static PyObject *__pyx_n_s__get;
static PyObject *__pyx_n_s__get_item;
static PyObject *__pyx_n_s__get_labels;
static PyObject *__pyx_n_s__get_pad_indexer;
static PyObject *__pyx_n_s__get_result;
static PyObject *__pyx_n_s__get_reverse_indexer;
static PyObject *__pyx_n_s__get_unique_labels;
static PyObject *__pyx_n_s__group_add;
static PyObject *__pyx_n_s__group_count;
static PyObject *__pyx_n_s__group_labels;
static PyObject *__pyx_n_s__group_mean;
static PyObject *__pyx_n_s__group_size;
static PyObject *__pyx_n_s__group_var;
static PyObject *__pyx_n_s__groupby_bool;
static PyObject *__pyx_n_s__groupby_float64;
static PyObject *__pyx_n_s__groupby_func;
static PyObject *__pyx_n_s__groupby_indices;
static PyObject *__pyx_n_s__groupby_int32;
static PyObject *__pyx_n_s__groupby_int64;
static PyObject *__pyx_n_s__groupby_object;
static PyObject *__pyx_n_s__groupsort_indexer;
static PyObject *__pyx_n_s__gt;
static PyObject *__pyx_n_s__has_infs_f4;
static PyObject *__pyx_n_s__has_infs_f8;
static PyObject *__pyx_n_s__hval;
static PyObject *__pyx_n_s__i;
static PyObject *__pyx_n_s__i4;
static PyObject *__pyx_n_s__i8;
static PyObject *__pyx_n_s__idMap;
static PyObject *__pyx_n_s__ids;
static PyObject *__pyx_n_s__idx;
static PyObject *__pyx_n_s__in_arr;
static PyObject *__pyx_n_s__inclusive;
static PyObject *__pyx_n_s__index;
static PyObject *__pyx_n_s__index_buf;
static PyObject *__pyx_n_s__indexer;
static PyObject *__pyx_n_s__indices;
static PyObject *__pyx_n_s__inf;
static PyObject *__pyx_n_s__infer_dtype;
static PyObject *__pyx_n_s__infer_dtype_list;
static PyObject *__pyx_n_s__infs;
static PyObject *__pyx_n_s__inner_join;
static PyObject *__pyx_n_s__input;
static PyObject *__pyx_n_s__insert;
static PyObject *__pyx_n_s__int16;
static PyObject *__pyx_n_s__int32;
static PyObject *__pyx_n_s__int64;
static PyObject *__pyx_n_s__int64_unique;
static PyObject *__pyx_n_s__int8;
static PyObject *__pyx_n_s__int_;
static PyObject *__pyx_n_s__integer;
static PyObject *__pyx_n_s__ints;
static PyObject *__pyx_n_s__is_bool_array;
static PyObject *__pyx_n_s__is_datetime_array;
static PyObject *__pyx_n_s__is_float_array;
static PyObject *__pyx_n_s__is_integer;
static PyObject *__pyx_n_s__is_integer_array;
static PyObject *__pyx_n_s__is_lexsorted;
static PyObject *__pyx_n_s__is_monotonic_bool;
static PyObject *__pyx_n_s__is_monotonic_int32;
static PyObject *__pyx_n_s__is_monotonic_int64;
static PyObject *__pyx_n_s__is_monotonic_object;
static PyObject *__pyx_n_s__is_string_array;
static PyObject *__pyx_n_s__isfinite;
static PyObject *__pyx_n_s__ismember;
static PyObject *__pyx_n_s__isnan;
static PyObject *__pyx_n_s__isnullobj;
static PyObject *__pyx_n_s__isnullobj2d;
static PyObject *__pyx_n_s__it;
static PyObject *__pyx_n_s__item;
static PyObject *__pyx_n_s__itemsize;
static PyObject *__pyx_n_s__iterations;
static PyObject *__pyx_n_s__j;
static PyObject *__pyx_n_s__join_sorter;
static PyObject *__pyx_n_s__jstart;
static PyObject *__pyx_n_s__k;
static PyObject *__pyx_n_s__key;
static PyObject *__pyx_n_s__keys;
static PyObject *__pyx_n_s__kind;
static PyObject *__pyx_n_s__kleft;
static PyObject *__pyx_n_s__kright;
static PyObject *__pyx_n_s__kth_smallest;
static PyObject *__pyx_n_s__l;
static PyObject *__pyx_n_s__lab;
static PyObject *__pyx_n_s__label;
static PyObject *__pyx_n_s__label_arrays;
static PyObject *__pyx_n_s__labels;
static PyObject *__pyx_n_s__lc;
static PyObject *__pyx_n_s__le;
static PyObject *__pyx_n_s__left;
static PyObject *__pyx_n_s__left_count;
static PyObject *__pyx_n_s__left_indexer;
static PyObject *__pyx_n_s__left_join_1d;
static PyObject *__pyx_n_s__left_join_2d;
static PyObject *__pyx_n_s__left_outer_join;
static PyObject *__pyx_n_s__left_pos;
static PyObject *__pyx_n_s__left_sorter;
static PyObject *__pyx_n_s__length;
static PyObject *__pyx_n_s__lidx;
static PyObject *__pyx_n_s__lindexer;
static PyObject *__pyx_n_s__list_of_arrays;
static PyObject *__pyx_n_s__lists;
static PyObject *__pyx_n_s__lk;
static PyObject *__pyx_n_s__loc;
static PyObject *__pyx_n_s__locs;
static PyObject *__pyx_n_s__lookup2;
static PyObject *__pyx_n_s__lookup_values;
static PyObject *__pyx_n_s__lt;
static PyObject *__pyx_n_s__lval;
static PyObject *__pyx_n_s__lvalues;
static PyObject *__pyx_n_s__m;
static PyObject *__pyx_n_s__map_infer;
static PyObject *__pyx_n_s__mapped_index;
static PyObject *__pyx_n_s__mapper;
static PyObject *__pyx_n_s__mapping;
static PyObject *__pyx_n_s__mask;
static PyObject *__pyx_n_s__max;
static PyObject *__pyx_n_s__max_bin;
static PyObject *__pyx_n_s__max_groups;
static PyObject *__pyx_n_s__maybe_convert_bool;
static PyObject *__pyx_n_s__median;
static PyObject *__pyx_n_s__members;
static PyObject *__pyx_n_s__memo;
static PyObject *__pyx_n_s__merge_indexer_bool;
static PyObject *__pyx_n_s__merge_indexer_int32;
static PyObject *__pyx_n_s__merge_indexer_int64;
static PyObject *__pyx_n_s__merge_indexer_list;
static PyObject *__pyx_n_s__mergesort;
static PyObject *__pyx_n_s__midpoint;
static PyObject *__pyx_n_s__min;
static PyObject *__pyx_n_s__minp;
static PyObject *__pyx_n_s__mixed;
static PyObject *__pyx_n_s__n;
static PyObject *__pyx_n_s__na_count;
static PyObject *__pyx_n_s__na_sentinel;
static PyObject *__pyx_n_s__na_values;
static PyObject *__pyx_n_s__nan;
static PyObject *__pyx_n_s__nan_value;
static PyObject *__pyx_n_s__nbuckets;
static PyObject *__pyx_n_s__ndarrays;
static PyObject *__pyx_n_s__ndim;
static PyObject *__pyx_n_s__ne;
static PyObject *__pyx_n_s__neginf;
static PyObject *__pyx_n_s__newIndex;
static PyObject *__pyx_n_s__newLength;
static PyObject *__pyx_n_s__newMap;
static PyObject *__pyx_n_s__newPos;
static PyObject *__pyx_n_s__neww;
static PyObject *__pyx_n_s__next;
static PyObject *__pyx_n_s__nextOld;
static PyObject *__pyx_n_s__next_bound;
static PyObject *__pyx_n_s__ngroups;
static PyObject *__pyx_n_s__nleft;
static PyObject *__pyx_n_s__nlevels;
static PyObject *__pyx_n_s__nobs;
static PyObject *__pyx_n_s__nonzero;
static PyObject *__pyx_n_s__np;
static PyObject *__pyx_n_s__nright;
static PyObject *__pyx_n_s__numpy;
static PyObject *__pyx_n_s__nvalues;
static PyObject *__pyx_n_s__o;
static PyObject *__pyx_n_s__obj;
static PyObject *__pyx_n_s__obj_unique;
static PyObject *__pyx_n_s__objbuf;
static PyObject *__pyx_n_s__object;
static PyObject *__pyx_n_s__object_;
static PyObject *__pyx_n_s__objects;
static PyObject *__pyx_n_s__offset;
static PyObject *__pyx_n_s__oldIndex;
static PyObject *__pyx_n_s__oldLength;
static PyObject *__pyx_n_s__oldMap;
static PyObject *__pyx_n_s__oldPos;
static PyObject *__pyx_n_s__oldbuf;
static PyObject *__pyx_n_s__oldw;
static PyObject *__pyx_n_s__onan;
static PyObject *__pyx_n_s__ones;
static PyObject *__pyx_n_s__op;
static PyObject *__pyx_n_s__operator;
static PyObject *__pyx_n_s__ordered_left_join;
static PyObject *__pyx_n_s__other;
static PyObject *__pyx_n_s__out;
static PyObject *__pyx_n_s__outbuf;
static PyObject *__pyx_n_s__output;
static PyObject *__pyx_n_s__pad_2d_inplace_bool;
static PyObject *__pyx_n_s__pad_bool;
static PyObject *__pyx_n_s__pad_float64;
static PyObject *__pyx_n_s__pad_inplace_float64;
static PyObject *__pyx_n_s__pad_int32;
static PyObject *__pyx_n_s__pad_int64;
static PyObject *__pyx_n_s__pad_object;
static PyObject *__pyx_n_s__parse;
static PyObject *__pyx_n_s__parse_date;
static PyObject *__pyx_n_s__parser;
static PyObject *__pyx_n_s__position;
static PyObject *__pyx_n_s__pre;
static PyObject *__pyx_n_s__prev;
static PyObject *__pyx_n_s__prevOld;
static PyObject *__pyx_n_s__put;
static PyObject *__pyx_n_s__putmask;
static PyObject *__pyx_n_s__pydate;
static PyObject *__pyx_n_s__pydatetime;
static PyObject *__pyx_n_s__quantile;
static PyObject *__pyx_n_s__random;
static PyObject *__pyx_n_s__range;
static PyObject *__pyx_n_s__rank_1d_float64;
static PyObject *__pyx_n_s__rank_1d_generic;
static PyObject *__pyx_n_s__rank_1d_int64;
static PyObject *__pyx_n_s__rank_2d_float64;
static PyObject *__pyx_n_s__rank_2d_generic;
static PyObject *__pyx_n_s__rank_2d_int64;
static PyObject *__pyx_n_s__ranks;
static PyObject *__pyx_n_s__rc;
static PyObject *__pyx_n_s__reduce;
static PyObject *__pyx_n_s__reduce_mean;
static PyObject *__pyx_n_s__reducer;
static PyObject *__pyx_n_s__remove;
static PyObject *__pyx_n_s__res;
static PyObject *__pyx_n_s__result;
static PyObject *__pyx_n_s__result_counts;
static PyObject *__pyx_n_s__result_keys;
static PyObject *__pyx_n_s__ret;
static PyObject *__pyx_n_s__retry;
static PyObject *__pyx_n_s__rev;
static PyObject *__pyx_n_s__rev_indexer;
static PyObject *__pyx_n_s__reverse;
static PyObject *__pyx_n_s__ridx;
static PyObject *__pyx_n_s__right;
static PyObject *__pyx_n_s__right_count;
static PyObject *__pyx_n_s__right_indexer;
static PyObject *__pyx_n_s__right_pos;
static PyObject *__pyx_n_s__right_sorter;
static PyObject *__pyx_n_s__rindexer;
static PyObject *__pyx_n_s__rk;
static PyObject *__pyx_n_s__roll_generic;
static PyObject *__pyx_n_s__roll_kurt;
static PyObject *__pyx_n_s__roll_max;
static PyObject *__pyx_n_s__roll_mean;
static PyObject *__pyx_n_s__roll_median_c;
static PyObject *__pyx_n_s__roll_median_cython;
static PyObject *__pyx_n_s__roll_min;
static PyObject *__pyx_n_s__roll_quantile;
static PyObject *__pyx_n_s__roll_skew;
static PyObject *__pyx_n_s__roll_sum;
static PyObject *__pyx_n_s__roll_var;
static PyObject *__pyx_n_s__row;
static PyObject *__pyx_n_s__rows;
static PyObject *__pyx_n_s__rval;
static PyObject *__pyx_n_s__rvalues;
static PyObject *__pyx_n_s__s;
static PyObject *__pyx_n_s__safe;
static PyObject *__pyx_n_s__sanitize_objects;
static PyObject *__pyx_n_s__scalar_binop;
static PyObject *__pyx_n_s__scalar_compare;
static PyObject *__pyx_n_s__searchsorted;
static PyObject *__pyx_n_s__seen;
static PyObject *__pyx_n_s__seen_bool;
static PyObject *__pyx_n_s__seen_float;
static PyObject *__pyx_n_s__seen_int;
static PyObject *__pyx_n_s__seen_null;
static PyObject *__pyx_n_s__seen_object;
static PyObject *__pyx_n_s__self;
static PyObject *__pyx_n_s__series;
static PyObject *__pyx_n_s__set_item;
static PyObject *__pyx_n_s__shape;
static PyObject *__pyx_n_s__side;
static PyObject *__pyx_n_s__size;
static PyObject *__pyx_n_s__size_hint;
static PyObject *__pyx_n_s__skiplist;
static PyObject *__pyx_n_s__sl;
static PyObject *__pyx_n_s__slobj;
static PyObject *__pyx_n_s__sort;
static PyObject *__pyx_n_s__sorted_data;
static PyObject *__pyx_n_s__sorter;
static PyObject *__pyx_n_s__start;
static PyObject *__pyx_n_s__starts;
static PyObject *__pyx_n_s__string;
static PyObject *__pyx_n_s__string_;
static PyObject *__pyx_n_s__strptime;
static PyObject *__pyx_n_s__stub;
static PyObject *__pyx_n_s__sum_ranks;
static PyObject *__pyx_n_s__sum_x;
static PyObject *__pyx_n_s__sum_xx;
static PyObject *__pyx_n_s__sumx;
static PyObject *__pyx_n_s__sumxx;
static PyObject *__pyx_n_s__t;
static PyObject *__pyx_n_s__table;
static PyObject *__pyx_n_s__take;
static PyObject *__pyx_n_s__take_1d_bool;
static PyObject *__pyx_n_s__take_1d_float64;
static PyObject *__pyx_n_s__take_1d_int32;
static PyObject *__pyx_n_s__take_1d_int64;
static PyObject *__pyx_n_s__take_1d_object;
static PyObject *__pyx_n_s__take_2d_axis0_bool;
static PyObject *__pyx_n_s__take_2d_axis0_int32;
static PyObject *__pyx_n_s__take_2d_axis0_int64;
static PyObject *__pyx_n_s__take_2d_axis1_bool;
static PyObject *__pyx_n_s__take_2d_axis1_int32;
static PyObject *__pyx_n_s__take_2d_axis1_int64;
static PyObject *__pyx_n_s__take_last;
static PyObject *__pyx_n_s__test;
static PyObject *__pyx_n_s__test_str;
static PyObject *__pyx_n_s__the_sum;
static PyObject *__pyx_n_s__tiebreak;
static PyObject *__pyx_n_s__tiebreakers;
static PyObject *__pyx_n_s__ties_method;
static PyObject *__pyx_n_s__time;
static PyObject *__pyx_n_s__tmp;
static PyObject *__pyx_n_s__to_object_array;
static PyObject *__pyx_n_s__toordinal;
static PyObject *__pyx_n_s__try_float;
static PyObject *__pyx_n_s__try_parse_dates;
static PyObject *__pyx_n_s__ts_upsample_generic;
static PyObject *__pyx_n_s__tup;
static PyObject *__pyx_n_s__tuples;
static PyObject *__pyx_n_s__type;
static PyObject *__pyx_n_s__uint16;
static PyObject *__pyx_n_s__uint32;
static PyObject *__pyx_n_s__uint64;
static PyObject *__pyx_n_s__uint8;
static PyObject *__pyx_n_s__unicode;
static PyObject *__pyx_n_s__unicode_;
static PyObject *__pyx_n_s__unique;
static PyObject *__pyx_n_s__uniques;
static PyObject *__pyx_n_s__utcfromtimestamp;
static PyObject *__pyx_n_s__val;
static PyObject *__pyx_n_s__val_kind;
static PyObject *__pyx_n_s__valid_locs;
static PyObject *__pyx_n_s__value;
static PyObject *__pyx_n_s__value_count_int64;
static PyObject *__pyx_n_s__values;
static PyObject *__pyx_n_s__vec_binop;
static PyObject *__pyx_n_s__vec_compare;
static PyObject *__pyx_n_s__vecs;
static PyObject *__pyx_n_s__view;
static PyObject *__pyx_n_s__where;
static PyObject *__pyx_n_s__width;
static PyObject *__pyx_n_s__win;
static PyObject *__pyx_n_s__x;
static PyObject *__pyx_n_s__xx;
static PyObject *__pyx_n_s__xxx;
static PyObject *__pyx_n_s__xxxx;
static PyObject *__pyx_n_s__y;
static PyObject *__pyx_n_s__z;
static PyObject *__pyx_n_s__zeros;
static PyObject *__pyx_n_s__zeros_like;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_int_15;
static PyObject *__pyx_int_100;
static PyObject *__pyx_k_9;
static PyObject *__pyx_k_10;
static PyObject *__pyx_k_11;
static PyObject *__pyx_k_12;
static PyObject *__pyx_k_27;
static PyObject *__pyx_k_30;
static PyObject *__pyx_k_32;
static PyObject *__pyx_k_34;
static PyObject *__pyx_k_36;
static PyObject *__pyx_k_38;
static PyObject *__pyx_k_40;
static PyObject *__pyx_k_42;
static PyObject *__pyx_k_44;
static PyObject *__pyx_k_46;
static PyObject *__pyx_k_48;
static PyObject *__pyx_k_50;
static PyObject *__pyx_k_52;
static PyObject *__pyx_k_54;
static PyObject *__pyx_k_56;
static PyObject *__pyx_k_69;
static PyObject *__pyx_k_72;
static PyObject *__pyx_k_75;
static PyObject *__pyx_k_81;
static PyObject *__pyx_k_87;
static PyObject *__pyx_k_93;
static PyObject *__pyx_k_114;
static PyObject *__pyx_k_117;
static PyObject *__pyx_k_118;
static PyObject *__pyx_k_119;
static PyObject *__pyx_k_120;
static PyObject *__pyx_k_tuple_2;
static PyObject *__pyx_k_tuple_4;
static PyObject *__pyx_k_tuple_5;
static PyObject *__pyx_k_tuple_7;
static PyObject *__pyx_k_slice_70;
static PyObject *__pyx_k_slice_73;
static PyObject *__pyx_k_slice_77;
static PyObject *__pyx_k_slice_78;
static PyObject *__pyx_k_slice_83;
static PyObject *__pyx_k_slice_84;
static PyObject *__pyx_k_slice_89;
static PyObject *__pyx_k_slice_96;
static PyObject *__pyx_k_slice_97;
static PyObject *__pyx_k_tuple_14;
static PyObject *__pyx_k_tuple_15;
static PyObject *__pyx_k_tuple_16;
static PyObject *__pyx_k_tuple_17;
static PyObject *__pyx_k_tuple_18;
static PyObject *__pyx_k_tuple_19;
static PyObject *__pyx_k_tuple_20;
static PyObject *__pyx_k_tuple_21;
static PyObject *__pyx_k_tuple_22;
static PyObject *__pyx_k_tuple_23;
static PyObject *__pyx_k_tuple_24;
static PyObject *__pyx_k_tuple_25;
static PyObject *__pyx_k_tuple_26;
static PyObject *__pyx_k_tuple_29;
static PyObject *__pyx_k_tuple_31;
static PyObject *__pyx_k_tuple_33;
static PyObject *__pyx_k_tuple_35;
static PyObject *__pyx_k_tuple_37;
static PyObject *__pyx_k_tuple_39;
static PyObject *__pyx_k_tuple_41;
static PyObject *__pyx_k_tuple_43;
static PyObject *__pyx_k_tuple_45;
static PyObject *__pyx_k_tuple_47;
static PyObject *__pyx_k_tuple_49;
static PyObject *__pyx_k_tuple_51;
static PyObject *__pyx_k_tuple_53;
static PyObject *__pyx_k_tuple_55;
static PyObject *__pyx_k_tuple_57;
static PyObject *__pyx_k_tuple_58;
static PyObject *__pyx_k_tuple_59;
static PyObject *__pyx_k_tuple_61;
static PyObject *__pyx_k_tuple_64;
static PyObject *__pyx_k_tuple_65;
static PyObject *__pyx_k_tuple_66;
static PyObject *__pyx_k_tuple_67;
static PyObject *__pyx_k_tuple_68;
static PyObject *__pyx_k_tuple_71;
static PyObject *__pyx_k_tuple_74;
static PyObject *__pyx_k_tuple_76;
static PyObject *__pyx_k_tuple_79;
static PyObject *__pyx_k_tuple_80;
static PyObject *__pyx_k_tuple_82;
static PyObject *__pyx_k_tuple_85;
static PyObject *__pyx_k_tuple_86;
static PyObject *__pyx_k_tuple_88;
static PyObject *__pyx_k_tuple_90;
static PyObject *__pyx_k_tuple_92;
static PyObject *__pyx_k_tuple_94;
static PyObject *__pyx_k_tuple_95;
static PyObject *__pyx_k_tuple_98;
static PyObject *__pyx_k_tuple_99;
static PyObject *__pyx_k_tuple_100;
static PyObject *__pyx_k_tuple_103;
static PyObject *__pyx_k_tuple_105;
static PyObject *__pyx_k_tuple_109;
static PyObject *__pyx_k_tuple_115;
static PyObject *__pyx_k_tuple_116;
static PyObject *__pyx_k_tuple_122;
static PyObject *__pyx_k_tuple_124;
static PyObject *__pyx_k_tuple_126;
static PyObject *__pyx_k_tuple_129;
static PyObject *__pyx_k_tuple_130;
static PyObject *__pyx_k_tuple_132;
static PyObject *__pyx_k_tuple_134;
static PyObject *__pyx_k_tuple_135;
static PyObject *__pyx_k_tuple_136;
static PyObject *__pyx_k_tuple_139;
static PyObject *__pyx_k_tuple_141;
static PyObject *__pyx_k_tuple_143;
static PyObject *__pyx_k_tuple_145;
static PyObject *__pyx_k_tuple_147;
static PyObject *__pyx_k_tuple_149;
static PyObject *__pyx_k_tuple_151;
static PyObject *__pyx_k_tuple_154;
static PyObject *__pyx_k_tuple_157;
static PyObject *__pyx_k_tuple_160;
static PyObject *__pyx_k_tuple_162;
static PyObject *__pyx_k_tuple_164;
static PyObject *__pyx_k_tuple_166;
static PyObject *__pyx_k_tuple_168;
static PyObject *__pyx_k_tuple_170;
static PyObject *__pyx_k_tuple_172;
static PyObject *__pyx_k_tuple_174;
static PyObject *__pyx_k_tuple_176;
static PyObject *__pyx_k_tuple_178;
static PyObject *__pyx_k_tuple_181;
static PyObject *__pyx_k_tuple_183;
static PyObject *__pyx_k_tuple_186;
static PyObject *__pyx_k_tuple_188;
static PyObject *__pyx_k_tuple_190;
static PyObject *__pyx_k_tuple_192;
static PyObject *__pyx_k_tuple_194;
static PyObject *__pyx_k_tuple_196;
static PyObject *__pyx_k_tuple_198;
static PyObject *__pyx_k_tuple_200;
static PyObject *__pyx_k_tuple_202;
static PyObject *__pyx_k_tuple_204;
static PyObject *__pyx_k_tuple_206;
static PyObject *__pyx_k_tuple_208;
static PyObject *__pyx_k_tuple_210;
static PyObject *__pyx_k_tuple_212;
static PyObject *__pyx_k_tuple_214;
static PyObject *__pyx_k_tuple_216;
static PyObject *__pyx_k_tuple_218;
static PyObject *__pyx_k_tuple_220;
static PyObject *__pyx_k_tuple_223;
static PyObject *__pyx_k_tuple_225;
static PyObject *__pyx_k_tuple_227;
static PyObject *__pyx_k_tuple_229;
static PyObject *__pyx_k_tuple_231;
static PyObject *__pyx_k_tuple_233;
static PyObject *__pyx_k_tuple_235;
static PyObject *__pyx_k_tuple_237;
static PyObject *__pyx_k_tuple_239;
static PyObject *__pyx_k_tuple_241;
static PyObject *__pyx_k_tuple_243;
static PyObject *__pyx_k_tuple_245;
static PyObject *__pyx_k_tuple_247;
static PyObject *__pyx_k_tuple_249;
static PyObject *__pyx_k_tuple_251;
static PyObject *__pyx_k_tuple_254;
static PyObject *__pyx_k_tuple_256;
static PyObject *__pyx_k_tuple_259;
static PyObject *__pyx_k_tuple_262;
static PyObject *__pyx_k_tuple_264;
static PyObject *__pyx_k_tuple_266;
static PyObject *__pyx_k_tuple_268;
static PyObject *__pyx_k_tuple_271;
static PyObject *__pyx_k_tuple_273;
static PyObject *__pyx_k_tuple_277;
static PyObject *__pyx_k_tuple_280;
static PyObject *__pyx_k_tuple_282;
static PyObject *__pyx_k_tuple_284;
static PyObject *__pyx_k_tuple_286;
static PyObject *__pyx_k_tuple_288;
static PyObject *__pyx_k_tuple_290;
static PyObject *__pyx_k_tuple_292;
static PyObject *__pyx_k_tuple_294;
static PyObject *__pyx_k_tuple_296;
static PyObject *__pyx_k_tuple_298;
static PyObject *__pyx_k_tuple_300;
static PyObject *__pyx_k_tuple_302;
static PyObject *__pyx_k_tuple_304;
static PyObject *__pyx_k_tuple_306;
static PyObject *__pyx_k_tuple_309;
static PyObject *__pyx_k_tuple_312;
static PyObject *__pyx_k_tuple_315;
static PyObject *__pyx_k_tuple_318;
static PyObject *__pyx_k_tuple_320;
static PyObject *__pyx_k_tuple_323;
static PyObject *__pyx_k_tuple_326;
static PyObject *__pyx_k_tuple_329;
static PyObject *__pyx_k_tuple_332;
static PyObject *__pyx_k_tuple_335;
static PyObject *__pyx_k_tuple_337;
static PyObject *__pyx_k_tuple_339;
static PyObject *__pyx_k_tuple_341;
static PyObject *__pyx_k_tuple_343;
static PyObject *__pyx_k_tuple_345;
static PyObject *__pyx_k_tuple_348;
static PyObject *__pyx_k_tuple_350;
static PyObject *__pyx_k_tuple_352;
static PyObject *__pyx_k_tuple_354;
static PyObject *__pyx_k_tuple_356;
static PyObject *__pyx_k_tuple_358;
static PyObject *__pyx_k_tuple_360;
static PyObject *__pyx_k_tuple_362;
static PyObject *__pyx_k_tuple_364;
static PyObject *__pyx_k_tuple_366;
static PyObject *__pyx_k_tuple_368;
static PyObject *__pyx_k_tuple_370;
static PyObject *__pyx_k_tuple_372;
static PyObject *__pyx_k_tuple_374;
static PyObject *__pyx_k_tuple_376;
static PyObject *__pyx_k_tuple_379;
static PyObject *__pyx_k_tuple_382;
static PyObject *__pyx_k_tuple_384;
static PyObject *__pyx_k_tuple_386;
static PyObject *__pyx_k_tuple_388;
static PyObject *__pyx_k_tuple_391;
static PyObject *__pyx_k_tuple_394;
static PyObject *__pyx_k_tuple_396;
static PyObject *__pyx_k_tuple_398;
static PyObject *__pyx_k_tuple_400;
static PyObject *__pyx_k_tuple_403;
static PyObject *__pyx_k_tuple_406;
static PyObject *__pyx_k_tuple_409;
static PyObject *__pyx_k_tuple_412;
static PyObject *__pyx_k_tuple_415;
static PyObject *__pyx_k_tuple_418;
static PyObject *__pyx_k_tuple_421;
static PyObject *__pyx_k_tuple_424;
static PyObject *__pyx_k_tuple_427;
static PyObject *__pyx_k_tuple_430;
static PyObject *__pyx_k_tuple_433;
static PyObject *__pyx_k_tuple_436;
static PyObject *__pyx_k_tuple_439;
static PyObject *__pyx_k_tuple_442;
static PyObject *__pyx_k_tuple_444;
static PyObject *__pyx_k_tuple_446;
static PyObject *__pyx_k_tuple_448;
static PyObject *__pyx_k_tuple_450;
static PyObject *__pyx_k_tuple_452;
static PyObject *__pyx_k_tuple_454;
static PyObject *__pyx_k_tuple_456;
static PyObject *__pyx_k_tuple_458;
static PyObject *__pyx_k_tuple_460;
static PyObject *__pyx_k_tuple_462;
static PyObject *__pyx_k_tuple_464;
static PyObject *__pyx_k_tuple_466;
static PyObject *__pyx_k_tuple_468;
static PyObject *__pyx_k_tuple_471;
static PyObject *__pyx_k_tuple_473;
static PyObject *__pyx_k_tuple_475;
static PyObject *__pyx_k_tuple_477;
static PyObject *__pyx_k_tuple_479;
static PyObject *__pyx_k_tuple_481;
static PyObject *__pyx_k_tuple_483;
static PyObject *__pyx_k_tuple_485;
static PyObject *__pyx_k_tuple_488;
static PyObject *__pyx_k_tuple_491;
static PyObject *__pyx_k_tuple_493;
static PyObject *__pyx_k_tuple_496;
static PyObject *__pyx_k_tuple_499;
static PyObject *__pyx_k_tuple_501;
static PyObject *__pyx_k_tuple_503;
static PyObject *__pyx_k_tuple_505;
static PyObject *__pyx_k_tuple_507;
static PyObject *__pyx_k_tuple_509;
static PyObject *__pyx_k_tuple_512;
static PyObject *__pyx_k_tuple_514;
static PyObject *__pyx_k_tuple_516;
static PyObject *__pyx_k_tuple_518;
static PyObject *__pyx_k_tuple_520;
static PyObject *__pyx_k_codeobj_110;
static PyObject *__pyx_k_codeobj_137;
static PyObject *__pyx_k_codeobj_140;
static PyObject *__pyx_k_codeobj_142;
static PyObject *__pyx_k_codeobj_144;
static PyObject *__pyx_k_codeobj_146;
static PyObject *__pyx_k_codeobj_148;
static PyObject *__pyx_k_codeobj_150;
static PyObject *__pyx_k_codeobj_152;
static PyObject *__pyx_k_codeobj_155;
static PyObject *__pyx_k_codeobj_158;
static PyObject *__pyx_k_codeobj_161;
static PyObject *__pyx_k_codeobj_163;
static PyObject *__pyx_k_codeobj_165;
static PyObject *__pyx_k_codeobj_167;
static PyObject *__pyx_k_codeobj_169;
static PyObject *__pyx_k_codeobj_171;
static PyObject *__pyx_k_codeobj_173;
static PyObject *__pyx_k_codeobj_175;
static PyObject *__pyx_k_codeobj_177;
static PyObject *__pyx_k_codeobj_179;
static PyObject *__pyx_k_codeobj_182;
static PyObject *__pyx_k_codeobj_184;
static PyObject *__pyx_k_codeobj_187;
static PyObject *__pyx_k_codeobj_189;
static PyObject *__pyx_k_codeobj_191;
static PyObject *__pyx_k_codeobj_193;
static PyObject *__pyx_k_codeobj_195;
static PyObject *__pyx_k_codeobj_197;
static PyObject *__pyx_k_codeobj_199;
static PyObject *__pyx_k_codeobj_201;
static PyObject *__pyx_k_codeobj_203;
static PyObject *__pyx_k_codeobj_205;
static PyObject *__pyx_k_codeobj_207;
static PyObject *__pyx_k_codeobj_209;
static PyObject *__pyx_k_codeobj_211;
static PyObject *__pyx_k_codeobj_213;
static PyObject *__pyx_k_codeobj_215;
static PyObject *__pyx_k_codeobj_217;
static PyObject *__pyx_k_codeobj_219;
static PyObject *__pyx_k_codeobj_221;
static PyObject *__pyx_k_codeobj_224;
static PyObject *__pyx_k_codeobj_226;
static PyObject *__pyx_k_codeobj_228;
static PyObject *__pyx_k_codeobj_230;
static PyObject *__pyx_k_codeobj_232;
static PyObject *__pyx_k_codeobj_234;
static PyObject *__pyx_k_codeobj_236;
static PyObject *__pyx_k_codeobj_238;
static PyObject *__pyx_k_codeobj_240;
static PyObject *__pyx_k_codeobj_242;
static PyObject *__pyx_k_codeobj_244;
static PyObject *__pyx_k_codeobj_246;
static PyObject *__pyx_k_codeobj_248;
static PyObject *__pyx_k_codeobj_250;
static PyObject *__pyx_k_codeobj_252;
static PyObject *__pyx_k_codeobj_255;
static PyObject *__pyx_k_codeobj_257;
static PyObject *__pyx_k_codeobj_260;
static PyObject *__pyx_k_codeobj_263;
static PyObject *__pyx_k_codeobj_265;
static PyObject *__pyx_k_codeobj_267;
static PyObject *__pyx_k_codeobj_269;
static PyObject *__pyx_k_codeobj_272;
static PyObject *__pyx_k_codeobj_274;
static PyObject *__pyx_k_codeobj_278;
static PyObject *__pyx_k_codeobj_281;
static PyObject *__pyx_k_codeobj_283;
static PyObject *__pyx_k_codeobj_285;
static PyObject *__pyx_k_codeobj_287;
static PyObject *__pyx_k_codeobj_289;
static PyObject *__pyx_k_codeobj_291;
static PyObject *__pyx_k_codeobj_293;
static PyObject *__pyx_k_codeobj_295;
static PyObject *__pyx_k_codeobj_297;
static PyObject *__pyx_k_codeobj_299;
static PyObject *__pyx_k_codeobj_301;
static PyObject *__pyx_k_codeobj_303;
static PyObject *__pyx_k_codeobj_305;
static PyObject *__pyx_k_codeobj_307;
static PyObject *__pyx_k_codeobj_310;
static PyObject *__pyx_k_codeobj_313;
static PyObject *__pyx_k_codeobj_316;
static PyObject *__pyx_k_codeobj_319;
static PyObject *__pyx_k_codeobj_321;
static PyObject *__pyx_k_codeobj_324;
static PyObject *__pyx_k_codeobj_327;
static PyObject *__pyx_k_codeobj_330;
static PyObject *__pyx_k_codeobj_333;
static PyObject *__pyx_k_codeobj_336;
static PyObject *__pyx_k_codeobj_338;
static PyObject *__pyx_k_codeobj_340;
static PyObject *__pyx_k_codeobj_342;
static PyObject *__pyx_k_codeobj_344;
static PyObject *__pyx_k_codeobj_346;
static PyObject *__pyx_k_codeobj_349;
static PyObject *__pyx_k_codeobj_351;
static PyObject *__pyx_k_codeobj_353;
static PyObject *__pyx_k_codeobj_355;
static PyObject *__pyx_k_codeobj_357;
static PyObject *__pyx_k_codeobj_359;
static PyObject *__pyx_k_codeobj_361;
static PyObject *__pyx_k_codeobj_363;
static PyObject *__pyx_k_codeobj_365;
static PyObject *__pyx_k_codeobj_367;
static PyObject *__pyx_k_codeobj_369;
static PyObject *__pyx_k_codeobj_371;
static PyObject *__pyx_k_codeobj_373;
static PyObject *__pyx_k_codeobj_375;
static PyObject *__pyx_k_codeobj_377;
static PyObject *__pyx_k_codeobj_380;
static PyObject *__pyx_k_codeobj_383;
static PyObject *__pyx_k_codeobj_385;
static PyObject *__pyx_k_codeobj_387;
static PyObject *__pyx_k_codeobj_389;
static PyObject *__pyx_k_codeobj_392;
static PyObject *__pyx_k_codeobj_395;
static PyObject *__pyx_k_codeobj_397;
static PyObject *__pyx_k_codeobj_399;
static PyObject *__pyx_k_codeobj_401;
static PyObject *__pyx_k_codeobj_404;
static PyObject *__pyx_k_codeobj_407;
static PyObject *__pyx_k_codeobj_410;
static PyObject *__pyx_k_codeobj_413;
static PyObject *__pyx_k_codeobj_416;
static PyObject *__pyx_k_codeobj_419;
static PyObject *__pyx_k_codeobj_422;
static PyObject *__pyx_k_codeobj_425;
static PyObject *__pyx_k_codeobj_428;
static PyObject *__pyx_k_codeobj_431;
static PyObject *__pyx_k_codeobj_434;
static PyObject *__pyx_k_codeobj_437;
static PyObject *__pyx_k_codeobj_440;
static PyObject *__pyx_k_codeobj_443;
static PyObject *__pyx_k_codeobj_445;
static PyObject *__pyx_k_codeobj_447;
static PyObject *__pyx_k_codeobj_449;
static PyObject *__pyx_k_codeobj_451;
static PyObject *__pyx_k_codeobj_453;
static PyObject *__pyx_k_codeobj_455;
static PyObject *__pyx_k_codeobj_457;
static PyObject *__pyx_k_codeobj_459;
static PyObject *__pyx_k_codeobj_461;
static PyObject *__pyx_k_codeobj_463;
static PyObject *__pyx_k_codeobj_465;
static PyObject *__pyx_k_codeobj_467;
static PyObject *__pyx_k_codeobj_469;
static PyObject *__pyx_k_codeobj_472;
static PyObject *__pyx_k_codeobj_474;
static PyObject *__pyx_k_codeobj_476;
static PyObject *__pyx_k_codeobj_478;
static PyObject *__pyx_k_codeobj_480;
static PyObject *__pyx_k_codeobj_482;
static PyObject *__pyx_k_codeobj_484;
static PyObject *__pyx_k_codeobj_486;
static PyObject *__pyx_k_codeobj_489;
static PyObject *__pyx_k_codeobj_492;
static PyObject *__pyx_k_codeobj_494;
static PyObject *__pyx_k_codeobj_497;
static PyObject *__pyx_k_codeobj_500;
static PyObject *__pyx_k_codeobj_502;
static PyObject *__pyx_k_codeobj_504;
static PyObject *__pyx_k_codeobj_506;
static PyObject *__pyx_k_codeobj_508;
static PyObject *__pyx_k_codeobj_510;
static PyObject *__pyx_k_codeobj_513;
static PyObject *__pyx_k_codeobj_515;
static PyObject *__pyx_k_codeobj_517;
static PyObject *__pyx_k_codeobj_519;
static PyObject *__pyx_k_codeobj_521;

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_358lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_358lambda1 = {__Pyx_NAMESTR("lambda1"), (PyCFunction)__pyx_pw_6pandas_8_tseries_358lambda1, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_358lambda1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_other = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__other,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda1 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("lambda1", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda1") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_self = values[0];
      __pyx_v_other = values[1];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_other = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda1", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_6pandas_8_tseries_lambda1(__pyx_self, __pyx_v_self, __pyx_v_other);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/stats.pyx":429
 *         return left != right
 * 
 * _return_false = lambda self, other: False             # <<<<<<<<<<<<<<
 * _return_true = lambda self, other: True
 * 
 */

static PyObject *__pyx_lambda_funcdef_6pandas_8_tseries_lambda1(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda1");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_359lambda2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_359lambda2 = {__Pyx_NAMESTR("lambda2"), (PyCFunction)__pyx_pw_6pandas_8_tseries_359lambda2, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_359lambda2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_other = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__other,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda2 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__other);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("lambda2", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda2") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_self = values[0];
      __pyx_v_other = values[1];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = values[0];
    __pyx_v_other = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_6pandas_8_tseries_lambda2(__pyx_self, __pyx_v_self, __pyx_v_other);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/stats.pyx":430
 * 
 * _return_false = lambda self, other: False
 * _return_true = lambda self, other: True             # <<<<<<<<<<<<<<
 * 
 * class Infinity(object):
 */

static PyObject *__pyx_lambda_funcdef_6pandas_8_tseries_lambda2(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda2");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":21
 * from datetime import datetime as pydatetime
 * 
 * cdef inline int int_max(int a, int b): return a if a >= b else b             # <<<<<<<<<<<<<<
 * cdef inline int int_min(int a, int b): return a if a <= b else b
 * 
 */

static CYTHON_INLINE int __pyx_f_6pandas_8_tseries_int_max(int __pyx_v_a, int __pyx_v_b) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("int_max");
  if ((__pyx_v_a >= __pyx_v_b)) {
    __pyx_t_1 = __pyx_v_a;
  } else {
    __pyx_t_1 = __pyx_v_b;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":22
 * 
 * cdef inline int int_max(int a, int b): return a if a >= b else b
 * cdef inline int int_min(int a, int b): return a if a <= b else b             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned char UChar
 */

static CYTHON_INLINE int __pyx_f_6pandas_8_tseries_int_min(int __pyx_v_a, int __pyx_v_b) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("int_min");
  if ((__pyx_v_a <= __pyx_v_b)) {
    __pyx_t_1 = __pyx_v_a;
  } else {
    __pyx_t_1 = __pyx_v_b;
  }
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":62
 * import_ufunc()
 * 
 * cpdef map_indices_list(list index):             # <<<<<<<<<<<<<<
 *     '''
 *     Produce a dict mapping the values of the input array to their respective
 */

static PyObject *__pyx_pw_6pandas_8_tseries_1map_indices_list(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_map_indices_list(PyObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_indices_list");

  /* "pandas/src/tseries.pyx":73
 *     '''
 *     cdef Py_ssize_t i, length
 *     cdef dict result = {}             # <<<<<<<<<<<<<<
 * 
 *     length = len(index)
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":75
 *     cdef dict result = {}
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < length:
 */
  if (unlikely(((PyObject *)__pyx_v_index) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_2 = PyList_GET_SIZE(((PyObject *)__pyx_v_index)); 
  __pyx_v_length = __pyx_t_2;

  /* "pandas/src/tseries.pyx":77
 *     length = len(index)
 * 
 *     for i from 0 <= i < length:             # <<<<<<<<<<<<<<
 *         result[index[i]] = i
 * 
 */
  __pyx_t_2 = __pyx_v_length;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "pandas/src/tseries.pyx":78
 * 
 *     for i from 0 <= i < length:
 *         result[index[i]] = i             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_index), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_3, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "pandas/src/tseries.pyx":80
 *         result[index[i]] = i
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._tseries.map_indices_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_1map_indices_list(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_6pandas_8_tseries_map_indices_list[] = "\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    ";
static PyObject *__pyx_pw_6pandas_8_tseries_1map_indices_list(PyObject *__pyx_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map_indices_list (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), (&PyList_Type), 1, "index", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_map_indices_list(__pyx_self, ((PyObject*)__pyx_v_index));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":62
 * import_ufunc()
 * 
 * cpdef map_indices_list(list index):             # <<<<<<<<<<<<<<
 *     '''
 *     Produce a dict mapping the values of the input array to their respective
 */

static PyObject *__pyx_pf_6pandas_8_tseries_map_indices_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_indices_list");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_8_tseries_map_indices_list(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.map_indices_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_8MultiMap_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_8MultiMap_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_label_arrays = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__label_arrays,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  {
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__label_arrays);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_label_arrays = ((PyObject*)values[0]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_label_arrays = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.MultiMap.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_label_arrays), (&PyList_Type), 1, "label_arrays", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_8MultiMap___init__(((struct __pyx_obj_6pandas_8_tseries_MultiMap *)__pyx_v_self), __pyx_v_label_arrays);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":94
 *         Py_ssize_t depth, length
 * 
 *     def __init__(self, list label_arrays):             # <<<<<<<<<<<<<<
 *         cdef:
 *             int32_t **ptr
 */

static int __pyx_pf_6pandas_8_tseries_8MultiMap___init__(struct __pyx_obj_6pandas_8_tseries_MultiMap *__pyx_v_self, PyObject *__pyx_v_label_arrays) {
  __pyx_t_5numpy_int32_t **__pyx_v_ptr;
  Py_ssize_t __pyx_v_i;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");

  /* "pandas/src/tseries.pyx":99
 *             Py_ssize_t i
 * 
 *         self.depth = len(label_arrays)             # <<<<<<<<<<<<<<
 *         self.length = len(label_arrays[0])
 *         self.store = {}
 */
  if (unlikely(((PyObject *)__pyx_v_label_arrays) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_label_arrays)); 
  __pyx_v_self->depth = __pyx_t_1;

  /* "pandas/src/tseries.pyx":100
 * 
 *         self.depth = len(label_arrays)
 *         self.length = len(label_arrays[0])             # <<<<<<<<<<<<<<
 *         self.store = {}
 * 
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_label_arrays), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->length = __pyx_t_1;

  /* "pandas/src/tseries.pyx":101
 *         self.depth = len(label_arrays)
 *         self.length = len(label_arrays[0])
 *         self.store = {}             # <<<<<<<<<<<<<<
 * 
 *         ptr = <int32_t**> malloc(self.depth * sizeof(int32_t*))
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __Pyx_GOTREF(__pyx_v_self->store);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->store));
  __pyx_v_self->store = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":103
 *         self.store = {}
 * 
 *         ptr = <int32_t**> malloc(self.depth * sizeof(int32_t*))             # <<<<<<<<<<<<<<
 * 
 *         for i in range(self.depth):
 */
  __pyx_v_ptr = ((__pyx_t_5numpy_int32_t **)malloc((__pyx_v_self->depth * (sizeof(__pyx_t_5numpy_int32_t *)))));

  /* "pandas/src/tseries.pyx":105
 *         ptr = <int32_t**> malloc(self.depth * sizeof(int32_t*))
 * 
 *         for i in range(self.depth):             # <<<<<<<<<<<<<<
 *             ptr[i] = <int32_t*> (<ndarray> label_arrays[i]).data
 * 
 */
  __pyx_t_1 = __pyx_v_self->depth;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "pandas/src/tseries.pyx":106
 * 
 *         for i in range(self.depth):
 *             ptr[i] = <int32_t*> (<ndarray> label_arrays[i]).data             # <<<<<<<<<<<<<<
 * 
 *         free(ptr)
 */
    __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_label_arrays), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    (__pyx_v_ptr[__pyx_v_i]) = ((__pyx_t_5numpy_int32_t *)((PyArrayObject *)__pyx_t_2)->data);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "pandas/src/tseries.pyx":108
 *             ptr[i] = <int32_t*> (<ndarray> label_arrays[i]).data
 * 
 *         free(ptr)             # <<<<<<<<<<<<<<
 * 
 *     cdef populate(self, int32_t **ptr):
 */
  free(__pyx_v_ptr);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._tseries.MultiMap.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":110
 *         free(ptr)
 * 
 *     cdef populate(self, int32_t **ptr):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i, j
 *         cdef int32_t* buf
 */

static PyObject *__pyx_f_6pandas_8_tseries_8MultiMap_populate(struct __pyx_obj_6pandas_8_tseries_MultiMap *__pyx_v_self, CYTHON_UNUSED __pyx_t_5numpy_int32_t **__pyx_v_ptr) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  CYTHON_UNUSED Py_ssize_t __pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  __Pyx_RefNannySetupContext("populate");

  /* "pandas/src/tseries.pyx":115
 *         cdef dict level
 * 
 *         for i from 0 <= i < self.length:             # <<<<<<<<<<<<<<
 * 
 *             for j from 0 <= j < self.depth - 1:
 */
  __pyx_t_1 = __pyx_v_self->length;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "pandas/src/tseries.pyx":117
 *         for i from 0 <= i < self.length:
 * 
 *             for j from 0 <= j < self.depth - 1:             # <<<<<<<<<<<<<<
 *                 pass
 * 
 */
    __pyx_t_2 = (__pyx_v_self->depth - 1);
    for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) {
    }
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":120
 *                 pass
 * 
 *     cpdef get(self, tuple key):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i
 *         cdef dict level = self.store
 */

static PyObject *__pyx_pw_6pandas_8_tseries_8MultiMap_3get(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_8MultiMap_get(struct __pyx_obj_6pandas_8_tseries_MultiMap *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_level = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pw_6pandas_8_tseries_8MultiMap_3get)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(((PyObject *)__pyx_v_key));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_key));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_key));
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "pandas/src/tseries.pyx":122
 *     cpdef get(self, tuple key):
 *         cdef Py_ssize_t i
 *         cdef dict level = self.store             # <<<<<<<<<<<<<<
 * 
 *         for i from 0 <= i < self.depth:
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self->store));
  __pyx_v_level = __pyx_v_self->store;

  /* "pandas/src/tseries.pyx":124
 *         cdef dict level = self.store
 * 
 *         for i from 0 <= i < self.depth:             # <<<<<<<<<<<<<<
 *             if i == self.depth - 1:
 *                 return level[i]
 */
  __pyx_t_4 = __pyx_v_self->depth;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) {

    /* "pandas/src/tseries.pyx":125
 * 
 *         for i from 0 <= i < self.depth:
 *             if i == self.depth - 1:             # <<<<<<<<<<<<<<
 *                 return level[i]
 *             else:
 */
    __pyx_t_5 = (__pyx_v_i == (__pyx_v_self->depth - 1));
    if (__pyx_t_5) {

      /* "pandas/src/tseries.pyx":126
 *         for i from 0 <= i < self.depth:
 *             if i == self.depth - 1:
 *                 return level[i]             # <<<<<<<<<<<<<<
 *             else:
 *                 level = level[i]
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_level), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "pandas/src/tseries.pyx":128
 *                 return level[i]
 *             else:
 *                 level = level[i]             # <<<<<<<<<<<<<<
 * 
 *         raise KeyError(key)
 */
      __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_level), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_v_level));
      __pyx_v_level = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;
    }
    __pyx_L5:;
  }

  /* "pandas/src/tseries.pyx":130
 *                 level = level[i]
 * 
 *         raise KeyError(key)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_key));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_key));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_key));
  __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  {__pyx_filename = __pyx_f[2]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._tseries.MultiMap.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_level);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_8MultiMap_3get(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_8MultiMap_3get(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyTuple_Type), 1, "key", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_8MultiMap_2get(((struct __pyx_obj_6pandas_8_tseries_MultiMap *)__pyx_v_self), ((PyObject*)__pyx_v_key));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":120
 *                 pass
 * 
 *     cpdef get(self, tuple key):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i
 *         cdef dict level = self.store
 */

static PyObject *__pyx_pf_6pandas_8_tseries_8MultiMap_2get(struct __pyx_obj_6pandas_8_tseries_MultiMap *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_MultiMap *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, __pyx_v_key, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.MultiMap.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_3ismember(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_2ismember[] = "\n    Checks whether\n\n    Parameters\n    ----------\n    arr : ndarray\n    values : set\n\n    Returns\n    -------\n    ismember : ndarray (boolean dtype)\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_3ismember = {__Pyx_NAMESTR("ismember"), (PyCFunction)__pyx_pw_6pandas_8_tseries_3ismember, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_2ismember)};
static PyObject *__pyx_pw_6pandas_8_tseries_3ismember(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_values = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__values,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ismember (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("ismember", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ismember") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_arr = ((PyArrayObject *)values[0]);
      __pyx_v_values = ((PyObject*)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_arr = ((PyArrayObject *)values[0]);
    __pyx_v_values = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ismember", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.ismember", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PySet_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_2ismember(__pyx_self, __pyx_v_arr, __pyx_v_values);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":133
 * 
 * 
 * def ismember(ndarray arr, set values):             # <<<<<<<<<<<<<<
 *     '''
 *     Checks whether
 */

static PyObject *__pyx_pf_6pandas_8_tseries_2ismember(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayIterObject *__pyx_v_it = 0;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_val = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ismember");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;

  /* "pandas/src/tseries.pyx":152
 *         object val
 * 
 *     it = <flatiter> PyArray_IterNew(arr)             # <<<<<<<<<<<<<<
 *     n = len(arr)
 *     result = np.empty(n, dtype=np.uint8)
 */
  __pyx_t_1 = PyArray_IterNew(((PyObject *)__pyx_v_arr)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)((PyArrayIterObject *)__pyx_t_1)));
  __pyx_v_it = ((PyArrayIterObject *)__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":153
 * 
 *     it = <flatiter> PyArray_IterNew(arr)
 *     n = len(arr)             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype=np.uint8)
 *     for i in range(n):
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_2;

  /* "pandas/src/tseries.pyx":154
 *     it = <flatiter> PyArray_IterNew(arr)
 *     n = len(arr)
 *     result = np.empty(n, dtype=np.uint8)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/src/tseries.pyx":155
 *     n = len(arr)
 *     result = np.empty(n, dtype=np.uint8)
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
 *         if val in values:
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_2; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "pandas/src/tseries.pyx":156
 *     result = np.empty(n, dtype=np.uint8)
 *     for i in range(n):
 *         val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))             # <<<<<<<<<<<<<<
 *         if val in values:
 *             result[i] = 1
 */
    __pyx_t_6 = PyArray_GETITEM(__pyx_v_arr, PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pandas/src/tseries.pyx":157
 *     for i in range(n):
 *         val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
 *         if val in values:             # <<<<<<<<<<<<<<
 *             result[i] = 1
 *         else:
 */
    __pyx_t_13 = ((PySequence_Contains(((PyObject *)__pyx_v_values), __pyx_v_val))); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_13) {

      /* "pandas/src/tseries.pyx":158
 *         val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
 *         if val in values:
 *             result[i] = 1             # <<<<<<<<<<<<<<
 *         else:
 *             result[i] = 0
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides) = 1;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "pandas/src/tseries.pyx":160
 *             result[i] = 1
 *         else:
 *             result[i] = 0             # <<<<<<<<<<<<<<
 *         PyArray_ITER_NEXT(it)
 * 
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides) = 0;
    }
    __pyx_L5:;

    /* "pandas/src/tseries.pyx":161
 *         else:
 *             result[i] = 0
 *         PyArray_ITER_NEXT(it)             # <<<<<<<<<<<<<<
 * 
 *     return result.view(np.bool_)
 */
    PyArray_ITER_NEXT(__pyx_v_it);
  }

  /* "pandas/src/tseries.pyx":163
 *         PyArray_ITER_NEXT(it)
 * 
 *     return result.view(np.bool_)             # <<<<<<<<<<<<<<
 * 
 * #----------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.ismember", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_it);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":172
 * from datetime import date as pydate
 * 
 * cdef inline int64_t gmtime(object date):             # <<<<<<<<<<<<<<
 *     cdef int y, m, d, h, mn, s, days
 * 
 */

static CYTHON_INLINE __pyx_t_5numpy_int64_t __pyx_f_6pandas_8_tseries_gmtime(PyObject *__pyx_v_date) {
  int __pyx_v_y;
  int __pyx_v_m;
  int __pyx_v_d;
  int __pyx_v_h;
  int __pyx_v_mn;
  int __pyx_v_s;
  int __pyx_v_days;
  __pyx_t_5numpy_int64_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gmtime");

  /* "pandas/src/tseries.pyx":175
 *     cdef int y, m, d, h, mn, s, days
 * 
 *     y = PyDateTime_GET_YEAR(date)             # <<<<<<<<<<<<<<
 *     m = PyDateTime_GET_MONTH(date)
 *     d = PyDateTime_GET_DAY(date)
 */
  if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_ptype_6pandas_8_tseries_datetime))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_date;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_y = PyDateTime_GET_YEAR(((PyDateTime_DateTime *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":176
 * 
 *     y = PyDateTime_GET_YEAR(date)
 *     m = PyDateTime_GET_MONTH(date)             # <<<<<<<<<<<<<<
 *     d = PyDateTime_GET_DAY(date)
 *     h = PyDateTime_DATE_GET_HOUR(date)
 */
  if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_ptype_6pandas_8_tseries_datetime))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_date;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_m = PyDateTime_GET_MONTH(((PyDateTime_DateTime *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":177
 *     y = PyDateTime_GET_YEAR(date)
 *     m = PyDateTime_GET_MONTH(date)
 *     d = PyDateTime_GET_DAY(date)             # <<<<<<<<<<<<<<
 *     h = PyDateTime_DATE_GET_HOUR(date)
 *     mn = PyDateTime_DATE_GET_MINUTE(date)
 */
  if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_ptype_6pandas_8_tseries_datetime))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_date;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_d = PyDateTime_GET_DAY(((PyDateTime_DateTime *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":178
 *     m = PyDateTime_GET_MONTH(date)
 *     d = PyDateTime_GET_DAY(date)
 *     h = PyDateTime_DATE_GET_HOUR(date)             # <<<<<<<<<<<<<<
 *     mn = PyDateTime_DATE_GET_MINUTE(date)
 *     s = PyDateTime_DATE_GET_SECOND(date)
 */
  if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_ptype_6pandas_8_tseries_datetime))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_date;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_h = PyDateTime_DATE_GET_HOUR(((PyDateTime_DateTime *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":179
 *     d = PyDateTime_GET_DAY(date)
 *     h = PyDateTime_DATE_GET_HOUR(date)
 *     mn = PyDateTime_DATE_GET_MINUTE(date)             # <<<<<<<<<<<<<<
 *     s = PyDateTime_DATE_GET_SECOND(date)
 * 
 */
  if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_ptype_6pandas_8_tseries_datetime))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_date;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_mn = PyDateTime_DATE_GET_MINUTE(((PyDateTime_DateTime *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":180
 *     h = PyDateTime_DATE_GET_HOUR(date)
 *     mn = PyDateTime_DATE_GET_MINUTE(date)
 *     s = PyDateTime_DATE_GET_SECOND(date)             # <<<<<<<<<<<<<<
 * 
 *     days = pydate(y, m, 1).toordinal() - _EPOCH_ORD + d - 1
 */
  if (!(likely(((__pyx_v_date) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_date, __pyx_ptype_6pandas_8_tseries_datetime))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = __pyx_v_date;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_s = PyDateTime_DATE_GET_SECOND(((PyDateTime_DateTime *)__pyx_t_1));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":182
 *     s = PyDateTime_DATE_GET_SECOND(date)
 * 
 *     days = pydate(y, m, 1).toordinal() - _EPOCH_ORD + d - 1             # <<<<<<<<<<<<<<
 *     return ((<int64_t> (((days * 24 + h) * 60 + mn))) * 60 + s) * 1000
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__pydate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromLong(__pyx_v_y); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyInt_FromLong(__pyx_v_m); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__toordinal); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromLong(__pyx_v_6pandas_8_tseries__EPOCH_ORD); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromLong(__pyx_v_d); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_days = __pyx_t_5;

  /* "pandas/src/tseries.pyx":183
 * 
 *     days = pydate(y, m, 1).toordinal() - _EPOCH_ORD + d - 1
 *     return ((<int64_t> (((days * 24 + h) * 60 + mn))) * 60 + s) * 1000             # <<<<<<<<<<<<<<
 * 
 * cpdef object to_datetime(int64_t timestamp):
 */
  __pyx_r = (((((__pyx_t_5numpy_int64_t)((((__pyx_v_days * 24) + __pyx_v_h) * 60) + __pyx_v_mn)) * 60) + __pyx_v_s) * 1000);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("pandas._tseries.gmtime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":185
 *     return ((<int64_t> (((days * 24 + h) * 60 + mn))) * 60 + s) * 1000
 * 
 * cpdef object to_datetime(int64_t timestamp):             # <<<<<<<<<<<<<<
 *     return pydatetime.utcfromtimestamp(timestamp / 1000.0)
 * 
 */

static PyObject *__pyx_pw_6pandas_8_tseries_5to_datetime(PyObject *__pyx_self, PyObject *__pyx_arg_timestamp); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_to_datetime(__pyx_t_5numpy_int64_t __pyx_v_timestamp, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_datetime");

  /* "pandas/src/tseries.pyx":186
 * 
 * cpdef object to_datetime(int64_t timestamp):
 *     return pydatetime.utcfromtimestamp(timestamp / 1000.0)             # <<<<<<<<<<<<<<
 * 
 * cpdef object to_timestamp(object dt):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__pydatetime); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__utcfromtimestamp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_timestamp / 1000.0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._tseries.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_5to_datetime(PyObject *__pyx_self, PyObject *__pyx_arg_timestamp); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_5to_datetime(PyObject *__pyx_self, PyObject *__pyx_arg_timestamp) {
  __pyx_t_5numpy_int64_t __pyx_v_timestamp;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_datetime (wrapper)");
  __pyx_self = __pyx_self;
  assert(__pyx_arg_timestamp); {
    __pyx_v_timestamp = __Pyx_PyInt_from_py_npy_int64(__pyx_arg_timestamp); if (unlikely((__pyx_v_timestamp == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_4to_datetime(__pyx_self, ((__pyx_t_5numpy_int64_t)__pyx_v_timestamp));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":185
 *     return ((<int64_t> (((days * 24 + h) * 60 + mn))) * 60 + s) * 1000
 * 
 * cpdef object to_datetime(int64_t timestamp):             # <<<<<<<<<<<<<<
 *     return pydatetime.utcfromtimestamp(timestamp / 1000.0)
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_4to_datetime(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_5numpy_int64_t __pyx_v_timestamp) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_datetime");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_8_tseries_to_datetime(__pyx_v_timestamp, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":188
 *     return pydatetime.utcfromtimestamp(timestamp / 1000.0)
 * 
 * cpdef object to_timestamp(object dt):             # <<<<<<<<<<<<<<
 *     return gmtime(dt)
 * 
 */

static PyObject *__pyx_pw_6pandas_8_tseries_7to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_to_timestamp(PyObject *__pyx_v_dt, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_timestamp");

  /* "pandas/src/tseries.pyx":189
 * 
 * cpdef object to_timestamp(object dt):
 *     return gmtime(dt)             # <<<<<<<<<<<<<<
 * 
 * def array_to_timestamp(ndarray[object, ndim=1] arr):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_f_6pandas_8_tseries_gmtime(__pyx_v_dt)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.to_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_7to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_dt); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_7to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_dt) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_timestamp (wrapper)");
  __pyx_self = __pyx_self;
  __pyx_r = __pyx_pf_6pandas_8_tseries_6to_timestamp(__pyx_self, ((PyObject *)__pyx_v_dt));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":188
 *     return pydatetime.utcfromtimestamp(timestamp / 1000.0)
 * 
 * cpdef object to_timestamp(object dt):             # <<<<<<<<<<<<<<
 *     return gmtime(dt)
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_6to_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_timestamp");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_8_tseries_to_timestamp(__pyx_v_dt, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.to_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_9array_to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_9array_to_timestamp = {__Pyx_NAMESTR("array_to_timestamp"), (PyCFunction)__pyx_pw_6pandas_8_tseries_9array_to_timestamp, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_9array_to_timestamp(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("array_to_timestamp (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_8array_to_timestamp(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":191
 *     return gmtime(dt)
 * 
 * def array_to_timestamp(ndarray[object, ndim=1] arr):             # <<<<<<<<<<<<<<
 *     cdef int i, n
 *     cdef ndarray[int64_t, ndim=1] result
 */

static PyObject *__pyx_pf_6pandas_8_tseries_8array_to_timestamp(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  int __pyx_v_i;
  int __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("array_to_timestamp");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/tseries.pyx":195
 *     cdef ndarray[int64_t, ndim=1] result
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype=np.int64)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/tseries.pyx":196
 * 
 *     n = len(arr)
 *     result = np.empty(n, dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromLong(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int64); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/src/tseries.pyx":198
 *     result = np.empty(n, dtype=np.int64)
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         result[i] = gmtime(arr[i])
 * 
 */
  __pyx_t_8 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) {

    /* "pandas/src/tseries.pyx":199
 * 
 *     for i from 0 <= i < n:
 *         result[i] = gmtime(arr[i])             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_13 = 0;
    if (unlikely(__pyx_t_13 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_13);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_14 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_result.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_14 = 0;
    if (unlikely(__pyx_t_14 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_14);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_8_tseries_gmtime(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }

  /* "pandas/src/tseries.pyx":201
 *         result[i] = gmtime(arr[i])
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def array_to_datetime(ndarray[int64_t, ndim=1] arr):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.array_to_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_11array_to_datetime(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_11array_to_datetime = {__Pyx_NAMESTR("array_to_datetime"), (PyCFunction)__pyx_pw_6pandas_8_tseries_11array_to_datetime, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_11array_to_datetime(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("array_to_datetime (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_10array_to_datetime(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":203
 *     return result
 * 
 * def array_to_datetime(ndarray[int64_t, ndim=1] arr):             # <<<<<<<<<<<<<<
 *     cdef int i, n
 *     cdef ndarray[object, ndim=1] result
 */

static PyObject *__pyx_pf_6pandas_8_tseries_10array_to_datetime(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  int __pyx_v_i;
  int __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  PyObject **__pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("array_to_datetime");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/tseries.pyx":207
 *     cdef ndarray[object, ndim=1] result
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype=object)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/tseries.pyx":208
 * 
 *     n = len(arr)
 *     result = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromLong(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/src/tseries.pyx":210
 *     result = np.empty(n, dtype=object)
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         result[i] = to_datetime(arr[i])
 * 
 */
  __pyx_t_7 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {

    /* "pandas/src/tseries.pyx":211
 * 
 *     for i from 0 <= i < n:
 *         result[i] = to_datetime(arr[i])             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_11 = __pyx_v_i;
    __pyx_t_12 = -1;
    if (__pyx_t_11 < 0) {
      __pyx_t_11 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_12 = 0;
    if (unlikely(__pyx_t_12 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_12);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = __pyx_f_6pandas_8_tseries_to_datetime((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides)), 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_result.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_13 = 0;
    if (unlikely(__pyx_t_13 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_13);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_14 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_14);
    __Pyx_DECREF(*__pyx_t_14); __Pyx_INCREF(__pyx_t_5);
    *__pyx_t_14 = __pyx_t_5;
    __Pyx_GIVEREF(*__pyx_t_14);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }

  /* "pandas/src/tseries.pyx":213
 *         result[i] = to_datetime(arr[i])
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * #----------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.array_to_datetime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":221
 * cdef double NEGINF = -INF
 * 
 * cdef inline bint _checknull(object val):             # <<<<<<<<<<<<<<
 *     return not np.PyArray_Check(val) and (val is None or val != val)
 * 
 */

static CYTHON_INLINE int __pyx_f_6pandas_8_tseries__checknull(PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_checknull");

  /* "pandas/src/tseries.pyx":222
 * 
 * cdef inline bint _checknull(object val):
 *     return not np.PyArray_Check(val) and (val is None or val != val)             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint _checknan(object val):
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong((!PyArray_Check(__pyx_v_val))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = (__pyx_v_val == Py_None);
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_2) {
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __pyx_t_4;
      __pyx_t_4 = 0;
    } else {
      __pyx_t_5 = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_t_3 = __pyx_t_5;
    __pyx_t_5 = 0;
  } else {
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("pandas._tseries._checknull", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":224
 *     return not np.PyArray_Check(val) and (val is None or val != val)
 * 
 * cdef inline bint _checknan(object val):             # <<<<<<<<<<<<<<
 *     return not np.PyArray_Check(val) and val != val
 * 
 */

static CYTHON_INLINE int __pyx_f_6pandas_8_tseries__checknan(PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_checknan");

  /* "pandas/src/tseries.pyx":225
 * 
 * cdef inline bint _checknan(object val):
 *     return not np.PyArray_Check(val) and val != val             # <<<<<<<<<<<<<<
 * 
 * cpdef checknull(object val):
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong((!PyArray_Check(__pyx_v_val))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_2) {
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __pyx_t_4 = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("pandas._tseries._checknan", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":227
 *     return not np.PyArray_Check(val) and val != val
 * 
 * cpdef checknull(object val):             # <<<<<<<<<<<<<<
 *     if util.is_float_object(val):
 *         return val != val or val == INF or val == NEGINF
 */

static PyObject *__pyx_pw_6pandas_8_tseries_13checknull(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_checknull(PyObject *__pyx_v_val, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("checknull");

  /* "pandas/src/tseries.pyx":228
 * 
 * cpdef checknull(object val):
 *     if util.is_float_object(val):             # <<<<<<<<<<<<<<
 *         return val != val or val == INF or val == NEGINF
 *     elif is_array(val):
 */
  __pyx_t_1 = is_float_object(__pyx_v_val);
  if (__pyx_t_1) {

    /* "pandas/src/tseries.pyx":229
 * cpdef checknull(object val):
 *     if util.is_float_object(val):
 *         return val != val or val == INF or val == NEGINF             # <<<<<<<<<<<<<<
 *     elif is_array(val):
 *         return False
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_6pandas_8_tseries_INF); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_val, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (!__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_3 = PyFloat_FromDouble(__pyx_v_6pandas_8_tseries_NEGINF); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = PyObject_RichCompare(__pyx_v_val, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __pyx_t_5;
        __pyx_t_5 = 0;
      } else {
        __pyx_t_3 = __pyx_t_4;
        __pyx_t_4 = 0;
      }
      __pyx_t_4 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __pyx_t_4 = __pyx_t_2;
      __pyx_t_2 = 0;
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "pandas/src/tseries.pyx":230
 *     if util.is_float_object(val):
 *         return val != val or val == INF or val == NEGINF
 *     elif is_array(val):             # <<<<<<<<<<<<<<
 *         return False
 *     else:
 */
  __pyx_t_4 = __pyx_f_4util_is_array(__pyx_v_val); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "pandas/src/tseries.pyx":231
 *         return val != val or val == INF or val == NEGINF
 *     elif is_array(val):
 *         return False             # <<<<<<<<<<<<<<
 *     else:
 *         return _checknull(val)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/tseries.pyx":233
 *         return False
 *     else:
 *         return _checknull(val)             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_f_6pandas_8_tseries__checknull(__pyx_v_val)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._tseries.checknull", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_13checknull(PyObject *__pyx_self, PyObject *__pyx_v_val); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_13checknull(PyObject *__pyx_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("checknull (wrapper)");
  __pyx_self = __pyx_self;
  __pyx_r = __pyx_pf_6pandas_8_tseries_12checknull(__pyx_self, ((PyObject *)__pyx_v_val));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":227
 *     return not np.PyArray_Check(val) and val != val
 * 
 * cpdef checknull(object val):             # <<<<<<<<<<<<<<
 *     if util.is_float_object(val):
 *         return val != val or val == INF or val == NEGINF
 */

static PyObject *__pyx_pf_6pandas_8_tseries_12checknull(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("checknull");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_8_tseries_checknull(__pyx_v_val, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.checknull", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_15isnullobj(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_15isnullobj = {__Pyx_NAMESTR("isnullobj"), (PyCFunction)__pyx_pw_6pandas_8_tseries_15isnullobj, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_15isnullobj(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isnullobj (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_14isnullobj(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":237
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def isnullobj(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, n
 *     cdef object val
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14isnullobj(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isnullobj");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/tseries.pyx":242
 *     cdef ndarray[uint8_t] result
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 *     result = np.zeros(n, dtype=np.uint8)
 *     for i from 0 <= i < n:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/tseries.pyx":243
 * 
 *     n = len(arr)
 *     result = np.zeros(n, dtype=np.uint8)             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         result[i] = _checknull(arr[i])
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "pandas/src/tseries.pyx":244
 *     n = len(arr)
 *     result = np.zeros(n, dtype=np.uint8)
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         result[i] = _checknull(arr[i])
 *     return result.view(np.bool_)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "pandas/src/tseries.pyx":245
 *     result = np.zeros(n, dtype=np.uint8)
 *     for i from 0 <= i < n:
 *         result[i] = _checknull(arr[i])             # <<<<<<<<<<<<<<
 *     return result.view(np.bool_)
 * 
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __pyx_t_13 = __pyx_v_i;
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_f_6pandas_8_tseries__checknull(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }

  /* "pandas/src/tseries.pyx":246
 *     for i from 0 <= i < n:
 *         result[i] = _checknull(arr[i])
 *     return result.view(np.bool_)             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.isnullobj", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_17isnullobj2d(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_17isnullobj2d = {__Pyx_NAMESTR("isnullobj2d"), (PyCFunction)__pyx_pw_6pandas_8_tseries_17isnullobj2d, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_17isnullobj2d(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isnullobj2d (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_16isnullobj2d(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":250
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def isnullobj2d(ndarray[object, ndim=2] arr):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, n, m
 *     cdef object val
 */

static PyObject *__pyx_pf_6pandas_8_tseries_16isnullobj2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_m;
  PyObject *__pyx_v_val = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyArrayObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isnullobj2d");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_arr.diminfo[1].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_arr.diminfo[1].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[1];

  /* "pandas/src/tseries.pyx":255
 *     cdef ndarray[uint8_t, ndim=2] result
 * 
 *     n, m = (<object> arr).shape             # <<<<<<<<<<<<<<
 *     result = np.zeros((n, m), dtype=np.uint8)
 *     for i from 0 <= i < n:
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_n = __pyx_t_6;
  __pyx_v_m = __pyx_t_7;

  /* "pandas/src/tseries.pyx":256
 * 
 *     n, m = (<object> arr).shape
 *     result = np.zeros((n, m), dtype=np.uint8)             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         for j from 0 <= j < m:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_m); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__uint8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_8);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_9 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_8);
  __pyx_t_8 = 0;

  /* "pandas/src/tseries.pyx":257
 *     n, m = (<object> arr).shape
 *     result = np.zeros((n, m), dtype=np.uint8)
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         for j from 0 <= j < m:
 *             val = arr[i, j]
 */
  __pyx_t_7 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {

    /* "pandas/src/tseries.pyx":258
 *     result = np.zeros((n, m), dtype=np.uint8)
 *     for i from 0 <= i < n:
 *         for j from 0 <= j < m:             # <<<<<<<<<<<<<<
 *             val = arr[i, j]
 *             if checknull(val):
 */
    __pyx_t_6 = __pyx_v_m;
    for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_6; __pyx_v_j++) {

      /* "pandas/src/tseries.pyx":259
 *     for i from 0 <= i < n:
 *         for j from 0 <= j < m:
 *             val = arr[i, j]             # <<<<<<<<<<<<<<
 *             if checknull(val):
 *                 result[i, j] = 1
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_15 = __pyx_v_j;
      __pyx_t_8 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_arr.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_arr.diminfo[1].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_8);
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "pandas/src/tseries.pyx":260
 *         for j from 0 <= j < m:
 *             val = arr[i, j]
 *             if checknull(val):             # <<<<<<<<<<<<<<
 *                 result[i, j] = 1
 *     return result.view(np.bool_)
 */
      __pyx_t_8 = __pyx_f_6pandas_8_tseries_checknull(__pyx_v_val, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_16) {

        /* "pandas/src/tseries.pyx":261
 *             val = arr[i, j]
 *             if checknull(val):
 *                 result[i, j] = 1             # <<<<<<<<<<<<<<
 *     return result.view(np.bool_)
 * 
 */
        __pyx_t_17 = __pyx_v_i;
        __pyx_t_18 = __pyx_v_j;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_result.diminfo[1].strides) = 1;
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
  }

  /* "pandas/src/tseries.pyx":262
 *             if checknull(val):
 *                 result[i, j] = 1
 *     return result.view(np.bool_)             # <<<<<<<<<<<<<<
 * 
 * def list_to_object_array(list obj):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_8 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__bool_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.isnullobj2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_19list_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static char __pyx_doc_6pandas_8_tseries_18list_to_object_array[] = "\n    Convert list to object ndarray. Seriously can't believe I had to write this\n    function\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_19list_to_object_array = {__Pyx_NAMESTR("list_to_object_array"), (PyCFunction)__pyx_pw_6pandas_8_tseries_19list_to_object_array, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_18list_to_object_array)};
static PyObject *__pyx_pw_6pandas_8_tseries_19list_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("list_to_object_array (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_obj), (&PyList_Type), 1, "obj", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_18list_to_object_array(__pyx_self, ((PyObject*)__pyx_v_obj));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":264
 *     return result.view(np.bool_)
 * 
 * def list_to_object_array(list obj):             # <<<<<<<<<<<<<<
 *     '''
 *     Convert list to object ndarray. Seriously can't believe I had to write this
 */

static PyObject *__pyx_pf_6pandas_8_tseries_18list_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_arr = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  PyObject **__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("list_to_object_array");
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;

  /* "pandas/src/tseries.pyx":273
 *         ndarray[object] arr
 * 
 *     n = len(obj)             # <<<<<<<<<<<<<<
 *     arr = np.empty(n, dtype=object)
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_obj) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_obj)); 
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/tseries.pyx":274
 * 
 *     n = len(obj)
 *     arr = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/src/tseries.pyx":276
 *     arr = np.empty(n, dtype=object)
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         arr[i] = obj[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "pandas/src/tseries.pyx":277
 * 
 *     for i from 0 <= i < n:
 *         arr[i] = obj[i]             # <<<<<<<<<<<<<<
 * 
 *     return arr
 */
    __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_obj), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_11 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_11 < 0) {
      __pyx_t_11 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_12 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_arr.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_12);
    __Pyx_DECREF(*__pyx_t_12); __Pyx_INCREF(__pyx_t_5);
    *__pyx_t_12 = __pyx_t_5;
    __Pyx_GIVEREF(*__pyx_t_12);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }

  /* "pandas/src/tseries.pyx":279
 *         arr[i] = obj[i]
 * 
 *     return arr             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_arr));
  __pyx_r = ((PyObject *)__pyx_v_arr);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.list_to_object_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_21fast_unique(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_21fast_unique = {__Pyx_NAMESTR("fast_unique"), (PyCFunction)__pyx_pw_6pandas_8_tseries_21fast_unique, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_21fast_unique(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fast_unique (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_20fast_unique(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":284
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_20fast_unique(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_uniques = 0;
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_stub = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fast_unique");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/tseries.pyx":286
 * def fast_unique(ndarray[object] values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         list uniques = []
 *         dict table = {}
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/tseries.pyx":287
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 *         list uniques = []             # <<<<<<<<<<<<<<
 *         dict table = {}
 *         object val, stub = 0
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_uniques = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":288
 *         Py_ssize_t i, n = len(values)
 *         list uniques = []
 *         dict table = {}             # <<<<<<<<<<<<<<
 *         object val, stub = 0
 * 
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_v_table = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":289
 *         list uniques = []
 *         dict table = {}
 *         object val, stub = 0             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_stub = __pyx_int_0;

  /* "pandas/src/tseries.pyx":291
 *         object val, stub = 0
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         val = values[i]
 *         if val not in table:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "pandas/src/tseries.pyx":292
 * 
 *     for i from 0 <= i < n:
 *         val = values[i]             # <<<<<<<<<<<<<<
 *         if val not in table:
 *             table[val] = stub
 */
    __pyx_t_3 = __pyx_v_i;
    __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/src/tseries.pyx":293
 *     for i from 0 <= i < n:
 *         val = values[i]
 *         if val not in table:             # <<<<<<<<<<<<<<
 *             table[val] = stub
 *             uniques.append(val)
 */
    __pyx_t_4 = (__Pyx_NegateNonNeg(PyDict_Contains(((PyObject *)__pyx_v_table), __pyx_v_val))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "pandas/src/tseries.pyx":294
 *         val = values[i]
 *         if val not in table:
 *             table[val] = stub             # <<<<<<<<<<<<<<
 *             uniques.append(val)
 *     try:
 */
      if (PyDict_SetItem(((PyObject *)__pyx_v_table), __pyx_v_val, __pyx_v_stub) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pandas/src/tseries.pyx":295
 *         if val not in table:
 *             table[val] = stub
 *             uniques.append(val)             # <<<<<<<<<<<<<<
 *     try:
 *         uniques.sort()
 */
      __pyx_t_5 = PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "pandas/src/tseries.pyx":296
 *             table[val] = stub
 *             uniques.append(val)
 *     try:             # <<<<<<<<<<<<<<
 *         uniques.sort()
 *     except Exception:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "pandas/src/tseries.pyx":297
 *             uniques.append(val)
 *     try:
 *         uniques.sort()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         pass
 */
      __pyx_t_5 = PyList_Sort(((PyObject *)__pyx_v_uniques)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
    }
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L13_try_end;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/src/tseries.pyx":298
 *     try:
 *         uniques.sort()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
    __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_9) {
      PyErr_Restore(0,0,0);
      goto __pyx_L7_exception_handled;
    }
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L7_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    __pyx_L13_try_end:;
  }

  /* "pandas/src/tseries.pyx":301
 *         pass
 * 
 *     return uniques             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_uniques));
  __pyx_r = ((PyObject *)__pyx_v_uniques);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.fast_unique", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XDECREF(__pyx_v_table);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_stub);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_23fast_unique_multiple(PyObject *__pyx_self, PyObject *__pyx_v_arrays); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_23fast_unique_multiple = {__Pyx_NAMESTR("fast_unique_multiple"), (PyCFunction)__pyx_pw_6pandas_8_tseries_23fast_unique_multiple, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_23fast_unique_multiple(PyObject *__pyx_self, PyObject *__pyx_v_arrays) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fast_unique_multiple (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arrays), (&PyList_Type), 1, "arrays", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_22fast_unique_multiple(__pyx_self, ((PyObject*)__pyx_v_arrays));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":305
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique_multiple(list arrays):             # <<<<<<<<<<<<<<
 *     cdef:
 *         ndarray[object] buf
 */

static PyObject *__pyx_pf_6pandas_8_tseries_22fast_unique_multiple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arrays) {
  PyArrayObject *__pyx_v_buf = 0;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_uniques = 0;
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_stub = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_buf;
  __Pyx_Buffer __pyx_pybuffer_buf;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyArrayObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fast_unique_multiple");
  __pyx_pybuffer_buf.pybuffer.buf = NULL;
  __pyx_pybuffer_buf.refcount = 0;
  __pyx_pybuffernd_buf.data = NULL;
  __pyx_pybuffernd_buf.rcbuffer = &__pyx_pybuffer_buf;

  /* "pandas/src/tseries.pyx":308
 *     cdef:
 *         ndarray[object] buf
 *         Py_ssize_t k = len(arrays)             # <<<<<<<<<<<<<<
 *         Py_ssize_t i, j, n
 *         list uniques = []
 */
  if (unlikely(((PyObject *)__pyx_v_arrays) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_arrays)); 
  __pyx_v_k = __pyx_t_1;

  /* "pandas/src/tseries.pyx":310
 *         Py_ssize_t k = len(arrays)
 *         Py_ssize_t i, j, n
 *         list uniques = []             # <<<<<<<<<<<<<<
 *         dict table = {}
 *         object val, stub = 0
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_uniques = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":311
 *         Py_ssize_t i, j, n
 *         list uniques = []
 *         dict table = {}             # <<<<<<<<<<<<<<
 *         object val, stub = 0
 * 
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_v_table = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":312
 *         list uniques = []
 *         dict table = {}
 *         object val, stub = 0             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < k:
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_stub = __pyx_int_0;

  /* "pandas/src/tseries.pyx":314
 *         object val, stub = 0
 * 
 *     for i from 0 <= i < k:             # <<<<<<<<<<<<<<
 *         buf = arrays[i]
 *         n = len(buf)
 */
  __pyx_t_1 = __pyx_v_k;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "pandas/src/tseries.pyx":315
 * 
 *     for i from 0 <= i < k:
 *         buf = arrays[i]             # <<<<<<<<<<<<<<
 *         n = len(buf)
 *         for j from 0 <= j < n:
 */
    if (!(likely(((PyList_GET_ITEM(__pyx_v_arrays, __pyx_v_i)) == Py_None) || likely(__Pyx_TypeTest(PyList_GET_ITEM(__pyx_v_arrays, __pyx_v_i), __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = ((PyArrayObject *)PyList_GET_ITEM(__pyx_v_arrays, __pyx_v_i));
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_buf.rcbuffer->pybuffer);
      __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_buf.rcbuffer->pybuffer, (PyObject*)__pyx_t_3, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_4 < 0)) {
        PyErr_Fetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_buf.rcbuffer->pybuffer, (PyObject*)__pyx_v_buf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_5, __pyx_t_6, __pyx_t_7);
        }
      }
      __pyx_pybuffernd_buf.diminfo[0].strides = __pyx_pybuffernd_buf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_buf.diminfo[0].shape = __pyx_pybuffernd_buf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = 0;
    __Pyx_INCREF(PyList_GET_ITEM(__pyx_v_arrays, __pyx_v_i));
    __Pyx_XDECREF(((PyObject *)__pyx_v_buf));
    __pyx_v_buf = ((PyArrayObject *)PyList_GET_ITEM(__pyx_v_arrays, __pyx_v_i));

    /* "pandas/src/tseries.pyx":316
 *     for i from 0 <= i < k:
 *         buf = arrays[i]
 *         n = len(buf)             # <<<<<<<<<<<<<<
 *         for j from 0 <= j < n:
 *             val = buf[j]
 */
    __pyx_t_8 = PyObject_Length(((PyObject *)__pyx_v_buf)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_n = __pyx_t_8;

    /* "pandas/src/tseries.pyx":317
 *         buf = arrays[i]
 *         n = len(buf)
 *         for j from 0 <= j < n:             # <<<<<<<<<<<<<<
 *             val = buf[j]
 *             if val not in table:
 */
    __pyx_t_8 = __pyx_v_n;
    for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) {

      /* "pandas/src/tseries.pyx":318
 *         n = len(buf)
 *         for j from 0 <= j < n:
 *             val = buf[j]             # <<<<<<<<<<<<<<
 *             if val not in table:
 *                 table[val] = stub
 */
      __pyx_t_9 = __pyx_v_j;
      __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_buf.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_buf.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_2);
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "pandas/src/tseries.pyx":319
 *         for j from 0 <= j < n:
 *             val = buf[j]
 *             if val not in table:             # <<<<<<<<<<<<<<
 *                 table[val] = stub
 *                 uniques.append(val)
 */
      __pyx_t_10 = (__Pyx_NegateNonNeg(PyDict_Contains(((PyObject *)__pyx_v_table), __pyx_v_val))); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_10) {

        /* "pandas/src/tseries.pyx":320
 *             val = buf[j]
 *             if val not in table:
 *                 table[val] = stub             # <<<<<<<<<<<<<<
 *                 uniques.append(val)
 *     try:
 */
        if (PyDict_SetItem(((PyObject *)__pyx_v_table), __pyx_v_val, __pyx_v_stub) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "pandas/src/tseries.pyx":321
 *             if val not in table:
 *                 table[val] = stub
 *                 uniques.append(val)             # <<<<<<<<<<<<<<
 *     try:
 *         uniques.sort()
 */
        __pyx_t_11 = PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L7;
      }
      __pyx_L7:;
    }
  }

  /* "pandas/src/tseries.pyx":322
 *                 table[val] = stub
 *                 uniques.append(val)
 *     try:             # <<<<<<<<<<<<<<
 *         uniques.sort()
 *     except Exception:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "pandas/src/tseries.pyx":323
 *                 uniques.append(val)
 *     try:
 *         uniques.sort()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         pass
 */
      __pyx_t_11 = PyList_Sort(((PyObject *)__pyx_v_uniques)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
    }
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L15_try_end;
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/src/tseries.pyx":324
 *     try:
 *         uniques.sort()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
    __pyx_t_4 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_4) {
      PyErr_Restore(0,0,0);
      goto __pyx_L9_exception_handled;
    }
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L9_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
    __pyx_L15_try_end:;
  }

  /* "pandas/src/tseries.pyx":327
 *         pass
 * 
 *     return uniques             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_uniques));
  __pyx_r = ((PyObject *)__pyx_v_uniques);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_buf.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.fast_unique_multiple", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_buf.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XDECREF(__pyx_v_table);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_stub);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_25fast_unique_multiple_list(PyObject *__pyx_self, PyObject *__pyx_v_lists); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_25fast_unique_multiple_list = {__Pyx_NAMESTR("fast_unique_multiple_list"), (PyCFunction)__pyx_pw_6pandas_8_tseries_25fast_unique_multiple_list, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_25fast_unique_multiple_list(PyObject *__pyx_self, PyObject *__pyx_v_lists) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fast_unique_multiple_list (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lists), (&PyList_Type), 1, "lists", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_24fast_unique_multiple_list(__pyx_self, ((PyObject*)__pyx_v_lists));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":331
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique_multiple_list(list lists):             # <<<<<<<<<<<<<<
 *     cdef:
 *         list buf
 */

static PyObject *__pyx_pf_6pandas_8_tseries_24fast_unique_multiple_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lists) {
  PyObject *__pyx_v_buf = 0;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_uniques = 0;
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_stub = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fast_unique_multiple_list");

  /* "pandas/src/tseries.pyx":334
 *     cdef:
 *         list buf
 *         Py_ssize_t k = len(lists)             # <<<<<<<<<<<<<<
 *         Py_ssize_t i, j, n
 *         list uniques = []
 */
  if (unlikely(((PyObject *)__pyx_v_lists) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_lists)); 
  __pyx_v_k = __pyx_t_1;

  /* "pandas/src/tseries.pyx":336
 *         Py_ssize_t k = len(lists)
 *         Py_ssize_t i, j, n
 *         list uniques = []             # <<<<<<<<<<<<<<
 *         dict table = {}
 *         object val, stub = 0
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_uniques = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":337
 *         Py_ssize_t i, j, n
 *         list uniques = []
 *         dict table = {}             # <<<<<<<<<<<<<<
 *         object val, stub = 0
 * 
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_v_table = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":338
 *         list uniques = []
 *         dict table = {}
 *         object val, stub = 0             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < k:
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_stub = __pyx_int_0;

  /* "pandas/src/tseries.pyx":340
 *         object val, stub = 0
 * 
 *     for i from 0 <= i < k:             # <<<<<<<<<<<<<<
 *         buf = lists[i]
 *         n = len(buf)
 */
  __pyx_t_1 = __pyx_v_k;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "pandas/src/tseries.pyx":341
 * 
 *     for i from 0 <= i < k:
 *         buf = lists[i]             # <<<<<<<<<<<<<<
 *         n = len(buf)
 *         for j from 0 <= j < n:
 */
    if (!(likely(PyList_CheckExact(PyList_GET_ITEM(__pyx_v_lists, __pyx_v_i)))||((PyList_GET_ITEM(__pyx_v_lists, __pyx_v_i)) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(PyList_GET_ITEM(__pyx_v_lists, __pyx_v_i))->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_INCREF(PyList_GET_ITEM(__pyx_v_lists, __pyx_v_i));
    __Pyx_XDECREF(((PyObject *)__pyx_v_buf));
    __pyx_v_buf = ((PyObject*)PyList_GET_ITEM(__pyx_v_lists, __pyx_v_i));

    /* "pandas/src/tseries.pyx":342
 *     for i from 0 <= i < k:
 *         buf = lists[i]
 *         n = len(buf)             # <<<<<<<<<<<<<<
 *         for j from 0 <= j < n:
 *             val = buf[j]
 */
    if (unlikely(((PyObject *)__pyx_v_buf) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_buf)); 
    __pyx_v_n = __pyx_t_3;

    /* "pandas/src/tseries.pyx":343
 *         buf = lists[i]
 *         n = len(buf)
 *         for j from 0 <= j < n:             # <<<<<<<<<<<<<<
 *             val = buf[j]
 *             if val not in table:
 */
    __pyx_t_3 = __pyx_v_n;
    for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_3; __pyx_v_j++) {

      /* "pandas/src/tseries.pyx":344
 *         n = len(buf)
 *         for j from 0 <= j < n:
 *             val = buf[j]             # <<<<<<<<<<<<<<
 *             if val not in table:
 *                 table[val] = stub
 */
      __Pyx_INCREF(PyList_GET_ITEM(__pyx_v_buf, __pyx_v_j));
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = PyList_GET_ITEM(__pyx_v_buf, __pyx_v_j);

      /* "pandas/src/tseries.pyx":345
 *         for j from 0 <= j < n:
 *             val = buf[j]
 *             if val not in table:             # <<<<<<<<<<<<<<
 *                 table[val] = stub
 *                 uniques.append(val)
 */
      __pyx_t_4 = (__Pyx_NegateNonNeg(PyDict_Contains(((PyObject *)__pyx_v_table), __pyx_v_val))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_4) {

        /* "pandas/src/tseries.pyx":346
 *             val = buf[j]
 *             if val not in table:
 *                 table[val] = stub             # <<<<<<<<<<<<<<
 *                 uniques.append(val)
 *     try:
 */
        if (PyDict_SetItem(((PyObject *)__pyx_v_table), __pyx_v_val, __pyx_v_stub) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "pandas/src/tseries.pyx":347
 *             if val not in table:
 *                 table[val] = stub
 *                 uniques.append(val)             # <<<<<<<<<<<<<<
 *     try:
 *         uniques.sort()
 */
        __pyx_t_5 = PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L7;
      }
      __pyx_L7:;
    }
  }

  /* "pandas/src/tseries.pyx":348
 *                 table[val] = stub
 *                 uniques.append(val)
 *     try:             # <<<<<<<<<<<<<<
 *         uniques.sort()
 *     except Exception:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "pandas/src/tseries.pyx":349
 *                 uniques.append(val)
 *     try:
 *         uniques.sort()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         pass
 */
      __pyx_t_5 = PyList_Sort(((PyObject *)__pyx_v_uniques)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
    }
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L15_try_end;
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/src/tseries.pyx":350
 *     try:
 *         uniques.sort()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
    __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_9) {
      PyErr_Restore(0,0,0);
      goto __pyx_L9_exception_handled;
    }
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L9_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    __pyx_L15_try_end:;
  }

  /* "pandas/src/tseries.pyx":353
 *         pass
 * 
 *     return uniques             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_uniques));
  __pyx_r = ((PyObject *)__pyx_v_uniques);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._tseries.fast_unique_multiple_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XDECREF(__pyx_v_table);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_stub);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_27fast_unique_multiple_list_gen(PyObject *__pyx_self, PyObject *__pyx_v_gen); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_27fast_unique_multiple_list_gen = {__Pyx_NAMESTR("fast_unique_multiple_list_gen"), (PyCFunction)__pyx_pw_6pandas_8_tseries_27fast_unique_multiple_list_gen, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_27fast_unique_multiple_list_gen(PyObject *__pyx_self, PyObject *__pyx_v_gen) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fast_unique_multiple_list_gen (wrapper)");
  __pyx_self = __pyx_self;
  __pyx_r = __pyx_pf_6pandas_8_tseries_26fast_unique_multiple_list_gen(__pyx_self, ((PyObject *)__pyx_v_gen));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":357
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique_multiple_list_gen(object gen):             # <<<<<<<<<<<<<<
 *     cdef:
 *         list buf
 */

static PyObject *__pyx_pf_6pandas_8_tseries_26fast_unique_multiple_list_gen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_gen) {
  PyObject *__pyx_v_buf = 0;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_uniques = 0;
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_stub = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fast_unique_multiple_list_gen");

  /* "pandas/src/tseries.pyx":361
 *         list buf
 *         Py_ssize_t j, n
 *         list uniques = []             # <<<<<<<<<<<<<<
 *         dict table = {}
 *         object val, stub = 0
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_uniques = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":362
 *         Py_ssize_t j, n
 *         list uniques = []
 *         dict table = {}             # <<<<<<<<<<<<<<
 *         object val, stub = 0
 * 
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_table = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":363
 *         list uniques = []
 *         dict table = {}
 *         object val, stub = 0             # <<<<<<<<<<<<<<
 * 
 *     for buf in gen:
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_stub = __pyx_int_0;

  /* "pandas/src/tseries.pyx":365
 *         object val, stub = 0
 * 
 *     for buf in gen:             # <<<<<<<<<<<<<<
 *         n = len(buf)
 *         for j from 0 <= j < n:
 */
  if (PyList_CheckExact(__pyx_v_gen) || PyTuple_CheckExact(__pyx_v_gen)) {
    __pyx_t_1 = __pyx_v_gen; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_gen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
      __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
    } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[2]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_buf));
    __pyx_v_buf = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pandas/src/tseries.pyx":366
 * 
 *     for buf in gen:
 *         n = len(buf)             # <<<<<<<<<<<<<<
 *         for j from 0 <= j < n:
 *             val = buf[j]
 */
    if (unlikely(((PyObject *)__pyx_v_buf) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_5 = PyList_GET_SIZE(((PyObject *)__pyx_v_buf)); 
    __pyx_v_n = __pyx_t_5;

    /* "pandas/src/tseries.pyx":367
 *     for buf in gen:
 *         n = len(buf)
 *         for j from 0 <= j < n:             # <<<<<<<<<<<<<<
 *             val = buf[j]
 *             if val not in table:
 */
    __pyx_t_5 = __pyx_v_n;
    for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) {

      /* "pandas/src/tseries.pyx":368
 *         n = len(buf)
 *         for j from 0 <= j < n:
 *             val = buf[j]             # <<<<<<<<<<<<<<
 *             if val not in table:
 *                 table[val] = stub
 */
      __Pyx_INCREF(PyList_GET_ITEM(__pyx_v_buf, __pyx_v_j));
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = PyList_GET_ITEM(__pyx_v_buf, __pyx_v_j);

      /* "pandas/src/tseries.pyx":369
 *         for j from 0 <= j < n:
 *             val = buf[j]
 *             if val not in table:             # <<<<<<<<<<<<<<
 *                 table[val] = stub
 *                 uniques.append(val)
 */
      __pyx_t_6 = (__Pyx_NegateNonNeg(PyDict_Contains(((PyObject *)__pyx_v_table), __pyx_v_val))); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_6) {

        /* "pandas/src/tseries.pyx":370
 *             val = buf[j]
 *             if val not in table:
 *                 table[val] = stub             # <<<<<<<<<<<<<<
 *                 uniques.append(val)
 * 
 */
        if (PyDict_SetItem(((PyObject *)__pyx_v_table), __pyx_v_val, __pyx_v_stub) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "pandas/src/tseries.pyx":371
 *             if val not in table:
 *                 table[val] = stub
 *                 uniques.append(val)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
        __pyx_t_7 = PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L7;
      }
      __pyx_L7:;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":373
 *                 uniques.append(val)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         uniques.sort()
 *     except Exception:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    /*try:*/ {

      /* "pandas/src/tseries.pyx":374
 * 
 *     try:
 *         uniques.sort()             # <<<<<<<<<<<<<<
 *     except Exception:
 *         pass
 */
      __pyx_t_7 = PyList_Sort(((PyObject *)__pyx_v_uniques)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
    }
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L15_try_end;
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pandas/src/tseries.pyx":375
 *     try:
 *         uniques.sort()
 *     except Exception:             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
    __pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_11) {
      PyErr_Restore(0,0,0);
      goto __pyx_L9_exception_handled;
    }
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    goto __pyx_L1_error;
    __pyx_L9_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    __pyx_L15_try_end:;
  }

  /* "pandas/src/tseries.pyx":378
 *         pass
 * 
 *     return uniques             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_uniques));
  __pyx_r = ((PyObject *)__pyx_v_uniques);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._tseries.fast_unique_multiple_list_gen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_buf);
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XDECREF(__pyx_v_table);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_stub);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_29dicts_to_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_29dicts_to_array = {__Pyx_NAMESTR("dicts_to_array"), (PyCFunction)__pyx_pw_6pandas_8_tseries_29dicts_to_array, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_29dicts_to_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dicts = 0;
  PyObject *__pyx_v_columns = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dicts,&__pyx_n_s__columns,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dicts_to_array (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dicts);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__columns);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("dicts_to_array", 1, 2, 2, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dicts_to_array") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_dicts = ((PyObject*)values[0]);
      __pyx_v_columns = ((PyObject*)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_dicts = ((PyObject*)values[0]);
    __pyx_v_columns = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dicts_to_array", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.dicts_to_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dicts), (&PyList_Type), 1, "dicts", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columns), (&PyList_Type), 1, "columns", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_28dicts_to_array(__pyx_self, __pyx_v_dicts, __pyx_v_columns);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":382
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def dicts_to_array(list dicts, list columns):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n
 */

static PyObject *__pyx_pf_6pandas_8_tseries_28dicts_to_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dicts, PyObject *__pyx_v_columns) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_row = 0;
  PyObject *__pyx_v_col = 0;
  PyObject *__pyx_v_onan = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  PyObject **__pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dicts_to_array");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;

  /* "pandas/src/tseries.pyx":387
 *         ndarray[object, ndim=2] result
 *         dict row
 *         object col, onan = np.nan             # <<<<<<<<<<<<<<
 * 
 *     k = len(columns)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__nan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_onan = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":389
 *         object col, onan = np.nan
 * 
 *     k = len(columns)             # <<<<<<<<<<<<<<
 *     n = len(dicts)
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_columns) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_columns)); 
  __pyx_v_k = __pyx_t_3;

  /* "pandas/src/tseries.pyx":390
 * 
 *     k = len(columns)
 *     n = len(dicts)             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty((n, k), dtype='O')
 */
  if (unlikely(((PyObject *)__pyx_v_dicts) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_dicts)); 
  __pyx_v_n = __pyx_t_3;

  /* "pandas/src/tseries.pyx":392
 *     n = len(dicts)
 * 
 *     result = np.empty((n, k), dtype='O')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
  __pyx_t_5 = 0;
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":394
 *     result = np.empty((n, k), dtype='O')
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         row = dicts[i]
 *         for j in range(k):
 */
  __pyx_t_3 = __pyx_v_n;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_3; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pandas/src/tseries.pyx":395
 * 
 *     for i in range(n):
 *         row = dicts[i]             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             col = columns[j]
 */
    if (!(likely(PyDict_CheckExact(PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i)))||((PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i)) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i))->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_INCREF(PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i));
    __Pyx_XDECREF(((PyObject *)__pyx_v_row));
    __pyx_v_row = ((PyObject*)PyList_GET_ITEM(__pyx_v_dicts, __pyx_v_i));

    /* "pandas/src/tseries.pyx":396
 *     for i in range(n):
 *         row = dicts[i]
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             col = columns[j]
 *             if col in row:
 */
    __pyx_t_12 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "pandas/src/tseries.pyx":397
 *         row = dicts[i]
 *         for j in range(k):
 *             col = columns[j]             # <<<<<<<<<<<<<<
 *             if col in row:
 *                 result[i, j] = row[col]
 */
      __Pyx_INCREF(PyList_GET_ITEM(__pyx_v_columns, __pyx_v_j));
      __Pyx_XDECREF(__pyx_v_col);
      __pyx_v_col = PyList_GET_ITEM(__pyx_v_columns, __pyx_v_j);

      /* "pandas/src/tseries.pyx":398
 *         for j in range(k):
 *             col = columns[j]
 *             if col in row:             # <<<<<<<<<<<<<<
 *                 result[i, j] = row[col]
 *             else:
 */
      if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_14 = ((PyDict_Contains(((PyObject *)__pyx_v_row), __pyx_v_col))); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_14) {

        /* "pandas/src/tseries.pyx":399
 *             col = columns[j]
 *             if col in row:
 *                 result[i, j] = row[col]             # <<<<<<<<<<<<<<
 *             else:
 *                 result[i, j] = onan
 */
        __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_row), __pyx_v_col); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_15 = __pyx_v_i;
        __pyx_t_16 = __pyx_v_j;
        __pyx_t_17 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_result.diminfo[1].strides);
        __Pyx_GOTREF(*__pyx_t_17);
        __Pyx_DECREF(*__pyx_t_17); __Pyx_INCREF(__pyx_t_2);
        *__pyx_t_17 = __pyx_t_2;
        __Pyx_GIVEREF(*__pyx_t_17);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L7;
      }
      /*else*/ {

        /* "pandas/src/tseries.pyx":401
 *                 result[i, j] = row[col]
 *             else:
 *                 result[i, j] = onan             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
        __pyx_t_18 = __pyx_v_i;
        __pyx_t_19 = __pyx_v_j;
        __pyx_t_17 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_result.diminfo[1].strides);
        __Pyx_GOTREF(*__pyx_t_17);
        __Pyx_DECREF(*__pyx_t_17); __Pyx_INCREF(__pyx_v_onan);
        *__pyx_t_17 = __pyx_v_onan;
        __Pyx_GIVEREF(*__pyx_t_17);
      }
      __pyx_L7:;
    }
  }

  /* "pandas/src/tseries.pyx":403
 *                 result[i, j] = onan
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.dicts_to_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_col);
  __Pyx_XDECREF(__pyx_v_onan);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_31fast_zip(PyObject *__pyx_self, PyObject *__pyx_v_ndarrays); /*proto*/
static char __pyx_doc_6pandas_8_tseries_30fast_zip[] = "\n    For zipping multiple ndarrays into an ndarray of tuples\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_31fast_zip = {__Pyx_NAMESTR("fast_zip"), (PyCFunction)__pyx_pw_6pandas_8_tseries_31fast_zip, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_30fast_zip)};
static PyObject *__pyx_pw_6pandas_8_tseries_31fast_zip(PyObject *__pyx_self, PyObject *__pyx_v_ndarrays) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fast_zip (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ndarrays), (&PyList_Type), 1, "ndarrays", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_30fast_zip(__pyx_self, ((PyObject*)__pyx_v_ndarrays));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":406
 * 
 * 
 * def fast_zip(list ndarrays):             # <<<<<<<<<<<<<<
 *     '''
 *     For zipping multiple ndarrays into an ndarray of tuples
 */

static PyObject *__pyx_pf_6pandas_8_tseries_30fast_zip(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ndarrays) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  PyArrayIterObject *__pyx_v_it = 0;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_tup = 0;
  PyObject *__pyx_v_arr = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  PyObject **__pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fast_zip");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;

  /* "pandas/src/tseries.pyx":416
 *         object val, tup
 * 
 *     k = len(ndarrays)             # <<<<<<<<<<<<<<
 *     n = len(ndarrays[0])
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_ndarrays) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_ndarrays)); 
  __pyx_v_k = __pyx_t_1;

  /* "pandas/src/tseries.pyx":417
 * 
 *     k = len(ndarrays)
 *     n = len(ndarrays[0])             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n, dtype=object)
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ndarrays), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/tseries.pyx":419
 *     n = len(ndarrays[0])
 * 
 *     result = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     # initialize tuples on first pass
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/src/tseries.pyx":422
 * 
 *     # initialize tuples on first pass
 *     arr = ndarrays[0]             # <<<<<<<<<<<<<<
 *     it = <flatiter> PyArray_IterNew(arr)
 *     for i in range(n):
 */
  __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ndarrays), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_arr = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/src/tseries.pyx":423
 *     # initialize tuples on first pass
 *     arr = ndarrays[0]
 *     it = <flatiter> PyArray_IterNew(arr)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
 */
  __pyx_t_5 = PyArray_IterNew(__pyx_v_arr); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)((PyArrayIterObject *)__pyx_t_5)));
  __pyx_v_it = ((PyArrayIterObject *)__pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "pandas/src/tseries.pyx":424
 *     arr = ndarrays[0]
 *     it = <flatiter> PyArray_IterNew(arr)
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
 *         tup = PyTuple_New(k)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pandas/src/tseries.pyx":425
 *     it = <flatiter> PyArray_IterNew(arr)
 *     for i in range(n):
 *         val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))             # <<<<<<<<<<<<<<
 *         tup = PyTuple_New(k)
 * 
 */
    if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = __pyx_v_arr;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_2 = PyArray_GETITEM(((PyArrayObject *)__pyx_t_5), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/src/tseries.pyx":426
 *     for i in range(n):
 *         val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
 *         tup = PyTuple_New(k)             # <<<<<<<<<<<<<<
 * 
 *         PyTuple_SET_ITEM(tup, 0, val)
 */
    __pyx_t_2 = ((PyObject *)PyTuple_New(__pyx_v_k)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_tup);
    __pyx_v_tup = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/src/tseries.pyx":428
 *         tup = PyTuple_New(k)
 * 
 *         PyTuple_SET_ITEM(tup, 0, val)             # <<<<<<<<<<<<<<
 *         Py_INCREF(val)
 *         result[i] = tup
 */
    PyTuple_SET_ITEM(__pyx_v_tup, 0, __pyx_v_val);

    /* "pandas/src/tseries.pyx":429
 * 
 *         PyTuple_SET_ITEM(tup, 0, val)
 *         Py_INCREF(val)             # <<<<<<<<<<<<<<
 *         result[i] = tup
 *         PyArray_ITER_NEXT(it)
 */
    Py_INCREF(__pyx_v_val);

    /* "pandas/src/tseries.pyx":430
 *         PyTuple_SET_ITEM(tup, 0, val)
 *         Py_INCREF(val)
 *         result[i] = tup             # <<<<<<<<<<<<<<
 *         PyArray_ITER_NEXT(it)
 * 
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_result.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_13 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_13);
    __Pyx_DECREF(*__pyx_t_13); __Pyx_INCREF(__pyx_v_tup);
    *__pyx_t_13 = __pyx_v_tup;
    __Pyx_GIVEREF(*__pyx_t_13);

    /* "pandas/src/tseries.pyx":431
 *         Py_INCREF(val)
 *         result[i] = tup
 *         PyArray_ITER_NEXT(it)             # <<<<<<<<<<<<<<
 * 
 *     for j in range(1, k):
 */
    PyArray_ITER_NEXT(__pyx_v_it);
  }

  /* "pandas/src/tseries.pyx":433
 *         PyArray_ITER_NEXT(it)
 * 
 *     for j in range(1, k):             # <<<<<<<<<<<<<<
 *         arr = ndarrays[j]
 *         it = <flatiter> PyArray_IterNew(arr)
 */
  __pyx_t_1 = __pyx_v_k;
  for (__pyx_t_11 = 1; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
    __pyx_v_j = __pyx_t_11;

    /* "pandas/src/tseries.pyx":434
 * 
 *     for j in range(1, k):
 *         arr = ndarrays[j]             # <<<<<<<<<<<<<<
 *         it = <flatiter> PyArray_IterNew(arr)
 *         if len(arr) != n:
 */
    __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ndarrays), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_v_arr);
    __pyx_v_arr = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "pandas/src/tseries.pyx":435
 *     for j in range(1, k):
 *         arr = ndarrays[j]
 *         it = <flatiter> PyArray_IterNew(arr)             # <<<<<<<<<<<<<<
 *         if len(arr) != n:
 *             raise ValueError('all arrays but be same length')
 */
    __pyx_t_2 = PyArray_IterNew(__pyx_v_arr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(((PyObject *)((PyArrayIterObject *)__pyx_t_2)));
    __Pyx_DECREF(((PyObject *)__pyx_v_it));
    __pyx_v_it = ((PyArrayIterObject *)__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pandas/src/tseries.pyx":436
 *         arr = ndarrays[j]
 *         it = <flatiter> PyArray_IterNew(arr)
 *         if len(arr) != n:             # <<<<<<<<<<<<<<
 *             raise ValueError('all arrays but be same length')
 * 
 */
    __pyx_t_14 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_15 = (__pyx_t_14 != __pyx_v_n);
    if (__pyx_t_15) {

      /* "pandas/src/tseries.pyx":437
 *         it = <flatiter> PyArray_IterNew(arr)
 *         if len(arr) != n:
 *             raise ValueError('all arrays but be same length')             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "pandas/src/tseries.pyx":439
 *             raise ValueError('all arrays but be same length')
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
 *             PyTuple_SET_ITEM(result[i], j, val)
 */
    __pyx_t_14 = __pyx_v_n;
    for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_14; __pyx_t_16+=1) {
      __pyx_v_i = __pyx_t_16;

      /* "pandas/src/tseries.pyx":440
 * 
 *         for i in range(n):
 *             val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))             # <<<<<<<<<<<<<<
 *             PyTuple_SET_ITEM(result[i], j, val)
 *             Py_INCREF(val)
 */
      if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_2 = __pyx_v_arr;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = PyArray_GETITEM(((PyArrayObject *)__pyx_t_2), PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "pandas/src/tseries.pyx":441
 *         for i in range(n):
 *             val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
 *             PyTuple_SET_ITEM(result[i], j, val)             # <<<<<<<<<<<<<<
 *             Py_INCREF(val)
 *             PyArray_ITER_NEXT(it)
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_5, __pyx_v_j, __pyx_v_val);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "pandas/src/tseries.pyx":442
 *             val = PyArray_GETITEM(arr, PyArray_ITER_DATA(it))
 *             PyTuple_SET_ITEM(result[i], j, val)
 *             Py_INCREF(val)             # <<<<<<<<<<<<<<
 *             PyArray_ITER_NEXT(it)
 * 
 */
      Py_INCREF(__pyx_v_val);

      /* "pandas/src/tseries.pyx":443
 *             PyTuple_SET_ITEM(result[i], j, val)
 *             Py_INCREF(val)
 *             PyArray_ITER_NEXT(it)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      PyArray_ITER_NEXT(__pyx_v_it);
    }
  }

  /* "pandas/src/tseries.pyx":445
 *             PyArray_ITER_NEXT(it)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def has_infs_f4(ndarray[float32_t] arr):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.fast_zip", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_it);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_tup);
  __Pyx_XDECREF(__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_33has_infs_f4(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_33has_infs_f4 = {__Pyx_NAMESTR("has_infs_f4"), (PyCFunction)__pyx_pw_6pandas_8_tseries_33has_infs_f4, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_33has_infs_f4(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("has_infs_f4 (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_32has_infs_f4(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":447
 *     return result
 * 
 * def has_infs_f4(ndarray[float32_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_32has_infs_f4(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_float32_t __pyx_v_inf;
  __pyx_t_5numpy_float32_t __pyx_v_neginf;
  __pyx_t_5numpy_float32_t __pyx_v_val;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_5numpy_float32_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("has_infs_f4");
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/tseries.pyx":449
 * def has_infs_f4(ndarray[float32_t] arr):
 *     cdef:
 *         Py_ssize_t i, n = len(arr)             # <<<<<<<<<<<<<<
 *         float32_t inf, neginf, val
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/tseries.pyx":452
 *         float32_t inf, neginf, val
 * 
 *     inf = np.inf             # <<<<<<<<<<<<<<
 *     neginf = -inf
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__inf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_float32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_inf = __pyx_t_4;

  /* "pandas/src/tseries.pyx":453
 * 
 *     inf = np.inf
 *     neginf = -inf             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_v_neginf = (-__pyx_v_inf);

  /* "pandas/src/tseries.pyx":455
 *     neginf = -inf
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         val = arr[i]
 *         if val == inf or val == neginf:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "pandas/src/tseries.pyx":456
 * 
 *     for i in range(n):
 *         val = arr[i]             # <<<<<<<<<<<<<<
 *         if val == inf or val == neginf:
 *             return True
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_6 < 0) {
      __pyx_t_6 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides));

    /* "pandas/src/tseries.pyx":457
 *     for i in range(n):
 *         val = arr[i]
 *         if val == inf or val == neginf:             # <<<<<<<<<<<<<<
 *             return True
 *     return False
 */
    __pyx_t_8 = (__pyx_v_val == __pyx_v_inf);
    if (!__pyx_t_8) {
      __pyx_t_9 = (__pyx_v_val == __pyx_v_neginf);
      __pyx_t_10 = __pyx_t_9;
    } else {
      __pyx_t_10 = __pyx_t_8;
    }
    if (__pyx_t_10) {

      /* "pandas/src/tseries.pyx":458
 *         val = arr[i]
 *         if val == inf or val == neginf:
 *             return True             # <<<<<<<<<<<<<<
 *     return False
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "pandas/src/tseries.pyx":459
 *         if val == inf or val == neginf:
 *             return True
 *     return False             # <<<<<<<<<<<<<<
 * 
 * def has_infs_f8(ndarray[float64_t] arr):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.has_infs_f4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_35has_infs_f8(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_35has_infs_f8 = {__Pyx_NAMESTR("has_infs_f8"), (PyCFunction)__pyx_pw_6pandas_8_tseries_35has_infs_f8, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_35has_infs_f8(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("has_infs_f8 (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_34has_infs_f8(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":461
 *     return False
 * 
 * def has_infs_f8(ndarray[float64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_34has_infs_f8(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_float64_t __pyx_v_inf;
  __pyx_t_5numpy_float64_t __pyx_v_neginf;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_5numpy_float64_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("has_infs_f8");
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/tseries.pyx":463
 * def has_infs_f8(ndarray[float64_t] arr):
 *     cdef:
 *         Py_ssize_t i, n = len(arr)             # <<<<<<<<<<<<<<
 *         float64_t inf, neginf, val
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/tseries.pyx":466
 *         float64_t inf, neginf, val
 * 
 *     inf = np.inf             # <<<<<<<<<<<<<<
 *     neginf = -inf
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__inf); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_inf = __pyx_t_4;

  /* "pandas/src/tseries.pyx":467
 * 
 *     inf = np.inf
 *     neginf = -inf             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_v_neginf = (-__pyx_v_inf);

  /* "pandas/src/tseries.pyx":469
 *     neginf = -inf
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         val = arr[i]
 *         if val == inf or val == neginf:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "pandas/src/tseries.pyx":470
 * 
 *     for i in range(n):
 *         val = arr[i]             # <<<<<<<<<<<<<<
 *         if val == inf or val == neginf:
 *             return True
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_6 < 0) {
      __pyx_t_6 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[2]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides));

    /* "pandas/src/tseries.pyx":471
 *     for i in range(n):
 *         val = arr[i]
 *         if val == inf or val == neginf:             # <<<<<<<<<<<<<<
 *             return True
 *     return False
 */
    __pyx_t_8 = (__pyx_v_val == __pyx_v_inf);
    if (!__pyx_t_8) {
      __pyx_t_9 = (__pyx_v_val == __pyx_v_neginf);
      __pyx_t_10 = __pyx_t_9;
    } else {
      __pyx_t_10 = __pyx_t_8;
    }
    if (__pyx_t_10) {

      /* "pandas/src/tseries.pyx":472
 *         val = arr[i]
 *         if val == inf or val == neginf:
 *             return True             # <<<<<<<<<<<<<<
 *     return False
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "pandas/src/tseries.pyx":473
 *         if val == inf or val == neginf:
 *             return True
 *     return False             # <<<<<<<<<<<<<<
 * 
 * def convert_timestamps(ndarray values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.has_infs_f8", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_37convert_timestamps(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_37convert_timestamps = {__Pyx_NAMESTR("convert_timestamps"), (PyCFunction)__pyx_pw_6pandas_8_tseries_37convert_timestamps, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_37convert_timestamps(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_timestamps (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_36convert_timestamps(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":475
 *     return False
 * 
 * def convert_timestamps(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         object val, f, result
 */

static PyObject *__pyx_pf_6pandas_8_tseries_36convert_timestamps(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_f = 0;
  PyObject *__pyx_v_cache = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_out = 0;
  PyObject *__pyx_v_datetime = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  PyObject **__pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_timestamps");
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;

  /* "pandas/src/tseries.pyx":478
 *     cdef:
 *         object val, f, result
 *         dict cache = {}             # <<<<<<<<<<<<<<
 *         Py_ssize_t i, n = len(values)
 *         ndarray[object] out
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_cache = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":479
 *         object val, f, result
 *         dict cache = {}
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[object] out
 * 
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_2;

  /* "pandas/src/tseries.pyx":484
 *     # for HDFStore, a bit temporary but...
 * 
 *     from datetime import datetime             # <<<<<<<<<<<<<<
 *     f = datetime.fromtimestamp
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime));
  __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__datetime);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__datetime);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_datetime = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "pandas/src/tseries.pyx":485
 * 
 *     from datetime import datetime
 *     f = datetime.fromtimestamp             # <<<<<<<<<<<<<<
 * 
 *     out = np.empty(n, dtype='O')
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_datetime, __pyx_n_s__fromtimestamp); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_f = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pandas/src/tseries.pyx":487
 *     f = datetime.fromtimestamp
 * 
 *     out = np.empty(n, dtype='O')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_out = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "pandas/src/tseries.pyx":489
 *     out = np.empty(n, dtype='O')
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         val = util.get_value_1d(values, i)
 *         if val in cache:
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_2; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pandas/src/tseries.pyx":490
 * 
 *     for i in range(n):
 *         val = util.get_value_1d(values, i)             # <<<<<<<<<<<<<<
 *         if val in cache:
 *             out[i] = cache[val]
 */
    __pyx_t_5 = get_value_1d(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/src/tseries.pyx":491
 *     for i in range(n):
 *         val = util.get_value_1d(values, i)
 *         if val in cache:             # <<<<<<<<<<<<<<
 *             out[i] = cache[val]
 *         else:
 */
    __pyx_t_12 = ((PyDict_Contains(((PyObject *)__pyx_v_cache), __pyx_v_val))); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_12) {

      /* "pandas/src/tseries.pyx":492
 *         val = util.get_value_1d(values, i)
 *         if val in cache:
 *             out[i] = cache[val]             # <<<<<<<<<<<<<<
 *         else:
 *             cache[val] = out[i] = f(val)
 */
      __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_cache), __pyx_v_val); if (!__pyx_t_5) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_out.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_14 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_out.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_14);
      __Pyx_DECREF(*__pyx_t_14); __Pyx_INCREF(__pyx_t_5);
      *__pyx_t_14 = __pyx_t_5;
      __Pyx_GIVEREF(*__pyx_t_14);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "pandas/src/tseries.pyx":494
 *             out[i] = cache[val]
 *         else:
 *             cache[val] = out[i] = f(val)             # <<<<<<<<<<<<<<
 * 
 *     return out
 */
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      __pyx_t_3 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      if (PyDict_SetItem(((PyObject *)__pyx_v_cache), __pyx_v_val, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_out.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_out.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[2]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_14 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_out.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_14);
      __Pyx_DECREF(*__pyx_t_14); __Pyx_INCREF(__pyx_t_3);
      *__pyx_t_14 = __pyx_t_3;
      __Pyx_GIVEREF(*__pyx_t_14);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_L5:;
  }

  /* "pandas/src/tseries.pyx":496
 *             cache[val] = out[i] = f(val)
 * 
 *     return out             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  __pyx_r = ((PyObject *)__pyx_v_out);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.convert_timestamps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_cache);
  __Pyx_XDECREF((PyObject *)__pyx_v_out);
  __Pyx_XDECREF(__pyx_v_datetime);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_39scalar_compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_39scalar_compare = {__Pyx_NAMESTR("scalar_compare"), (PyCFunction)__pyx_pw_6pandas_8_tseries_39scalar_compare, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_39scalar_compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_op = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__val,&__pyx_n_s__op,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("scalar_compare (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("scalar_compare", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__op);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("scalar_compare", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scalar_compare") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_val = values[1];
      __pyx_v_op = values[2];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_val = values[1];
    __pyx_v_op = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("scalar_compare", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.scalar_compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_38scalar_compare(__pyx_self, __pyx_v_values, __pyx_v_val, __pyx_v_op);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":500
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def scalar_compare(ndarray[object] values, object val, object op):             # <<<<<<<<<<<<<<
 *     import operator
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_38scalar_compare(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val, PyObject *__pyx_v_op) {
  PyObject *__pyx_v_operator = NULL;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  int __pyx_v_flag;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_result = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("scalar_compare");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/tseries.pyx":501
 * @cython.boundscheck(False)
 * def scalar_compare(ndarray[object] values, object val, object op):
 *     import operator             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__operator), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_operator = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":503
 *     import operator
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         int flag
 *         object x
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_2;

  /* "pandas/src/tseries.pyx":507
 *         object x
 * 
 *     if op is operator.lt:             # <<<<<<<<<<<<<<
 *         flag = cpython.Py_LT
 *     elif op is operator.le:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__lt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pandas/src/tseries.pyx":508
 * 
 *     if op is operator.lt:
 *         flag = cpython.Py_LT             # <<<<<<<<<<<<<<
 *     elif op is operator.le:
 *         flag = cpython.Py_LE
 */
    __pyx_v_flag = Py_LT;
    goto __pyx_L3;
  }

  /* "pandas/src/tseries.pyx":509
 *     if op is operator.lt:
 *         flag = cpython.Py_LT
 *     elif op is operator.le:             # <<<<<<<<<<<<<<
 *         flag = cpython.Py_LE
 *     elif op is operator.gt:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__le); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pandas/src/tseries.pyx":510
 *         flag = cpython.Py_LT
 *     elif op is operator.le:
 *         flag = cpython.Py_LE             # <<<<<<<<<<<<<<
 *     elif op is operator.gt:
 *         flag = cpython.Py_GT
 */
    __pyx_v_flag = Py_LE;
    goto __pyx_L3;
  }

  /* "pandas/src/tseries.pyx":511
 *     elif op is operator.le:
 *         flag = cpython.Py_LE
 *     elif op is operator.gt:             # <<<<<<<<<<<<<<
 *         flag = cpython.Py_GT
 *     elif op is operator.ge:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__gt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pandas/src/tseries.pyx":512
 *         flag = cpython.Py_LE
 *     elif op is operator.gt:
 *         flag = cpython.Py_GT             # <<<<<<<<<<<<<<
 *     elif op is operator.ge:
 *         flag = cpython.Py_GE
 */
    __pyx_v_flag = Py_GT;
    goto __pyx_L3;
  }

  /* "pandas/src/tseries.pyx":513
 *     elif op is operator.gt:
 *         flag = cpython.Py_GT
 *     elif op is operator.ge:             # <<<<<<<<<<<<<<
 *         flag = cpython.Py_GE
 *     elif op is operator.eq:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__ge); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pandas/src/tseries.pyx":514
 *         flag = cpython.Py_GT
 *     elif op is operator.ge:
 *         flag = cpython.Py_GE             # <<<<<<<<<<<<<<
 *     elif op is operator.eq:
 *         flag = cpython.Py_EQ
 */
    __pyx_v_flag = Py_GE;
    goto __pyx_L3;
  }

  /* "pandas/src/tseries.pyx":515
 *     elif op is operator.ge:
 *         flag = cpython.Py_GE
 *     elif op is operator.eq:             # <<<<<<<<<<<<<<
 *         flag = cpython.Py_EQ
 *     elif op is operator.ne:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__eq); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pandas/src/tseries.pyx":516
 *         flag = cpython.Py_GE
 *     elif op is operator.eq:
 *         flag = cpython.Py_EQ             # <<<<<<<<<<<<<<
 *     elif op is operator.ne:
 *         flag = cpython.Py_NE
 */
    __pyx_v_flag = Py_EQ;
    goto __pyx_L3;
  }

  /* "pandas/src/tseries.pyx":517
 *     elif op is operator.eq:
 *         flag = cpython.Py_EQ
 *     elif op is operator.ne:             # <<<<<<<<<<<<<<
 *         flag = cpython.Py_NE
 *     else:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__ne); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pandas/src/tseries.pyx":518
 *         flag = cpython.Py_EQ
 *     elif op is operator.ne:
 *         flag = cpython.Py_NE             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError('Unrecognized operator')
 */
    __pyx_v_flag = Py_NE;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/tseries.pyx":520
 *         flag = cpython.Py_NE
 *     else:
 *         raise ValueError('Unrecognized operator')             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n, dtype=object)
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  /* "pandas/src/tseries.pyx":522
 *         raise ValueError('Unrecognized operator')
 * 
 *     result = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_result = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pandas/src/tseries.pyx":524
 *     result = np.empty(n, dtype=object)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         x = values[i]
 *         if _checknull(x):
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_2; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "pandas/src/tseries.pyx":525
 * 
 *     for i in range(n):
 *         x = values[i]             # <<<<<<<<<<<<<<
 *         if _checknull(x):
 *             result[i] = x
 */
    __pyx_t_8 = __pyx_v_i;
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_XDECREF(__pyx_v_x);
    __pyx_v_x = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pandas/src/tseries.pyx":526
 *     for i in range(n):
 *         x = values[i]
 *         if _checknull(x):             # <<<<<<<<<<<<<<
 *             result[i] = x
 *         else:
 */
    __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_x);
    if (__pyx_t_3) {

      /* "pandas/src/tseries.pyx":527
 *         x = values[i]
 *         if _checknull(x):
 *             result[i] = x             # <<<<<<<<<<<<<<
 *         else:
 *             result[i] = cpython.PyObject_RichCompareBool(x, val, flag)
 */
      if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_v_x, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    /*else*/ {

      /* "pandas/src/tseries.pyx":529
 *             result[i] = x
 *         else:
 *             result[i] = cpython.PyObject_RichCompareBool(x, val, flag)             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_bool(result)
 */
      __pyx_t_3 = PyObject_RichCompareBool(__pyx_v_x, __pyx_v_val, __pyx_v_flag); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_t_6, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_L6:;
  }

  /* "pandas/src/tseries.pyx":531
 *             result[i] = cpython.PyObject_RichCompareBool(x, val, flag)
 * 
 *     return maybe_convert_bool(result)             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__maybe_convert_bool); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_result);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_result);
  __Pyx_GIVEREF(__pyx_v_result);
  __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.scalar_compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_operator);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_41vec_compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_41vec_compare = {__Pyx_NAMESTR("vec_compare"), (PyCFunction)__pyx_pw_6pandas_8_tseries_41vec_compare, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_41vec_compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  PyObject *__pyx_v_op = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__op,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("vec_compare (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("vec_compare", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__op);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("vec_compare", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vec_compare") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
      __pyx_v_op = values[2];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
    __pyx_v_op = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("vec_compare", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.vec_compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_40vec_compare(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_op);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":535
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def vec_compare(ndarray[object] left, ndarray[object] right, object op):             # <<<<<<<<<<<<<<
 *     import operator
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_40vec_compare(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyObject *__pyx_v_op) {
  PyObject *__pyx_v_operator = NULL;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  int __pyx_v_flag;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_v_y = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("vec_compare");
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/tseries.pyx":536
 * @cython.boundscheck(False)
 * def vec_compare(ndarray[object] left, ndarray[object] right, object op):
 *     import operator             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(left)
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__operator), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_operator = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":538
 *     import operator
 *     cdef:
 *         Py_ssize_t i, n = len(left)             # <<<<<<<<<<<<<<
 *         int flag
 * 
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_2;

  /* "pandas/src/tseries.pyx":541
 *         int flag
 * 
 *     if op is operator.lt:             # <<<<<<<<<<<<<<
 *         flag = cpython.Py_LT
 *     elif op is operator.le:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__lt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pandas/src/tseries.pyx":542
 * 
 *     if op is operator.lt:
 *         flag = cpython.Py_LT             # <<<<<<<<<<<<<<
 *     elif op is operator.le:
 *         flag = cpython.Py_LE
 */
    __pyx_v_flag = Py_LT;
    goto __pyx_L3;
  }

  /* "pandas/src/tseries.pyx":543
 *     if op is operator.lt:
 *         flag = cpython.Py_LT
 *     elif op is operator.le:             # <<<<<<<<<<<<<<
 *         flag = cpython.Py_LE
 *     elif op is operator.gt:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__le); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pandas/src/tseries.pyx":544
 *         flag = cpython.Py_LT
 *     elif op is operator.le:
 *         flag = cpython.Py_LE             # <<<<<<<<<<<<<<
 *     elif op is operator.gt:
 *         flag = cpython.Py_GT
 */
    __pyx_v_flag = Py_LE;
    goto __pyx_L3;
  }

  /* "pandas/src/tseries.pyx":545
 *     elif op is operator.le:
 *         flag = cpython.Py_LE
 *     elif op is operator.gt:             # <<<<<<<<<<<<<<
 *         flag = cpython.Py_GT
 *     elif op is operator.ge:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__gt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pandas/src/tseries.pyx":546
 *         flag = cpython.Py_LE
 *     elif op is operator.gt:
 *         flag = cpython.Py_GT             # <<<<<<<<<<<<<<
 *     elif op is operator.ge:
 *         flag = cpython.Py_GE
 */
    __pyx_v_flag = Py_GT;
    goto __pyx_L3;
  }

  /* "pandas/src/tseries.pyx":547
 *     elif op is operator.gt:
 *         flag = cpython.Py_GT
 *     elif op is operator.ge:             # <<<<<<<<<<<<<<
 *         flag = cpython.Py_GE
 *     elif op is operator.eq:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__ge); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pandas/src/tseries.pyx":548
 *         flag = cpython.Py_GT
 *     elif op is operator.ge:
 *         flag = cpython.Py_GE             # <<<<<<<<<<<<<<
 *     elif op is operator.eq:
 *         flag = cpython.Py_EQ
 */
    __pyx_v_flag = Py_GE;
    goto __pyx_L3;
  }

  /* "pandas/src/tseries.pyx":549
 *     elif op is operator.ge:
 *         flag = cpython.Py_GE
 *     elif op is operator.eq:             # <<<<<<<<<<<<<<
 *         flag = cpython.Py_EQ
 *     elif op is operator.ne:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__eq); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pandas/src/tseries.pyx":550
 *         flag = cpython.Py_GE
 *     elif op is operator.eq:
 *         flag = cpython.Py_EQ             # <<<<<<<<<<<<<<
 *     elif op is operator.ne:
 *         flag = cpython.Py_NE
 */
    __pyx_v_flag = Py_EQ;
    goto __pyx_L3;
  }

  /* "pandas/src/tseries.pyx":551
 *     elif op is operator.eq:
 *         flag = cpython.Py_EQ
 *     elif op is operator.ne:             # <<<<<<<<<<<<<<
 *         flag = cpython.Py_NE
 *     else:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_operator, __pyx_n_s__ne); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = (__pyx_v_op == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "pandas/src/tseries.pyx":552
 *         flag = cpython.Py_EQ
 *     elif op is operator.ne:
 *         flag = cpython.Py_NE             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError('Unrecognized operator')
 */
    __pyx_v_flag = Py_NE;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "pandas/src/tseries.pyx":554
 *         flag = cpython.Py_NE
 *     else:
 *         raise ValueError('Unrecognized operator')             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n, dtype=object)
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[2]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  /* "pandas/src/tseries.pyx":556
 *         raise ValueError('Unrecognized operator')
 * 
 *     result = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_result = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "pandas/src/tseries.pyx":558
 *     result = np.empty(n, dtype=object)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         x = left[i]
 *         y = right[i]
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_2; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "pandas/src/tseries.pyx":559
 * 
 *     for i in range(n):
 *         x = left[i]             # <<<<<<<<<<<<<<
 *         y = right[i]
 *         try:
 */
    __pyx_t_8 = __pyx_v_i;
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_left.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_XDECREF(__pyx_v_x);
    __pyx_v_x = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pandas/src/tseries.pyx":560
 *     for i in range(n):
 *         x = left[i]
 *         y = right[i]             # <<<<<<<<<<<<<<
 *         try:
 *             result[i] = cpython.PyObject_RichCompareBool(x, y, flag)
 */
    __pyx_t_9 = __pyx_v_i;
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_right.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_XDECREF(__pyx_v_y);
    __pyx_v_y = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "pandas/src/tseries.pyx":561
 *         x = left[i]
 *         y = right[i]
 *         try:             # <<<<<<<<<<<<<<
 *             result[i] = cpython.PyObject_RichCompareBool(x, y, flag)
 *         except TypeError:
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      /*try:*/ {

        /* "pandas/src/tseries.pyx":562
 *         y = right[i]
 *         try:
 *             result[i] = cpython.PyObject_RichCompareBool(x, y, flag)             # <<<<<<<<<<<<<<
 *         except TypeError:
 *             if _checknull(x):
 */
        __pyx_t_3 = PyObject_RichCompareBool(__pyx_v_x, __pyx_v_y, __pyx_v_flag); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_t_6, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 562; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      goto __pyx_L13_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "pandas/src/tseries.pyx":563
 *         try:
 *             result[i] = cpython.PyObject_RichCompareBool(x, y, flag)
 *         except TypeError:             # <<<<<<<<<<<<<<
 *             if _checknull(x):
 *                 result[i] = x
 */
      __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
      if (__pyx_t_13) {
        __Pyx_AddTraceback("pandas._tseries.vec_compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_5);

        /* "pandas/src/tseries.pyx":564
 *             result[i] = cpython.PyObject_RichCompareBool(x, y, flag)
 *         except TypeError:
 *             if _checknull(x):             # <<<<<<<<<<<<<<
 *                 result[i] = x
 *             elif _checknull(y):
 */
        __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_x);
        if (__pyx_t_3) {

          /* "pandas/src/tseries.pyx":565
 *         except TypeError:
 *             if _checknull(x):
 *                 result[i] = x             # <<<<<<<<<<<<<<
 *             elif _checknull(y):
 *                 result[i] = y
 */
          if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_v_x, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          goto __pyx_L16;
        }

        /* "pandas/src/tseries.pyx":566
 *             if _checknull(x):
 *                 result[i] = x
 *             elif _checknull(y):             # <<<<<<<<<<<<<<
 *                 result[i] = y
 *             else:
 */
        __pyx_t_3 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_y);
        if (__pyx_t_3) {

          /* "pandas/src/tseries.pyx":567
 *                 result[i] = x
 *             elif _checknull(y):
 *                 result[i] = y             # <<<<<<<<<<<<<<
 *             else:
 *                 raise
 */
          if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_v_y, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          goto __pyx_L16;
        }
        /*else*/ {

          /* "pandas/src/tseries.pyx":569
 *                 result[i] = y
 *             else:
 *                 raise             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_bool(result)
 */
          __Pyx_GIVEREF(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_1);
          __Pyx_GIVEREF(__pyx_t_5);
          __Pyx_ErrRestore(__pyx_t_6, __pyx_t_1, __pyx_t_5);
          __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_t_5 = 0; 
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        }
        __pyx_L16:;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L7_exception_handled;
      }
      __pyx_L8_except_error:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      goto __pyx_L1_error;
      __pyx_L7_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      __pyx_L13_try_end:;
    }
  }

  /* "pandas/src/tseries.pyx":571
 *                 raise
 * 
 *     return maybe_convert_bool(result)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__maybe_convert_bool); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_result);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_result);
  __Pyx_GIVEREF(__pyx_v_result);
  __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.vec_compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_operator);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_43scalar_binop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_43scalar_binop = {__Pyx_NAMESTR("scalar_binop"), (PyCFunction)__pyx_pw_6pandas_8_tseries_43scalar_binop, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_43scalar_binop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_op = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__val,&__pyx_n_s__op,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("scalar_binop (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("scalar_binop", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__op);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("scalar_binop", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scalar_binop") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_val = values[1];
      __pyx_v_op = values[2];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_val = values[1];
    __pyx_v_op = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("scalar_binop", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.scalar_binop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_42scalar_binop(__pyx_self, __pyx_v_values, __pyx_v_val, __pyx_v_op);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":576
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def scalar_binop(ndarray[object] values, object val, object op):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_42scalar_binop(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_val, PyObject *__pyx_v_op) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_result = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("scalar_binop");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/tseries.pyx":578
 * def scalar_binop(ndarray[object] values, object val, object op):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         object x
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/tseries.pyx":581
 *         object x
 * 
 *     result = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_result = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/src/tseries.pyx":583
 *     result = np.empty(n, dtype=object)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         x = values[i]
 *         if _checknull(x):
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "pandas/src/tseries.pyx":584
 * 
 *     for i in range(n):
 *         x = values[i]             # <<<<<<<<<<<<<<
 *         if _checknull(x):
 *             result[i] = x
 */
    __pyx_t_7 = __pyx_v_i;
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_XDECREF(__pyx_v_x);
    __pyx_v_x = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/src/tseries.pyx":585
 *     for i in range(n):
 *         x = values[i]
 *         if _checknull(x):             # <<<<<<<<<<<<<<
 *             result[i] = x
 *         else:
 */
    __pyx_t_8 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_x);
    if (__pyx_t_8) {

      /* "pandas/src/tseries.pyx":586
 *         x = values[i]
 *         if _checknull(x):
 *             result[i] = x             # <<<<<<<<<<<<<<
 *         else:
 *             result[i] = op(x, val)
 */
      if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_v_x, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    /*else*/ {

      /* "pandas/src/tseries.pyx":588
 *             result[i] = x
 *         else:
 *             result[i] = op(x, val)             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_bool(result)
 */
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_x);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_x);
      __Pyx_GIVEREF(__pyx_v_x);
      __Pyx_INCREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      __pyx_t_2 = PyObject_Call(__pyx_v_op, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_t_2, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L5:;
  }

  /* "pandas/src/tseries.pyx":590
 *             result[i] = op(x, val)
 * 
 *     return maybe_convert_bool(result)             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__maybe_convert_bool); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_result);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_result);
  __Pyx_GIVEREF(__pyx_v_result);
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.scalar_binop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_45vec_binop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_45vec_binop = {__Pyx_NAMESTR("vec_binop"), (PyCFunction)__pyx_pw_6pandas_8_tseries_45vec_binop, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_45vec_binop(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  PyObject *__pyx_v_op = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__op,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("vec_binop (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("vec_binop", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__op);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("vec_binop", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vec_binop") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
      __pyx_v_op = values[2];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
    __pyx_v_op = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("vec_binop", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.vec_binop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_44vec_binop(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_op);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pandas/src/tseries.pyx":594
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def vec_binop(ndarray[object] left, ndarray[object] right, object op):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(left)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_44vec_binop(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyObject *__pyx_v_op) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_v_y = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("vec_binop");
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "pandas/src/tseries.pyx":596
 * def vec_binop(ndarray[object] left, ndarray[object] right, object op):
 *     cdef:
 *         Py_ssize_t i, n = len(left)             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n, dtype=object)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "pandas/src/tseries.pyx":598
 *         Py_ssize_t i, n = len(left)
 * 
 *     result = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_result = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pandas/src/tseries.pyx":600
 *     result = np.empty(n, dtype=object)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         x = left[i]
 *         y = right[i]
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "pandas/src/tseries.pyx":601
 * 
 *     for i in range(n):
 *         x = left[i]             # <<<<<<<<<<<<<<
 *         y = right[i]
 *         try:
 */
    __pyx_t_7 = __pyx_v_i;
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_XDECREF(__pyx_v_x);
    __pyx_v_x = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/src/tseries.pyx":602
 *     for i in range(n):
 *         x = left[i]
 *         y = right[i]             # <<<<<<<<<<<<<<
 *         try:
 *             result[i] = op(x, y)
 */
    __pyx_t_8 = __pyx_v_i;
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_XDECREF(__pyx_v_y);
    __pyx_v_y = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "pandas/src/tseries.pyx":603
 *         x = left[i]
 *         y = right[i]
 *         try:             # <<<<<<<<<<<<<<
 *             result[i] = op(x, y)
 *         except TypeError:
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      /*try:*/ {

        /* "pandas/src/tseries.pyx":604
 *         y = right[i]
 *         try:
 *             result[i] = op(x, y)             # <<<<<<<<<<<<<<
 *         except TypeError:
 *             if _checknull(x):
 */
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_x);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_x);
        __Pyx_GIVEREF(__pyx_v_x);
        __Pyx_INCREF(__pyx_v_y);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_y);
        __Pyx_GIVEREF(__pyx_v_y);
        __pyx_t_2 = PyObject_Call(__pyx_v_op, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
        if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_t_2, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "pandas/src/tseries.pyx":605
 *         try:
 *             result[i] = op(x, y)
 *         except TypeError:             # <<<<<<<<<<<<<<
 *             if _checknull(x):
 *                 result[i] = x
 */
      __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
      if (__pyx_t_12) {
        __Pyx_AddTraceback("pandas._tseries.vec_binop", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_4);

        /* "pandas/src/tseries.pyx":606
 *             result[i] = op(x, y)
 *         except TypeError:
 *             if _checknull(x):             # <<<<<<<<<<<<<<
 *                 result[i] = x
 *             elif _checknull(y):
 */
        __pyx_t_13 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_x);
        if (__pyx_t_13) {

          /* "pandas/src/tseries.pyx":607
 *         except TypeError:
 *             if _checknull(x):
 *                 result[i] = x             # <<<<<<<<<<<<<<
 *             elif _checknull(y):
 *                 result[i] = y
 */
          if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_v_x, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
          goto __pyx_L15;
        }

        /* "pandas/src/tseries.pyx":608
 *             if _checknull(x):
 *                 result[i] = x
 *             elif _checknull(y):             # <<<<<<<<<<<<<<
 *                 result[i] = y
 *             else:
 */
        __pyx_t_13 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_y);
        if (__pyx_t_13) {

          /* "pandas/src/tseries.pyx":609
 *                 result[i] = x
 *             elif _checknull(y):
 *                 result[i] = y             # <<<<<<<<<<<<<<
 *             else:
 *                 raise
 */
          if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_v_y, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
          goto __pyx_L15;
        }
        /*else*/ {

          /* "pandas/src/tseries.pyx":611
 *                 result[i] = y
 *             else:
 *                 raise             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_bool(result)
 */
          __Pyx_GIVEREF(__pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_5);
          __Pyx_GIVEREF(__pyx_t_4);
          __Pyx_ErrRestore(__pyx_t_2, __pyx_t_5, __pyx_t_4);
          __pyx_t_2 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; 
          {__pyx_filename = __pyx_f[2]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        }
        __pyx_L15:;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L6_exception_handled;
      }
      __pyx_L7_except_error:;
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      goto __pyx_L1_error;
      __pyx_L6_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      __pyx_L12_try_end:;
    }
  }

  /* "pandas/src/tseries.pyx":613
 *                 raise
 * 
 *     return maybe_convert_bool(result)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__maybe_convert_bool); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_result);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_result);
  __Pyx_GIVEREF(__pyx_v_result);
  __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.vec_binop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_y);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":18
 * # MSVC does not have log2!
 * 
 * cdef double Log2(double x):             # <<<<<<<<<<<<<<
 *     return log(x) / log(2.)
 * 
 */

static double __pyx_f_6pandas_8_tseries_Log2(double __pyx_v_x) {
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  double __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Log2");

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":19
 * 
 * cdef double Log2(double x):
 *     return log(x) / log(2.)             # <<<<<<<<<<<<<<
 * 
 * cimport numpy as np
 */
  __pyx_t_1 = log(__pyx_v_x);
  __pyx_t_2 = log(2.);
  if (unlikely(__pyx_t_2 == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "float division");
    {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_r = (__pyx_t_1 / __pyx_t_2);
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pandas._tseries.Log2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_4Node_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_4Node_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_5numpy_double_t __pyx_v_value;
  PyObject *__pyx_v_next = 0;
  PyObject *__pyx_v_width = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__value,&__pyx_n_s__next,&__pyx_n_s__width,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__next);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__width);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_value = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_value == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_next = ((PyObject*)values[1]);
      __pyx_v_width = ((PyObject*)values[2]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_value = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_value == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_next = ((PyObject*)values[1]);
    __pyx_v_width = ((PyObject*)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Node.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_next), (&PyList_Type), 1, "next", 1))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_width), (&PyList_Type), 1, "width", 1))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_4Node___init__(((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self), __pyx_v_value, __pyx_v_next, __pyx_v_width);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":38
 *         list width
 * 
 *     def __init__(self, double_t value, list next, list width):             # <<<<<<<<<<<<<<
 *         self.value = value
 *         self.next = next
 */

static int __pyx_pf_6pandas_8_tseries_4Node___init__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self, __pyx_t_5numpy_double_t __pyx_v_value, PyObject *__pyx_v_next, PyObject *__pyx_v_width) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__");

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":39
 * 
 *     def __init__(self, double_t value, list next, list width):
 *         self.value = value             # <<<<<<<<<<<<<<
 *         self.next = next
 *         self.width = width
 */
  __pyx_v_self->value = __pyx_v_value;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":40
 *     def __init__(self, double_t value, list next, list width):
 *         self.value = value
 *         self.next = next             # <<<<<<<<<<<<<<
 *         self.width = width
 * 
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_next));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_next));
  __Pyx_GOTREF(__pyx_v_self->next);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->next));
  __pyx_v_self->next = __pyx_v_next;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":41
 *         self.value = value
 *         self.next = next
 *         self.width = width             # <<<<<<<<<<<<<<
 * 
 * # Singleton terminator node
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_width));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_width));
  __Pyx_GOTREF(__pyx_v_self->width);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->width));
  __pyx_v_self->width = __pyx_v_width;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_4Node_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_4Node_5value_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_4Node_5value___get__(((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":34
 * cdef class Node:
 *     cdef public:
 *         double_t value             # <<<<<<<<<<<<<<
 *         list next
 *         list width
 */

static PyObject *__pyx_pf_6pandas_8_tseries_4Node_5value___get__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.Node.value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_4Node_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_4Node_5value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_4Node_5value_2__set__(((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_4Node_5value_2__set__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __pyx_t_5numpy_double_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->value = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Node.value.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_4Node_4next_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_4Node_4next_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_4Node_4next___get__(((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":35
 *     cdef public:
 *         double_t value
 *         list next             # <<<<<<<<<<<<<<
 *         list width
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_4Node_4next___get__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->next));
  __pyx_r = ((PyObject *)__pyx_v_self->next);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_4Node_4next_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_4Node_4next_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_4Node_4next_2__set__(((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_4Node_4next_2__set__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->next);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->next));
  __pyx_v_self->next = ((PyObject*)__pyx_v_value);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Node.next.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_4Node_4next_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_8_tseries_4Node_4next_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_4Node_4next_4__del__(((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_4Node_4next_4__del__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->next);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->next));
  __pyx_v_self->next = ((PyObject*)Py_None);

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_4Node_5width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_4Node_5width_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_4Node_5width___get__(((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":36
 *         double_t value
 *         list next
 *         list width             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, double_t value, list next, list width):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_4Node_5width___get__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->width));
  __pyx_r = ((PyObject *)__pyx_v_self->width);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_4Node_5width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_4Node_5width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_4Node_5width_2__set__(((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_4Node_5width_2__set__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->width);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->width));
  __pyx_v_self->width = ((PyObject*)__pyx_v_value);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Node.width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_4Node_5width_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_8_tseries_4Node_5width_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_4Node_5width_4__del__(((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_4Node_5width_4__del__(struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->width);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->width));
  __pyx_v_self->width = ((PyObject*)Py_None);

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_17IndexableSkiplist_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_17IndexableSkiplist_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_expected_size = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__expected_size,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_100);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__expected_size);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_expected_size = values[0];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_expected_size = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.IndexableSkiplist.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_17IndexableSkiplist___init__(((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self), __pyx_v_expected_size);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":55
 *         Node head
 * 
 *     def __init__(self, expected_size=100):             # <<<<<<<<<<<<<<
 *         self.size = 0
 *         self.maxlevels = int(1 + Log2(expected_size))
 */

static int __pyx_pf_6pandas_8_tseries_17IndexableSkiplist___init__(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_self, PyObject *__pyx_v_expected_size) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":56
 * 
 *     def __init__(self, expected_size=100):
 *         self.size = 0             # <<<<<<<<<<<<<<
 *         self.maxlevels = int(1 + Log2(expected_size))
 *         self.head = Node(np.NaN, [NIL] * self.maxlevels, [1] * self.maxlevels)
 */
  __pyx_v_self->size = 0;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":57
 *     def __init__(self, expected_size=100):
 *         self.size = 0
 *         self.maxlevels = int(1 + Log2(expected_size))             # <<<<<<<<<<<<<<
 *         self.head = Node(np.NaN, [NIL] * self.maxlevels, [1] * self.maxlevels)
 * 
 */
  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_expected_size); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->maxlevels = ((Py_ssize_t)(1.0 + __pyx_f_6pandas_8_tseries_Log2(__pyx_t_1)));

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":58
 *         self.size = 0
 *         self.maxlevels = int(1 + Log2(expected_size))
 *         self.head = Node(np.NaN, [NIL] * self.maxlevels, [1] * self.maxlevels)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__NaN); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__NIL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyList_New(1 * ((__pyx_v_self->maxlevels<0) ? 0:__pyx_v_self->maxlevels)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_v_self->maxlevels; __pyx_temp++) {
      __Pyx_INCREF(__pyx_t_2);
      PyList_SET_ITEM(__pyx_t_4, __pyx_temp, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(1 * ((__pyx_v_self->maxlevels<0) ? 0:__pyx_v_self->maxlevels)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_v_self->maxlevels; __pyx_temp++) {
      __Pyx_INCREF(__pyx_int_1);
      PyList_SET_ITEM(__pyx_t_2, __pyx_temp, __pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
    }
  }
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  PyTuple_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_8_tseries_Node)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->head);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->head));
  __pyx_v_self->head = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_2);
  __pyx_t_2 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._tseries.IndexableSkiplist.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static Py_ssize_t __pyx_pw_6pandas_8_tseries_17IndexableSkiplist_3__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_6pandas_8_tseries_17IndexableSkiplist_3__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_17IndexableSkiplist_2__len__(((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":60
 *         self.head = Node(np.NaN, [NIL] * self.maxlevels, [1] * self.maxlevels)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.size
 * 
 */

static Py_ssize_t __pyx_pf_6pandas_8_tseries_17IndexableSkiplist_2__len__(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__");

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":61
 * 
 *     def __len__(self):
 *         return self.size             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, i):
 */
  __pyx_r = __pyx_v_self->size;
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_17IndexableSkiplist_4__getitem__(((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self), ((PyObject *)__pyx_v_i));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":63
 *         return self.size
 * 
 *     def __getitem__(self, i):             # <<<<<<<<<<<<<<
 *         return self.get(i)
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17IndexableSkiplist_4__getitem__(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_self, PyObject *__pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__");

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":64
 * 
 *     def __getitem__(self, i):
 *         return self.get(i)             # <<<<<<<<<<<<<<
 * 
 *     cpdef get(self, Py_ssize_t i):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._tseries.IndexableSkiplist.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":66
 *         return self.get(i)
 * 
 *     cpdef get(self, Py_ssize_t i):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t level
 *         cdef Node node
 */

static PyObject *__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_7get(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_17IndexableSkiplist_get(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_self, Py_ssize_t __pyx_v_i, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_level;
  struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_node = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_7get)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":70
 *         cdef Node node
 * 
 *         node = self.head             # <<<<<<<<<<<<<<
 *         i += 1
 * 
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self->head));
  __pyx_v_node = __pyx_v_self->head;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":71
 * 
 *         node = self.head
 *         i += 1             # <<<<<<<<<<<<<<
 * 
 *         for level in range(self.maxlevels - 1, -1, -1):
 */
  __pyx_v_i = (__pyx_v_i + 1);

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":73
 *         i += 1
 * 
 *         for level in range(self.maxlevels - 1, -1, -1):             # <<<<<<<<<<<<<<
 *             while node.width[level] <= i:
 *                 i -= node.width[level]
 */
  for (__pyx_t_4 = (__pyx_v_self->maxlevels - 1); __pyx_t_4 > -1; __pyx_t_4-=1) {
    __pyx_v_level = __pyx_t_4;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":74
 * 
 *         for level in range(self.maxlevels - 1, -1, -1):
 *             while node.width[level] <= i:             # <<<<<<<<<<<<<<
 *                 i -= node.width[level]
 *                 node = node.next[level]
 */
    while (1) {
      __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_node->width), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!__pyx_t_5) break;

      /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":75
 *         for level in range(self.maxlevels - 1, -1, -1):
 *             while node.width[level] <= i:
 *                 i -= node.width[level]             # <<<<<<<<<<<<<<
 *                 node = node.next[level]
 * 
 */
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_node->width), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_i = __pyx_t_6;

      /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":76
 *             while node.width[level] <= i:
 *                 i -= node.width[level]
 *                 node = node.next[level]             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_node->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_8_tseries_Node))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_v_node));
      __pyx_v_node = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_1);
      __pyx_t_1 = 0;
    }
  }

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":79
 * 
 * 
 *         return node.value             # <<<<<<<<<<<<<<
 * 
 *     cpdef insert(self, double value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_node->value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._tseries.IndexableSkiplist.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_node);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_7get(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_7get(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get (wrapper)");
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyIndex_AsSsize_t(__pyx_arg_i); if (unlikely((__pyx_v_i == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.IndexableSkiplist.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_17IndexableSkiplist_6get(((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self), ((Py_ssize_t)__pyx_v_i));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":66
 *         return self.get(i)
 * 
 *     cpdef get(self, Py_ssize_t i):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t level
 *         cdef Node node
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17IndexableSkiplist_6get(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_self, Py_ssize_t __pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, __pyx_v_i, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.IndexableSkiplist.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":81
 *         return node.value
 * 
 *     cpdef insert(self, double value):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t level, steps, d
 *         cdef Node node, prevnode, newnode, next_at_level, tmp
 */

static PyObject *__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_9insert(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_17IndexableSkiplist_insert(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_self, double __pyx_v_value, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_level;
  Py_ssize_t __pyx_v_steps;
  Py_ssize_t __pyx_v_d;
  struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_node = 0;
  struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_prevnode = 0;
  struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_newnode = 0;
  struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_next_at_level = 0;
  PyObject *__pyx_v_chain = 0;
  PyObject *__pyx_v_steps_at_level = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  double __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("insert");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__insert); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_9insert)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":87
 * 
 *         # find first node on each level where node.next[levels].value > value
 *         chain = [None] * self.maxlevels             # <<<<<<<<<<<<<<
 *         steps_at_level = [0] * self.maxlevels
 *         node = self.head
 */
  __pyx_t_1 = PyList_New(1 * ((__pyx_v_self->maxlevels<0) ? 0:__pyx_v_self->maxlevels)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_v_self->maxlevels; __pyx_temp++) {
      __Pyx_INCREF(Py_None);
      PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None);
      __Pyx_GIVEREF(Py_None);
    }
  }
  __pyx_v_chain = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":88
 *         # find first node on each level where node.next[levels].value > value
 *         chain = [None] * self.maxlevels
 *         steps_at_level = [0] * self.maxlevels             # <<<<<<<<<<<<<<
 *         node = self.head
 * 
 */
  __pyx_t_1 = PyList_New(1 * ((__pyx_v_self->maxlevels<0) ? 0:__pyx_v_self->maxlevels)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_v_self->maxlevels; __pyx_temp++) {
      __Pyx_INCREF(__pyx_int_0);
      PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
    }
  }
  __pyx_v_steps_at_level = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":89
 *         chain = [None] * self.maxlevels
 *         steps_at_level = [0] * self.maxlevels
 *         node = self.head             # <<<<<<<<<<<<<<
 * 
 *         for level in range(self.maxlevels - 1, -1, -1):
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self->head));
  __pyx_v_node = __pyx_v_self->head;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":91
 *         node = self.head
 * 
 *         for level in range(self.maxlevels - 1, -1, -1):             # <<<<<<<<<<<<<<
 *             next_at_level = node.next[level]
 * 
 */
  for (__pyx_t_4 = (__pyx_v_self->maxlevels - 1); __pyx_t_4 > -1; __pyx_t_4-=1) {
    __pyx_v_level = __pyx_t_4;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":92
 * 
 *         for level in range(self.maxlevels - 1, -1, -1):
 *             next_at_level = node.next[level]             # <<<<<<<<<<<<<<
 * 
 *             while next_at_level.value <= value:
 */
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_node->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_8_tseries_Node))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_next_at_level));
    __pyx_v_next_at_level = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":94
 *             next_at_level = node.next[level]
 * 
 *             while next_at_level.value <= value:             # <<<<<<<<<<<<<<
 *                 steps_at_level[level] = (steps_at_level[level] +
 *                                          node.width[level])
 */
    while (1) {
      __pyx_t_5 = (__pyx_v_next_at_level->value <= __pyx_v_value);
      if (!__pyx_t_5) break;

      /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":95
 * 
 *             while next_at_level.value <= value:
 *                 steps_at_level[level] = (steps_at_level[level] +             # <<<<<<<<<<<<<<
 *                                          node.width[level])
 *                 node = next_at_level
 */
      __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_steps_at_level), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);

      /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":96
 *             while next_at_level.value <= value:
 *                 steps_at_level[level] = (steps_at_level[level] +
 *                                          node.width[level])             # <<<<<<<<<<<<<<
 *                 node = next_at_level
 *                 next_at_level = node.next[level]
 */
      __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_node->width), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":95
 * 
 *             while next_at_level.value <= value:
 *                 steps_at_level[level] = (steps_at_level[level] +             # <<<<<<<<<<<<<<
 *                                          node.width[level])
 *                 node = next_at_level
 */
      if (__Pyx_SetItemInt(((PyObject *)__pyx_v_steps_at_level), __pyx_v_level, __pyx_t_3, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":97
 *                 steps_at_level[level] = (steps_at_level[level] +
 *                                          node.width[level])
 *                 node = next_at_level             # <<<<<<<<<<<<<<
 *                 next_at_level = node.next[level]
 * 
 */
      __Pyx_INCREF(((PyObject *)__pyx_v_next_at_level));
      __Pyx_DECREF(((PyObject *)__pyx_v_node));
      __pyx_v_node = __pyx_v_next_at_level;

      /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":98
 *                                          node.width[level])
 *                 node = next_at_level
 *                 next_at_level = node.next[level]             # <<<<<<<<<<<<<<
 * 
 *             chain[level] = node
 */
      __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_node->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6pandas_8_tseries_Node))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_v_next_at_level));
      __pyx_v_next_at_level = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_3);
      __pyx_t_3 = 0;
    }

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":100
 *                 next_at_level = node.next[level]
 * 
 *             chain[level] = node             # <<<<<<<<<<<<<<
 * 
 *         # insert a link to the newnode at each level
 */
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_chain), __pyx_v_level, ((PyObject *)__pyx_v_node), sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":103
 * 
 *         # insert a link to the newnode at each level
 *         d = min(self.maxlevels, 1 - int(Log2(random())))             # <<<<<<<<<<<<<<
 *         newnode = Node(value, [None] * d, [None] * d)
 *         steps = 0
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__random); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyFloat_FromDouble(__pyx_f_6pandas_8_tseries_Log2(__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Subtract(__pyx_int_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_v_self->maxlevels;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_LT); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_5) {
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_2 = __pyx_t_3;
  } else {
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __pyx_t_7;
    __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_4;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":104
 *         # insert a link to the newnode at each level
 *         d = min(self.maxlevels, 1 - int(Log2(random())))
 *         newnode = Node(value, [None] * d, [None] * d)             # <<<<<<<<<<<<<<
 *         steps = 0
 * 
 */
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(1 * ((__pyx_v_d<0) ? 0:__pyx_v_d)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_v_d; __pyx_temp++) {
      __Pyx_INCREF(Py_None);
      PyList_SET_ITEM(__pyx_t_3, __pyx_temp, Py_None);
      __Pyx_GIVEREF(Py_None);
    }
  }
  __pyx_t_7 = PyList_New(1 * ((__pyx_v_d<0) ? 0:__pyx_v_d)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_v_d; __pyx_temp++) {
      __Pyx_INCREF(Py_None);
      PyList_SET_ITEM(__pyx_t_7, __pyx_temp, Py_None);
      __Pyx_GIVEREF(Py_None);
    }
  }
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_t_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_t_7));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_8_tseries_Node)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_v_newnode = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":105
 *         d = min(self.maxlevels, 1 - int(Log2(random())))
 *         newnode = Node(value, [None] * d, [None] * d)
 *         steps = 0             # <<<<<<<<<<<<<<
 * 
 *         for level in range(d):
 */
  __pyx_v_steps = 0;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":107
 *         steps = 0
 * 
 *         for level in range(d):             # <<<<<<<<<<<<<<
 *             prevnode = chain[level]
 *             newnode.next[level] = prevnode.next[level]
 */
  __pyx_t_4 = __pyx_v_d;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_4; __pyx_t_8+=1) {
    __pyx_v_level = __pyx_t_8;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":108
 * 
 *         for level in range(d):
 *             prevnode = chain[level]             # <<<<<<<<<<<<<<
 *             newnode.next[level] = prevnode.next[level]
 *             prevnode.next[level] = newnode
 */
    __pyx_t_7 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chain), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_7) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_6pandas_8_tseries_Node))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_prevnode));
    __pyx_v_prevnode = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_7);
    __pyx_t_7 = 0;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":109
 *         for level in range(d):
 *             prevnode = chain[level]
 *             newnode.next[level] = prevnode.next[level]             # <<<<<<<<<<<<<<
 *             prevnode.next[level] = newnode
 *             newnode.width[level] = (prevnode.width[level] - steps)
 */
    __pyx_t_7 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_prevnode->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_7) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_newnode->next), __pyx_v_level, __pyx_t_7, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":110
 *             prevnode = chain[level]
 *             newnode.next[level] = prevnode.next[level]
 *             prevnode.next[level] = newnode             # <<<<<<<<<<<<<<
 *             newnode.width[level] = (prevnode.width[level] - steps)
 *             prevnode.width[level] = steps + 1
 */
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_prevnode->next), __pyx_v_level, ((PyObject *)__pyx_v_newnode), sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":111
 *             newnode.next[level] = prevnode.next[level]
 *             prevnode.next[level] = newnode
 *             newnode.width[level] = (prevnode.width[level] - steps)             # <<<<<<<<<<<<<<
 *             prevnode.width[level] = steps + 1
 *             steps += steps_at_level[level]
 */
    __pyx_t_7 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_prevnode->width), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_7) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_steps); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_Subtract(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_newnode->width), __pyx_v_level, __pyx_t_3, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":112
 *             prevnode.next[level] = newnode
 *             newnode.width[level] = (prevnode.width[level] - steps)
 *             prevnode.width[level] = steps + 1             # <<<<<<<<<<<<<<
 *             steps += steps_at_level[level]
 * 
 */
    __pyx_t_3 = PyInt_FromSsize_t((__pyx_v_steps + 1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_prevnode->width), __pyx_v_level, __pyx_t_3, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":113
 *             newnode.width[level] = (prevnode.width[level] - steps)
 *             prevnode.width[level] = steps + 1
 *             steps += steps_at_level[level]             # <<<<<<<<<<<<<<
 * 
 *         for level in range(d, self.maxlevels):
 */
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_steps); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_steps_at_level), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_steps = __pyx_t_9;
  }

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":115
 *             steps += steps_at_level[level]
 * 
 *         for level in range(d, self.maxlevels):             # <<<<<<<<<<<<<<
 *             (<Node> chain[level]).width[level] += 1
 * 
 */
  __pyx_t_4 = __pyx_v_self->maxlevels;
  for (__pyx_t_8 = __pyx_v_d; __pyx_t_8 < __pyx_t_4; __pyx_t_8+=1) {
    __pyx_v_level = __pyx_t_8;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":116
 * 
 *         for level in range(d, self.maxlevels):
 *             (<Node> chain[level]).width[level] += 1             # <<<<<<<<<<<<<<
 * 
 *         self.size += 1
 */
    __pyx_t_7 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chain), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_7) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_7)->width));
    __pyx_t_10 = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_7)->width;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_9 = __pyx_v_level;
    __pyx_t_7 = __Pyx_GetItemInt_List(((PyObject *)__pyx_t_10), __pyx_t_9, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_7) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_7, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__Pyx_SetItemInt(((PyObject *)__pyx_t_10), __pyx_t_9, __pyx_t_1, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":118
 *             (<Node> chain[level]).width[level] += 1
 * 
 *         self.size += 1             # <<<<<<<<<<<<<<
 * 
 *     cpdef remove(self, double value):
 */
  __pyx_v_self->size = (__pyx_v_self->size + 1);

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(((PyObject *)__pyx_t_10));
  __Pyx_AddTraceback("pandas._tseries.IndexableSkiplist.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_node);
  __Pyx_XDECREF((PyObject *)__pyx_v_prevnode);
  __Pyx_XDECREF((PyObject *)__pyx_v_newnode);
  __Pyx_XDECREF((PyObject *)__pyx_v_next_at_level);
  __Pyx_XDECREF(__pyx_v_chain);
  __Pyx_XDECREF(__pyx_v_steps_at_level);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_9insert(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_9insert(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  double __pyx_v_value;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("insert (wrapper)");
  assert(__pyx_arg_value); {
    __pyx_v_value = __pyx_PyFloat_AsDouble(__pyx_arg_value); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.IndexableSkiplist.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_17IndexableSkiplist_8insert(((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self), ((double)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":81
 *         return node.value
 * 
 *     cpdef insert(self, double value):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t level, steps, d
 *         cdef Node node, prevnode, newnode, next_at_level, tmp
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17IndexableSkiplist_8insert(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_self, double __pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("insert");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self->__pyx_vtab)->insert(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.IndexableSkiplist.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":120
 *         self.size += 1
 * 
 *     cpdef remove(self, double value):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t level, d
 *         cdef Node node, prevnode, tmpnode, next_at_level
 */

static PyObject *__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_11remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_17IndexableSkiplist_remove(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_self, double __pyx_v_value, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_level;
  Py_ssize_t __pyx_v_d;
  struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_node = 0;
  struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_prevnode = 0;
  struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_tmpnode = 0;
  struct __pyx_obj_6pandas_8_tseries_Node *__pyx_v_next_at_level = 0;
  PyObject *__pyx_v_chain = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_11remove)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":126
 * 
 *         # find first node on each level where node.next[levels].value >= value
 *         chain = [None] * self.maxlevels             # <<<<<<<<<<<<<<
 *         node = self.head
 * 
 */
  __pyx_t_1 = PyList_New(1 * ((__pyx_v_self->maxlevels<0) ? 0:__pyx_v_self->maxlevels)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  { Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < __pyx_v_self->maxlevels; __pyx_temp++) {
      __Pyx_INCREF(Py_None);
      PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None);
      __Pyx_GIVEREF(Py_None);
    }
  }
  __pyx_v_chain = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":127
 *         # find first node on each level where node.next[levels].value >= value
 *         chain = [None] * self.maxlevels
 *         node = self.head             # <<<<<<<<<<<<<<
 * 
 *         for level in range(self.maxlevels - 1, -1, -1):
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self->head));
  __pyx_v_node = __pyx_v_self->head;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":129
 *         node = self.head
 * 
 *         for level in range(self.maxlevels - 1, -1, -1):             # <<<<<<<<<<<<<<
 *             next_at_level = node.next[level]
 *             while next_at_level.value < value:
 */
  for (__pyx_t_4 = (__pyx_v_self->maxlevels - 1); __pyx_t_4 > -1; __pyx_t_4-=1) {
    __pyx_v_level = __pyx_t_4;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":130
 * 
 *         for level in range(self.maxlevels - 1, -1, -1):
 *             next_at_level = node.next[level]             # <<<<<<<<<<<<<<
 *             while next_at_level.value < value:
 *                 node = next_at_level
 */
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_node->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_8_tseries_Node))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_next_at_level));
    __pyx_v_next_at_level = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":131
 *         for level in range(self.maxlevels - 1, -1, -1):
 *             next_at_level = node.next[level]
 *             while next_at_level.value < value:             # <<<<<<<<<<<<<<
 *                 node = next_at_level
 *                 next_at_level = node.next[level]
 */
    while (1) {
      __pyx_t_5 = (__pyx_v_next_at_level->value < __pyx_v_value);
      if (!__pyx_t_5) break;

      /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":132
 *             next_at_level = node.next[level]
 *             while next_at_level.value < value:
 *                 node = next_at_level             # <<<<<<<<<<<<<<
 *                 next_at_level = node.next[level]
 * 
 */
      __Pyx_INCREF(((PyObject *)__pyx_v_next_at_level));
      __Pyx_DECREF(((PyObject *)__pyx_v_node));
      __pyx_v_node = __pyx_v_next_at_level;

      /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":133
 *             while next_at_level.value < value:
 *                 node = next_at_level
 *                 next_at_level = node.next[level]             # <<<<<<<<<<<<<<
 * 
 *             chain[level] = node
 */
      __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_node->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_8_tseries_Node))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_v_next_at_level));
      __pyx_v_next_at_level = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_1);
      __pyx_t_1 = 0;
    }

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":135
 *                 next_at_level = node.next[level]
 * 
 *             chain[level] = node             # <<<<<<<<<<<<<<
 * 
 *         if value != (<Node> (<Node> (<Node> chain[0]).next)[0]).value:
 */
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_chain), __pyx_v_level, ((PyObject *)__pyx_v_node), sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":137
 *             chain[level] = node
 * 
 *         if value != (<Node> (<Node> (<Node> chain[0]).next)[0]).value:             # <<<<<<<<<<<<<<
 *             raise KeyError('Not Found')
 * 
 */
  __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chain), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_1)->next), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = (__pyx_v_value != ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_2)->value);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":138
 * 
 *         if value != (<Node> (<Node> (<Node> chain[0]).next)[0]).value:
 *             raise KeyError('Not Found')             # <<<<<<<<<<<<<<
 * 
 *         # remove one link at each level
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[4]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":141
 * 
 *         # remove one link at each level
 *         d = len((<Node> (<Node> (<Node> chain[0]).next)[0]).next)             # <<<<<<<<<<<<<<
 * 
 *         for level in range(d):
 */
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chain), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_2)->next), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = ((PyObject *)((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_1)->next);
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2 == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_4 = PyList_GET_SIZE(__pyx_t_2); 
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_d = __pyx_t_4;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":143
 *         d = len((<Node> (<Node> (<Node> chain[0]).next)[0]).next)
 * 
 *         for level in range(d):             # <<<<<<<<<<<<<<
 *             prevnode = chain[level]
 *             tmpnode = prevnode.next[level]
 */
  __pyx_t_4 = __pyx_v_d;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_4; __pyx_t_6+=1) {
    __pyx_v_level = __pyx_t_6;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":144
 * 
 *         for level in range(d):
 *             prevnode = chain[level]             # <<<<<<<<<<<<<<
 *             tmpnode = prevnode.next[level]
 *             prevnode.width[level] += tmpnode.width[level] - 1
 */
    __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chain), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_8_tseries_Node))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_prevnode));
    __pyx_v_prevnode = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":145
 *         for level in range(d):
 *             prevnode = chain[level]
 *             tmpnode = prevnode.next[level]             # <<<<<<<<<<<<<<
 *             prevnode.width[level] += tmpnode.width[level] - 1
 *             prevnode.next[level] = tmpnode.next[level]
 */
    __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_prevnode->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6pandas_8_tseries_Node))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_tmpnode));
    __pyx_v_tmpnode = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":146
 *             prevnode = chain[level]
 *             tmpnode = prevnode.next[level]
 *             prevnode.width[level] += tmpnode.width[level] - 1             # <<<<<<<<<<<<<<
 *             prevnode.next[level] = tmpnode.next[level]
 * 
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_prevnode->width));
    __pyx_t_7 = __pyx_v_prevnode->width;
    __pyx_t_8 = __pyx_v_level;
    __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_t_7), __pyx_t_8, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tmpnode->width), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__Pyx_SetItemInt(((PyObject *)__pyx_t_7), __pyx_t_8, __pyx_t_1, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":147
 *             tmpnode = prevnode.next[level]
 *             prevnode.width[level] += tmpnode.width[level] - 1
 *             prevnode.next[level] = tmpnode.next[level]             # <<<<<<<<<<<<<<
 * 
 *         for level in range(d, self.maxlevels):
 */
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tmpnode->next), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_prevnode->next), __pyx_v_level, __pyx_t_1, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":149
 *             prevnode.next[level] = tmpnode.next[level]
 * 
 *         for level in range(d, self.maxlevels):             # <<<<<<<<<<<<<<
 *             tmpnode = chain[level]
 *             tmpnode.width[level] -= 1
 */
  __pyx_t_4 = __pyx_v_self->maxlevels;
  for (__pyx_t_6 = __pyx_v_d; __pyx_t_6 < __pyx_t_4; __pyx_t_6+=1) {
    __pyx_v_level = __pyx_t_6;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":150
 * 
 *         for level in range(d, self.maxlevels):
 *             tmpnode = chain[level]             # <<<<<<<<<<<<<<
 *             tmpnode.width[level] -= 1
 * 
 */
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_chain), __pyx_v_level, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6pandas_8_tseries_Node))))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_tmpnode));
    __pyx_v_tmpnode = ((struct __pyx_obj_6pandas_8_tseries_Node *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":151
 *         for level in range(d, self.maxlevels):
 *             tmpnode = chain[level]
 *             tmpnode.width[level] -= 1             # <<<<<<<<<<<<<<
 * 
 *         self.size -= 1
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_tmpnode->width));
    __pyx_t_7 = __pyx_v_tmpnode->width;
    __pyx_t_8 = __pyx_v_level;
    __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_t_7), __pyx_t_8, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__Pyx_SetItemInt(((PyObject *)__pyx_t_7), __pyx_t_8, __pyx_t_3, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":153
 *             tmpnode.width[level] -= 1
 * 
 *         self.size -= 1             # <<<<<<<<<<<<<<
 */
  __pyx_v_self->size = (__pyx_v_self->size - 1);

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(((PyObject *)__pyx_t_7));
  __Pyx_AddTraceback("pandas._tseries.IndexableSkiplist.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_node);
  __Pyx_XDECREF((PyObject *)__pyx_v_prevnode);
  __Pyx_XDECREF((PyObject *)__pyx_v_tmpnode);
  __Pyx_XDECREF((PyObject *)__pyx_v_next_at_level);
  __Pyx_XDECREF(__pyx_v_chain);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_11remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_11remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  double __pyx_v_value;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove (wrapper)");
  assert(__pyx_arg_value); {
    __pyx_v_value = __pyx_PyFloat_AsDouble(__pyx_arg_value); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.IndexableSkiplist.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_17IndexableSkiplist_10remove(((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self), ((double)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":120
 *         self.size += 1
 * 
 *     cpdef remove(self, double value):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t level, d
 *         cdef Node node, prevnode, tmpnode, next_at_level
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17IndexableSkiplist_10remove(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_self, double __pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_self->__pyx_vtab)->remove(__pyx_v_self, __pyx_v_value, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.IndexableSkiplist.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_47arrmap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_47arrmap = {__Pyx_NAMESTR("arrmap"), (PyCFunction)__pyx_pw_6pandas_8_tseries_47arrmap, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_47arrmap(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyObject *__pyx_v_func = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("arrmap (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("arrmap", 1, 2, 2, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_index = ((PyArrayObject *)values[0]);
      __pyx_v_func = values[1];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_index = ((PyArrayObject *)values[0]);
    __pyx_v_func = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("arrmap", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.arrmap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_46arrmap(__pyx_self, __pyx_v_index, __pyx_v_func);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":5
 * 
 * @cython.boundscheck(False)
 * def arrmap(ndarray[object] index, object func):             # <<<<<<<<<<<<<<
 *     cdef int length = index.shape[0]
 *     cdef int i = 0
 */

static PyObject *__pyx_pf_6pandas_8_tseries_46arrmap(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) {
  int __pyx_v_length;
  int __pyx_v_i;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject **__pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arrmap");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":6
 * @cython.boundscheck(False)
 * def arrmap(ndarray[object] index, object func):
 *     cdef int length = index.shape[0]             # <<<<<<<<<<<<<<
 *     cdef int i = 0
 * 
 */
  __pyx_v_length = (__pyx_v_index->dimensions[0]);

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":7
 * def arrmap(ndarray[object] index, object func):
 *     cdef int length = index.shape[0]
 *     cdef int i = 0             # <<<<<<<<<<<<<<
 * 
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":9
 *     cdef int i = 0
 * 
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < length:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(__pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":11
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)
 * 
 *     for i from 0 <= i < length:             # <<<<<<<<<<<<<<
 *         result[i] = func(index[i])
 * 
 */
  __pyx_t_7 = __pyx_v_length;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":12
 * 
 *     for i from 0 <= i < length:
 *         result[i] = func(index[i])             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_8 = __pyx_v_i;
    if (__pyx_t_8 < 0) __pyx_t_8 += __pyx_pybuffernd_index.diminfo[0].shape;
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_index.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_9 = __pyx_v_i;
    if (__pyx_t_9 < 0) __pyx_t_9 += __pyx_pybuffernd_result.diminfo[0].shape;
    __pyx_t_10 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_10);
    __Pyx_DECREF(*__pyx_t_10); __Pyx_INCREF(__pyx_t_5);
    *__pyx_t_10 = __pyx_t_5;
    __Pyx_GIVEREF(*__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":14
 *         result[i] = func(index[i])
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.arrmap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_49groupby_func(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_49groupby_func = {__Pyx_NAMESTR("groupby_func"), (PyCFunction)__pyx_pw_6pandas_8_tseries_49groupby_func, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_49groupby_func(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_mapper = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__mapper,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("groupby_func (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mapper);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("groupby_func", 1, 2, 2, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_func") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_index = values[0];
      __pyx_v_mapper = values[1];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_index = values[0];
    __pyx_v_mapper = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("groupby_func", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.groupby_func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_48groupby_func(__pyx_self, __pyx_v_index, __pyx_v_mapper);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":17
 * 
 * @cython.boundscheck(False)
 * def groupby_func(object index, object mapper):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef ndarray[object] mapped_index
 */

static PyObject *__pyx_pf_6pandas_8_tseries_48groupby_func(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyObject *__pyx_v_mapper) {
  PyObject *__pyx_v_result = 0;
  PyArrayObject *__pyx_v_mapped_index = 0;
  PyArrayObject *__pyx_v_index_buf = 0;
  PyArrayObject *__pyx_v_mask = 0;
  int __pyx_v_i;
  int __pyx_v_length;
  PyObject *__pyx_v_members = 0;
  PyObject *__pyx_v_idx = 0;
  PyObject *__pyx_v_key = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index_buf;
  __Pyx_Buffer __pyx_pybuffer_index_buf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mapped_index;
  __Pyx_Buffer __pyx_pybuffer_mapped_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyArrayObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  __pyx_t_5numpy_int8_t __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("groupby_func");
  __pyx_pybuffer_mapped_index.pybuffer.buf = NULL;
  __pyx_pybuffer_mapped_index.refcount = 0;
  __pyx_pybuffernd_mapped_index.data = NULL;
  __pyx_pybuffernd_mapped_index.rcbuffer = &__pyx_pybuffer_mapped_index;
  __pyx_pybuffer_index_buf.pybuffer.buf = NULL;
  __pyx_pybuffer_index_buf.refcount = 0;
  __pyx_pybuffernd_index_buf.data = NULL;
  __pyx_pybuffernd_index_buf.rcbuffer = &__pyx_pybuffer_index_buf;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":18
 * @cython.boundscheck(False)
 * def groupby_func(object index, object mapper):
 *     cdef dict result = {}             # <<<<<<<<<<<<<<
 *     cdef ndarray[object] mapped_index
 *     cdef ndarray[object] index_buf
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":26
 *     cdef object idx, key
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     index_buf = np.asarray(index)
 */
  __pyx_t_2 = PyObject_Length(__pyx_v_index); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_length = __pyx_t_2;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":28
 *     length = len(index)
 * 
 *     index_buf = np.asarray(index)             # <<<<<<<<<<<<<<
 *     mapped_index = arrmap(index_buf, mapper)
 *     mask = isnullobj(mapped_index)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__asarray); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_index);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_index);
  __Pyx_GIVEREF(__pyx_v_index);
  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index_buf.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index_buf.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index_buf.rcbuffer->pybuffer, (PyObject*)__pyx_v_index_buf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_index_buf.diminfo[0].strides = __pyx_pybuffernd_index_buf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index_buf.diminfo[0].shape = __pyx_pybuffernd_index_buf.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_index_buf = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":29
 * 
 *     index_buf = np.asarray(index)
 *     mapped_index = arrmap(index_buf, mapper)             # <<<<<<<<<<<<<<
 *     mask = isnullobj(mapped_index)
 * 
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__arrmap); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_index_buf));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_index_buf));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_index_buf));
  __Pyx_INCREF(__pyx_v_mapper);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_mapper);
  __Pyx_GIVEREF(__pyx_v_mapper);
  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_10 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mapped_index.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mapped_index.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mapped_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_mapped_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      }
    }
    __pyx_pybuffernd_mapped_index.diminfo[0].strides = __pyx_pybuffernd_mapped_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mapped_index.diminfo[0].shape = __pyx_pybuffernd_mapped_index.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_10 = 0;
  __pyx_v_mapped_index = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":30
 *     index_buf = np.asarray(index)
 *     mapped_index = arrmap(index_buf, mapper)
 *     mask = isnullobj(mapped_index)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < length:
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__isnullobj); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_mapped_index));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_mapped_index));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_mapped_index));
  __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_mask = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":32
 *     mask = isnullobj(mapped_index)
 * 
 *     for i from 0 <= i < length:             # <<<<<<<<<<<<<<
 *         if mask[i]:
 *             continue
 */
  __pyx_t_6 = __pyx_v_length;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":33
 * 
 *     for i from 0 <= i < length:
 *         if mask[i]:             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
    __pyx_t_12 = __pyx_v_i;
    if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_pybuffernd_mask.diminfo[0].shape;
    __pyx_t_13 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_mask.diminfo[0].strides));
    if (__pyx_t_13) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":34
 *     for i from 0 <= i < length:
 *         if mask[i]:
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         key = mapped_index[i]
 */
      goto __pyx_L3_continue;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":36
 *             continue
 * 
 *         key = mapped_index[i]             # <<<<<<<<<<<<<<
 *         idx = index_buf[i]
 *         if key in result:
 */
    __pyx_t_14 = __pyx_v_i;
    if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_pybuffernd_mapped_index.diminfo[0].shape;
    __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_mapped_index.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_mapped_index.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_4);
    __Pyx_XDECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":37
 * 
 *         key = mapped_index[i]
 *         idx = index_buf[i]             # <<<<<<<<<<<<<<
 *         if key in result:
 *             members = result[key]
 */
    __pyx_t_15 = __pyx_v_i;
    if (__pyx_t_15 < 0) __pyx_t_15 += __pyx_pybuffernd_index_buf.diminfo[0].shape;
    __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_index_buf.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_index_buf.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_4);
    __Pyx_XDECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":38
 *         key = mapped_index[i]
 *         idx = index_buf[i]
 *         if key in result:             # <<<<<<<<<<<<<<
 *             members = result[key]
 *             members.append(idx)
 */
    __pyx_t_16 = ((PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_key))); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_16) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":39
 *         idx = index_buf[i]
 *         if key in result:
 *             members = result[key]             # <<<<<<<<<<<<<<
 *             members.append(idx)
 *         else:
 */
      __pyx_t_4 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_key); if (!__pyx_t_4) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_XDECREF(((PyObject *)__pyx_v_members));
      __pyx_v_members = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":40
 *         if key in result:
 *             members = result[key]
 *             members.append(idx)             # <<<<<<<<<<<<<<
 *         else:
 *             result[key] = [idx]
 */
      if (unlikely(((PyObject *)__pyx_v_members) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_17 = PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":42
 *             members.append(idx)
 *         else:
 *             result[key] = [idx]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_idx);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_idx);
      __Pyx_GIVEREF(__pyx_v_idx);
      if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_key, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    }
    __pyx_L6:;
    __pyx_L3_continue:;
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":44
 *             result[key] = [idx]
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index_buf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mapped_index.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_func", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index_buf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mapped_index.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_mapped_index);
  __Pyx_XDECREF((PyObject *)__pyx_v_index_buf);
  __Pyx_XDECREF((PyObject *)__pyx_v_mask);
  __Pyx_XDECREF(__pyx_v_members);
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_51func_groupby_indices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_51func_groupby_indices = {__Pyx_NAMESTR("func_groupby_indices"), (PyCFunction)__pyx_pw_6pandas_8_tseries_51func_groupby_indices, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_51func_groupby_indices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_mapper = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__mapper,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func_groupby_indices (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mapper);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("func_groupby_indices", 1, 2, 2, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "func_groupby_indices") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_index = values[0];
      __pyx_v_mapper = values[1];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_index = values[0];
    __pyx_v_mapper = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func_groupby_indices", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.func_groupby_indices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_50func_groupby_indices(__pyx_self, __pyx_v_index, __pyx_v_mapper);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":47
 * 
 * 
 * def func_groupby_indices(object index, object mapper):             # <<<<<<<<<<<<<<
 *     return groupby_indices_naive(arrmap(index, mapper))
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_50func_groupby_indices(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyObject *__pyx_v_mapper) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func_groupby_indices");

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":48
 * 
 * def func_groupby_indices(object index, object mapper):
 *     return groupby_indices_naive(arrmap(index, mapper))             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__arrmap); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_index);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_index);
  __Pyx_GIVEREF(__pyx_v_index);
  __Pyx_INCREF(__pyx_v_mapper);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_mapper);
  __Pyx_GIVEREF(__pyx_v_mapper);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = __pyx_f_6pandas_8_tseries_groupby_indices_naive(((PyArrayObject *)__pyx_t_3), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._tseries.func_groupby_indices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":51
 * 
 * @cython.boundscheck(False)
 * cpdef groupby_indices_naive(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef dict result
 *     cdef ndarray[int8_t] mask
 */

static PyObject *__pyx_pw_6pandas_8_tseries_53groupby_indices_naive(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_groupby_indices_naive(PyArrayObject *__pyx_v_values, CYTHON_UNUSED int __pyx_skip_dispatch) {
  PyObject *__pyx_v_result = 0;
  PyArrayObject *__pyx_v_mask = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_key = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  __pyx_t_5numpy_int8_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("groupby_indices_naive");
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":54
 *     cdef dict result
 *     cdef ndarray[int8_t] mask
 *     cdef Py_ssize_t i, length = len(values)             # <<<<<<<<<<<<<<
 *     cdef object key
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_length = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":57
 *     cdef object key
 * 
 *     result = {}             # <<<<<<<<<<<<<<
 *     mask = isnullobj(values)
 *     for i from 0 <= i < length:
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":58
 * 
 *     result = {}
 *     mask = isnullobj(values)             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < length:
 *         if mask[i]:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__isnullobj); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_mask = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":59
 *     result = {}
 *     mask = isnullobj(values)
 *     for i from 0 <= i < length:             # <<<<<<<<<<<<<<
 *         if mask[i]:
 *             continue
 */
  __pyx_t_1 = __pyx_v_length;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":60
 *     mask = isnullobj(values)
 *     for i from 0 <= i < length:
 *         if mask[i]:             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
    __pyx_t_10 = __pyx_v_i;
    if (__pyx_t_10 < 0) __pyx_t_10 += __pyx_pybuffernd_mask.diminfo[0].shape;
    __pyx_t_11 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_mask.diminfo[0].strides));
    if (__pyx_t_11) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":61
 *     for i from 0 <= i < length:
 *         if mask[i]:
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         key = values[i]
 */
      goto __pyx_L3_continue;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":63
 *             continue
 * 
 *         key = values[i]             # <<<<<<<<<<<<<<
 *         if key in result:
 *             (<list> result[key]).append(i)
 */
    __pyx_t_12 = __pyx_v_i;
    if (__pyx_t_12 < 0) __pyx_t_12 += __pyx_pybuffernd_values.diminfo[0].shape;
    __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_4);
    __Pyx_XDECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":64
 * 
 *         key = values[i]
 *         if key in result:             # <<<<<<<<<<<<<<
 *             (<list> result[key]).append(i)
 *         else:
 */
    __pyx_t_13 = ((PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_key))); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_13) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":65
 *         key = values[i]
 *         if key in result:
 *             (<list> result[key]).append(i)             # <<<<<<<<<<<<<<
 *         else:
 *             result[key] = [i]
 */
      __pyx_t_4 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_key); if (!__pyx_t_4) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(__pyx_t_4 == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_14 = PyList_Append(((PyObject*)__pyx_t_4), __pyx_t_3); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":67
 *             (<list> result[key]).append(i)
 *         else:
 *             result[key] = [i]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_3 = 0;
      if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_key, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    }
    __pyx_L6:;
    __pyx_L3_continue:;
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":69
 *             result[key] = [i]
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_indices_naive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_mask);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_53groupby_indices_naive(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_53groupby_indices_naive(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("groupby_indices_naive (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_52groupby_indices_naive(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":51
 * 
 * @cython.boundscheck(False)
 * cpdef groupby_indices_naive(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef dict result
 *     cdef ndarray[int8_t] mask
 */

static PyObject *__pyx_pf_6pandas_8_tseries_52groupby_indices_naive(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("groupby_indices_naive");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_8_tseries_groupby_indices_naive(__pyx_v_values, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_indices_naive", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_55groupby_indices(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_55groupby_indices = {__Pyx_NAMESTR("groupby_indices"), (PyCFunction)__pyx_pw_6pandas_8_tseries_55groupby_indices, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_55groupby_indices(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("groupby_indices (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_54groupby_indices(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":72
 * 
 * @cython.boundscheck(False)
 * def groupby_indices(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_54groupby_indices(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_labels = 0;
  PyArrayObject *__pyx_v_counts = 0;
  PyArrayObject *__pyx_v_arr = 0;
  PyArrayObject *__pyx_v_seen = 0;
  __pyx_t_5numpy_int32_t __pyx_v_loc;
  PyObject *__pyx_v_ids = 0;
  __pyx_t_5numpy_int32_t __pyx_v_k;
  __pyx_t_5numpy_int32_t **__pyx_v_vecs;
  PyObject *__pyx_v_result = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_seen;
  __Pyx_Buffer __pyx_pybuffer_seen;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyArrayObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  __pyx_t_5numpy_int32_t __pyx_t_16;
  __pyx_t_5numpy_int32_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("groupby_indices");
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  __pyx_pybuffer_seen.pybuffer.buf = NULL;
  __pyx_pybuffer_seen.refcount = 0;
  __pyx_pybuffernd_seen.data = NULL;
  __pyx_pybuffernd_seen.rcbuffer = &__pyx_pybuffer_seen;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":74
 * def groupby_indices(ndarray values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[int32_t] labels, counts, arr, seen
 *         int32_t loc
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":77
 *         ndarray[int32_t] labels, counts, arr, seen
 *         int32_t loc
 *         dict ids = {}             # <<<<<<<<<<<<<<
 *         object val
 *         int32_t k
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_v_ids = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":81
 *         int32_t k
 * 
 *     ids, labels, counts = group_labels(values)             # <<<<<<<<<<<<<<
 *     seen = np.zeros_like(counts)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__group_labels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 3)) {
        if (PyTuple_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 3)) {
        if (PyList_GET_SIZE(sequence) > 3) __Pyx_RaiseTooManyValuesError(3);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 2; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  if (!(likely(PyDict_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_v_ids));
  __pyx_v_ids = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
    }
    __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":82
 * 
 *     ids, labels, counts = group_labels(values)
 *     seen = np.zeros_like(counts)             # <<<<<<<<<<<<<<
 * 
 *     # try not to get in trouble here...
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_counts));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_counts));
  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seen.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seen.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_seen.rcbuffer->pybuffer, (PyObject*)__pyx_v_seen, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
    }
    __pyx_pybuffernd_seen.diminfo[0].strides = __pyx_pybuffernd_seen.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_seen.diminfo[0].shape = __pyx_pybuffernd_seen.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __pyx_v_seen = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":85
 * 
 *     # try not to get in trouble here...
 *     cdef int32_t **vecs = <int32_t **> malloc(len(ids) * sizeof(int32_t*))             # <<<<<<<<<<<<<<
 *     result = {}
 *     for i from 0 <= i < len(counts):
 */
  if (unlikely(((PyObject *)__pyx_v_ids) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = PyDict_Size(((PyObject *)__pyx_v_ids)); 
  __pyx_v_vecs = ((__pyx_t_5numpy_int32_t **)malloc((__pyx_t_1 * (sizeof(__pyx_t_5numpy_int32_t *)))));

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":86
 *     # try not to get in trouble here...
 *     cdef int32_t **vecs = <int32_t **> malloc(len(ids) * sizeof(int32_t*))
 *     result = {}             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < len(counts):
 *         arr = np.empty(counts[i], dtype=np.int32)
 */
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":87
 *     cdef int32_t **vecs = <int32_t **> malloc(len(ids) * sizeof(int32_t*))
 *     result = {}
 *     for i from 0 <= i < len(counts):             # <<<<<<<<<<<<<<
 *         arr = np.empty(counts[i], dtype=np.int32)
 *         result[ids[i]] = arr
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":88
 *     result = {}
 *     for i from 0 <= i < len(counts):
 *         arr = np.empty(counts[i], dtype=np.int32)             # <<<<<<<<<<<<<<
 *         result[ids[i]] = arr
 *         vecs[i] = <int32_t *> arr.data
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_13 = __pyx_v_i;
    if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_pybuffernd_counts.diminfo[0].shape;
    __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_counts.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_8 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
      __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_9 < 0)) {
        PyErr_Fetch(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_12, __pyx_t_11, __pyx_t_10);
        }
      }
      __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_8 = 0;
    __Pyx_XDECREF(((PyObject *)__pyx_v_arr));
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":89
 *     for i from 0 <= i < len(counts):
 *         arr = np.empty(counts[i], dtype=np.int32)
 *         result[ids[i]] = arr             # <<<<<<<<<<<<<<
 *         vecs[i] = <int32_t *> arr.data
 * 
 */
    __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_ids), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_6) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_6, ((PyObject *)__pyx_v_arr)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":90
 *         arr = np.empty(counts[i], dtype=np.int32)
 *         result[ids[i]] = arr
 *         vecs[i] = <int32_t *> arr.data             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
    (__pyx_v_vecs[__pyx_v_i]) = ((__pyx_t_5numpy_int32_t *)__pyx_v_arr->data);
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":92
 *         vecs[i] = <int32_t *> arr.data
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         k = labels[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":93
 * 
 *     for i from 0 <= i < n:
 *         k = labels[i]             # <<<<<<<<<<<<<<
 * 
 *         # was NaN
 */
    __pyx_t_14 = __pyx_v_i;
    if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_pybuffernd_labels.diminfo[0].shape;
    __pyx_v_k = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":96
 * 
 *         # was NaN
 *         if k == -1:             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
    __pyx_t_15 = (__pyx_v_k == -1);
    if (__pyx_t_15) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":97
 *         # was NaN
 *         if k == -1:
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         loc = seen[k]
 */
      goto __pyx_L7_continue;
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":99
 *             continue
 * 
 *         loc = seen[k]             # <<<<<<<<<<<<<<
 *         vecs[k][loc] = i
 *         seen[k] = loc + 1
 */
    __pyx_t_16 = __pyx_v_k;
    if (__pyx_t_16 < 0) __pyx_t_16 += __pyx_pybuffernd_seen.diminfo[0].shape;
    __pyx_v_loc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_seen.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_seen.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":100
 * 
 *         loc = seen[k]
 *         vecs[k][loc] = i             # <<<<<<<<<<<<<<
 *         seen[k] = loc + 1
 * 
 */
    ((__pyx_v_vecs[__pyx_v_k])[__pyx_v_loc]) = __pyx_v_i;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":101
 *         loc = seen[k]
 *         vecs[k][loc] = i
 *         seen[k] = loc + 1             # <<<<<<<<<<<<<<
 * 
 *     free(vecs)
 */
    __pyx_t_17 = __pyx_v_k;
    if (__pyx_t_17 < 0) __pyx_t_17 += __pyx_pybuffernd_seen.diminfo[0].shape;
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_seen.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_seen.diminfo[0].strides) = (__pyx_v_loc + 1);
    __pyx_L7_continue:;
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":103
 *         seen[k] = loc + 1
 * 
 *     free(vecs)             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
  free(__pyx_v_vecs);

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":105
 *     free(vecs)
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seen.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_indices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_seen.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_labels);
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF((PyObject *)__pyx_v_seen);
  __Pyx_XDECREF(__pyx_v_ids);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_57is_lexsorted(PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_57is_lexsorted = {__Pyx_NAMESTR("is_lexsorted"), (PyCFunction)__pyx_pw_6pandas_8_tseries_57is_lexsorted, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_57is_lexsorted(PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_lexsorted (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_arrays), (&PyList_Type), 1, "list_of_arrays", 1))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_56is_lexsorted(__pyx_self, ((PyObject*)__pyx_v_list_of_arrays));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":109
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def is_lexsorted(list list_of_arrays):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int i
 */

static PyObject *__pyx_pf_6pandas_8_tseries_56is_lexsorted(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_list_of_arrays) {
  int __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_nlevels;
  __pyx_t_5numpy_int32_t __pyx_v_k;
  __pyx_t_5numpy_int32_t __pyx_v_cur;
  __pyx_t_5numpy_int32_t __pyx_v_pre;
  __pyx_t_5numpy_int32_t **__pyx_v_vecs;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_lexsorted");

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":115
 *         int32_t k, cur, pre
 * 
 *     nlevels = len(list_of_arrays)             # <<<<<<<<<<<<<<
 *     n = len(list_of_arrays[0])
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_list_of_arrays) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_list_of_arrays)); 
  __pyx_v_nlevels = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":116
 * 
 *     nlevels = len(list_of_arrays)
 *     n = len(list_of_arrays[0])             # <<<<<<<<<<<<<<
 * 
 *     cdef int32_t **vecs = <int32_t**> malloc(nlevels * sizeof(int32_t*))
 */
  __pyx_t_2 = PyList_GET_ITEM(__pyx_v_list_of_arrays, 0);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":118
 *     n = len(list_of_arrays[0])
 * 
 *     cdef int32_t **vecs = <int32_t**> malloc(nlevels * sizeof(int32_t*))             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < nlevels:
 *         vecs[i] = <int32_t *> (<ndarray> list_of_arrays[i]).data
 */
  __pyx_v_vecs = ((__pyx_t_5numpy_int32_t **)malloc((__pyx_v_nlevels * (sizeof(__pyx_t_5numpy_int32_t *)))));

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":119
 * 
 *     cdef int32_t **vecs = <int32_t**> malloc(nlevels * sizeof(int32_t*))
 *     for i from 0 <= i < nlevels:             # <<<<<<<<<<<<<<
 *         vecs[i] = <int32_t *> (<ndarray> list_of_arrays[i]).data
 *     # assume uniqueness??
 */
  __pyx_t_1 = __pyx_v_nlevels;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":120
 *     cdef int32_t **vecs = <int32_t**> malloc(nlevels * sizeof(int32_t*))
 *     for i from 0 <= i < nlevels:
 *         vecs[i] = <int32_t *> (<ndarray> list_of_arrays[i]).data             # <<<<<<<<<<<<<<
 *     # assume uniqueness??
 * 
 */
    (__pyx_v_vecs[__pyx_v_i]) = ((__pyx_t_5numpy_int32_t *)((PyArrayObject *)PyList_GET_ITEM(__pyx_v_list_of_arrays, __pyx_v_i))->data);
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":123
 *     # assume uniqueness??
 * 
 *     for i from 1 <= i < n:             # <<<<<<<<<<<<<<
 *         for k from 0 <= k < nlevels:
 *             cur = vecs[k][i]
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":124
 * 
 *     for i from 1 <= i < n:
 *         for k from 0 <= k < nlevels:             # <<<<<<<<<<<<<<
 *             cur = vecs[k][i]
 *             pre = vecs[k][i-1]
 */
    __pyx_t_3 = __pyx_v_nlevels;
    for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":125
 *     for i from 1 <= i < n:
 *         for k from 0 <= k < nlevels:
 *             cur = vecs[k][i]             # <<<<<<<<<<<<<<
 *             pre = vecs[k][i-1]
 *             if cur == pre:
 */
      __pyx_v_cur = ((__pyx_v_vecs[__pyx_v_k])[__pyx_v_i]);

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":126
 *         for k from 0 <= k < nlevels:
 *             cur = vecs[k][i]
 *             pre = vecs[k][i-1]             # <<<<<<<<<<<<<<
 *             if cur == pre:
 *                 continue
 */
      __pyx_v_pre = ((__pyx_v_vecs[__pyx_v_k])[(__pyx_v_i - 1)]);

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":127
 *             cur = vecs[k][i]
 *             pre = vecs[k][i-1]
 *             if cur == pre:             # <<<<<<<<<<<<<<
 *                 continue
 *             elif cur > pre:
 */
      __pyx_t_4 = (__pyx_v_cur == __pyx_v_pre);
      if (__pyx_t_4) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":128
 *             pre = vecs[k][i-1]
 *             if cur == pre:
 *                 continue             # <<<<<<<<<<<<<<
 *             elif cur > pre:
 *                 break
 */
        goto __pyx_L7_continue;
        goto __pyx_L9;
      }

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":129
 *             if cur == pre:
 *                 continue
 *             elif cur > pre:             # <<<<<<<<<<<<<<
 *                 break
 *             else:
 */
      __pyx_t_4 = (__pyx_v_cur > __pyx_v_pre);
      if (__pyx_t_4) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":130
 *                 continue
 *             elif cur > pre:
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 return False
 */
        goto __pyx_L8_break;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":132
 *                 break
 *             else:
 *                 return False             # <<<<<<<<<<<<<<
 *     free(vecs)
 *     return True
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;
      }
      __pyx_L9:;
      __pyx_L7_continue:;
    }
    __pyx_L8_break:;
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":133
 *             else:
 *                 return False
 *     free(vecs)             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
  free(__pyx_v_vecs);

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":134
 *                 return False
 *     free(vecs)
 *     return True             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._tseries.is_lexsorted", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_59group_labels(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static char __pyx_doc_6pandas_8_tseries_58group_labels[] = "\n    Compute label vector from input values and associated useful data\n\n    Returns\n    -------\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_59group_labels = {__Pyx_NAMESTR("group_labels"), (PyCFunction)__pyx_pw_6pandas_8_tseries_59group_labels, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_58group_labels)};
static PyObject *__pyx_pw_6pandas_8_tseries_59group_labels(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("group_labels (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_58group_labels(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":138
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def group_labels(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     '''
 *     Compute label vector from input values and associated useful data
 */

static PyObject *__pyx_pf_6pandas_8_tseries_58group_labels(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_labels = 0;
  PyArrayObject *__pyx_v_counts = 0;
  PyObject *__pyx_v_ids = 0;
  PyObject *__pyx_v_reverse = 0;
  __pyx_t_5numpy_int32_t __pyx_v_idx;
  PyObject *__pyx_v_val = 0;
  __pyx_t_5numpy_int32_t __pyx_v_count;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  PyArrayObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  __pyx_t_5numpy_int32_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  __pyx_t_5numpy_int32_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  __pyx_t_5numpy_int32_t __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("group_labels");
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":146
 *     '''
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[int32_t] labels = np.empty(n, dtype=np.int32)
 *         ndarray[int32_t] counts = np.empty(n, dtype=np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":147
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 *         ndarray[int32_t] labels = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 *         ndarray[int32_t] counts = np.empty(n, dtype=np.int32)
 *         dict ids = {}, reverse = {}
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":148
 *         Py_ssize_t i, n = len(values)
 *         ndarray[int32_t] labels = np.empty(n, dtype=np.int32)
 *         ndarray[int32_t] counts = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 *         dict ids = {}, reverse = {}
 *         int32_t idx
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__int32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_8 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":149
 *         ndarray[int32_t] labels = np.empty(n, dtype=np.int32)
 *         ndarray[int32_t] counts = np.empty(n, dtype=np.int32)
 *         dict ids = {}, reverse = {}             # <<<<<<<<<<<<<<
 *         int32_t idx
 *         object val
 */
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  __pyx_v_ids = __pyx_t_5;
  __pyx_t_5 = 0;
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  __pyx_v_reverse = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":152
 *         int32_t idx
 *         object val
 *         int32_t count = 0             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":154
 *         int32_t count = 0
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         val = values[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":155
 * 
 *     for i from 0 <= i < n:
 *         val = values[i]             # <<<<<<<<<<<<<<
 * 
 *         # is NaN
 */
    __pyx_t_9 = __pyx_v_i;
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":158
 * 
 *         # is NaN
 *         if val != val:             # <<<<<<<<<<<<<<
 *             labels[i] = -1
 *             continue
 */
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_10) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":159
 *         # is NaN
 *         if val != val:
 *             labels[i] = -1             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
      __pyx_t_11 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_labels.diminfo[0].strides) = -1;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":160
 *         if val != val:
 *             labels[i] = -1
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         # for large number of groups, not doing try: except: makes a big
 */
      goto __pyx_L3_continue;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":164
 *         # for large number of groups, not doing try: except: makes a big
 *         # difference
 *         if val in ids:             # <<<<<<<<<<<<<<
 *             idx = ids[val]
 *             labels[i] = idx
 */
    __pyx_t_10 = ((PyDict_Contains(((PyObject *)__pyx_v_ids), __pyx_v_val))); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_10) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":165
 *         # difference
 *         if val in ids:
 *             idx = ids[val]             # <<<<<<<<<<<<<<
 *             labels[i] = idx
 *             counts[idx] = counts[idx] + 1
 */
      __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_ids), __pyx_v_val); if (!__pyx_t_5) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_12 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_5); if (unlikely((__pyx_t_12 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_idx = __pyx_t_12;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":166
 *         if val in ids:
 *             idx = ids[val]
 *             labels[i] = idx             # <<<<<<<<<<<<<<
 *             counts[idx] = counts[idx] + 1
 *         else:
 */
      __pyx_t_13 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":167
 *             idx = ids[val]
 *             labels[i] = idx
 *             counts[idx] = counts[idx] + 1             # <<<<<<<<<<<<<<
 *         else:
 *             ids[val] = count
 */
      __pyx_t_12 = __pyx_v_idx;
      __pyx_t_14 = __pyx_v_idx;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_counts.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_counts.diminfo[0].strides)) + 1);
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":169
 *             counts[idx] = counts[idx] + 1
 *         else:
 *             ids[val] = count             # <<<<<<<<<<<<<<
 *             reverse[count] = val
 *             labels[i] = count
 */
      __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(((PyObject *)__pyx_v_ids), __pyx_v_val, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":170
 *         else:
 *             ids[val] = count
 *             reverse[count] = val             # <<<<<<<<<<<<<<
 *             labels[i] = count
 *             counts[count] = 1
 */
      if (__Pyx_SetItemInt(((PyObject *)__pyx_v_reverse), __pyx_v_count, __pyx_v_val, sizeof(__pyx_t_5numpy_int32_t), __Pyx_PyInt_to_py_npy_int32) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":171
 *             ids[val] = count
 *             reverse[count] = val
 *             labels[i] = count             # <<<<<<<<<<<<<<
 *             counts[count] = 1
 *             count += 1
 */
      __pyx_t_15 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":172
 *             reverse[count] = val
 *             labels[i] = count
 *             counts[count] = 1             # <<<<<<<<<<<<<<
 *             count += 1
 * 
 */
      __pyx_t_16 = __pyx_v_count;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_counts.diminfo[0].strides) = 1;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":173
 *             labels[i] = count
 *             counts[count] = 1
 *             count += 1             # <<<<<<<<<<<<<<
 * 
 *     return reverse, labels, counts[:count].copy()
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L6:;
    __pyx_L3_continue:;
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":175
 *             count += 1
 * 
 *     return reverse, labels, counts[:count].copy()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_counts), 0, __pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__copy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_v_reverse));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_reverse));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_reverse));
  __Pyx_INCREF(((PyObject *)__pyx_v_labels));
  PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_labels));
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = ((PyObject *)__pyx_t_6);
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.group_labels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_labels);
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XDECREF(__pyx_v_ids);
  __Pyx_XDECREF(__pyx_v_reverse);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_61get_unique_labels(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_61get_unique_labels = {__Pyx_NAMESTR("get_unique_labels"), (PyCFunction)__pyx_pw_6pandas_8_tseries_61get_unique_labels, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_61get_unique_labels(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_idMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__idMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_unique_labels (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__idMap);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_unique_labels", 1, 2, 2, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_unique_labels") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_idMap = ((PyObject*)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_idMap = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_unique_labels", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.get_unique_labels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_idMap), (&PyDict_Type), 1, "idMap", 1))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_60get_unique_labels(__pyx_self, __pyx_v_values, __pyx_v_idMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":180
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def get_unique_labels(ndarray[object] values, dict idMap):             # <<<<<<<<<<<<<<
 *     cdef int i, length
 *     cdef object idx
 */

static PyObject *__pyx_pf_6pandas_8_tseries_60get_unique_labels(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_idMap) {
  int __pyx_v_i;
  int __pyx_v_length;
  PyObject *__pyx_v_idx = 0;
  PyArrayObject *__pyx_v_fillVec = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fillVec;
  __Pyx_Buffer __pyx_pybuffer_fillVec;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  __pyx_t_5numpy_int32_t __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_unique_labels");
  __pyx_pybuffer_fillVec.pybuffer.buf = NULL;
  __pyx_pybuffer_fillVec.refcount = 0;
  __pyx_pybuffernd_fillVec.data = NULL;
  __pyx_pybuffernd_fillVec.rcbuffer = &__pyx_pybuffer_fillVec;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":184
 *     cdef object idx
 *     cdef ndarray[int32_t] fillVec
 *     length = len(values)             # <<<<<<<<<<<<<<
 *     fillVec = np.empty(length, dtype=np.int32)
 *     for i from 0 <= i < length:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_length = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":185
 *     cdef ndarray[int32_t] fillVec
 *     length = len(values)
 *     fillVec = np.empty(length, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < length:
 *         idx = values[i]
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromLong(__pyx_v_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fillVec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fillVec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fillVec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fillVec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fillVec.diminfo[0].strides = __pyx_pybuffernd_fillVec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fillVec.diminfo[0].shape = __pyx_pybuffernd_fillVec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fillVec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":186
 *     length = len(values)
 *     fillVec = np.empty(length, dtype=np.int32)
 *     for i from 0 <= i < length:             # <<<<<<<<<<<<<<
 *         idx = values[i]
 *         fillVec[i] = idMap[idx]
 */
  __pyx_t_8 = __pyx_v_length;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":187
 *     fillVec = np.empty(length, dtype=np.int32)
 *     for i from 0 <= i < length:
 *         idx = values[i]             # <<<<<<<<<<<<<<
 *         fillVec[i] = idMap[idx]
 * 
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_XDECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":188
 *     for i from 0 <= i < length:
 *         idx = values[i]
 *         fillVec[i] = idMap[idx]             # <<<<<<<<<<<<<<
 * 
 *     return fillVec
 */
    __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_idMap), __pyx_v_idx); if (!__pyx_t_6) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_13 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_6); if (unlikely((__pyx_t_13 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_14 = __pyx_v_i;
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fillVec.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_fillVec.diminfo[0].strides) = __pyx_t_13;
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":190
 *         fillVec[i] = idMap[idx]
 * 
 *     return fillVec             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fillVec));
  __pyx_r = ((PyObject *)__pyx_v_fillVec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fillVec.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.get_unique_labels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fillVec.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF((PyObject *)__pyx_v_fillVec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_63groupsort_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_63groupsort_indexer = {__Pyx_NAMESTR("groupsort_indexer"), (PyCFunction)__pyx_pw_6pandas_8_tseries_63groupsort_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_63groupsort_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  Py_ssize_t __pyx_v_ngroups;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__ngroups,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("groupsort_indexer (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ngroups);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("groupsort_indexer", 1, 2, 2, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupsort_indexer") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_index = ((PyArrayObject *)values[0]);
      __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_index = ((PyArrayObject *)values[0]);
    __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("groupsort_indexer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.groupsort_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_62groupsort_indexer(__pyx_self, __pyx_v_index, __pyx_v_ngroups);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":194
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def groupsort_indexer(ndarray[int32_t] index, Py_ssize_t ngroups):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, loc, label, n
 */

static PyObject *__pyx_pf_6pandas_8_tseries_62groupsort_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, Py_ssize_t __pyx_v_ngroups) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_label;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_counts = 0;
  PyArrayObject *__pyx_v_where = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_where;
  __Pyx_Buffer __pyx_pybuffer_where;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  __pyx_t_5numpy_int32_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("groupsort_indexer");
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_where.pybuffer.buf = NULL;
  __pyx_pybuffer_where.refcount = 0;
  __pyx_pybuffernd_where.data = NULL;
  __pyx_pybuffernd_where.rcbuffer = &__pyx_pybuffer_where;
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":200
 * 
 *     # count group sizes, location 0 for NA
 *     counts = np.zeros(ngroups + 1, dtype='i4')             # <<<<<<<<<<<<<<
 *     n = len(index)
 *     for i from 0 <= i < n:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t((__pyx_v_ngroups + 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":201
 *     # count group sizes, location 0 for NA
 *     counts = np.zeros(ngroups + 1, dtype='i4')
 *     n = len(index)             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         counts[index[i] + 1] += 1
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_10;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":202
 *     counts = np.zeros(ngroups + 1, dtype='i4')
 *     n = len(index)
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         counts[index[i] + 1] += 1
 * 
 */
  __pyx_t_10 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_10; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":203
 *     n = len(index)
 *     for i from 0 <= i < n:
 *         counts[index[i] + 1] += 1             # <<<<<<<<<<<<<<
 * 
 *     # mark the start of each contiguous group of like-indexed data
 */
    __pyx_t_11 = __pyx_v_i;
    __pyx_t_12 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_index.diminfo[0].strides)) + 1);
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_counts.diminfo[0].strides) += 1;
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":206
 * 
 *     # mark the start of each contiguous group of like-indexed data
 *     where = np.zeros(ngroups + 1, dtype='i4')             # <<<<<<<<<<<<<<
 *     for i from 1 <= i < ngroups + 1:
 *         where[i] = where[i - 1] + counts[i - 1]
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__zeros); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromSsize_t((__pyx_v_ngroups + 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_where.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_where.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_where.rcbuffer->pybuffer, (PyObject*)__pyx_v_where, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      }
    }
    __pyx_pybuffernd_where.diminfo[0].strides = __pyx_pybuffernd_where.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_where.diminfo[0].shape = __pyx_pybuffernd_where.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_where = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":207
 *     # mark the start of each contiguous group of like-indexed data
 *     where = np.zeros(ngroups + 1, dtype='i4')
 *     for i from 1 <= i < ngroups + 1:             # <<<<<<<<<<<<<<
 *         where[i] = where[i - 1] + counts[i - 1]
 * 
 */
  __pyx_t_10 = (__pyx_v_ngroups + 1);
  for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_10; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":208
 *     where = np.zeros(ngroups + 1, dtype='i4')
 *     for i from 1 <= i < ngroups + 1:
 *         where[i] = where[i - 1] + counts[i - 1]             # <<<<<<<<<<<<<<
 * 
 *     # this is our indexer
 */
    __pyx_t_13 = (__pyx_v_i - 1);
    __pyx_t_14 = (__pyx_v_i - 1);
    __pyx_t_15 = __pyx_v_i;
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_where.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_where.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_where.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_where.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_counts.diminfo[0].strides)));
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":211
 * 
 *     # this is our indexer
 *     result = np.zeros(n, dtype='i4')             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         label = index[i] + 1
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":212
 *     # this is our indexer
 *     result = np.zeros(n, dtype='i4')
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         label = index[i] + 1
 *         result[where[label]] = i
 */
  __pyx_t_10 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_10; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":213
 *     result = np.zeros(n, dtype='i4')
 *     for i from 0 <= i < n:
 *         label = index[i] + 1             # <<<<<<<<<<<<<<
 *         result[where[label]] = i
 *         where[label] += 1
 */
    __pyx_t_16 = __pyx_v_i;
    __pyx_v_label = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_index.diminfo[0].strides)) + 1);

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":214
 *     for i from 0 <= i < n:
 *         label = index[i] + 1
 *         result[where[label]] = i             # <<<<<<<<<<<<<<
 *         where[label] += 1
 * 
 */
    __pyx_t_17 = __pyx_v_label;
    __pyx_t_18 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_where.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_where.diminfo[0].strides));
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_i;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":215
 *         label = index[i] + 1
 *         result[where[label]] = i
 *         where[label] += 1             # <<<<<<<<<<<<<<
 * 
 *     return result, counts
 */
    __pyx_t_19 = __pyx_v_label;
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_where.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_where.diminfo[0].strides) += 1;
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":217
 *         where[label] += 1
 * 
 *     return result, counts             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __Pyx_INCREF(((PyObject *)__pyx_v_counts));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_counts));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_where.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupsort_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_where.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XDECREF((PyObject *)__pyx_v_where);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_65group_add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_64group_add[] = "\n    Only aggregates on axis=0\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_65group_add = {__Pyx_NAMESTR("group_add"), (PyCFunction)__pyx_pw_6pandas_8_tseries_65group_add, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_64group_add)};
static PyObject *__pyx_pw_6pandas_8_tseries_65group_add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_v_counts = 0;
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_labels = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("group_add (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("group_add", 1, 4, 4, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("group_add", 1, 4, 4, 2); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("group_add", 1, 4, 4, 3); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_add") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_out = ((PyArrayObject *)values[0]);
      __pyx_v_counts = ((PyArrayObject *)values[1]);
      __pyx_v_values = ((PyArrayObject *)values[2]);
      __pyx_v_labels = ((PyArrayObject *)values[3]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_out = ((PyArrayObject *)values[0]);
    __pyx_v_counts = ((PyArrayObject *)values[1]);
    __pyx_v_values = ((PyArrayObject *)values[2]);
    __pyx_v_labels = ((PyArrayObject *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("group_add", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.group_add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_64group_add(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":224
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def group_add(ndarray[float64_t, ndim=2] out,             # <<<<<<<<<<<<<<
 *               ndarray[int32_t] counts,
 *               ndarray[float64_t, ndim=2] values,
 */

static PyObject *__pyx_pf_6pandas_8_tseries_64group_add(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  Py_ssize_t __pyx_v_K;
  Py_ssize_t __pyx_v_lab;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  PyArrayObject *__pyx_v_sumx = 0;
  PyArrayObject *__pyx_v_nobs = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx;
  __Pyx_Buffer __pyx_pybuffer_sumx;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs;
  __Pyx_Buffer __pyx_pybuffer_nobs;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyArrayObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  long __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  long __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  long __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  Py_ssize_t __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  Py_ssize_t __pyx_t_36;
  Py_ssize_t __pyx_t_37;
  Py_ssize_t __pyx_t_38;
  Py_ssize_t __pyx_t_39;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("group_add");
  __pyx_pybuffer_sumx.pybuffer.buf = NULL;
  __pyx_pybuffer_sumx.refcount = 0;
  __pyx_pybuffernd_sumx.data = NULL;
  __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx;
  __pyx_pybuffer_nobs.pybuffer.buf = NULL;
  __pyx_pybuffer_nobs.refcount = 0;
  __pyx_pybuffernd_nobs.data = NULL;
  __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":236
 *         ndarray[float64_t, ndim=2] sumx, nobs
 * 
 *     nobs = np.zeros_like(out)             # <<<<<<<<<<<<<<
 *     sumx = np.zeros_like(out)
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 0)) {
      PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = 0;
  __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":237
 * 
 *     nobs = np.zeros_like(out)
 *     sumx = np.zeros_like(out)             # <<<<<<<<<<<<<<
 * 
 *     N, K = (<object> values).shape
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_6);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
      }
    }
    __pyx_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = 0;
  __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":239
 *     sumx = np.zeros_like(out)
 * 
 *     N, K = (<object> values).shape             # <<<<<<<<<<<<<<
 * 
 *     if K > 1:
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_1 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[5]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_N = __pyx_t_11;
  __pyx_v_K = __pyx_t_12;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":241
 *     N, K = (<object> values).shape
 * 
 *     if K > 1:             # <<<<<<<<<<<<<<
 *         for i in range(N):
 *             lab = labels[i]
 */
  __pyx_t_13 = (__pyx_v_K > 1);
  if (__pyx_t_13) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":242
 * 
 *     if K > 1:
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             lab = labels[i]
 *             if lab < 0:
 */
    __pyx_t_12 = __pyx_v_N;
    for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_12; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":243
 *     if K > 1:
 *         for i in range(N):
 *             lab = labels[i]             # <<<<<<<<<<<<<<
 *             if lab < 0:
 *                 continue
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":244
 *         for i in range(N):
 *             lab = labels[i]
 *             if lab < 0:             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      __pyx_t_13 = (__pyx_v_lab < 0);
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":245
 *             lab = labels[i]
 *             if lab < 0:
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             counts[lab] += 1
 */
        goto __pyx_L6_continue;
        goto __pyx_L8;
      }
      __pyx_L8:;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":247
 *                 continue
 * 
 *             counts[lab] += 1             # <<<<<<<<<<<<<<
 *             for j in range(K):
 *                 val = values[i, j]
 */
      __pyx_t_15 = __pyx_v_lab;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":248
 * 
 *             counts[lab] += 1
 *             for j in range(K):             # <<<<<<<<<<<<<<
 *                 val = values[i, j]
 * 
 */
      __pyx_t_16 = __pyx_v_K;
      for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
        __pyx_v_j = __pyx_t_17;

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":249
 *             counts[lab] += 1
 *             for j in range(K):
 *                 val = values[i, j]             # <<<<<<<<<<<<<<
 * 
 *                 # not nan
 */
        __pyx_t_18 = __pyx_v_i;
        __pyx_t_19 = __pyx_v_j;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides));

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":252
 * 
 *                 # not nan
 *                 if val == val:             # <<<<<<<<<<<<<<
 *                     nobs[lab, j] += 1
 *                     sumx[lab, j] += val
 */
        __pyx_t_13 = (__pyx_v_val == __pyx_v_val);
        if (__pyx_t_13) {

          /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":253
 *                 # not nan
 *                 if val == val:
 *                     nobs[lab, j] += 1             # <<<<<<<<<<<<<<
 *                     sumx[lab, j] += val
 *     else:
 */
          __pyx_t_20 = __pyx_v_lab;
          __pyx_t_21 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1;

          /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":254
 *                 if val == val:
 *                     nobs[lab, j] += 1
 *                     sumx[lab, j] += val             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(N):
 */
          __pyx_t_22 = __pyx_v_lab;
          __pyx_t_23 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val;
          goto __pyx_L11;
        }
        __pyx_L11:;
      }
      __pyx_L6_continue:;
    }
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":256
 *                     sumx[lab, j] += val
 *     else:
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             lab = labels[i]
 *             if lab < 0:
 */
    __pyx_t_12 = __pyx_v_N;
    for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_12; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":257
 *     else:
 *         for i in range(N):
 *             lab = labels[i]             # <<<<<<<<<<<<<<
 *             if lab < 0:
 *                 continue
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":258
 *         for i in range(N):
 *             lab = labels[i]
 *             if lab < 0:             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      __pyx_t_13 = (__pyx_v_lab < 0);
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":259
 *             lab = labels[i]
 *             if lab < 0:
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             counts[lab] += 1
 */
        goto __pyx_L12_continue;
        goto __pyx_L14;
      }
      __pyx_L14:;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":261
 *                 continue
 * 
 *             counts[lab] += 1             # <<<<<<<<<<<<<<
 *             val = values[i, 0]
 * 
 */
      __pyx_t_17 = __pyx_v_lab;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":262
 * 
 *             counts[lab] += 1
 *             val = values[i, 0]             # <<<<<<<<<<<<<<
 * 
 *             # not nan
 */
      __pyx_t_24 = __pyx_v_i;
      __pyx_t_25 = 0;
      __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides));

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":265
 * 
 *             # not nan
 *             if val == val:             # <<<<<<<<<<<<<<
 *                 nobs[lab, 0] += 1
 *                 sumx[lab, 0] += val
 */
      __pyx_t_13 = (__pyx_v_val == __pyx_v_val);
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":266
 *             # not nan
 *             if val == val:
 *                 nobs[lab, 0] += 1             # <<<<<<<<<<<<<<
 *                 sumx[lab, 0] += val
 * 
 */
        __pyx_t_26 = __pyx_v_lab;
        __pyx_t_27 = 0;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1;

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":267
 *             if val == val:
 *                 nobs[lab, 0] += 1
 *                 sumx[lab, 0] += val             # <<<<<<<<<<<<<<
 * 
 *     for i in range(len(counts)):
 */
        __pyx_t_28 = __pyx_v_lab;
        __pyx_t_29 = 0;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val;
        goto __pyx_L15;
      }
      __pyx_L15:;
      __pyx_L12_continue:;
    }
  }
  __pyx_L5:;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":269
 *                 sumx[lab, 0] += val
 * 
 *     for i in range(len(counts)):             # <<<<<<<<<<<<<<
 *         for j in range(K):
 *             if nobs[i, j] == 0:
 */
  __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_12; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":270
 * 
 *     for i in range(len(counts)):
 *         for j in range(K):             # <<<<<<<<<<<<<<
 *             if nobs[i, j] == 0:
 *                 out[i, j] = nan
 */
    __pyx_t_30 = __pyx_v_K;
    for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_30; __pyx_t_31+=1) {
      __pyx_v_j = __pyx_t_31;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":271
 *     for i in range(len(counts)):
 *         for j in range(K):
 *             if nobs[i, j] == 0:             # <<<<<<<<<<<<<<
 *                 out[i, j] = nan
 *             else:
 */
      __pyx_t_32 = __pyx_v_i;
      __pyx_t_33 = __pyx_v_j;
      __pyx_t_13 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0);
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":272
 *         for j in range(K):
 *             if nobs[i, j] == 0:
 *                 out[i, j] = nan             # <<<<<<<<<<<<<<
 *             else:
 *                 out[i, j] = sumx[i, j]
 */
        __pyx_t_34 = __pyx_v_i;
        __pyx_t_35 = __pyx_v_j;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_8_tseries_nan;
        goto __pyx_L20;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":274
 *                 out[i, j] = nan
 *             else:
 *                 out[i, j] = sumx[i, j]             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
        __pyx_t_36 = __pyx_v_i;
        __pyx_t_37 = __pyx_v_j;
        __pyx_t_38 = __pyx_v_i;
        __pyx_t_39 = __pyx_v_j;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_sumx.diminfo[1].strides));
      }
      __pyx_L20:;
    }
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.group_add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_sumx);
  __Pyx_XDECREF((PyObject *)__pyx_v_nobs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_67group_mean(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_67group_mean = {__Pyx_NAMESTR("group_mean"), (PyCFunction)__pyx_pw_6pandas_8_tseries_67group_mean, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_67group_mean(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_v_counts = 0;
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_labels = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("group_mean (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("group_mean", 1, 4, 4, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("group_mean", 1, 4, 4, 2); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("group_mean", 1, 4, 4, 3); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_mean") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_out = ((PyArrayObject *)values[0]);
      __pyx_v_counts = ((PyArrayObject *)values[1]);
      __pyx_v_values = ((PyArrayObject *)values[2]);
      __pyx_v_labels = ((PyArrayObject *)values[3]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_out = ((PyArrayObject *)values[0]);
    __pyx_v_counts = ((PyArrayObject *)values[1]);
    __pyx_v_values = ((PyArrayObject *)values[2]);
    __pyx_v_labels = ((PyArrayObject *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("group_mean", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.group_mean", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_66group_mean(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":278
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def group_mean(ndarray[float64_t, ndim=2] out,             # <<<<<<<<<<<<<<
 *                ndarray[int32_t] counts,
 *                ndarray[float64_t, ndim=2] values,
 */

static PyObject *__pyx_pf_6pandas_8_tseries_66group_mean(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  Py_ssize_t __pyx_v_K;
  Py_ssize_t __pyx_v_lab;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  __pyx_t_5numpy_float64_t __pyx_v_count;
  PyArrayObject *__pyx_v_sumx = 0;
  PyArrayObject *__pyx_v_nobs = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx;
  __Pyx_Buffer __pyx_pybuffer_sumx;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs;
  __Pyx_Buffer __pyx_pybuffer_nobs;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyArrayObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  long __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  long __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  long __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  Py_ssize_t __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  Py_ssize_t __pyx_t_36;
  Py_ssize_t __pyx_t_37;
  Py_ssize_t __pyx_t_38;
  Py_ssize_t __pyx_t_39;
  __pyx_t_5numpy_float64_t __pyx_t_40;
  Py_ssize_t __pyx_t_41;
  Py_ssize_t __pyx_t_42;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("group_mean");
  __pyx_pybuffer_sumx.pybuffer.buf = NULL;
  __pyx_pybuffer_sumx.refcount = 0;
  __pyx_pybuffernd_sumx.data = NULL;
  __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx;
  __pyx_pybuffer_nobs.pybuffer.buf = NULL;
  __pyx_pybuffer_nobs.refcount = 0;
  __pyx_pybuffernd_nobs.data = NULL;
  __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":287
 *         ndarray[float64_t, ndim=2] sumx, nobs
 * 
 *     nobs = np.zeros_like(out)             # <<<<<<<<<<<<<<
 *     sumx = np.zeros_like(out)
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 0)) {
      PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = 0;
  __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":288
 * 
 *     nobs = np.zeros_like(out)
 *     sumx = np.zeros_like(out)             # <<<<<<<<<<<<<<
 * 
 *     N, K = (<object> values).shape
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_6);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
      }
    }
    __pyx_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = 0;
  __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":290
 *     sumx = np.zeros_like(out)
 * 
 *     N, K = (<object> values).shape             # <<<<<<<<<<<<<<
 * 
 *     if K > 1:
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_1 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[5]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_N = __pyx_t_11;
  __pyx_v_K = __pyx_t_12;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":292
 *     N, K = (<object> values).shape
 * 
 *     if K > 1:             # <<<<<<<<<<<<<<
 *         for i in range(N):
 *             lab = labels[i]
 */
  __pyx_t_13 = (__pyx_v_K > 1);
  if (__pyx_t_13) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":293
 * 
 *     if K > 1:
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             lab = labels[i]
 *             if lab < 0:
 */
    __pyx_t_12 = __pyx_v_N;
    for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_12; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":294
 *     if K > 1:
 *         for i in range(N):
 *             lab = labels[i]             # <<<<<<<<<<<<<<
 *             if lab < 0:
 *                 continue
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":295
 *         for i in range(N):
 *             lab = labels[i]
 *             if lab < 0:             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      __pyx_t_13 = (__pyx_v_lab < 0);
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":296
 *             lab = labels[i]
 *             if lab < 0:
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             counts[lab] += 1
 */
        goto __pyx_L6_continue;
        goto __pyx_L8;
      }
      __pyx_L8:;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":298
 *                 continue
 * 
 *             counts[lab] += 1             # <<<<<<<<<<<<<<
 *             for j in range(K):
 *                 val = values[i, j]
 */
      __pyx_t_15 = __pyx_v_lab;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":299
 * 
 *             counts[lab] += 1
 *             for j in range(K):             # <<<<<<<<<<<<<<
 *                 val = values[i, j]
 *                 # not nan
 */
      __pyx_t_16 = __pyx_v_K;
      for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
        __pyx_v_j = __pyx_t_17;

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":300
 *             counts[lab] += 1
 *             for j in range(K):
 *                 val = values[i, j]             # <<<<<<<<<<<<<<
 *                 # not nan
 *                 if val == val:
 */
        __pyx_t_18 = __pyx_v_i;
        __pyx_t_19 = __pyx_v_j;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides));

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":302
 *                 val = values[i, j]
 *                 # not nan
 *                 if val == val:             # <<<<<<<<<<<<<<
 *                     nobs[lab, j] += 1
 *                     sumx[lab, j] += val
 */
        __pyx_t_13 = (__pyx_v_val == __pyx_v_val);
        if (__pyx_t_13) {

          /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":303
 *                 # not nan
 *                 if val == val:
 *                     nobs[lab, j] += 1             # <<<<<<<<<<<<<<
 *                     sumx[lab, j] += val
 *     else:
 */
          __pyx_t_20 = __pyx_v_lab;
          __pyx_t_21 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1;

          /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":304
 *                 if val == val:
 *                     nobs[lab, j] += 1
 *                     sumx[lab, j] += val             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(N):
 */
          __pyx_t_22 = __pyx_v_lab;
          __pyx_t_23 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val;
          goto __pyx_L11;
        }
        __pyx_L11:;
      }
      __pyx_L6_continue:;
    }
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":306
 *                     sumx[lab, j] += val
 *     else:
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             lab = labels[i]
 *             if lab < 0:
 */
    __pyx_t_12 = __pyx_v_N;
    for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_12; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":307
 *     else:
 *         for i in range(N):
 *             lab = labels[i]             # <<<<<<<<<<<<<<
 *             if lab < 0:
 *                 continue
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":308
 *         for i in range(N):
 *             lab = labels[i]
 *             if lab < 0:             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      __pyx_t_13 = (__pyx_v_lab < 0);
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":309
 *             lab = labels[i]
 *             if lab < 0:
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             counts[lab] += 1
 */
        goto __pyx_L12_continue;
        goto __pyx_L14;
      }
      __pyx_L14:;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":311
 *                 continue
 * 
 *             counts[lab] += 1             # <<<<<<<<<<<<<<
 *             val = values[i, 0]
 *             # not nan
 */
      __pyx_t_17 = __pyx_v_lab;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":312
 * 
 *             counts[lab] += 1
 *             val = values[i, 0]             # <<<<<<<<<<<<<<
 *             # not nan
 *             if val == val:
 */
      __pyx_t_24 = __pyx_v_i;
      __pyx_t_25 = 0;
      __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides));

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":314
 *             val = values[i, 0]
 *             # not nan
 *             if val == val:             # <<<<<<<<<<<<<<
 *                 nobs[lab, 0] += 1
 *                 sumx[lab, 0] += val
 */
      __pyx_t_13 = (__pyx_v_val == __pyx_v_val);
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":315
 *             # not nan
 *             if val == val:
 *                 nobs[lab, 0] += 1             # <<<<<<<<<<<<<<
 *                 sumx[lab, 0] += val
 * 
 */
        __pyx_t_26 = __pyx_v_lab;
        __pyx_t_27 = 0;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1;

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":316
 *             if val == val:
 *                 nobs[lab, 0] += 1
 *                 sumx[lab, 0] += val             # <<<<<<<<<<<<<<
 * 
 *     for i in range(len(counts)):
 */
        __pyx_t_28 = __pyx_v_lab;
        __pyx_t_29 = 0;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val;
        goto __pyx_L15;
      }
      __pyx_L15:;
      __pyx_L12_continue:;
    }
  }
  __pyx_L5:;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":318
 *                 sumx[lab, 0] += val
 * 
 *     for i in range(len(counts)):             # <<<<<<<<<<<<<<
 *         for j in range(K):
 *             count = nobs[i, j]
 */
  __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_12; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":319
 * 
 *     for i in range(len(counts)):
 *         for j in range(K):             # <<<<<<<<<<<<<<
 *             count = nobs[i, j]
 *             if nobs[i, j] == 0:
 */
    __pyx_t_30 = __pyx_v_K;
    for (__pyx_t_31 = 0; __pyx_t_31 < __pyx_t_30; __pyx_t_31+=1) {
      __pyx_v_j = __pyx_t_31;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":320
 *     for i in range(len(counts)):
 *         for j in range(K):
 *             count = nobs[i, j]             # <<<<<<<<<<<<<<
 *             if nobs[i, j] == 0:
 *                 out[i, j] = nan
 */
      __pyx_t_32 = __pyx_v_i;
      __pyx_t_33 = __pyx_v_j;
      __pyx_v_count = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_nobs.diminfo[1].strides));

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":321
 *         for j in range(K):
 *             count = nobs[i, j]
 *             if nobs[i, j] == 0:             # <<<<<<<<<<<<<<
 *                 out[i, j] = nan
 *             else:
 */
      __pyx_t_34 = __pyx_v_i;
      __pyx_t_35 = __pyx_v_j;
      __pyx_t_13 = ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_nobs.diminfo[1].strides)) == 0.0);
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":322
 *             count = nobs[i, j]
 *             if nobs[i, j] == 0:
 *                 out[i, j] = nan             # <<<<<<<<<<<<<<
 *             else:
 *                 out[i, j] = sumx[i, j] / count
 */
        __pyx_t_36 = __pyx_v_i;
        __pyx_t_37 = __pyx_v_j;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_8_tseries_nan;
        goto __pyx_L20;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":324
 *                 out[i, j] = nan
 *             else:
 *                 out[i, j] = sumx[i, j] / count             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
        __pyx_t_38 = __pyx_v_i;
        __pyx_t_39 = __pyx_v_j;
        __pyx_t_40 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_sumx.diminfo[1].strides));
        if (unlikely(__pyx_v_count == 0)) {
          PyErr_Format(PyExc_ZeroDivisionError, "float division");
          {__pyx_filename = __pyx_f[5]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_41 = __pyx_v_i;
        __pyx_t_42 = __pyx_v_j;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_41, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_42, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_40 / __pyx_v_count);
      }
      __pyx_L20:;
    }
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.group_mean", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_sumx);
  __Pyx_XDECREF((PyObject *)__pyx_v_nobs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_69group_var(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_69group_var = {__Pyx_NAMESTR("group_var"), (PyCFunction)__pyx_pw_6pandas_8_tseries_69group_var, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_69group_var(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_out = 0;
  PyArrayObject *__pyx_v_counts = 0;
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_labels = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__out,&__pyx_n_s__counts,&__pyx_n_s__values,&__pyx_n_s__labels,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("group_var (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__counts);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("group_var", 1, 4, 4, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("group_var", 1, 4, 4, 2); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("group_var", 1, 4, 4, 3); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_var") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_out = ((PyArrayObject *)values[0]);
      __pyx_v_counts = ((PyArrayObject *)values[1]);
      __pyx_v_values = ((PyArrayObject *)values[2]);
      __pyx_v_labels = ((PyArrayObject *)values[3]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_out = ((PyArrayObject *)values[0]);
    __pyx_v_counts = ((PyArrayObject *)values[1]);
    __pyx_v_values = ((PyArrayObject *)values[2]);
    __pyx_v_labels = ((PyArrayObject *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("group_var", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.group_var", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_counts), __pyx_ptype_5numpy_ndarray, 1, "counts", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_68group_var(__pyx_self, __pyx_v_out, __pyx_v_counts, __pyx_v_values, __pyx_v_labels);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":328
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def group_var(ndarray[float64_t, ndim=2] out,             # <<<<<<<<<<<<<<
 *               ndarray[int32_t] counts,
 *               ndarray[float64_t, ndim=2] values,
 */

static PyObject *__pyx_pf_6pandas_8_tseries_68group_var(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_out, PyArrayObject *__pyx_v_counts, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_labels) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  Py_ssize_t __pyx_v_K;
  Py_ssize_t __pyx_v_lab;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  __pyx_t_5numpy_float64_t __pyx_v_ct;
  PyArrayObject *__pyx_v_nobs = 0;
  PyArrayObject *__pyx_v_sumx = 0;
  PyArrayObject *__pyx_v_sumxx = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sumx;
  __Pyx_Buffer __pyx_pybuffer_sumx;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_nobs;
  __Pyx_Buffer __pyx_pybuffer_nobs;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sumxx;
  __Pyx_Buffer __pyx_pybuffer_sumxx;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyArrayObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  long __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  long __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  long __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  long __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  Py_ssize_t __pyx_t_36;
  Py_ssize_t __pyx_t_37;
  Py_ssize_t __pyx_t_38;
  Py_ssize_t __pyx_t_39;
  Py_ssize_t __pyx_t_40;
  Py_ssize_t __pyx_t_41;
  Py_ssize_t __pyx_t_42;
  Py_ssize_t __pyx_t_43;
  Py_ssize_t __pyx_t_44;
  Py_ssize_t __pyx_t_45;
  __pyx_t_5numpy_float64_t __pyx_t_46;
  __pyx_t_5numpy_float64_t __pyx_t_47;
  Py_ssize_t __pyx_t_48;
  Py_ssize_t __pyx_t_49;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("group_var");
  __pyx_pybuffer_nobs.pybuffer.buf = NULL;
  __pyx_pybuffer_nobs.refcount = 0;
  __pyx_pybuffernd_nobs.data = NULL;
  __pyx_pybuffernd_nobs.rcbuffer = &__pyx_pybuffer_nobs;
  __pyx_pybuffer_sumx.pybuffer.buf = NULL;
  __pyx_pybuffer_sumx.refcount = 0;
  __pyx_pybuffernd_sumx.data = NULL;
  __pyx_pybuffernd_sumx.rcbuffer = &__pyx_pybuffer_sumx;
  __pyx_pybuffer_sumxx.pybuffer.buf = NULL;
  __pyx_pybuffer_sumxx.refcount = 0;
  __pyx_pybuffernd_sumxx.data = NULL;
  __pyx_pybuffernd_sumxx.rcbuffer = &__pyx_pybuffer_sumxx;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":337
 *         ndarray[float64_t, ndim=2] nobs, sumx, sumxx
 * 
 *     nobs = np.zeros_like(out)             # <<<<<<<<<<<<<<
 *     sumx = np.zeros_like(out)
 *     sumxx = np.zeros_like(out)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 0)) {
      PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer, (PyObject*)__pyx_v_nobs, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_nobs.diminfo[0].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nobs.diminfo[0].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nobs.diminfo[1].strides = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nobs.diminfo[1].shape = __pyx_pybuffernd_nobs.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = 0;
  __pyx_v_nobs = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":338
 * 
 *     nobs = np.zeros_like(out)
 *     sumx = np.zeros_like(out)             # <<<<<<<<<<<<<<
 *     sumxx = np.zeros_like(out)
 * 
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_6);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
      }
    }
    __pyx_pybuffernd_sumx.diminfo[0].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumx.diminfo[0].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumx.diminfo[1].strides = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumx.diminfo[1].shape = __pyx_pybuffernd_sumx.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = 0;
  __pyx_v_sumx = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":339
 *     nobs = np.zeros_like(out)
 *     sumx = np.zeros_like(out)
 *     sumxx = np.zeros_like(out)             # <<<<<<<<<<<<<<
 * 
 *     N, K = (<object> values).shape
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__zeros_like); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_out));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_out));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_out));
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer);
    __pyx_t_5 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_t_4, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_5 < 0)) {
      PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer, (PyObject*)__pyx_v_sumxx, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_sumxx.diminfo[0].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sumxx.diminfo[0].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_sumxx.diminfo[1].strides = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_sumxx.diminfo[1].shape = __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_4 = 0;
  __pyx_v_sumxx = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":341
 *     sumxx = np.zeros_like(out)
 * 
 *     N, K = (<object> values).shape             # <<<<<<<<<<<<<<
 * 
 *     if K > 1:
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[5]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_N = __pyx_t_11;
  __pyx_v_K = __pyx_t_12;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":343
 *     N, K = (<object> values).shape
 * 
 *     if K > 1:             # <<<<<<<<<<<<<<
 *         for i in range(N):
 * 
 */
  __pyx_t_13 = (__pyx_v_K > 1);
  if (__pyx_t_13) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":344
 * 
 *     if K > 1:
 *         for i in range(N):             # <<<<<<<<<<<<<<
 * 
 *             lab = labels[i]
 */
    __pyx_t_12 = __pyx_v_N;
    for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_12; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":346
 *         for i in range(N):
 * 
 *             lab = labels[i]             # <<<<<<<<<<<<<<
 *             if lab < 0:
 *                 continue
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":347
 * 
 *             lab = labels[i]
 *             if lab < 0:             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      __pyx_t_13 = (__pyx_v_lab < 0);
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":348
 *             lab = labels[i]
 *             if lab < 0:
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             counts[lab] += 1
 */
        goto __pyx_L6_continue;
        goto __pyx_L8;
      }
      __pyx_L8:;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":350
 *                 continue
 * 
 *             counts[lab] += 1             # <<<<<<<<<<<<<<
 * 
 *             for j in range(K):
 */
      __pyx_t_15 = __pyx_v_lab;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) += 1;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":352
 *             counts[lab] += 1
 * 
 *             for j in range(K):             # <<<<<<<<<<<<<<
 *                 val = values[i, j]
 * 
 */
      __pyx_t_16 = __pyx_v_K;
      for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
        __pyx_v_j = __pyx_t_17;

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":353
 * 
 *             for j in range(K):
 *                 val = values[i, j]             # <<<<<<<<<<<<<<
 * 
 *                 # not nan
 */
        __pyx_t_18 = __pyx_v_i;
        __pyx_t_19 = __pyx_v_j;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides));

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":356
 * 
 *                 # not nan
 *                 if val == val:             # <<<<<<<<<<<<<<
 *                     nobs[lab, j] += 1
 *                     sumx[lab, j] += val
 */
        __pyx_t_13 = (__pyx_v_val == __pyx_v_val);
        if (__pyx_t_13) {

          /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":357
 *                 # not nan
 *                 if val == val:
 *                     nobs[lab, j] += 1             # <<<<<<<<<<<<<<
 *                     sumx[lab, j] += val
 *                     sumxx[lab, j] += val * val
 */
          __pyx_t_20 = __pyx_v_lab;
          __pyx_t_21 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1;

          /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":358
 *                 if val == val:
 *                     nobs[lab, j] += 1
 *                     sumx[lab, j] += val             # <<<<<<<<<<<<<<
 *                     sumxx[lab, j] += val * val
 *     else:
 */
          __pyx_t_22 = __pyx_v_lab;
          __pyx_t_23 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val;

          /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":359
 *                     nobs[lab, j] += 1
 *                     sumx[lab, j] += val
 *                     sumxx[lab, j] += val * val             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(N):
 */
          __pyx_t_24 = __pyx_v_lab;
          __pyx_t_25 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val);
          goto __pyx_L11;
        }
        __pyx_L11:;
      }
      __pyx_L6_continue:;
    }
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":361
 *                     sumxx[lab, j] += val * val
 *     else:
 *         for i in range(N):             # <<<<<<<<<<<<<<
 * 
 *             lab = labels[i]
 */
    __pyx_t_12 = __pyx_v_N;
    for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_12; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":363
 *         for i in range(N):
 * 
 *             lab = labels[i]             # <<<<<<<<<<<<<<
 *             if lab < 0:
 *                 continue
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":364
 * 
 *             lab = labels[i]
 *             if lab < 0:             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      __pyx_t_13 = (__pyx_v_lab < 0);
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":365
 *             lab = labels[i]
 *             if lab < 0:
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             counts[lab] += 1
 */
        goto __pyx_L12_continue;
        goto __pyx_L14;
      }
      __pyx_L14:;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":367
 *                 continue
 * 
 *             counts[lab] += 1             # <<<<<<<<<<<<<<
 *             val = values[i, 0]
 *             # not nan
 */
      __pyx_t_17 = __pyx_v_lab;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) += 1;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":368
 * 
 *             counts[lab] += 1
 *             val = values[i, 0]             # <<<<<<<<<<<<<<
 *             # not nan
 *             if val == val:
 */
      __pyx_t_26 = __pyx_v_i;
      __pyx_t_27 = 0;
      __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_values.diminfo[1].strides));

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":370
 *             val = values[i, 0]
 *             # not nan
 *             if val == val:             # <<<<<<<<<<<<<<
 *                 nobs[lab, 0] += 1
 *                 sumx[lab, 0] += val
 */
      __pyx_t_13 = (__pyx_v_val == __pyx_v_val);
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":371
 *             # not nan
 *             if val == val:
 *                 nobs[lab, 0] += 1             # <<<<<<<<<<<<<<
 *                 sumx[lab, 0] += val
 *                 sumxx[lab, 0] += val * val
 */
        __pyx_t_28 = __pyx_v_lab;
        __pyx_t_29 = 0;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_nobs.diminfo[1].strides) += 1;

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":372
 *             if val == val:
 *                 nobs[lab, 0] += 1
 *                 sumx[lab, 0] += val             # <<<<<<<<<<<<<<
 *                 sumxx[lab, 0] += val * val
 * 
 */
        __pyx_t_30 = __pyx_v_lab;
        __pyx_t_31 = 0;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_sumx.diminfo[1].strides) += __pyx_v_val;

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":373
 *                 nobs[lab, 0] += 1
 *                 sumx[lab, 0] += val
 *                 sumxx[lab, 0] += val * val             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __pyx_t_32 = __pyx_v_lab;
        __pyx_t_33 = 0;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_sumxx.diminfo[1].strides) += (__pyx_v_val * __pyx_v_val);
        goto __pyx_L15;
      }
      __pyx_L15:;
      __pyx_L12_continue:;
    }
  }
  __pyx_L5:;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":376
 * 
 * 
 *     for i in range(len(counts)):             # <<<<<<<<<<<<<<
 *         for j in range(K):
 *             ct = nobs[i, j]
 */
  __pyx_t_12 = PyObject_Length(((PyObject *)__pyx_v_counts)); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_12; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":377
 * 
 *     for i in range(len(counts)):
 *         for j in range(K):             # <<<<<<<<<<<<<<
 *             ct = nobs[i, j]
 *             if ct < 2:
 */
    __pyx_t_34 = __pyx_v_K;
    for (__pyx_t_35 = 0; __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) {
      __pyx_v_j = __pyx_t_35;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":378
 *     for i in range(len(counts)):
 *         for j in range(K):
 *             ct = nobs[i, j]             # <<<<<<<<<<<<<<
 *             if ct < 2:
 *                 out[i, j] = nan
 */
      __pyx_t_36 = __pyx_v_i;
      __pyx_t_37 = __pyx_v_j;
      __pyx_v_ct = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_nobs.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_nobs.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_nobs.diminfo[1].strides));

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":379
 *         for j in range(K):
 *             ct = nobs[i, j]
 *             if ct < 2:             # <<<<<<<<<<<<<<
 *                 out[i, j] = nan
 *             else:
 */
      __pyx_t_13 = (__pyx_v_ct < 2.0);
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":380
 *             ct = nobs[i, j]
 *             if ct < 2:
 *                 out[i, j] = nan             # <<<<<<<<<<<<<<
 *             else:
 *                 out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) /
 */
        __pyx_t_38 = __pyx_v_i;
        __pyx_t_39 = __pyx_v_j;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_8_tseries_nan;
        goto __pyx_L20;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":382
 *                 out[i, j] = nan
 *             else:
 *                 out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) /             # <<<<<<<<<<<<<<
 *                              (ct * ct - ct))
 * 
 */
        __pyx_t_40 = __pyx_v_i;
        __pyx_t_41 = __pyx_v_j;
        __pyx_t_42 = __pyx_v_i;
        __pyx_t_43 = __pyx_v_j;
        __pyx_t_44 = __pyx_v_i;
        __pyx_t_45 = __pyx_v_j;
        __pyx_t_46 = ((__pyx_v_ct * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumxx.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_sumxx.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_sumxx.diminfo[1].strides))) - ((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_sumx.diminfo[1].strides)) * (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sumx.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_sumx.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_sumx.diminfo[1].strides))));

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":383
 *             else:
 *                 out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) /
 *                              (ct * ct - ct))             # <<<<<<<<<<<<<<
 * 
 * def group_count(ndarray[int32_t] values, Py_ssize_t size):
 */
        __pyx_t_47 = ((__pyx_v_ct * __pyx_v_ct) - __pyx_v_ct);
        if (unlikely(__pyx_t_47 == 0)) {
          PyErr_Format(PyExc_ZeroDivisionError, "float division");
          {__pyx_filename = __pyx_f[5]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":382
 *                 out[i, j] = nan
 *             else:
 *                 out[i, j] = ((ct * sumxx[i, j] - sumx[i, j] * sumx[i, j]) /             # <<<<<<<<<<<<<<
 *                              (ct * ct - ct))
 * 
 */
        __pyx_t_48 = __pyx_v_i;
        __pyx_t_49 = __pyx_v_j;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_49, __pyx_pybuffernd_out.diminfo[1].strides) = (__pyx_t_46 / __pyx_t_47);
      }
      __pyx_L20:;
    }
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.group_var", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumx.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_nobs.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sumxx.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_nobs);
  __Pyx_XDECREF((PyObject *)__pyx_v_sumx);
  __Pyx_XDECREF((PyObject *)__pyx_v_sumxx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_71group_count(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_71group_count = {__Pyx_NAMESTR("group_count"), (PyCFunction)__pyx_pw_6pandas_8_tseries_71group_count, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_71group_count(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  Py_ssize_t __pyx_v_size;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__size,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("group_count (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("group_count", 1, 2, 2, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "group_count") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_size = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_size == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_size = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_size == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("group_count", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.group_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_70group_count(__pyx_self, __pyx_v_values, __pyx_v_size);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":385
 *                              (ct * ct - ct))
 * 
 * def group_count(ndarray[int32_t] values, Py_ssize_t size):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_70group_count(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, Py_ssize_t __pyx_v_size) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_counts = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  __pyx_t_5numpy_int32_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("group_count");
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":387
 * def group_count(ndarray[int32_t] values, Py_ssize_t size):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[int32_t] counts
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":390
 *         ndarray[int32_t] counts
 * 
 *     counts = np.zeros(size, dtype='i4')             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         counts[values[i]] += 1
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":391
 * 
 *     counts = np.zeros(size, dtype='i4')
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         counts[values[i]] += 1
 *     return counts
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":392
 *     counts = np.zeros(size, dtype='i4')
 *     for i in range(n):
 *         counts[values[i]] += 1             # <<<<<<<<<<<<<<
 *     return counts
 * 
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_13 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_values.diminfo[0].strides));
    __pyx_t_7 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_counts.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_counts.diminfo[0].strides) += 1;
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":393
 *     for i in range(n):
 *         counts[values[i]] += 1
 *     return counts             # <<<<<<<<<<<<<<
 * 
 * def lookup_values(ndarray[object] values, dict mapping):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_counts));
  __pyx_r = ((PyObject *)__pyx_v_counts);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.group_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_73lookup_values(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_73lookup_values = {__Pyx_NAMESTR("lookup_values"), (PyCFunction)__pyx_pw_6pandas_8_tseries_73lookup_values, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_73lookup_values(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_mapping = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mapping,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lookup_values (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mapping);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("lookup_values", 1, 2, 2, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lookup_values") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_mapping = ((PyObject*)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_mapping = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lookup_values", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.lookup_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapping), (&PyDict_Type), 1, "mapping", 1))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_72lookup_values(__pyx_self, __pyx_v_values, __pyx_v_mapping);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":395
 *     return counts
 * 
 * def lookup_values(ndarray[object] values, dict mapping):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_72lookup_values(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_mapping) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_result = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lookup_values");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":397
 * def lookup_values(ndarray[object] values, dict mapping):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n, dtype='O')
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":399
 *         Py_ssize_t i, n = len(values)
 * 
 *     result = np.empty(n, dtype='O')             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         result[i] = mapping[values[i]]
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_result = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":400
 * 
 *     result = np.empty(n, dtype='O')
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         result[i] = mapping[values[i]]
 *     return maybe_convert_objects(result)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_1; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":401
 *     result = np.empty(n, dtype='O')
 *     for i in range(n):
 *         result[i] = mapping[values[i]]             # <<<<<<<<<<<<<<
 *     return maybe_convert_objects(result)
 * 
 */
    __pyx_t_7 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_7 < 0) {
      __pyx_t_7 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_7 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_mapping), __pyx_t_5); if (!__pyx_t_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__Pyx_SetItemInt(__pyx_v_result, __pyx_v_i, __pyx_t_2, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":402
 *     for i in range(n):
 *         result[i] = mapping[values[i]]
 *     return maybe_convert_objects(result)             # <<<<<<<<<<<<<<
 * 
 * def reduce_mean(ndarray[object] indices,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_result);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_result);
  __Pyx_GIVEREF(__pyx_v_result);
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.lookup_values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_75reduce_mean(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_75reduce_mean = {__Pyx_NAMESTR("reduce_mean"), (PyCFunction)__pyx_pw_6pandas_8_tseries_75reduce_mean, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_75reduce_mean(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_indices = 0;
  PyArrayObject *__pyx_v_buckets = 0;
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_inclusive = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__indices,&__pyx_n_s__buckets,&__pyx_n_s__values,&__pyx_n_s__inclusive,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reduce_mean (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    values[3] = __pyx_k_9;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indices);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__buckets);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("reduce_mean", 0, 3, 4, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("reduce_mean", 0, 3, 4, 2); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__inclusive);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reduce_mean") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_indices = ((PyArrayObject *)values[0]);
      __pyx_v_buckets = ((PyArrayObject *)values[1]);
      __pyx_v_values = ((PyArrayObject *)values[2]);
      __pyx_v_inclusive = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_indices = ((PyArrayObject *)values[0]);
    __pyx_v_buckets = ((PyArrayObject *)values[1]);
    __pyx_v_values = ((PyArrayObject *)values[2]);
    __pyx_v_inclusive = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("reduce_mean", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.reduce_mean", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_buckets), __pyx_ptype_5numpy_ndarray, 1, "buckets", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_74reduce_mean(__pyx_self, __pyx_v_indices, __pyx_v_buckets, __pyx_v_values, __pyx_v_inclusive);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":404
 *     return maybe_convert_objects(result)
 * 
 * def reduce_mean(ndarray[object] indices,             # <<<<<<<<<<<<<<
 *                 ndarray[object] buckets,
 *                 ndarray[float64_t] values,
 */

static PyObject *__pyx_pf_6pandas_8_tseries_74reduce_mean(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indices, PyArrayObject *__pyx_v_buckets, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_inclusive) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_nbuckets;
  Py_ssize_t __pyx_v_nvalues;
  PyArrayObject *__pyx_v_output = 0;
  __pyx_t_5numpy_float64_t __pyx_v_the_sum;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  __pyx_t_5numpy_float64_t __pyx_v_nobs;
  PyObject *__pyx_v_next_bound = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_buckets;
  __Pyx_Buffer __pyx_pybuffer_buckets;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indices;
  __Pyx_Buffer __pyx_pybuffer_indices;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_output;
  __Pyx_Buffer __pyx_pybuffer_output;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reduce_mean");
  __pyx_pybuffer_output.pybuffer.buf = NULL;
  __pyx_pybuffer_output.refcount = 0;
  __pyx_pybuffernd_output.data = NULL;
  __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output;
  __pyx_pybuffer_indices.pybuffer.buf = NULL;
  __pyx_pybuffer_indices.refcount = 0;
  __pyx_pybuffernd_indices.data = NULL;
  __pyx_pybuffernd_indices.rcbuffer = &__pyx_pybuffer_indices;
  __pyx_pybuffer_buckets.pybuffer.buf = NULL;
  __pyx_pybuffer_buckets.refcount = 0;
  __pyx_pybuffernd_buckets.data = NULL;
  __pyx_pybuffernd_buckets.rcbuffer = &__pyx_pybuffer_buckets;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_indices, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indices.diminfo[0].strides = __pyx_pybuffernd_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indices.diminfo[0].shape = __pyx_pybuffernd_indices.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_buckets.rcbuffer->pybuffer, (PyObject*)__pyx_v_buckets, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_buckets.diminfo[0].strides = __pyx_pybuffernd_buckets.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_buckets.diminfo[0].shape = __pyx_pybuffernd_buckets.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":415
 * 
 * 
 *     nbuckets = len(buckets)             # <<<<<<<<<<<<<<
 *     nvalues = len(indices)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_buckets)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nbuckets = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":416
 * 
 *     nbuckets = len(buckets)
 *     nvalues = len(indices)             # <<<<<<<<<<<<<<
 * 
 *     assert(len(values) == len(indices))
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indices)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nvalues = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":418
 *     nvalues = len(indices)
 * 
 *     assert(len(values) == len(indices))             # <<<<<<<<<<<<<<
 * 
 *     output = np.empty(nbuckets, dtype=float)
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_indices)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!(__pyx_t_1 == __pyx_t_2))) {
    PyErr_SetNone(PyExc_AssertionError);
    {__pyx_filename = __pyx_f[5]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":420
 *     assert(len(values) == len(indices))
 * 
 *     output = np.empty(nbuckets, dtype=float)             # <<<<<<<<<<<<<<
 *     output.fill(np.NaN)
 * 
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_nbuckets); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_v_output, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":421
 * 
 *     output = np.empty(nbuckets, dtype=float)
 *     output.fill(np.NaN)             # <<<<<<<<<<<<<<
 * 
 *     j = 0
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_output), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__NaN); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":423
 *     output.fill(np.NaN)
 * 
 *     j = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < nbuckets:
 *         next_bound = buckets[i]
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":424
 * 
 *     j = 0
 *     for i from 0 <= i < nbuckets:             # <<<<<<<<<<<<<<
 *         next_bound = buckets[i]
 *         the_sum = 0
 */
  __pyx_t_2 = __pyx_v_nbuckets;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":425
 *     j = 0
 *     for i from 0 <= i < nbuckets:
 *         next_bound = buckets[i]             # <<<<<<<<<<<<<<
 *         the_sum = 0
 *         nobs = 0
 */
    __pyx_t_1 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_1 < 0) {
      __pyx_t_1 += __pyx_pybuffernd_buckets.diminfo[0].shape;
      if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_buckets.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_buckets.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_buckets.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_XDECREF(__pyx_v_next_bound);
    __pyx_v_next_bound = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":426
 *     for i from 0 <= i < nbuckets:
 *         next_bound = buckets[i]
 *         the_sum = 0             # <<<<<<<<<<<<<<
 *         nobs = 0
 *         if inclusive:
 */
    __pyx_v_the_sum = 0.0;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":427
 *         next_bound = buckets[i]
 *         the_sum = 0
 *         nobs = 0             # <<<<<<<<<<<<<<
 *         if inclusive:
 *             while j < nvalues and indices[j] <= next_bound:
 */
    __pyx_v_nobs = 0.0;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":428
 *         the_sum = 0
 *         nobs = 0
 *         if inclusive:             # <<<<<<<<<<<<<<
 *             while j < nvalues and indices[j] <= next_bound:
 *                 val = values[j]
 */
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_inclusive); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_12) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":429
 *         nobs = 0
 *         if inclusive:
 *             while j < nvalues and indices[j] <= next_bound:             # <<<<<<<<<<<<<<
 *                 val = values[j]
 *                 # not NaN
 */
      while (1) {
        __pyx_t_12 = (__pyx_v_j < __pyx_v_nvalues);
        if (__pyx_t_12) {
          __pyx_t_13 = __pyx_v_j;
          __pyx_t_8 = -1;
          if (__pyx_t_13 < 0) {
            __pyx_t_13 += __pyx_pybuffernd_indices.diminfo[0].shape;
            if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
          } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_8 = 0;
          if (unlikely(__pyx_t_8 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_8);
            {__pyx_filename = __pyx_f[5]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_indices.diminfo[0].strides);
          __Pyx_INCREF((PyObject*)__pyx_t_5);
          __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_next_bound, Py_LE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_15 = __pyx_t_14;
        } else {
          __pyx_t_15 = __pyx_t_12;
        }
        if (!__pyx_t_15) break;

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":430
 *         if inclusive:
 *             while j < nvalues and indices[j] <= next_bound:
 *                 val = values[j]             # <<<<<<<<<<<<<<
 *                 # not NaN
 *                 if val == val:
 */
        __pyx_t_16 = __pyx_v_j;
        __pyx_t_8 = -1;
        if (__pyx_t_16 < 0) {
          __pyx_t_16 += __pyx_pybuffernd_values.diminfo[0].shape;
          if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
        } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0;
        if (unlikely(__pyx_t_8 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_8);
          {__pyx_filename = __pyx_f[5]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides));

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":432
 *                 val = values[j]
 *                 # not NaN
 *                 if val == val:             # <<<<<<<<<<<<<<
 *                     the_sum += val
 *                     nobs += 1
 */
        __pyx_t_15 = (__pyx_v_val == __pyx_v_val);
        if (__pyx_t_15) {

          /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":433
 *                 # not NaN
 *                 if val == val:
 *                     the_sum += val             # <<<<<<<<<<<<<<
 *                     nobs += 1
 *                 j += 1
 */
          __pyx_v_the_sum = (__pyx_v_the_sum + __pyx_v_val);

          /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":434
 *                 if val == val:
 *                     the_sum += val
 *                     nobs += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *         else:
 */
          __pyx_v_nobs = (__pyx_v_nobs + 1.0);
          goto __pyx_L8;
        }
        __pyx_L8:;

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":435
 *                     the_sum += val
 *                     nobs += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *         else:
 *             while j < nvalues and indices[j] < next_bound:
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":437
 *                 j += 1
 *         else:
 *             while j < nvalues and indices[j] < next_bound:             # <<<<<<<<<<<<<<
 *                 val = values[j]
 *                 # not NaN
 */
      while (1) {
        __pyx_t_15 = (__pyx_v_j < __pyx_v_nvalues);
        if (__pyx_t_15) {
          __pyx_t_17 = __pyx_v_j;
          __pyx_t_8 = -1;
          if (__pyx_t_17 < 0) {
            __pyx_t_17 += __pyx_pybuffernd_indices.diminfo[0].shape;
            if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
          } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_8 = 0;
          if (unlikely(__pyx_t_8 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_8);
            {__pyx_filename = __pyx_f[5]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indices.diminfo[0].strides);
          __Pyx_INCREF((PyObject*)__pyx_t_3);
          __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_v_next_bound, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_14 = __pyx_t_12;
        } else {
          __pyx_t_14 = __pyx_t_15;
        }
        if (!__pyx_t_14) break;

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":438
 *         else:
 *             while j < nvalues and indices[j] < next_bound:
 *                 val = values[j]             # <<<<<<<<<<<<<<
 *                 # not NaN
 *                 if val == val:
 */
        __pyx_t_18 = __pyx_v_j;
        __pyx_t_8 = -1;
        if (__pyx_t_18 < 0) {
          __pyx_t_18 += __pyx_pybuffernd_values.diminfo[0].shape;
          if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
        } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0;
        if (unlikely(__pyx_t_8 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_8);
          {__pyx_filename = __pyx_f[5]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides));

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":440
 *                 val = values[j]
 *                 # not NaN
 *                 if val == val:             # <<<<<<<<<<<<<<
 *                     the_sum += val
 *                     nobs += 1
 */
        __pyx_t_14 = (__pyx_v_val == __pyx_v_val);
        if (__pyx_t_14) {

          /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":441
 *                 # not NaN
 *                 if val == val:
 *                     the_sum += val             # <<<<<<<<<<<<<<
 *                     nobs += 1
 *                 j += 1
 */
          __pyx_v_the_sum = (__pyx_v_the_sum + __pyx_v_val);

          /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":442
 *                 if val == val:
 *                     the_sum += val
 *                     nobs += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 * 
 */
          __pyx_v_nobs = (__pyx_v_nobs + 1.0);
          goto __pyx_L11;
        }
        __pyx_L11:;

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":443
 *                     the_sum += val
 *                     nobs += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *         if nobs > 0:
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":445
 *                 j += 1
 * 
 *         if nobs > 0:             # <<<<<<<<<<<<<<
 *             output[i] = the_sum / nobs
 * 
 */
    __pyx_t_14 = (__pyx_v_nobs > 0.0);
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":446
 * 
 *         if nobs > 0:
 *             output[i] = the_sum / nobs             # <<<<<<<<<<<<<<
 * 
 *         if j >= nvalues:
 */
      if (unlikely(__pyx_v_nobs == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "float division");
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_output.diminfo[0].strides) = (__pyx_v_the_sum / __pyx_v_nobs);
      goto __pyx_L12;
    }
    __pyx_L12:;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":448
 *             output[i] = the_sum / nobs
 * 
 *         if j >= nvalues:             # <<<<<<<<<<<<<<
 *             break
 * 
 */
    __pyx_t_14 = (__pyx_v_j >= __pyx_v_nvalues);
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":449
 * 
 *         if j >= nvalues:
 *             break             # <<<<<<<<<<<<<<
 * 
 *     return output
 */
      goto __pyx_L4_break;
      goto __pyx_L13;
    }
    __pyx_L13:;
  }
  __pyx_L4_break:;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":451
 *             break
 * 
 *     return output             # <<<<<<<<<<<<<<
 * 
 * def _bucket_locs(index, buckets, inclusive=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_output));
  __pyx_r = ((PyObject *)__pyx_v_output);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_buckets.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.reduce_mean", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_buckets.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XDECREF(__pyx_v_next_bound);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_77_bucket_locs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_77_bucket_locs = {__Pyx_NAMESTR("_bucket_locs"), (PyCFunction)__pyx_pw_6pandas_8_tseries_77_bucket_locs, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_77_bucket_locs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_buckets = 0;
  PyObject *__pyx_v_inclusive = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__buckets,&__pyx_n_s__inclusive,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_bucket_locs (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    values[2] = __pyx_k_10;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__buckets);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_bucket_locs", 0, 2, 3, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__inclusive);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_bucket_locs") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_index = values[0];
      __pyx_v_buckets = values[1];
      __pyx_v_inclusive = values[2];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_index = values[0];
    __pyx_v_buckets = values[1];
    __pyx_v_inclusive = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_bucket_locs", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries._bucket_locs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_76_bucket_locs(__pyx_self, __pyx_v_index, __pyx_v_buckets, __pyx_v_inclusive);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":453
 *     return output
 * 
 * def _bucket_locs(index, buckets, inclusive=False):             # <<<<<<<<<<<<<<
 *     if inclusive:
 *         locs = index.searchsorted(buckets, side='left')
 */

static PyObject *__pyx_pf_6pandas_8_tseries_76_bucket_locs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index, PyObject *__pyx_v_buckets, PyObject *__pyx_v_inclusive) {
  PyObject *__pyx_v_locs = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_bucket_locs");

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":454
 * 
 * def _bucket_locs(index, buckets, inclusive=False):
 *     if inclusive:             # <<<<<<<<<<<<<<
 *         locs = index.searchsorted(buckets, side='left')
 *     else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_inclusive); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":455
 * def _bucket_locs(index, buckets, inclusive=False):
 *     if inclusive:
 *         locs = index.searchsorted(buckets, side='left')             # <<<<<<<<<<<<<<
 *     else:
 *         locs = index.searchsorted(buckets, side='right')
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_index, __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_buckets);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_buckets);
    __Pyx_GIVEREF(__pyx_v_buckets);
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__left)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_v_locs = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":457
 *         locs = index.searchsorted(buckets, side='left')
 *     else:
 *         locs = index.searchsorted(buckets, side='right')             # <<<<<<<<<<<<<<
 * 
 *     return locs
 */
    __pyx_t_5 = PyObject_GetAttr(__pyx_v_index, __pyx_n_s__searchsorted); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_buckets);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_buckets);
    __Pyx_GIVEREF(__pyx_v_buckets);
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__side), ((PyObject *)__pyx_n_s__right)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_v_locs = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":459
 *         locs = index.searchsorted(buckets, side='right')
 * 
 *     return locs             # <<<<<<<<<<<<<<
 * 
 * def count_level_1d(ndarray[uint8_t, cast=True] mask,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_locs);
  __pyx_r = __pyx_v_locs;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._tseries._bucket_locs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_79count_level_1d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_79count_level_1d = {__Pyx_NAMESTR("count_level_1d"), (PyCFunction)__pyx_pw_6pandas_8_tseries_79count_level_1d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_79count_level_1d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_mask = 0;
  PyArrayObject *__pyx_v_labels = 0;
  Py_ssize_t __pyx_v_max_bin;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mask,&__pyx_n_s__labels,&__pyx_n_s__max_bin,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("count_level_1d (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("count_level_1d", 1, 3, 3, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_bin);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("count_level_1d", 1, 3, 3, 2); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "count_level_1d") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_mask = ((PyArrayObject *)values[0]);
      __pyx_v_labels = ((PyArrayObject *)values[1]);
      __pyx_v_max_bin = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_bin == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_mask = ((PyArrayObject *)values[0]);
    __pyx_v_labels = ((PyArrayObject *)values[1]);
    __pyx_v_max_bin = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_bin == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("count_level_1d", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.count_level_1d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_78count_level_1d(__pyx_self, __pyx_v_mask, __pyx_v_labels, __pyx_v_max_bin);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":461
 *     return locs
 * 
 * def count_level_1d(ndarray[uint8_t, cast=True] mask,             # <<<<<<<<<<<<<<
 *                    ndarray[int32_t] labels, Py_ssize_t max_bin):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_78count_level_1d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_counts = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  __pyx_t_5numpy_uint8_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  __pyx_t_5numpy_int32_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("count_level_1d");
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":467
 *         ndarray[int64_t] counts
 * 
 *     counts = np.zeros(max_bin, dtype='i8')             # <<<<<<<<<<<<<<
 * 
 *     n = len(mask)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_max_bin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":469
 *     counts = np.zeros(max_bin, dtype='i8')
 * 
 *     n = len(mask)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_mask)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_10;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":471
 *     n = len(mask)
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         if mask[i]:
 *             counts[labels[i]] += 1
 */
  __pyx_t_10 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_10; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":472
 * 
 *     for i from 0 <= i < n:
 *         if mask[i]:             # <<<<<<<<<<<<<<
 *             counts[labels[i]] += 1
 * 
 */
    __pyx_t_11 = __pyx_v_i;
    __pyx_t_6 = -1;
    if (__pyx_t_11 < 0) {
      __pyx_t_11 += __pyx_pybuffernd_mask.diminfo[0].shape;
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_6 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_6 = 0;
    if (unlikely(__pyx_t_6 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_6);
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_12 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_mask.diminfo[0].strides));
    if (__pyx_t_12) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":473
 *     for i from 0 <= i < n:
 *         if mask[i]:
 *             counts[labels[i]] += 1             # <<<<<<<<<<<<<<
 * 
 *     return counts
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_6 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_14 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides));
      __pyx_t_6 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_counts.diminfo[0].strides) += 1;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":475
 *             counts[labels[i]] += 1
 * 
 *     return counts             # <<<<<<<<<<<<<<
 * 
 * def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_counts));
  __pyx_r = ((PyObject *)__pyx_v_counts);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.count_level_1d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_81count_level_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_81count_level_2d = {__Pyx_NAMESTR("count_level_2d"), (PyCFunction)__pyx_pw_6pandas_8_tseries_81count_level_2d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_81count_level_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_mask = 0;
  PyArrayObject *__pyx_v_labels = 0;
  Py_ssize_t __pyx_v_max_bin;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mask,&__pyx_n_s__labels,&__pyx_n_s__max_bin,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("count_level_2d (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("count_level_2d", 1, 3, 3, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_bin);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("count_level_2d", 1, 3, 3, 2); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "count_level_2d") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_mask = ((PyArrayObject *)values[0]);
      __pyx_v_labels = ((PyArrayObject *)values[1]);
      __pyx_v_max_bin = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_bin == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_mask = ((PyArrayObject *)values[0]);
    __pyx_v_labels = ((PyArrayObject *)values[1]);
    __pyx_v_max_bin = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_bin == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("count_level_2d", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.count_level_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_80count_level_2d(__pyx_self, __pyx_v_mask, __pyx_v_labels, __pyx_v_max_bin);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":477
 *     return counts
 * 
 * def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask,             # <<<<<<<<<<<<<<
 *                    ndarray[int32_t] labels, Py_ssize_t max_bin):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_80count_level_2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_max_bin) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_counts = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyArrayObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  __pyx_t_5numpy_uint8_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  __pyx_t_5numpy_int32_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("count_level_2d");
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":483
 *         ndarray[int64_t, ndim=2] counts
 * 
 *     n, k = (<object> mask).shape             # <<<<<<<<<<<<<<
 *     counts = np.zeros((max_bin, k), dtype='i8')
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_mask), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[5]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_n = __pyx_t_6;
  __pyx_v_k = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":484
 * 
 *     n, k = (<object> mask).shape
 *     counts = np.zeros((max_bin, k), dtype='i8')             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_max_bin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_counts.diminfo[1].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_counts.diminfo[1].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":486
 *     counts = np.zeros((max_bin, k), dtype='i8')
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         for j from 0 <= j < k:
 *             if mask[i, j]:
 */
  __pyx_t_7 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":487
 * 
 *     for i from 0 <= i < n:
 *         for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *             if mask[i, j]:
 *                 counts[labels[i], j] += 1
 */
    __pyx_t_6 = __pyx_v_k;
    for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_6; __pyx_v_j++) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":488
 *     for i from 0 <= i < n:
 *         for j from 0 <= j < k:
 *             if mask[i, j]:             # <<<<<<<<<<<<<<
 *                 counts[labels[i], j] += 1
 * 
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = __pyx_v_j;
      __pyx_t_9 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_mask.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_9 = 0;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_mask.diminfo[1].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 1;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_mask.diminfo[1].shape)) __pyx_t_9 = 1;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_15 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[1].strides));
      if (__pyx_t_15) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":489
 *         for j from 0 <= j < k:
 *             if mask[i, j]:
 *                 counts[labels[i], j] += 1             # <<<<<<<<<<<<<<
 * 
 *     return counts
 */
        __pyx_t_16 = __pyx_v_i;
        __pyx_t_9 = -1;
        if (__pyx_t_16 < 0) {
          __pyx_t_16 += __pyx_pybuffernd_labels.diminfo[0].shape;
          if (unlikely(__pyx_t_16 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_9 = 0;
        if (unlikely(__pyx_t_9 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_9);
          {__pyx_filename = __pyx_f[5]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_17 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides));
        __pyx_t_18 = __pyx_v_j;
        __pyx_t_9 = -1;
        if (__pyx_t_17 < 0) {
          __pyx_t_17 += __pyx_pybuffernd_counts.diminfo[0].shape;
          if (unlikely(__pyx_t_17 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_9 = 0;
        if (__pyx_t_18 < 0) {
          __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[1].shape;
          if (unlikely(__pyx_t_18 < 0)) __pyx_t_9 = 1;
        } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[1].shape)) __pyx_t_9 = 1;
        if (unlikely(__pyx_t_9 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_9);
          {__pyx_filename = __pyx_f[5]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[1].strides) += 1;
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":491
 *                 counts[labels[i], j] += 1
 * 
 *     return counts             # <<<<<<<<<<<<<<
 * 
 * def duplicated(list values, take_last=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_counts));
  __pyx_r = ((PyObject *)__pyx_v_counts);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.count_level_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_83duplicated(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_83duplicated = {__Pyx_NAMESTR("duplicated"), (PyCFunction)__pyx_pw_6pandas_8_tseries_83duplicated, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_83duplicated(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_values = 0;
  PyObject *__pyx_v_take_last = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__take_last,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("duplicated (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    values[1] = __pyx_k_11;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__take_last);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "duplicated") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyObject*)values[0]);
      __pyx_v_take_last = values[1];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyObject*)values[0]);
    __pyx_v_take_last = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("duplicated", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.duplicated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyList_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_82duplicated(__pyx_self, __pyx_v_values, __pyx_v_take_last);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":493
 *     return counts
 * 
 * def duplicated(list values, take_last=False):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */

static PyObject *__pyx_pf_6pandas_8_tseries_82duplicated(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values, PyObject *__pyx_v_take_last) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_seen = 0;
  PyObject *__pyx_v_row = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("duplicated");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":496
 *     cdef:
 *         Py_ssize_t i, n
 *         dict seen = {}             # <<<<<<<<<<<<<<
 *         object row
 * 
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_seen = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":499
 *         object row
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     cdef ndarray[uint8_t] result = np.zeros(n, dtype=np.uint8)
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_values) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_2 = PyList_GET_SIZE(((PyObject *)__pyx_v_values)); 
  __pyx_v_n = __pyx_t_2;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":500
 * 
 *     n = len(values)
 *     cdef ndarray[uint8_t] result = np.zeros(n, dtype=np.uint8)             # <<<<<<<<<<<<<<
 * 
 *     if take_last:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":502
 *     cdef ndarray[uint8_t] result = np.zeros(n, dtype=np.uint8)
 * 
 *     if take_last:             # <<<<<<<<<<<<<<
 *         for i from n > i >= 0:
 *             row = values[i]
 */
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_take_last); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_8) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":503
 * 
 *     if take_last:
 *         for i from n > i >= 0:             # <<<<<<<<<<<<<<
 *             row = values[i]
 *             if row in seen:
 */
    for (__pyx_v_i = __pyx_v_n-1; __pyx_v_i >= 0; __pyx_v_i--) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":504
 *     if take_last:
 *         for i from n > i >= 0:
 *             row = values[i]             # <<<<<<<<<<<<<<
 *             if row in seen:
 *                 result[i] = 1
 */
      __pyx_t_6 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_6) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_v_row);
      __pyx_v_row = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":505
 *         for i from n > i >= 0:
 *             row = values[i]
 *             if row in seen:             # <<<<<<<<<<<<<<
 *                 result[i] = 1
 *             else:
 */
      __pyx_t_8 = ((PyDict_Contains(((PyObject *)__pyx_v_seen), __pyx_v_row))); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_8) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":506
 *             row = values[i]
 *             if row in seen:
 *                 result[i] = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 seen[row] = None
 */
        __pyx_t_2 = __pyx_v_i;
        __pyx_t_9 = -1;
        if (__pyx_t_2 < 0) {
          __pyx_t_2 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_2 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_2 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0;
        if (unlikely(__pyx_t_9 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_9);
          {__pyx_filename = __pyx_f[5]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_result.diminfo[0].strides) = 1;
        goto __pyx_L6;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":508
 *                 result[i] = 1
 *             else:
 *                 seen[row] = None             # <<<<<<<<<<<<<<
 *                 result[i] = 0
 *     else:
 */
        if (PyDict_SetItem(((PyObject *)__pyx_v_seen), __pyx_v_row, Py_None) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":509
 *             else:
 *                 seen[row] = None
 *                 result[i] = 0             # <<<<<<<<<<<<<<
 *     else:
 *         for i from 0 <= i < n:
 */
        __pyx_t_10 = __pyx_v_i;
        __pyx_t_9 = -1;
        if (__pyx_t_10 < 0) {
          __pyx_t_10 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_10 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0;
        if (unlikely(__pyx_t_9 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_9);
          {__pyx_filename = __pyx_f[5]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides) = 0;
      }
      __pyx_L6:;
    }
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":511
 *                 result[i] = 0
 *     else:
 *         for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *             row = values[i]
 *             if row in seen:
 */
    __pyx_t_11 = __pyx_v_n;
    for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_11; __pyx_v_i++) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":512
 *     else:
 *         for i from 0 <= i < n:
 *             row = values[i]             # <<<<<<<<<<<<<<
 *             if row in seen:
 *                 result[i] = 1
 */
      __pyx_t_6 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_values), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_6) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_v_row);
      __pyx_v_row = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":513
 *         for i from 0 <= i < n:
 *             row = values[i]
 *             if row in seen:             # <<<<<<<<<<<<<<
 *                 result[i] = 1
 *             else:
 */
      __pyx_t_8 = ((PyDict_Contains(((PyObject *)__pyx_v_seen), __pyx_v_row))); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      if (__pyx_t_8) {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":514
 *             row = values[i]
 *             if row in seen:
 *                 result[i] = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 seen[row] = None
 */
        __pyx_t_12 = __pyx_v_i;
        __pyx_t_9 = -1;
        if (__pyx_t_12 < 0) {
          __pyx_t_12 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_12 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0;
        if (unlikely(__pyx_t_9 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_9);
          {__pyx_filename = __pyx_f[5]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_result.diminfo[0].strides) = 1;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":516
 *                 result[i] = 1
 *             else:
 *                 seen[row] = None             # <<<<<<<<<<<<<<
 *                 result[i] = 0
 * 
 */
        if (PyDict_SetItem(((PyObject *)__pyx_v_seen), __pyx_v_row, Py_None) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":517
 *             else:
 *                 seen[row] = None
 *                 result[i] = 0             # <<<<<<<<<<<<<<
 * 
 *     return result.view(np.bool_)
 */
        __pyx_t_13 = __pyx_v_i;
        __pyx_t_9 = -1;
        if (__pyx_t_13 < 0) {
          __pyx_t_13 += __pyx_pybuffernd_result.diminfo[0].shape;
          if (unlikely(__pyx_t_13 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0;
        if (unlikely(__pyx_t_9 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_9);
          {__pyx_filename = __pyx_f[5]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides) = 0;
      }
      __pyx_L9:;
    }
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":519
 *                 result[i] = 0
 * 
 *     return result.view(np.bool_)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.duplicated", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_seen);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_85generate_slices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_85generate_slices = {__Pyx_NAMESTR("generate_slices"), (PyCFunction)__pyx_pw_6pandas_8_tseries_85generate_slices, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_85generate_slices(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_labels = 0;
  Py_ssize_t __pyx_v_ngroups;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__labels,&__pyx_n_s__ngroups,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("generate_slices (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ngroups);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("generate_slices", 1, 2, 2, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generate_slices") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_labels = ((PyArrayObject *)values[0]);
      __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_labels = ((PyArrayObject *)values[0]);
    __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("generate_slices", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.generate_slices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_84generate_slices(__pyx_self, __pyx_v_labels, __pyx_v_ngroups);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":522
 * 
 * 
 * def generate_slices(ndarray[int32_t] labels, Py_ssize_t ngroups):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, group_size, n, lab, start
 */

static PyObject *__pyx_pf_6pandas_8_tseries_84generate_slices(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_group_size;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_lab;
  Py_ssize_t __pyx_v_start;
  PyArrayObject *__pyx_v_starts = 0;
  PyObject *__pyx_v_ends = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_starts;
  __Pyx_Buffer __pyx_pybuffer_starts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("generate_slices");
  __pyx_pybuffer_starts.pybuffer.buf = NULL;
  __pyx_pybuffer_starts.refcount = 0;
  __pyx_pybuffernd_starts.data = NULL;
  __pyx_pybuffernd_starts.rcbuffer = &__pyx_pybuffer_starts;
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":528
 *         ndarray[int32_t] starts
 * 
 *     n = len(labels)             # <<<<<<<<<<<<<<
 * 
 *     starts = np.zeros(ngroups, dtype='i4')
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_labels)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":530
 *     n = len(labels)
 * 
 *     starts = np.zeros(ngroups, dtype='i4')             # <<<<<<<<<<<<<<
 *     ends = np.zeros(ngroups, dtype='i4')
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_ngroups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_starts.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_starts.rcbuffer->pybuffer, (PyObject*)__pyx_v_starts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_starts.diminfo[0].strides = __pyx_pybuffernd_starts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_starts.diminfo[0].shape = __pyx_pybuffernd_starts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_starts = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":531
 * 
 *     starts = np.zeros(ngroups, dtype='i4')
 *     ends = np.zeros(ngroups, dtype='i4')             # <<<<<<<<<<<<<<
 * 
 *     start = 0
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_ngroups); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_v_ends = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":533
 *     ends = np.zeros(ngroups, dtype='i4')
 * 
 *     start = 0             # <<<<<<<<<<<<<<
 *     group_size = 0
 *     for i in range(n):
 */
  __pyx_v_start = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":534
 * 
 *     start = 0
 *     group_size = 0             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         group_size += 1
 */
  __pyx_v_group_size = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":535
 *     start = 0
 *     group_size = 0
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         group_size += 1
 *         lab = labels[i]
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":536
 *     group_size = 0
 *     for i in range(n):
 *         group_size += 1             # <<<<<<<<<<<<<<
 *         lab = labels[i]
 *         if i == n - 1 or lab != labels[i + 1]:
 */
    __pyx_v_group_size = (__pyx_v_group_size + 1);

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":537
 *     for i in range(n):
 *         group_size += 1
 *         lab = labels[i]             # <<<<<<<<<<<<<<
 *         if i == n - 1 or lab != labels[i + 1]:
 *             starts[lab] = start
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_labels.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_labels.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":538
 *         group_size += 1
 *         lab = labels[i]
 *         if i == n - 1 or lab != labels[i + 1]:             # <<<<<<<<<<<<<<
 *             starts[lab] = start
 *             ends[lab] = start + group_size
 */
    __pyx_t_13 = (__pyx_v_i == (__pyx_v_n - 1));
    if (!__pyx_t_13) {
      __pyx_t_14 = (__pyx_v_i + 1);
      __pyx_t_7 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_15 = (__pyx_v_lab != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)));
      __pyx_t_16 = __pyx_t_15;
    } else {
      __pyx_t_16 = __pyx_t_13;
    }
    if (__pyx_t_16) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":539
 *         lab = labels[i]
 *         if i == n - 1 or lab != labels[i + 1]:
 *             starts[lab] = start             # <<<<<<<<<<<<<<
 *             ends[lab] = start + group_size
 *             start += group_size
 */
      __pyx_t_17 = __pyx_v_lab;
      __pyx_t_7 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_starts.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_starts.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_starts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_starts.diminfo[0].strides) = __pyx_v_start;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":540
 *         if i == n - 1 or lab != labels[i + 1]:
 *             starts[lab] = start
 *             ends[lab] = start + group_size             # <<<<<<<<<<<<<<
 *             start += group_size
 *             group_size = 0
 */
      __pyx_t_3 = PyInt_FromSsize_t((__pyx_v_start + __pyx_v_group_size)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemInt(__pyx_v_ends, __pyx_v_lab, __pyx_t_3, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":541
 *             starts[lab] = start
 *             ends[lab] = start + group_size
 *             start += group_size             # <<<<<<<<<<<<<<
 *             group_size = 0
 * 
 */
      __pyx_v_start = (__pyx_v_start + __pyx_v_group_size);

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":542
 *             ends[lab] = start + group_size
 *             start += group_size
 *             group_size = 0             # <<<<<<<<<<<<<<
 * 
 *     return starts, ends
 */
      __pyx_v_group_size = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":544
 *             group_size = 0
 * 
 *     return starts, ends             # <<<<<<<<<<<<<<
 * 
 * '''
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_starts));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_starts));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_starts));
  __Pyx_INCREF(__pyx_v_ends);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ends);
  __Pyx_GIVEREF(__pyx_v_ends);
  __pyx_r = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.generate_slices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_starts.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_starts);
  __Pyx_XDECREF(__pyx_v_ends);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_87ts_upsample_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_86ts_upsample_generic[] = "\n    put something here\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_87ts_upsample_generic = {__Pyx_NAMESTR("ts_upsample_generic"), (PyCFunction)__pyx_pw_6pandas_8_tseries_87ts_upsample_generic, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_86ts_upsample_generic)};
static PyObject *__pyx_pw_6pandas_8_tseries_87ts_upsample_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_indices = 0;
  PyArrayObject *__pyx_v_buckets = 0;
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_aggfunc = 0;
  PyObject *__pyx_v_inclusive = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__indices,&__pyx_n_s__buckets,&__pyx_n_s__values,&__pyx_n_s__aggfunc,&__pyx_n_s__inclusive,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ts_upsample_generic (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[5] = {0,0,0,0,0};
    values[4] = __pyx_k_12;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indices);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__buckets);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("ts_upsample_generic", 0, 4, 5, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("ts_upsample_generic", 0, 4, 5, 2); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__aggfunc);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("ts_upsample_generic", 0, 4, 5, 3); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__inclusive);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ts_upsample_generic") < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_indices = ((PyArrayObject *)values[0]);
      __pyx_v_buckets = ((PyArrayObject *)values[1]);
      __pyx_v_values = ((PyArrayObject *)values[2]);
      __pyx_v_aggfunc = values[3];
      __pyx_v_inclusive = values[4];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_indices = ((PyArrayObject *)values[0]);
    __pyx_v_buckets = ((PyArrayObject *)values[1]);
    __pyx_v_values = ((PyArrayObject *)values[2]);
    __pyx_v_aggfunc = values[3];
    __pyx_v_inclusive = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ts_upsample_generic", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.ts_upsample_generic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indices), __pyx_ptype_5numpy_ndarray, 1, "indices", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_buckets), __pyx_ptype_5numpy_ndarray, 1, "buckets", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_86ts_upsample_generic(__pyx_self, __pyx_v_indices, __pyx_v_buckets, __pyx_v_values, __pyx_v_aggfunc, __pyx_v_inclusive);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/groupby.pyx":641
 * '''
 * 
 * def ts_upsample_generic(ndarray[object] indices,             # <<<<<<<<<<<<<<
 *                         ndarray[object] buckets,
 *                         ndarray[float64_t] values,
 */

static PyObject *__pyx_pf_6pandas_8_tseries_86ts_upsample_generic(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indices, PyArrayObject *__pyx_v_buckets, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_aggfunc, PyObject *__pyx_v_inclusive) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_jstart;
  Py_ssize_t __pyx_v_nbuckets;
  Py_ssize_t __pyx_v_nvalues;
  PyArrayObject *__pyx_v_output = 0;
  PyObject *__pyx_v_next_bound = 0;
  CYTHON_UNUSED __pyx_t_5numpy_float64_t __pyx_v_the_sum;
  __pyx_t_5numpy_float64_t __pyx_v_nobs;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_buckets;
  __Pyx_Buffer __pyx_pybuffer_buckets;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indices;
  __Pyx_Buffer __pyx_pybuffer_indices;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_output;
  __Pyx_Buffer __pyx_pybuffer_output;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  __pyx_t_5numpy_float64_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ts_upsample_generic");
  __pyx_pybuffer_output.pybuffer.buf = NULL;
  __pyx_pybuffer_output.refcount = 0;
  __pyx_pybuffernd_output.data = NULL;
  __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output;
  __pyx_pybuffer_indices.pybuffer.buf = NULL;
  __pyx_pybuffer_indices.refcount = 0;
  __pyx_pybuffernd_indices.data = NULL;
  __pyx_pybuffernd_indices.rcbuffer = &__pyx_pybuffer_indices;
  __pyx_pybuffer_buckets.pybuffer.buf = NULL;
  __pyx_pybuffer_buckets.refcount = 0;
  __pyx_pybuffernd_buckets.data = NULL;
  __pyx_pybuffernd_buckets.rcbuffer = &__pyx_pybuffer_buckets;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indices.rcbuffer->pybuffer, (PyObject*)__pyx_v_indices, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indices.diminfo[0].strides = __pyx_pybuffernd_indices.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indices.diminfo[0].shape = __pyx_pybuffernd_indices.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_buckets.rcbuffer->pybuffer, (PyObject*)__pyx_v_buckets, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_buckets.diminfo[0].strides = __pyx_pybuffernd_buckets.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_buckets.diminfo[0].shape = __pyx_pybuffernd_buckets.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":655
 *         float64_t the_sum, val, nobs
 * 
 *     nbuckets = len(buckets)             # <<<<<<<<<<<<<<
 *     nvalues = len(indices)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_buckets)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nbuckets = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":656
 * 
 *     nbuckets = len(buckets)
 *     nvalues = len(indices)             # <<<<<<<<<<<<<<
 * 
 *     assert(len(values) == len(indices))
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indices)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nvalues = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":658
 *     nvalues = len(indices)
 * 
 *     assert(len(values) == len(indices))             # <<<<<<<<<<<<<<
 * 
 *     output = np.empty(nbuckets, dtype=float)
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_indices)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!(__pyx_t_1 == __pyx_t_2))) {
    PyErr_SetNone(PyExc_AssertionError);
    {__pyx_filename = __pyx_f[5]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":660
 *     assert(len(values) == len(indices))
 * 
 *     output = np.empty(nbuckets, dtype=float)             # <<<<<<<<<<<<<<
 *     output.fill(np.NaN)
 * 
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_nbuckets); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_v_output, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":661
 * 
 *     output = np.empty(nbuckets, dtype=float)
 *     output.fill(np.NaN)             # <<<<<<<<<<<<<<
 * 
 *     j = 0
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_output), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__NaN); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":663
 *     output.fill(np.NaN)
 * 
 *     j = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < nbuckets:
 *         next_bound = buckets[i]
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":664
 * 
 *     j = 0
 *     for i from 0 <= i < nbuckets:             # <<<<<<<<<<<<<<
 *         next_bound = buckets[i]
 *         the_sum = 0
 */
  __pyx_t_2 = __pyx_v_nbuckets;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":665
 *     j = 0
 *     for i from 0 <= i < nbuckets:
 *         next_bound = buckets[i]             # <<<<<<<<<<<<<<
 *         the_sum = 0
 *         nobs = 0
 */
    __pyx_t_1 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_1 < 0) {
      __pyx_t_1 += __pyx_pybuffernd_buckets.diminfo[0].shape;
      if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_buckets.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[5]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_buckets.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_buckets.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_XDECREF(__pyx_v_next_bound);
    __pyx_v_next_bound = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":666
 *     for i from 0 <= i < nbuckets:
 *         next_bound = buckets[i]
 *         the_sum = 0             # <<<<<<<<<<<<<<
 *         nobs = 0
 * 
 */
    __pyx_v_the_sum = 0.0;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":667
 *         next_bound = buckets[i]
 *         the_sum = 0
 *         nobs = 0             # <<<<<<<<<<<<<<
 * 
 *         jstart = j
 */
    __pyx_v_nobs = 0.0;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":669
 *         nobs = 0
 * 
 *         jstart = j             # <<<<<<<<<<<<<<
 *         if inclusive:
 *             while j < nvalues and indices[j] <= next_bound:
 */
    __pyx_v_jstart = __pyx_v_j;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":670
 * 
 *         jstart = j
 *         if inclusive:             # <<<<<<<<<<<<<<
 *             while j < nvalues and indices[j] <= next_bound:
 *                 j += 1
 */
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_inclusive); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_12) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":671
 *         jstart = j
 *         if inclusive:
 *             while j < nvalues and indices[j] <= next_bound:             # <<<<<<<<<<<<<<
 *                 j += 1
 *         else:
 */
      while (1) {
        __pyx_t_12 = (__pyx_v_j < __pyx_v_nvalues);
        if (__pyx_t_12) {
          __pyx_t_13 = __pyx_v_j;
          __pyx_t_8 = -1;
          if (__pyx_t_13 < 0) {
            __pyx_t_13 += __pyx_pybuffernd_indices.diminfo[0].shape;
            if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
          } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_8 = 0;
          if (unlikely(__pyx_t_8 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_8);
            {__pyx_filename = __pyx_f[5]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_indices.diminfo[0].strides);
          __Pyx_INCREF((PyObject*)__pyx_t_5);
          __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_next_bound, Py_LE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_15 = __pyx_t_14;
        } else {
          __pyx_t_15 = __pyx_t_12;
        }
        if (!__pyx_t_15) break;

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":672
 *         if inclusive:
 *             while j < nvalues and indices[j] <= next_bound:
 *                 j += 1             # <<<<<<<<<<<<<<
 *         else:
 *             while j < nvalues and indices[j] < next_bound:
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":674
 *                 j += 1
 *         else:
 *             while j < nvalues and indices[j] < next_bound:             # <<<<<<<<<<<<<<
 *                 j += 1
 * 
 */
      while (1) {
        __pyx_t_15 = (__pyx_v_j < __pyx_v_nvalues);
        if (__pyx_t_15) {
          __pyx_t_16 = __pyx_v_j;
          __pyx_t_8 = -1;
          if (__pyx_t_16 < 0) {
            __pyx_t_16 += __pyx_pybuffernd_indices.diminfo[0].shape;
            if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
          } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_indices.diminfo[0].shape)) __pyx_t_8 = 0;
          if (unlikely(__pyx_t_8 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_8);
            {__pyx_filename = __pyx_f[5]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_indices.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_indices.diminfo[0].strides);
          __Pyx_INCREF((PyObject*)__pyx_t_3);
          __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_v_next_bound, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_14 = __pyx_t_12;
        } else {
          __pyx_t_14 = __pyx_t_15;
        }
        if (!__pyx_t_14) break;

        /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":675
 *         else:
 *             while j < nvalues and indices[j] < next_bound:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *         if nobs > 0:
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":677
 *                 j += 1
 * 
 *         if nobs > 0:             # <<<<<<<<<<<<<<
 *             output[i] = aggfunc(values[jstart:j])
 * 
 */
    __pyx_t_14 = (__pyx_v_nobs > 0.0);
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":678
 * 
 *         if nobs > 0:
 *             output[i] = aggfunc(values[jstart:j])             # <<<<<<<<<<<<<<
 * 
 *         if j >= nvalues:
 */
      __pyx_t_5 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_values), __pyx_v_jstart, __pyx_v_j); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_Call(__pyx_v_aggfunc, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_17 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_18 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[5]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_t_17;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":680
 *             output[i] = aggfunc(values[jstart:j])
 * 
 *         if j >= nvalues:             # <<<<<<<<<<<<<<
 *             break
 * 
 */
    __pyx_t_14 = (__pyx_v_j >= __pyx_v_nvalues);
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":681
 * 
 *         if j >= nvalues:
 *             break             # <<<<<<<<<<<<<<
 * 
 *     return output
 */
      goto __pyx_L4_break;
      goto __pyx_L11;
    }
    __pyx_L11:;
  }
  __pyx_L4_break:;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":683
 *             break
 * 
 *     return output             # <<<<<<<<<<<<<<
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_output));
  __pyx_r = ((PyObject *)__pyx_v_output);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_buckets.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.ts_upsample_generic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_buckets.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indices.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XDECREF(__pyx_v_next_bound);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_89kth_smallest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_89kth_smallest = {__Pyx_NAMESTR("kth_smallest"), (PyCFunction)__pyx_pw_6pandas_8_tseries_89kth_smallest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_89kth_smallest(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_a = 0;
  Py_ssize_t __pyx_v_k;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__a,&__pyx_n_s__k,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("kth_smallest (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__k);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("kth_smallest", 1, 2, 2, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "kth_smallest") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_a = ((PyArrayObject *)values[0]);
      __pyx_v_k = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_k == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_a = ((PyArrayObject *)values[0]);
    __pyx_v_k = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_k == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("kth_smallest", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.kth_smallest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_5numpy_ndarray, 1, "a", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_88kth_smallest(__pyx_self, __pyx_v_a, __pyx_v_k);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":28
 * 
 * 
 * def kth_smallest(ndarray[double_t] a, Py_ssize_t k):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i,j,l,m,n
 */

static PyObject *__pyx_pf_6pandas_8_tseries_88kth_smallest(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_a, Py_ssize_t __pyx_v_k) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_l;
  Py_ssize_t __pyx_v_m;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_double_t __pyx_v_x;
  __pyx_t_5numpy_double_t __pyx_v_t;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_a;
  __Pyx_Buffer __pyx_pybuffer_a;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("kth_smallest");
  __pyx_pybuffer_a.pybuffer.buf = NULL;
  __pyx_pybuffer_a.refcount = 0;
  __pyx_pybuffernd_a.data = NULL;
  __pyx_pybuffernd_a.rcbuffer = &__pyx_pybuffer_a;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_a, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_a.diminfo[0].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a.diminfo[0].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":33
 *         double_t x, t
 * 
 *     n = len(a)             # <<<<<<<<<<<<<<
 * 
 *     l = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_a)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":35
 *     n = len(a)
 * 
 *     l = 0             # <<<<<<<<<<<<<<
 *     m = n-1
 *     while (l<m):
 */
  __pyx_v_l = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":36
 * 
 *     l = 0
 *     m = n-1             # <<<<<<<<<<<<<<
 *     while (l<m):
 *         x = a[k]
 */
  __pyx_v_m = (__pyx_v_n - 1);

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":37
 *     l = 0
 *     m = n-1
 *     while (l<m):             # <<<<<<<<<<<<<<
 *         x = a[k]
 *         i = l
 */
  while (1) {
    __pyx_t_2 = (__pyx_v_l < __pyx_v_m);
    if (!__pyx_t_2) break;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":38
 *     m = n-1
 *     while (l<m):
 *         x = a[k]             # <<<<<<<<<<<<<<
 *         i = l
 *         j = m
 */
    __pyx_t_1 = __pyx_v_k;
    __pyx_t_3 = -1;
    if (__pyx_t_1 < 0) {
      __pyx_t_1 += __pyx_pybuffernd_a.diminfo[0].shape;
      if (unlikely(__pyx_t_1 < 0)) __pyx_t_3 = 0;
    } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0;
    if (unlikely(__pyx_t_3 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_3);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_x = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_a.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":39
 *     while (l<m):
 *         x = a[k]
 *         i = l             # <<<<<<<<<<<<<<
 *         j = m
 * 
 */
    __pyx_v_i = __pyx_v_l;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":40
 *         x = a[k]
 *         i = l
 *         j = m             # <<<<<<<<<<<<<<
 * 
 *         while 1:
 */
    __pyx_v_j = __pyx_v_m;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":42
 *         j = m
 * 
 *         while 1:             # <<<<<<<<<<<<<<
 *             while a[i] < x: i += 1
 *             while x < a[j]: j -= 1
 */
    while (1) {
      if (!1) break;

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":43
 * 
 *         while 1:
 *             while a[i] < x: i += 1             # <<<<<<<<<<<<<<
 *             while x < a[j]: j -= 1
 *             if i <= j:
 */
      while (1) {
        __pyx_t_4 = __pyx_v_i;
        __pyx_t_3 = -1;
        if (__pyx_t_4 < 0) {
          __pyx_t_4 += __pyx_pybuffernd_a.diminfo[0].shape;
          if (unlikely(__pyx_t_4 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[6]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_2 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_a.diminfo[0].strides)) < __pyx_v_x);
        if (!__pyx_t_2) break;
        __pyx_v_i = (__pyx_v_i + 1);
      }

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":44
 *         while 1:
 *             while a[i] < x: i += 1
 *             while x < a[j]: j -= 1             # <<<<<<<<<<<<<<
 *             if i <= j:
 *                 t = a[i]
 */
      while (1) {
        __pyx_t_5 = __pyx_v_j;
        __pyx_t_3 = -1;
        if (__pyx_t_5 < 0) {
          __pyx_t_5 += __pyx_pybuffernd_a.diminfo[0].shape;
          if (unlikely(__pyx_t_5 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[6]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_2 = (__pyx_v_x < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_a.diminfo[0].strides)));
        if (!__pyx_t_2) break;
        __pyx_v_j = (__pyx_v_j - 1);
      }

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":45
 *             while a[i] < x: i += 1
 *             while x < a[j]: j -= 1
 *             if i <= j:             # <<<<<<<<<<<<<<
 *                 t = a[i]
 *                 a[i] = a[j]
 */
      __pyx_t_2 = (__pyx_v_i <= __pyx_v_j);
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":46
 *             while x < a[j]: j -= 1
 *             if i <= j:
 *                 t = a[i]             # <<<<<<<<<<<<<<
 *                 a[i] = a[j]
 *                 a[j] = t
 */
        __pyx_t_6 = __pyx_v_i;
        __pyx_t_3 = -1;
        if (__pyx_t_6 < 0) {
          __pyx_t_6 += __pyx_pybuffernd_a.diminfo[0].shape;
          if (unlikely(__pyx_t_6 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[6]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_v_t = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_a.diminfo[0].strides));

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":47
 *             if i <= j:
 *                 t = a[i]
 *                 a[i] = a[j]             # <<<<<<<<<<<<<<
 *                 a[j] = t
 *                 i += 1; j -= 1
 */
        __pyx_t_7 = __pyx_v_j;
        __pyx_t_3 = -1;
        if (__pyx_t_7 < 0) {
          __pyx_t_7 += __pyx_pybuffernd_a.diminfo[0].shape;
          if (unlikely(__pyx_t_7 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[6]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_8 = __pyx_v_i;
        __pyx_t_3 = -1;
        if (__pyx_t_8 < 0) {
          __pyx_t_8 += __pyx_pybuffernd_a.diminfo[0].shape;
          if (unlikely(__pyx_t_8 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[6]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_a.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_a.diminfo[0].strides));

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":48
 *                 t = a[i]
 *                 a[i] = a[j]
 *                 a[j] = t             # <<<<<<<<<<<<<<
 *                 i += 1; j -= 1
 * 
 */
        __pyx_t_9 = __pyx_v_j;
        __pyx_t_3 = -1;
        if (__pyx_t_9 < 0) {
          __pyx_t_9 += __pyx_pybuffernd_a.diminfo[0].shape;
          if (unlikely(__pyx_t_9 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[6]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_a.diminfo[0].strides) = __pyx_v_t;

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":49
 *                 a[i] = a[j]
 *                 a[j] = t
 *                 i += 1; j -= 1             # <<<<<<<<<<<<<<
 * 
 *             if i > j: break
 */
        __pyx_v_i = (__pyx_v_i + 1);
        __pyx_v_j = (__pyx_v_j - 1);
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":51
 *                 i += 1; j -= 1
 * 
 *             if i > j: break             # <<<<<<<<<<<<<<
 * 
 *         if j < k: l = i
 */
      __pyx_t_2 = (__pyx_v_i > __pyx_v_j);
      if (__pyx_t_2) {
        goto __pyx_L6_break;
        goto __pyx_L12;
      }
      __pyx_L12:;
    }
    __pyx_L6_break:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":53
 *             if i > j: break
 * 
 *         if j < k: l = i             # <<<<<<<<<<<<<<
 *         if k < i: m = j
 *     return a[k]
 */
    __pyx_t_2 = (__pyx_v_j < __pyx_v_k);
    if (__pyx_t_2) {
      __pyx_v_l = __pyx_v_i;
      goto __pyx_L13;
    }
    __pyx_L13:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":54
 * 
 *         if j < k: l = i
 *         if k < i: m = j             # <<<<<<<<<<<<<<
 *     return a[k]
 * 
 */
    __pyx_t_2 = (__pyx_v_k < __pyx_v_i);
    if (__pyx_t_2) {
      __pyx_v_m = __pyx_v_j;
      goto __pyx_L14;
    }
    __pyx_L14:;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":55
 *         if j < k: l = i
 *         if k < i: m = j
 *     return a[k]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_10 = __pyx_v_k;
  __pyx_t_3 = -1;
  if (__pyx_t_10 < 0) {
    __pyx_t_10 += __pyx_pybuffernd_a.diminfo[0].shape;
    if (unlikely(__pyx_t_10 < 0)) __pyx_t_3 = 0;
  } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_a.diminfo[0].shape)) __pyx_t_3 = 0;
  if (unlikely(__pyx_t_3 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_3);
    {__pyx_filename = __pyx_f[6]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_a.diminfo[0].strides))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_r = __pyx_t_11;
  __pyx_t_11 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_11);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.kth_smallest", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_91median(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static char __pyx_doc_6pandas_8_tseries_90median[] = "\n    A faster median\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_91median = {__Pyx_NAMESTR("median"), (PyCFunction)__pyx_pw_6pandas_8_tseries_91median, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_90median)};
static PyObject *__pyx_pw_6pandas_8_tseries_91median(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("median (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_90median(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":58
 * 
 * 
 * def median(ndarray arr):             # <<<<<<<<<<<<<<
 *     '''
 *     A faster median
 */

static PyObject *__pyx_pf_6pandas_8_tseries_90median(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  int __pyx_v_n;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  long __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("median");
  __Pyx_INCREF((PyObject *)__pyx_v_arr);

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":62
 *     A faster median
 *     '''
 *     cdef int n = len(arr)             # <<<<<<<<<<<<<<
 * 
 *     if len(arr) == 0:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":64
 *     cdef int n = len(arr)
 * 
 *     if len(arr) == 0:             # <<<<<<<<<<<<<<
 *         return np.NaN
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = (__pyx_t_1 == 0);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":65
 * 
 *     if len(arr) == 0:
 *         return np.NaN             # <<<<<<<<<<<<<<
 * 
 *     arr = arr.copy()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__NaN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":67
 *         return np.NaN
 * 
 *     arr = arr.copy()             # <<<<<<<<<<<<<<
 * 
 *     if n % 2:
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__copy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_v_arr));
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":69
 *     arr = arr.copy()
 * 
 *     if n % 2:             # <<<<<<<<<<<<<<
 *         return kth_smallest(arr, n / 2)
 *     else:
 */
  __pyx_t_5 = __Pyx_mod_long(__pyx_v_n, 2);
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":70
 * 
 *     if n % 2:
 *         return kth_smallest(arr, n / 2)             # <<<<<<<<<<<<<<
 *     else:
 *         return (kth_smallest(arr, n / 2) +
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__kth_smallest); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyInt_FromLong(__Pyx_div_long(__pyx_v_n, 2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(((PyObject *)__pyx_v_arr));
    PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_arr));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_arr));
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":72
 *         return kth_smallest(arr, n / 2)
 *     else:
 *         return (kth_smallest(arr, n / 2) +             # <<<<<<<<<<<<<<
 *                 kth_smallest(arr, n / 2 - 1)) / 2
 * 
 */
    __Pyx_XDECREF(__pyx_r);

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":73
 *     else:
 *         return (kth_smallest(arr, n / 2) +
 *                 kth_smallest(arr, n / 2 - 1)) / 2             # <<<<<<<<<<<<<<
 * 
 * #-------------------------------------------------------------------------------
 */
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__kth_smallest); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":72
 *         return kth_smallest(arr, n / 2)
 *     else:
 *         return (kth_smallest(arr, n / 2) +             # <<<<<<<<<<<<<<
 *                 kth_smallest(arr, n / 2 - 1)) / 2
 * 
 */
    __pyx_t_6 = PyInt_FromLong(__Pyx_div_long(__pyx_v_n, 2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)__pyx_v_arr));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_arr));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_arr));
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":73
 *     else:
 *         return (kth_smallest(arr, n / 2) +
 *                 kth_smallest(arr, n / 2 - 1)) / 2             # <<<<<<<<<<<<<<
 * 
 * #-------------------------------------------------------------------------------
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__kth_smallest); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyInt_FromLong((__Pyx_div_long(__pyx_v_n, 2) - 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(((PyObject *)__pyx_v_arr));
    PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_arr));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_arr));
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
    __pyx_t_7 = PyNumber_Add(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_7, __pyx_int_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pandas._tseries.median", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_93roll_sum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_93roll_sum = {__Pyx_NAMESTR("roll_sum"), (PyCFunction)__pyx_pw_6pandas_8_tseries_93roll_sum, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_93roll_sum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_input = 0;
  int __pyx_v_win;
  int __pyx_v_minp;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("roll_sum (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_sum", 1, 3, 3, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_sum", 1, 3, 3, 2); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_sum") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_input = ((PyArrayObject *)values[0]);
      __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_input = ((PyArrayObject *)values[0]);
    __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("roll_sum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.roll_sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_92roll_sum(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":78
 * # Rolling sum
 * 
 * def roll_sum(ndarray[double_t] input, int win, int minp):             # <<<<<<<<<<<<<<
 *     cdef double val, prev, sum_x = 0
 *     cdef int nobs = 0, i
 */

static PyObject *__pyx_pf_6pandas_8_tseries_92roll_sum(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) {
  double __pyx_v_val;
  double __pyx_v_prev;
  double __pyx_v_sum_x;
  int __pyx_v_nobs;
  int __pyx_v_i;
  int __pyx_v_N;
  PyArrayObject *__pyx_v_output = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_output;
  __Pyx_Buffer __pyx_pybuffer_output;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_input;
  __Pyx_Buffer __pyx_pybuffer_input;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("roll_sum");
  __pyx_pybuffer_output.pybuffer.buf = NULL;
  __pyx_pybuffer_output.refcount = 0;
  __pyx_pybuffernd_output.data = NULL;
  __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output;
  __pyx_pybuffer_input.pybuffer.buf = NULL;
  __pyx_pybuffer_input.refcount = 0;
  __pyx_pybuffernd_input.data = NULL;
  __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":79
 * 
 * def roll_sum(ndarray[double_t] input, int win, int minp):
 *     cdef double val, prev, sum_x = 0             # <<<<<<<<<<<<<<
 *     cdef int nobs = 0, i
 *     cdef int N = len(input)
 */
  __pyx_v_sum_x = 0.0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":80
 * def roll_sum(ndarray[double_t] input, int win, int minp):
 *     cdef double val, prev, sum_x = 0
 *     cdef int nobs = 0, i             # <<<<<<<<<<<<<<
 *     cdef int N = len(input)
 * 
 */
  __pyx_v_nobs = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":81
 *     cdef double val, prev, sum_x = 0
 *     cdef int nobs = 0, i
 *     cdef int N = len(input)             # <<<<<<<<<<<<<<
 * 
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_N = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":83
 *     cdef int N = len(input)
 * 
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)             # <<<<<<<<<<<<<<
 * 
 *     minp = _check_minp(minp, N)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":85
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)
 * 
 *     minp = _check_minp(minp, N)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < minp - 1:
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyInt_FromLong(__pyx_v_N); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_minp = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":87
 *     minp = _check_minp(minp, N)
 * 
 *     for i from 0 <= i < minp - 1:             # <<<<<<<<<<<<<<
 *         val = input[i]
 * 
 */
  __pyx_t_8 = (__pyx_v_minp - 1);
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":88
 * 
 *     for i from 0 <= i < minp - 1:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         # Not NaN
 */
    __pyx_t_7 = __pyx_v_i;
    __pyx_t_9 = -1;
    if (__pyx_t_7 < 0) {
      __pyx_t_7 += __pyx_pybuffernd_input.diminfo[0].shape;
      if (unlikely(__pyx_t_7 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_7 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_input.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":91
 * 
 *         # Not NaN
 *         if val == val:             # <<<<<<<<<<<<<<
 *             nobs += 1
 *             sum_x += val
 */
    __pyx_t_10 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_10) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":92
 *         # Not NaN
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             sum_x += val
 * 
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":93
 *         if val == val:
 *             nobs += 1
 *             sum_x += val             # <<<<<<<<<<<<<<
 * 
 *         output[i] = NaN
 */
      __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val);
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":95
 *             sum_x += val
 * 
 *         output[i] = NaN             # <<<<<<<<<<<<<<
 * 
 *     for i from minp - 1 <= i < N:
 */
    __pyx_t_9 = __pyx_v_i;
    __pyx_t_11 = -1;
    if (__pyx_t_9 < 0) {
      __pyx_t_9 += __pyx_pybuffernd_output.diminfo[0].shape;
      if (unlikely(__pyx_t_9 < 0)) __pyx_t_11 = 0;
    } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_11 = 0;
    if (unlikely(__pyx_t_11 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_11);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_NaN;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":97
 *         output[i] = NaN
 * 
 *     for i from minp - 1 <= i < N:             # <<<<<<<<<<<<<<
 *         val = input[i]
 * 
 */
  __pyx_t_11 = __pyx_v_N;
  for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_11; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":98
 * 
 *     for i from minp - 1 <= i < N:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         if i > win - 1:
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_13 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_input.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_13 = 0;
    if (unlikely(__pyx_t_13 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_13);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_input.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":100
 *         val = input[i]
 * 
 *         if i > win - 1:             # <<<<<<<<<<<<<<
 *             prev = input[i - win]
 *             if prev == prev:
 */
    __pyx_t_10 = (__pyx_v_i > (__pyx_v_win - 1));
    if (__pyx_t_10) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":101
 * 
 *         if i > win - 1:
 *             prev = input[i - win]             # <<<<<<<<<<<<<<
 *             if prev == prev:
 *                 sum_x -= prev
 */
      __pyx_t_13 = (__pyx_v_i - __pyx_v_win);
      __pyx_t_14 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_14 = 0;
      if (unlikely(__pyx_t_14 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_14);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":102
 *         if i > win - 1:
 *             prev = input[i - win]
 *             if prev == prev:             # <<<<<<<<<<<<<<
 *                 sum_x -= prev
 *                 nobs -= 1
 */
      __pyx_t_10 = (__pyx_v_prev == __pyx_v_prev);
      if (__pyx_t_10) {

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":103
 *             prev = input[i - win]
 *             if prev == prev:
 *                 sum_x -= prev             # <<<<<<<<<<<<<<
 *                 nobs -= 1
 * 
 */
        __pyx_v_sum_x = (__pyx_v_sum_x - __pyx_v_prev);

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":104
 *             if prev == prev:
 *                 sum_x -= prev
 *                 nobs -= 1             # <<<<<<<<<<<<<<
 * 
 *         if val == val:
 */
        __pyx_v_nobs = (__pyx_v_nobs - 1);
        goto __pyx_L9;
      }
      __pyx_L9:;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":106
 *                 nobs -= 1
 * 
 *         if val == val:             # <<<<<<<<<<<<<<
 *             nobs += 1
 *             sum_x += val
 */
    __pyx_t_10 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_10) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":107
 * 
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             sum_x += val
 * 
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":108
 *         if val == val:
 *             nobs += 1
 *             sum_x += val             # <<<<<<<<<<<<<<
 * 
 *         if nobs >= minp:
 */
      __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val);
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":110
 *             sum_x += val
 * 
 *         if nobs >= minp:             # <<<<<<<<<<<<<<
 *             output[i] = sum_x
 *         else:
 */
    __pyx_t_10 = (__pyx_v_nobs >= __pyx_v_minp);
    if (__pyx_t_10) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":111
 * 
 *         if nobs >= minp:
 *             output[i] = sum_x             # <<<<<<<<<<<<<<
 *         else:
 *             output[i] = NaN
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_15 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_15 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_15 = 0;
      if (unlikely(__pyx_t_15 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_15);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_sum_x;
      goto __pyx_L11;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":113
 *             output[i] = sum_x
 *         else:
 *             output[i] = NaN             # <<<<<<<<<<<<<<
 * 
 *     return output
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_16 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_16 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_16 = 0;
      if (unlikely(__pyx_t_16 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_16);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L11:;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":115
 *             output[i] = NaN
 * 
 *     return output             # <<<<<<<<<<<<<<
 * 
 * #-------------------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_output));
  __pyx_r = ((PyObject *)__pyx_v_output);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.roll_sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_95roll_mean(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_95roll_mean = {__Pyx_NAMESTR("roll_mean"), (PyCFunction)__pyx_pw_6pandas_8_tseries_95roll_mean, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_95roll_mean(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_input = 0;
  int __pyx_v_win;
  int __pyx_v_minp;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("roll_mean (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_mean", 1, 3, 3, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_mean", 1, 3, 3, 2); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_mean") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_input = ((PyArrayObject *)values[0]);
      __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_input = ((PyArrayObject *)values[0]);
    __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("roll_mean", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.roll_mean", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_94roll_mean(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":120
 * # Rolling mean
 * 
 * def roll_mean(ndarray[double_t] input,             # <<<<<<<<<<<<<<
 *                int win, int minp):
 *     cdef double val, prev, sum_x = 0
 */

static PyObject *__pyx_pf_6pandas_8_tseries_94roll_mean(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) {
  double __pyx_v_val;
  double __pyx_v_prev;
  double __pyx_v_sum_x;
  Py_ssize_t __pyx_v_nobs;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_N;
  PyArrayObject *__pyx_v_output = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_output;
  __Pyx_Buffer __pyx_pybuffer_output;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_input;
  __Pyx_Buffer __pyx_pybuffer_input;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("roll_mean");
  __pyx_pybuffer_output.pybuffer.buf = NULL;
  __pyx_pybuffer_output.refcount = 0;
  __pyx_pybuffernd_output.data = NULL;
  __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output;
  __pyx_pybuffer_input.pybuffer.buf = NULL;
  __pyx_pybuffer_input.refcount = 0;
  __pyx_pybuffernd_input.data = NULL;
  __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":122
 * def roll_mean(ndarray[double_t] input,
 *                int win, int minp):
 *     cdef double val, prev, sum_x = 0             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t nobs = 0, i
 *     cdef Py_ssize_t N = len(input)
 */
  __pyx_v_sum_x = 0.0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":123
 *                int win, int minp):
 *     cdef double val, prev, sum_x = 0
 *     cdef Py_ssize_t nobs = 0, i             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t N = len(input)
 * 
 */
  __pyx_v_nobs = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":124
 *     cdef double val, prev, sum_x = 0
 *     cdef Py_ssize_t nobs = 0, i
 *     cdef Py_ssize_t N = len(input)             # <<<<<<<<<<<<<<
 * 
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_N = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":126
 *     cdef Py_ssize_t N = len(input)
 * 
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)             # <<<<<<<<<<<<<<
 * 
 *     minp = _check_minp(minp, N)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":128
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)
 * 
 *     minp = _check_minp(minp, N)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < minp - 1:
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_minp = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":130
 *     minp = _check_minp(minp, N)
 * 
 *     for i from 0 <= i < minp - 1:             # <<<<<<<<<<<<<<
 *         val = input[i]
 * 
 */
  __pyx_t_8 = (__pyx_v_minp - 1);
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":131
 * 
 *     for i from 0 <= i < minp - 1:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         # Not NaN
 */
    __pyx_t_1 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_1 < 0) {
      __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape;
      if (unlikely(__pyx_t_1 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":134
 * 
 *         # Not NaN
 *         if val == val:             # <<<<<<<<<<<<<<
 *             nobs += 1
 *             sum_x += val
 */
    __pyx_t_9 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":135
 *         # Not NaN
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             sum_x += val
 * 
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":136
 *         if val == val:
 *             nobs += 1
 *             sum_x += val             # <<<<<<<<<<<<<<
 * 
 *         output[i] = NaN
 */
      __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val);
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":138
 *             sum_x += val
 * 
 *         output[i] = NaN             # <<<<<<<<<<<<<<
 * 
 *     for i from minp - 1 <= i < N:
 */
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_pybuffernd_output.diminfo[0].shape;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_NaN;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":140
 *         output[i] = NaN
 * 
 *     for i from minp - 1 <= i < N:             # <<<<<<<<<<<<<<
 *         val = input[i]
 * 
 */
  __pyx_t_11 = __pyx_v_N;
  for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_11; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":141
 * 
 *     for i from minp - 1 <= i < N:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         if i > win - 1:
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_input.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_input.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":143
 *         val = input[i]
 * 
 *         if i > win - 1:             # <<<<<<<<<<<<<<
 *             prev = input[i - win]
 *             if prev == prev:
 */
    __pyx_t_9 = (__pyx_v_i > (__pyx_v_win - 1));
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":144
 * 
 *         if i > win - 1:
 *             prev = input[i - win]             # <<<<<<<<<<<<<<
 *             if prev == prev:
 *                 sum_x -= prev
 */
      __pyx_t_13 = (__pyx_v_i - __pyx_v_win);
      __pyx_t_7 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":145
 *         if i > win - 1:
 *             prev = input[i - win]
 *             if prev == prev:             # <<<<<<<<<<<<<<
 *                 sum_x -= prev
 *                 nobs -= 1
 */
      __pyx_t_9 = (__pyx_v_prev == __pyx_v_prev);
      if (__pyx_t_9) {

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":146
 *             prev = input[i - win]
 *             if prev == prev:
 *                 sum_x -= prev             # <<<<<<<<<<<<<<
 *                 nobs -= 1
 * 
 */
        __pyx_v_sum_x = (__pyx_v_sum_x - __pyx_v_prev);

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":147
 *             if prev == prev:
 *                 sum_x -= prev
 *                 nobs -= 1             # <<<<<<<<<<<<<<
 * 
 *         if val == val:
 */
        __pyx_v_nobs = (__pyx_v_nobs - 1);
        goto __pyx_L9;
      }
      __pyx_L9:;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":149
 *                 nobs -= 1
 * 
 *         if val == val:             # <<<<<<<<<<<<<<
 *             nobs += 1
 *             sum_x += val
 */
    __pyx_t_9 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":150
 * 
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             sum_x += val
 * 
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":151
 *         if val == val:
 *             nobs += 1
 *             sum_x += val             # <<<<<<<<<<<<<<
 * 
 *         if nobs >= minp:
 */
      __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val);
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":153
 *             sum_x += val
 * 
 *         if nobs >= minp:             # <<<<<<<<<<<<<<
 *             output[i] = sum_x / nobs
 *         else:
 */
    __pyx_t_9 = (__pyx_v_nobs >= __pyx_v_minp);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":154
 * 
 *         if nobs >= minp:
 *             output[i] = sum_x / nobs             # <<<<<<<<<<<<<<
 *         else:
 *             output[i] = NaN
 */
      if (unlikely(__pyx_v_nobs == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "float division");
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_output.diminfo[0].strides) = (__pyx_v_sum_x / __pyx_v_nobs);
      goto __pyx_L11;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":156
 *             output[i] = sum_x / nobs
 *         else:
 *             output[i] = NaN             # <<<<<<<<<<<<<<
 * 
 *     return output
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L11:;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":158
 *             output[i] = NaN
 * 
 *     return output             # <<<<<<<<<<<<<<
 * 
 * #-------------------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_output));
  __pyx_r = ((PyObject *)__pyx_v_output);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.roll_mean", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_97ewma(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_96ewma[] = "\n    Compute exponentially-weighted moving average using center-of-mass.\n\n    Parameters\n    ----------\n    input : ndarray (float64 type)\n    com : float64\n\n    Returns\n    -------\n    y : ndarray\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_97ewma = {__Pyx_NAMESTR("ewma"), (PyCFunction)__pyx_pw_6pandas_8_tseries_97ewma, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_96ewma)};
static PyObject *__pyx_pw_6pandas_8_tseries_97ewma(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_input = 0;
  __pyx_t_5numpy_double_t __pyx_v_com;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__com,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ewma (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__com);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("ewma", 1, 2, 2, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ewma") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_input = ((PyArrayObject *)values[0]);
      __pyx_v_com = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_com == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_input = ((PyArrayObject *)values[0]);
    __pyx_v_com = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_com == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ewma", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.ewma", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_96ewma(__pyx_self, __pyx_v_input, __pyx_v_com);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":163
 * # Exponentially weighted moving average
 * 
 * def ewma(ndarray[double_t] input, double_t com):             # <<<<<<<<<<<<<<
 *     '''
 *     Compute exponentially-weighted moving average using center-of-mass.
 */

static PyObject *__pyx_pf_6pandas_8_tseries_96ewma(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, __pyx_t_5numpy_double_t __pyx_v_com) {
  double __pyx_v_cur;
  double __pyx_v_prev;
  double __pyx_v_neww;
  double __pyx_v_oldw;
  double __pyx_v_adj;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_N;
  PyArrayObject *__pyx_v_output = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_output;
  __Pyx_Buffer __pyx_pybuffer_output;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_input;
  __Pyx_Buffer __pyx_pybuffer_input;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  __pyx_t_5numpy_double_t __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  long __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  double __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ewma");
  __pyx_pybuffer_output.pybuffer.buf = NULL;
  __pyx_pybuffer_output.refcount = 0;
  __pyx_pybuffernd_output.data = NULL;
  __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output;
  __pyx_pybuffer_input.pybuffer.buf = NULL;
  __pyx_pybuffer_input.refcount = 0;
  __pyx_pybuffernd_input.data = NULL;
  __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":179
 *     cdef double cur, prev, neww, oldw, adj
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t N = len(input)             # <<<<<<<<<<<<<<
 * 
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_N = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":181
 *     cdef Py_ssize_t N = len(input)
 * 
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":184
 * 
 * 
 *     neww = 1. / (1. + com)             # <<<<<<<<<<<<<<
 *     oldw = 1. - neww
 *     adj = oldw
 */
  __pyx_t_7 = (1. + __pyx_v_com);
  if (unlikely(__pyx_t_7 == 0)) {
    PyErr_Format(PyExc_ZeroDivisionError, "float division");
    {__pyx_filename = __pyx_f[6]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_neww = (1. / __pyx_t_7);

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":185
 * 
 *     neww = 1. / (1. + com)
 *     oldw = 1. - neww             # <<<<<<<<<<<<<<
 *     adj = oldw
 * 
 */
  __pyx_v_oldw = (1. - __pyx_v_neww);

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":186
 *     neww = 1. / (1. + com)
 *     oldw = 1. - neww
 *     adj = oldw             # <<<<<<<<<<<<<<
 * 
 *     output[0] = neww * input[0]
 */
  __pyx_v_adj = __pyx_v_oldw;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":188
 *     adj = oldw
 * 
 *     output[0] = neww * input[0]             # <<<<<<<<<<<<<<
 * 
 *     for i from 1 <= i < N:
 */
  __pyx_t_8 = 0;
  __pyx_t_9 = -1;
  if (__pyx_t_8 < 0) {
    __pyx_t_8 += __pyx_pybuffernd_input.diminfo[0].shape;
    if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
  } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_9 = 0;
  if (unlikely(__pyx_t_9 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_9);
    {__pyx_filename = __pyx_f[6]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_10 = 0;
  __pyx_t_9 = -1;
  if (__pyx_t_10 < 0) {
    __pyx_t_10 += __pyx_pybuffernd_output.diminfo[0].shape;
    if (unlikely(__pyx_t_10 < 0)) __pyx_t_9 = 0;
  } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_9 = 0;
  if (unlikely(__pyx_t_9 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_9);
    {__pyx_filename = __pyx_f[6]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_output.diminfo[0].strides) = (__pyx_v_neww * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_input.diminfo[0].strides)));

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":190
 *     output[0] = neww * input[0]
 * 
 *     for i from 1 <= i < N:             # <<<<<<<<<<<<<<
 *         cur = input[i]
 *         prev = output[i - 1]
 */
  __pyx_t_1 = __pyx_v_N;
  for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":191
 * 
 *     for i from 1 <= i < N:
 *         cur = input[i]             # <<<<<<<<<<<<<<
 *         prev = output[i - 1]
 * 
 */
    __pyx_t_11 = __pyx_v_i;
    __pyx_t_9 = -1;
    if (__pyx_t_11 < 0) {
      __pyx_t_11 += __pyx_pybuffernd_input.diminfo[0].shape;
      if (unlikely(__pyx_t_11 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_input.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":192
 *     for i from 1 <= i < N:
 *         cur = input[i]
 *         prev = output[i - 1]             # <<<<<<<<<<<<<<
 * 
 *         if cur == cur:
 */
    __pyx_t_12 = (__pyx_v_i - 1);
    __pyx_t_9 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_output.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_output.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":194
 *         prev = output[i - 1]
 * 
 *         if cur == cur:             # <<<<<<<<<<<<<<
 *             if prev == prev:
 *                 output[i] = oldw * prev + neww * cur
 */
    __pyx_t_13 = (__pyx_v_cur == __pyx_v_cur);
    if (__pyx_t_13) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":195
 * 
 *         if cur == cur:
 *             if prev == prev:             # <<<<<<<<<<<<<<
 *                 output[i] = oldw * prev + neww * cur
 *             else:
 */
      __pyx_t_13 = (__pyx_v_prev == __pyx_v_prev);
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":196
 *         if cur == cur:
 *             if prev == prev:
 *                 output[i] = oldw * prev + neww * cur             # <<<<<<<<<<<<<<
 *             else:
 *                 output[i] = neww * cur
 */
        __pyx_t_14 = __pyx_v_i;
        __pyx_t_9 = -1;
        if (__pyx_t_14 < 0) {
          __pyx_t_14 += __pyx_pybuffernd_output.diminfo[0].shape;
          if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_9 = 0;
        if (unlikely(__pyx_t_9 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_9);
          {__pyx_filename = __pyx_f[6]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_output.diminfo[0].strides) = ((__pyx_v_oldw * __pyx_v_prev) + (__pyx_v_neww * __pyx_v_cur));
        goto __pyx_L6;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":198
 *                 output[i] = oldw * prev + neww * cur
 *             else:
 *                 output[i] = neww * cur             # <<<<<<<<<<<<<<
 *         else:
 *             output[i] = prev
 */
        __pyx_t_15 = __pyx_v_i;
        __pyx_t_9 = -1;
        if (__pyx_t_15 < 0) {
          __pyx_t_15 += __pyx_pybuffernd_output.diminfo[0].shape;
          if (unlikely(__pyx_t_15 < 0)) __pyx_t_9 = 0;
        } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_9 = 0;
        if (unlikely(__pyx_t_9 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_9);
          {__pyx_filename = __pyx_f[6]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_output.diminfo[0].strides) = (__pyx_v_neww * __pyx_v_cur);
      }
      __pyx_L6:;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":200
 *                 output[i] = neww * cur
 *         else:
 *             output[i] = prev             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < N:
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_9 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_prev;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":202
 *             output[i] = prev
 * 
 *     for i from 0 <= i < N:             # <<<<<<<<<<<<<<
 *         cur = input[i]
 *         output[i] = output[i] / (1. - adj)
 */
  __pyx_t_1 = __pyx_v_N;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":203
 * 
 *     for i from 0 <= i < N:
 *         cur = input[i]             # <<<<<<<<<<<<<<
 *         output[i] = output[i] / (1. - adj)
 * 
 */
    __pyx_t_17 = __pyx_v_i;
    __pyx_t_9 = -1;
    if (__pyx_t_17 < 0) {
      __pyx_t_17 += __pyx_pybuffernd_input.diminfo[0].shape;
      if (unlikely(__pyx_t_17 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_input.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":204
 *     for i from 0 <= i < N:
 *         cur = input[i]
 *         output[i] = output[i] / (1. - adj)             # <<<<<<<<<<<<<<
 * 
 *         if cur == cur:
 */
    __pyx_t_18 = __pyx_v_i;
    __pyx_t_9 = -1;
    if (__pyx_t_18 < 0) {
      __pyx_t_18 += __pyx_pybuffernd_output.diminfo[0].shape;
      if (unlikely(__pyx_t_18 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_output.diminfo[0].strides));
    __pyx_t_19 = (1. - __pyx_v_adj);
    if (unlikely(__pyx_t_19 == 0)) {
      PyErr_Format(PyExc_ZeroDivisionError, "float division");
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_20 = __pyx_v_i;
    __pyx_t_9 = -1;
    if (__pyx_t_20 < 0) {
      __pyx_t_20 += __pyx_pybuffernd_output.diminfo[0].shape;
      if (unlikely(__pyx_t_20 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_output.diminfo[0].strides) = (__pyx_t_7 / __pyx_t_19);

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":206
 *         output[i] = output[i] / (1. - adj)
 * 
 *         if cur == cur:             # <<<<<<<<<<<<<<
 *             adj *= oldw
 * 
 */
    __pyx_t_13 = (__pyx_v_cur == __pyx_v_cur);
    if (__pyx_t_13) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":207
 * 
 *         if cur == cur:
 *             adj *= oldw             # <<<<<<<<<<<<<<
 * 
 *     return output
 */
      __pyx_v_adj = (__pyx_v_adj * __pyx_v_oldw);
      goto __pyx_L9;
    }
    __pyx_L9:;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":209
 *             adj *= oldw
 * 
 *     return output             # <<<<<<<<<<<<<<
 * 
 * #-------------------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_output));
  __pyx_r = ((PyObject *)__pyx_v_output);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.ewma", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_99_check_minp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_99_check_minp = {__Pyx_NAMESTR("_check_minp"), (PyCFunction)__pyx_pw_6pandas_8_tseries_99_check_minp, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_99_check_minp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_minp = 0;
  PyObject *__pyx_v_N = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__minp,&__pyx_n_s__N,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_check_minp (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__N);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_check_minp", 1, 2, 2, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_minp") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_minp = values[0];
      __pyx_v_N = values[1];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_minp = values[0];
    __pyx_v_N = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_check_minp", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries._check_minp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_98_check_minp(__pyx_self, __pyx_v_minp, __pyx_v_N);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":214
 * # Rolling variance
 * 
 * def _check_minp(minp, N):             # <<<<<<<<<<<<<<
 *     if minp > N:
 *         minp = N + 1
 */

static PyObject *__pyx_pf_6pandas_8_tseries_98_check_minp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_minp, PyObject *__pyx_v_N) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_check_minp");
  __Pyx_INCREF(__pyx_v_minp);

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":215
 * 
 * def _check_minp(minp, N):
 *     if minp > N:             # <<<<<<<<<<<<<<
 *         minp = N + 1
 *     elif minp == 0:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_minp, __pyx_v_N, Py_GT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":216
 * def _check_minp(minp, N):
 *     if minp > N:
 *         minp = N + 1             # <<<<<<<<<<<<<<
 *     elif minp == 0:
 *         minp = 1
 */
    __pyx_t_1 = PyNumber_Add(__pyx_v_N, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_v_minp);
    __pyx_v_minp = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":217
 *     if minp > N:
 *         minp = N + 1
 *     elif minp == 0:             # <<<<<<<<<<<<<<
 *         minp = 1
 *     elif minp < 0:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_minp, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":218
 *         minp = N + 1
 *     elif minp == 0:
 *         minp = 1             # <<<<<<<<<<<<<<
 *     elif minp < 0:
 *         raise ValueError('min_periods must be >= 0')
 */
    __Pyx_INCREF(__pyx_int_1);
    __Pyx_DECREF(__pyx_v_minp);
    __pyx_v_minp = __pyx_int_1;
    goto __pyx_L3;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":219
 *     elif minp == 0:
 *         minp = 1
 *     elif minp < 0:             # <<<<<<<<<<<<<<
 *         raise ValueError('min_periods must be >= 0')
 *     return minp
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_minp, __pyx_int_0, Py_LT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":220
 *         minp = 1
 *     elif minp < 0:
 *         raise ValueError('min_periods must be >= 0')             # <<<<<<<<<<<<<<
 *     return minp
 * 
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[6]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":221
 *     elif minp < 0:
 *         raise ValueError('min_periods must be >= 0')
 *     return minp             # <<<<<<<<<<<<<<
 * 
 * def roll_var(ndarray[double_t] input, int win, int minp):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_minp);
  __pyx_r = __pyx_v_minp;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries._check_minp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_minp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_101roll_var(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_101roll_var = {__Pyx_NAMESTR("roll_var"), (PyCFunction)__pyx_pw_6pandas_8_tseries_101roll_var, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_101roll_var(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_input = 0;
  int __pyx_v_win;
  int __pyx_v_minp;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("roll_var (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_var", 1, 3, 3, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_var", 1, 3, 3, 2); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_var") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_input = ((PyArrayObject *)values[0]);
      __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_input = ((PyArrayObject *)values[0]);
    __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("roll_var", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.roll_var", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_100roll_var(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":223
 *     return minp
 * 
 * def roll_var(ndarray[double_t] input, int win, int minp):             # <<<<<<<<<<<<<<
 *     cdef double val, prev, sum_x = 0, sum_xx = 0, nobs = 0
 *     cdef Py_ssize_t i
 */

static PyObject *__pyx_pf_6pandas_8_tseries_100roll_var(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) {
  double __pyx_v_val;
  double __pyx_v_prev;
  double __pyx_v_sum_x;
  double __pyx_v_sum_xx;
  double __pyx_v_nobs;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_N;
  PyArrayObject *__pyx_v_output = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_output;
  __Pyx_Buffer __pyx_pybuffer_output;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_input;
  __Pyx_Buffer __pyx_pybuffer_input;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  double __pyx_t_14;
  double __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("roll_var");
  __pyx_pybuffer_output.pybuffer.buf = NULL;
  __pyx_pybuffer_output.refcount = 0;
  __pyx_pybuffernd_output.data = NULL;
  __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output;
  __pyx_pybuffer_input.pybuffer.buf = NULL;
  __pyx_pybuffer_input.refcount = 0;
  __pyx_pybuffernd_input.data = NULL;
  __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":224
 * 
 * def roll_var(ndarray[double_t] input, int win, int minp):
 *     cdef double val, prev, sum_x = 0, sum_xx = 0, nobs = 0             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t N = len(input)
 */
  __pyx_v_sum_x = 0.0;
  __pyx_v_sum_xx = 0.0;
  __pyx_v_nobs = 0.0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":226
 *     cdef double val, prev, sum_x = 0, sum_xx = 0, nobs = 0
 *     cdef Py_ssize_t i
 *     cdef Py_ssize_t N = len(input)             # <<<<<<<<<<<<<<
 * 
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_N = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":228
 *     cdef Py_ssize_t N = len(input)
 * 
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)             # <<<<<<<<<<<<<<
 * 
 *     minp = _check_minp(minp, N)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":230
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)
 * 
 *     minp = _check_minp(minp, N)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < minp - 1:
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_minp = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":232
 *     minp = _check_minp(minp, N)
 * 
 *     for i from 0 <= i < minp - 1:             # <<<<<<<<<<<<<<
 *         val = input[i]
 * 
 */
  __pyx_t_8 = (__pyx_v_minp - 1);
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":233
 * 
 *     for i from 0 <= i < minp - 1:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         # Not NaN
 */
    __pyx_t_1 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_1 < 0) {
      __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape;
      if (unlikely(__pyx_t_1 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":236
 * 
 *         # Not NaN
 *         if val == val:             # <<<<<<<<<<<<<<
 *             nobs += 1
 *             sum_x += val
 */
    __pyx_t_9 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":237
 *         # Not NaN
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             sum_x += val
 *             sum_xx += val * val
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1.0);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":238
 *         if val == val:
 *             nobs += 1
 *             sum_x += val             # <<<<<<<<<<<<<<
 *             sum_xx += val * val
 * 
 */
      __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":239
 *             nobs += 1
 *             sum_x += val
 *             sum_xx += val * val             # <<<<<<<<<<<<<<
 * 
 *         output[i] = NaN
 */
      __pyx_v_sum_xx = (__pyx_v_sum_xx + (__pyx_v_val * __pyx_v_val));
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":241
 *             sum_xx += val * val
 * 
 *         output[i] = NaN             # <<<<<<<<<<<<<<
 * 
 *     for i from minp - 1 <= i < N:
 */
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_pybuffernd_output.diminfo[0].shape;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_NaN;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":243
 *         output[i] = NaN
 * 
 *     for i from minp - 1 <= i < N:             # <<<<<<<<<<<<<<
 *         val = input[i]
 * 
 */
  __pyx_t_11 = __pyx_v_N;
  for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_11; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":244
 * 
 *     for i from minp - 1 <= i < N:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         if i > win - 1:
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_input.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_input.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":246
 *         val = input[i]
 * 
 *         if i > win - 1:             # <<<<<<<<<<<<<<
 *             prev = input[i - win]
 *             if prev == prev:
 */
    __pyx_t_9 = (__pyx_v_i > (__pyx_v_win - 1));
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":247
 * 
 *         if i > win - 1:
 *             prev = input[i - win]             # <<<<<<<<<<<<<<
 *             if prev == prev:
 *                 sum_x -= prev
 */
      __pyx_t_13 = (__pyx_v_i - __pyx_v_win);
      __pyx_t_7 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":248
 *         if i > win - 1:
 *             prev = input[i - win]
 *             if prev == prev:             # <<<<<<<<<<<<<<
 *                 sum_x -= prev
 *                 sum_xx -= prev * prev
 */
      __pyx_t_9 = (__pyx_v_prev == __pyx_v_prev);
      if (__pyx_t_9) {

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":249
 *             prev = input[i - win]
 *             if prev == prev:
 *                 sum_x -= prev             # <<<<<<<<<<<<<<
 *                 sum_xx -= prev * prev
 *                 nobs -= 1
 */
        __pyx_v_sum_x = (__pyx_v_sum_x - __pyx_v_prev);

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":250
 *             if prev == prev:
 *                 sum_x -= prev
 *                 sum_xx -= prev * prev             # <<<<<<<<<<<<<<
 *                 nobs -= 1
 * 
 */
        __pyx_v_sum_xx = (__pyx_v_sum_xx - (__pyx_v_prev * __pyx_v_prev));

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":251
 *                 sum_x -= prev
 *                 sum_xx -= prev * prev
 *                 nobs -= 1             # <<<<<<<<<<<<<<
 * 
 *         if val == val:
 */
        __pyx_v_nobs = (__pyx_v_nobs - 1.0);
        goto __pyx_L9;
      }
      __pyx_L9:;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":253
 *                 nobs -= 1
 * 
 *         if val == val:             # <<<<<<<<<<<<<<
 *             nobs += 1
 *             sum_x += val
 */
    __pyx_t_9 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":254
 * 
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             sum_x += val
 *             sum_xx += val * val
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1.0);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":255
 *         if val == val:
 *             nobs += 1
 *             sum_x += val             # <<<<<<<<<<<<<<
 *             sum_xx += val * val
 * 
 */
      __pyx_v_sum_x = (__pyx_v_sum_x + __pyx_v_val);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":256
 *             nobs += 1
 *             sum_x += val
 *             sum_xx += val * val             # <<<<<<<<<<<<<<
 * 
 *         if nobs >= minp:
 */
      __pyx_v_sum_xx = (__pyx_v_sum_xx + (__pyx_v_val * __pyx_v_val));
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":258
 *             sum_xx += val * val
 * 
 *         if nobs >= minp:             # <<<<<<<<<<<<<<
 *             output[i] = (nobs * sum_xx - sum_x * sum_x) / (nobs * nobs - nobs)
 *         else:
 */
    __pyx_t_9 = (__pyx_v_nobs >= __pyx_v_minp);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":259
 * 
 *         if nobs >= minp:
 *             output[i] = (nobs * sum_xx - sum_x * sum_x) / (nobs * nobs - nobs)             # <<<<<<<<<<<<<<
 *         else:
 *             output[i] = NaN
 */
      __pyx_t_14 = ((__pyx_v_nobs * __pyx_v_sum_xx) - (__pyx_v_sum_x * __pyx_v_sum_x));
      __pyx_t_15 = ((__pyx_v_nobs * __pyx_v_nobs) - __pyx_v_nobs);
      if (unlikely(__pyx_t_15 == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "float division");
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_output.diminfo[0].strides) = (__pyx_t_14 / __pyx_t_15);
      goto __pyx_L11;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":261
 *             output[i] = (nobs * sum_xx - sum_x * sum_x) / (nobs * nobs - nobs)
 *         else:
 *             output[i] = NaN             # <<<<<<<<<<<<<<
 * 
 *     return output
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L11:;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":263
 *             output[i] = NaN
 * 
 *     return output             # <<<<<<<<<<<<<<
 * 
 * #-------------------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_output));
  __pyx_r = ((PyObject *)__pyx_v_output);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.roll_var", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_103roll_skew(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_103roll_skew = {__Pyx_NAMESTR("roll_skew"), (PyCFunction)__pyx_pw_6pandas_8_tseries_103roll_skew, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_103roll_skew(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_input = 0;
  int __pyx_v_win;
  int __pyx_v_minp;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("roll_skew (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_skew", 1, 3, 3, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_skew", 1, 3, 3, 2); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_skew") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_input = ((PyArrayObject *)values[0]);
      __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_input = ((PyArrayObject *)values[0]);
    __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("roll_skew", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.roll_skew", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_102roll_skew(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":268
 * # Rolling skewness
 * 
 * def roll_skew(ndarray[double_t] input, int win, int minp):             # <<<<<<<<<<<<<<
 *     cdef double val, prev
 *     cdef double x = 0, xx = 0, xxx = 0
 */

static PyObject *__pyx_pf_6pandas_8_tseries_102roll_skew(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) {
  double __pyx_v_val;
  double __pyx_v_prev;
  double __pyx_v_x;
  double __pyx_v_xx;
  double __pyx_v_xxx;
  Py_ssize_t __pyx_v_nobs;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_N;
  PyArrayObject *__pyx_v_output = 0;
  double __pyx_v_A;
  double __pyx_v_B;
  double __pyx_v_C;
  double __pyx_v_R;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_output;
  __Pyx_Buffer __pyx_pybuffer_output;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_input;
  __Pyx_Buffer __pyx_pybuffer_input;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  double __pyx_t_14;
  double __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("roll_skew");
  __pyx_pybuffer_output.pybuffer.buf = NULL;
  __pyx_pybuffer_output.refcount = 0;
  __pyx_pybuffernd_output.data = NULL;
  __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output;
  __pyx_pybuffer_input.pybuffer.buf = NULL;
  __pyx_pybuffer_input.refcount = 0;
  __pyx_pybuffernd_input.data = NULL;
  __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":270
 * def roll_skew(ndarray[double_t] input, int win, int minp):
 *     cdef double val, prev
 *     cdef double x = 0, xx = 0, xxx = 0             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t nobs = 0, i
 *     cdef Py_ssize_t N = len(input)
 */
  __pyx_v_x = 0.0;
  __pyx_v_xx = 0.0;
  __pyx_v_xxx = 0.0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":271
 *     cdef double val, prev
 *     cdef double x = 0, xx = 0, xxx = 0
 *     cdef Py_ssize_t nobs = 0, i             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t N = len(input)
 * 
 */
  __pyx_v_nobs = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":272
 *     cdef double x = 0, xx = 0, xxx = 0
 *     cdef Py_ssize_t nobs = 0, i
 *     cdef Py_ssize_t N = len(input)             # <<<<<<<<<<<<<<
 * 
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_N = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":274
 *     cdef Py_ssize_t N = len(input)
 * 
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)             # <<<<<<<<<<<<<<
 * 
 *     # 3 components of the skewness equation
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":279
 *     cdef double A, B, C, R
 * 
 *     minp = _check_minp(minp, N)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < minp - 1:
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_minp = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":281
 *     minp = _check_minp(minp, N)
 * 
 *     for i from 0 <= i < minp - 1:             # <<<<<<<<<<<<<<
 *         val = input[i]
 * 
 */
  __pyx_t_8 = (__pyx_v_minp - 1);
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":282
 * 
 *     for i from 0 <= i < minp - 1:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         # Not NaN
 */
    __pyx_t_1 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_1 < 0) {
      __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape;
      if (unlikely(__pyx_t_1 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":285
 * 
 *         # Not NaN
 *         if val == val:             # <<<<<<<<<<<<<<
 *             nobs += 1
 *             x += val
 */
    __pyx_t_9 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":286
 *         # Not NaN
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             x += val
 *             xx += val * val
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":287
 *         if val == val:
 *             nobs += 1
 *             x += val             # <<<<<<<<<<<<<<
 *             xx += val * val
 *             xxx += val * val * val
 */
      __pyx_v_x = (__pyx_v_x + __pyx_v_val);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":288
 *             nobs += 1
 *             x += val
 *             xx += val * val             # <<<<<<<<<<<<<<
 *             xxx += val * val * val
 * 
 */
      __pyx_v_xx = (__pyx_v_xx + (__pyx_v_val * __pyx_v_val));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":289
 *             x += val
 *             xx += val * val
 *             xxx += val * val * val             # <<<<<<<<<<<<<<
 * 
 *         output[i] = NaN
 */
      __pyx_v_xxx = (__pyx_v_xxx + ((__pyx_v_val * __pyx_v_val) * __pyx_v_val));
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":291
 *             xxx += val * val * val
 * 
 *         output[i] = NaN             # <<<<<<<<<<<<<<
 * 
 *     for i from minp - 1 <= i < N:
 */
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_pybuffernd_output.diminfo[0].shape;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_NaN;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":293
 *         output[i] = NaN
 * 
 *     for i from minp - 1 <= i < N:             # <<<<<<<<<<<<<<
 *         val = input[i]
 * 
 */
  __pyx_t_11 = __pyx_v_N;
  for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_11; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":294
 * 
 *     for i from minp - 1 <= i < N:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         if i > win - 1:
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_input.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_input.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":296
 *         val = input[i]
 * 
 *         if i > win - 1:             # <<<<<<<<<<<<<<
 *             prev = input[i - win]
 *             if prev == prev:
 */
    __pyx_t_9 = (__pyx_v_i > (__pyx_v_win - 1));
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":297
 * 
 *         if i > win - 1:
 *             prev = input[i - win]             # <<<<<<<<<<<<<<
 *             if prev == prev:
 *                 x -= prev
 */
      __pyx_t_13 = (__pyx_v_i - __pyx_v_win);
      __pyx_t_7 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":298
 *         if i > win - 1:
 *             prev = input[i - win]
 *             if prev == prev:             # <<<<<<<<<<<<<<
 *                 x -= prev
 *                 xx -= prev * prev
 */
      __pyx_t_9 = (__pyx_v_prev == __pyx_v_prev);
      if (__pyx_t_9) {

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":299
 *             prev = input[i - win]
 *             if prev == prev:
 *                 x -= prev             # <<<<<<<<<<<<<<
 *                 xx -= prev * prev
 *                 xxx -= prev * prev * prev
 */
        __pyx_v_x = (__pyx_v_x - __pyx_v_prev);

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":300
 *             if prev == prev:
 *                 x -= prev
 *                 xx -= prev * prev             # <<<<<<<<<<<<<<
 *                 xxx -= prev * prev * prev
 * 
 */
        __pyx_v_xx = (__pyx_v_xx - (__pyx_v_prev * __pyx_v_prev));

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":301
 *                 x -= prev
 *                 xx -= prev * prev
 *                 xxx -= prev * prev * prev             # <<<<<<<<<<<<<<
 * 
 *                 nobs -= 1
 */
        __pyx_v_xxx = (__pyx_v_xxx - ((__pyx_v_prev * __pyx_v_prev) * __pyx_v_prev));

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":303
 *                 xxx -= prev * prev * prev
 * 
 *                 nobs -= 1             # <<<<<<<<<<<<<<
 * 
 *         if val == val:
 */
        __pyx_v_nobs = (__pyx_v_nobs - 1);
        goto __pyx_L9;
      }
      __pyx_L9:;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":305
 *                 nobs -= 1
 * 
 *         if val == val:             # <<<<<<<<<<<<<<
 *             nobs += 1
 *             x += val
 */
    __pyx_t_9 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":306
 * 
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             x += val
 *             xx += val * val
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":307
 *         if val == val:
 *             nobs += 1
 *             x += val             # <<<<<<<<<<<<<<
 *             xx += val * val
 *             xxx += val * val * val
 */
      __pyx_v_x = (__pyx_v_x + __pyx_v_val);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":308
 *             nobs += 1
 *             x += val
 *             xx += val * val             # <<<<<<<<<<<<<<
 *             xxx += val * val * val
 * 
 */
      __pyx_v_xx = (__pyx_v_xx + (__pyx_v_val * __pyx_v_val));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":309
 *             x += val
 *             xx += val * val
 *             xxx += val * val * val             # <<<<<<<<<<<<<<
 * 
 *         if nobs >= minp:
 */
      __pyx_v_xxx = (__pyx_v_xxx + ((__pyx_v_val * __pyx_v_val) * __pyx_v_val));
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":311
 *             xxx += val * val * val
 * 
 *         if nobs >= minp:             # <<<<<<<<<<<<<<
 *             A = x / nobs
 *             B = xx / nobs - A * A
 */
    __pyx_t_9 = (__pyx_v_nobs >= __pyx_v_minp);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":312
 * 
 *         if nobs >= minp:
 *             A = x / nobs             # <<<<<<<<<<<<<<
 *             B = xx / nobs - A * A
 *             C = xxx / nobs - A * A * A - 3 * A * B
 */
      if (unlikely(__pyx_v_nobs == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "float division");
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_A = (__pyx_v_x / __pyx_v_nobs);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":313
 *         if nobs >= minp:
 *             A = x / nobs
 *             B = xx / nobs - A * A             # <<<<<<<<<<<<<<
 *             C = xxx / nobs - A * A * A - 3 * A * B
 * 
 */
      if (unlikely(__pyx_v_nobs == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "float division");
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_B = ((__pyx_v_xx / __pyx_v_nobs) - (__pyx_v_A * __pyx_v_A));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":314
 *             A = x / nobs
 *             B = xx / nobs - A * A
 *             C = xxx / nobs - A * A * A - 3 * A * B             # <<<<<<<<<<<<<<
 * 
 *             R = sqrt(B)
 */
      if (unlikely(__pyx_v_nobs == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "float division");
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_C = (((__pyx_v_xxx / __pyx_v_nobs) - ((__pyx_v_A * __pyx_v_A) * __pyx_v_A)) - ((3.0 * __pyx_v_A) * __pyx_v_B));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":316
 *             C = xxx / nobs - A * A * A - 3 * A * B
 * 
 *             R = sqrt(B)             # <<<<<<<<<<<<<<
 * 
 *             output[i] = ((sqrt(nobs * (nobs - 1.)) * C) /
 */
      __pyx_v_R = sqrt(__pyx_v_B);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":318
 *             R = sqrt(B)
 * 
 *             output[i] = ((sqrt(nobs * (nobs - 1.)) * C) /             # <<<<<<<<<<<<<<
 *                          ((nobs-2) * R * R * R))
 *         else:
 */
      __pyx_t_14 = (sqrt((__pyx_v_nobs * (__pyx_v_nobs - 1.))) * __pyx_v_C);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":319
 * 
 *             output[i] = ((sqrt(nobs * (nobs - 1.)) * C) /
 *                          ((nobs-2) * R * R * R))             # <<<<<<<<<<<<<<
 *         else:
 *             output[i] = NaN
 */
      __pyx_t_15 = ((((__pyx_v_nobs - 2) * __pyx_v_R) * __pyx_v_R) * __pyx_v_R);
      if (unlikely(__pyx_t_15 == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "float division");
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":318
 *             R = sqrt(B)
 * 
 *             output[i] = ((sqrt(nobs * (nobs - 1.)) * C) /             # <<<<<<<<<<<<<<
 *                          ((nobs-2) * R * R * R))
 *         else:
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_output.diminfo[0].strides) = (__pyx_t_14 / __pyx_t_15);
      goto __pyx_L11;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":321
 *                          ((nobs-2) * R * R * R))
 *         else:
 *             output[i] = NaN             # <<<<<<<<<<<<<<
 * 
 *     return output
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L11:;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":323
 *             output[i] = NaN
 * 
 *     return output             # <<<<<<<<<<<<<<
 * 
 * #-------------------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_output));
  __pyx_r = ((PyObject *)__pyx_v_output);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.roll_skew", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_105roll_kurt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_105roll_kurt = {__Pyx_NAMESTR("roll_kurt"), (PyCFunction)__pyx_pw_6pandas_8_tseries_105roll_kurt, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_105roll_kurt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_input = 0;
  int __pyx_v_win;
  int __pyx_v_minp;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("roll_kurt (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_kurt", 1, 3, 3, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_kurt", 1, 3, 3, 2); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_kurt") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_input = ((PyArrayObject *)values[0]);
      __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_input = ((PyArrayObject *)values[0]);
    __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("roll_kurt", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.roll_kurt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_104roll_kurt(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":329
 * 
 * 
 * def roll_kurt(ndarray[double_t] input,             # <<<<<<<<<<<<<<
 *                int win, int minp):
 *     cdef double val, prev
 */

static PyObject *__pyx_pf_6pandas_8_tseries_104roll_kurt(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) {
  double __pyx_v_val;
  double __pyx_v_prev;
  double __pyx_v_x;
  double __pyx_v_xx;
  double __pyx_v_xxx;
  double __pyx_v_xxxx;
  Py_ssize_t __pyx_v_nobs;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_N;
  PyArrayObject *__pyx_v_output = 0;
  double __pyx_v_A;
  double __pyx_v_B;
  double __pyx_v_C;
  double __pyx_v_D;
  double __pyx_v_R;
  double __pyx_v_K;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_output;
  __Pyx_Buffer __pyx_pybuffer_output;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_input;
  __Pyx_Buffer __pyx_pybuffer_input;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  double __pyx_t_14;
  double __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("roll_kurt");
  __pyx_pybuffer_output.pybuffer.buf = NULL;
  __pyx_pybuffer_output.refcount = 0;
  __pyx_pybuffernd_output.data = NULL;
  __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output;
  __pyx_pybuffer_input.pybuffer.buf = NULL;
  __pyx_pybuffer_input.refcount = 0;
  __pyx_pybuffernd_input.data = NULL;
  __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":332
 *                int win, int minp):
 *     cdef double val, prev
 *     cdef double x = 0, xx = 0, xxx = 0, xxxx = 0             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t nobs = 0, i
 *     cdef Py_ssize_t N = len(input)
 */
  __pyx_v_x = 0.0;
  __pyx_v_xx = 0.0;
  __pyx_v_xxx = 0.0;
  __pyx_v_xxxx = 0.0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":333
 *     cdef double val, prev
 *     cdef double x = 0, xx = 0, xxx = 0, xxxx = 0
 *     cdef Py_ssize_t nobs = 0, i             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t N = len(input)
 * 
 */
  __pyx_v_nobs = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":334
 *     cdef double x = 0, xx = 0, xxx = 0, xxxx = 0
 *     cdef Py_ssize_t nobs = 0, i
 *     cdef Py_ssize_t N = len(input)             # <<<<<<<<<<<<<<
 * 
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_N = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":336
 *     cdef Py_ssize_t N = len(input)
 * 
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)             # <<<<<<<<<<<<<<
 * 
 *     # 5 components of the kurtosis equation
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":341
 *     cdef double A, B, C, D, R, K
 * 
 *     minp = _check_minp(minp, N)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < minp - 1:
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_minp = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":343
 *     minp = _check_minp(minp, N)
 * 
 *     for i from 0 <= i < minp - 1:             # <<<<<<<<<<<<<<
 *         val = input[i]
 * 
 */
  __pyx_t_8 = (__pyx_v_minp - 1);
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":344
 * 
 *     for i from 0 <= i < minp - 1:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         # Not NaN
 */
    __pyx_t_1 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_1 < 0) {
      __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape;
      if (unlikely(__pyx_t_1 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":347
 * 
 *         # Not NaN
 *         if val == val:             # <<<<<<<<<<<<<<
 *             nobs += 1
 * 
 */
    __pyx_t_9 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":348
 *         # Not NaN
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 * 
 *             # seriously don't ask me why this is faster
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":351
 * 
 *             # seriously don't ask me why this is faster
 *             x += val             # <<<<<<<<<<<<<<
 *             xx += val * val
 *             xxx += val * val * val
 */
      __pyx_v_x = (__pyx_v_x + __pyx_v_val);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":352
 *             # seriously don't ask me why this is faster
 *             x += val
 *             xx += val * val             # <<<<<<<<<<<<<<
 *             xxx += val * val * val
 *             xxxx += val * val * val * val
 */
      __pyx_v_xx = (__pyx_v_xx + (__pyx_v_val * __pyx_v_val));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":353
 *             x += val
 *             xx += val * val
 *             xxx += val * val * val             # <<<<<<<<<<<<<<
 *             xxxx += val * val * val * val
 * 
 */
      __pyx_v_xxx = (__pyx_v_xxx + ((__pyx_v_val * __pyx_v_val) * __pyx_v_val));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":354
 *             xx += val * val
 *             xxx += val * val * val
 *             xxxx += val * val * val * val             # <<<<<<<<<<<<<<
 * 
 *         output[i] = NaN
 */
      __pyx_v_xxxx = (__pyx_v_xxxx + (((__pyx_v_val * __pyx_v_val) * __pyx_v_val) * __pyx_v_val));
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":356
 *             xxxx += val * val * val * val
 * 
 *         output[i] = NaN             # <<<<<<<<<<<<<<
 * 
 *     for i from minp - 1 <= i < N:
 */
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_pybuffernd_output.diminfo[0].shape;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_NaN;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":358
 *         output[i] = NaN
 * 
 *     for i from minp - 1 <= i < N:             # <<<<<<<<<<<<<<
 *         val = input[i]
 * 
 */
  __pyx_t_11 = __pyx_v_N;
  for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_11; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":359
 * 
 *     for i from minp - 1 <= i < N:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         if i > win - 1:
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_input.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_input.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":361
 *         val = input[i]
 * 
 *         if i > win - 1:             # <<<<<<<<<<<<<<
 *             prev = input[i - win]
 *             if prev == prev:
 */
    __pyx_t_9 = (__pyx_v_i > (__pyx_v_win - 1));
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":362
 * 
 *         if i > win - 1:
 *             prev = input[i - win]             # <<<<<<<<<<<<<<
 *             if prev == prev:
 *                 x -= prev
 */
      __pyx_t_13 = (__pyx_v_i - __pyx_v_win);
      __pyx_t_7 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":363
 *         if i > win - 1:
 *             prev = input[i - win]
 *             if prev == prev:             # <<<<<<<<<<<<<<
 *                 x -= prev
 *                 xx -= prev * prev
 */
      __pyx_t_9 = (__pyx_v_prev == __pyx_v_prev);
      if (__pyx_t_9) {

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":364
 *             prev = input[i - win]
 *             if prev == prev:
 *                 x -= prev             # <<<<<<<<<<<<<<
 *                 xx -= prev * prev
 *                 xxx -= prev * prev * prev
 */
        __pyx_v_x = (__pyx_v_x - __pyx_v_prev);

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":365
 *             if prev == prev:
 *                 x -= prev
 *                 xx -= prev * prev             # <<<<<<<<<<<<<<
 *                 xxx -= prev * prev * prev
 *                 xxxx -= prev * prev * prev * prev
 */
        __pyx_v_xx = (__pyx_v_xx - (__pyx_v_prev * __pyx_v_prev));

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":366
 *                 x -= prev
 *                 xx -= prev * prev
 *                 xxx -= prev * prev * prev             # <<<<<<<<<<<<<<
 *                 xxxx -= prev * prev * prev * prev
 * 
 */
        __pyx_v_xxx = (__pyx_v_xxx - ((__pyx_v_prev * __pyx_v_prev) * __pyx_v_prev));

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":367
 *                 xx -= prev * prev
 *                 xxx -= prev * prev * prev
 *                 xxxx -= prev * prev * prev * prev             # <<<<<<<<<<<<<<
 * 
 *                 nobs -= 1
 */
        __pyx_v_xxxx = (__pyx_v_xxxx - (((__pyx_v_prev * __pyx_v_prev) * __pyx_v_prev) * __pyx_v_prev));

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":369
 *                 xxxx -= prev * prev * prev * prev
 * 
 *                 nobs -= 1             # <<<<<<<<<<<<<<
 * 
 *         if val == val:
 */
        __pyx_v_nobs = (__pyx_v_nobs - 1);
        goto __pyx_L9;
      }
      __pyx_L9:;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":371
 *                 nobs -= 1
 * 
 *         if val == val:             # <<<<<<<<<<<<<<
 *             nobs += 1
 *             x += val
 */
    __pyx_t_9 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":372
 * 
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             x += val
 *             xx += val * val
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":373
 *         if val == val:
 *             nobs += 1
 *             x += val             # <<<<<<<<<<<<<<
 *             xx += val * val
 *             xxx += val * val * val
 */
      __pyx_v_x = (__pyx_v_x + __pyx_v_val);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":374
 *             nobs += 1
 *             x += val
 *             xx += val * val             # <<<<<<<<<<<<<<
 *             xxx += val * val * val
 *             xxxx += val * val * val * val
 */
      __pyx_v_xx = (__pyx_v_xx + (__pyx_v_val * __pyx_v_val));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":375
 *             x += val
 *             xx += val * val
 *             xxx += val * val * val             # <<<<<<<<<<<<<<
 *             xxxx += val * val * val * val
 * 
 */
      __pyx_v_xxx = (__pyx_v_xxx + ((__pyx_v_val * __pyx_v_val) * __pyx_v_val));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":376
 *             xx += val * val
 *             xxx += val * val * val
 *             xxxx += val * val * val * val             # <<<<<<<<<<<<<<
 * 
 *         if nobs >= minp:
 */
      __pyx_v_xxxx = (__pyx_v_xxxx + (((__pyx_v_val * __pyx_v_val) * __pyx_v_val) * __pyx_v_val));
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":378
 *             xxxx += val * val * val * val
 * 
 *         if nobs >= minp:             # <<<<<<<<<<<<<<
 *             A = x / nobs
 *             R = A * A
 */
    __pyx_t_9 = (__pyx_v_nobs >= __pyx_v_minp);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":379
 * 
 *         if nobs >= minp:
 *             A = x / nobs             # <<<<<<<<<<<<<<
 *             R = A * A
 *             B = xx / nobs - R
 */
      if (unlikely(__pyx_v_nobs == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "float division");
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_A = (__pyx_v_x / __pyx_v_nobs);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":380
 *         if nobs >= minp:
 *             A = x / nobs
 *             R = A * A             # <<<<<<<<<<<<<<
 *             B = xx / nobs - R
 *             R = R * A
 */
      __pyx_v_R = (__pyx_v_A * __pyx_v_A);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":381
 *             A = x / nobs
 *             R = A * A
 *             B = xx / nobs - R             # <<<<<<<<<<<<<<
 *             R = R * A
 *             C = xxx / nobs - R - 3 * A * B
 */
      if (unlikely(__pyx_v_nobs == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "float division");
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_B = ((__pyx_v_xx / __pyx_v_nobs) - __pyx_v_R);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":382
 *             R = A * A
 *             B = xx / nobs - R
 *             R = R * A             # <<<<<<<<<<<<<<
 *             C = xxx / nobs - R - 3 * A * B
 *             R = R * A
 */
      __pyx_v_R = (__pyx_v_R * __pyx_v_A);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":383
 *             B = xx / nobs - R
 *             R = R * A
 *             C = xxx / nobs - R - 3 * A * B             # <<<<<<<<<<<<<<
 *             R = R * A
 *             D = xxxx / nobs - R - 6*B*A*A - 4*C*A
 */
      if (unlikely(__pyx_v_nobs == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "float division");
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_C = (((__pyx_v_xxx / __pyx_v_nobs) - __pyx_v_R) - ((3.0 * __pyx_v_A) * __pyx_v_B));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":384
 *             R = R * A
 *             C = xxx / nobs - R - 3 * A * B
 *             R = R * A             # <<<<<<<<<<<<<<
 *             D = xxxx / nobs - R - 6*B*A*A - 4*C*A
 * 
 */
      __pyx_v_R = (__pyx_v_R * __pyx_v_A);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":385
 *             C = xxx / nobs - R - 3 * A * B
 *             R = R * A
 *             D = xxxx / nobs - R - 6*B*A*A - 4*C*A             # <<<<<<<<<<<<<<
 * 
 *             K = (nobs * nobs - 1.)*D/(B*B) - 3*((nobs-1.)**2)
 */
      if (unlikely(__pyx_v_nobs == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "float division");
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_D = ((((__pyx_v_xxxx / __pyx_v_nobs) - __pyx_v_R) - (((6.0 * __pyx_v_B) * __pyx_v_A) * __pyx_v_A)) - ((4.0 * __pyx_v_C) * __pyx_v_A));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":387
 *             D = xxxx / nobs - R - 6*B*A*A - 4*C*A
 * 
 *             K = (nobs * nobs - 1.)*D/(B*B) - 3*((nobs-1.)**2)             # <<<<<<<<<<<<<<
 *             K = K / ((nobs - 2.)*(nobs-3.))
 * 
 */
      __pyx_t_14 = (((__pyx_v_nobs * __pyx_v_nobs) - 1.) * __pyx_v_D);
      __pyx_t_15 = (__pyx_v_B * __pyx_v_B);
      if (unlikely(__pyx_t_15 == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "float division");
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_K = ((__pyx_t_14 / __pyx_t_15) - (3.0 * pow((__pyx_v_nobs - 1.), 2.0)));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":388
 * 
 *             K = (nobs * nobs - 1.)*D/(B*B) - 3*((nobs-1.)**2)
 *             K = K / ((nobs - 2.)*(nobs-3.))             # <<<<<<<<<<<<<<
 * 
 *             output[i] = K
 */
      __pyx_t_15 = ((__pyx_v_nobs - 2.) * (__pyx_v_nobs - 3.));
      if (unlikely(__pyx_t_15 == 0)) {
        PyErr_Format(PyExc_ZeroDivisionError, "float division");
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_K = (__pyx_v_K / __pyx_t_15);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":390
 *             K = K / ((nobs - 2.)*(nobs-3.))
 * 
 *             output[i] = K             # <<<<<<<<<<<<<<
 *         else:
 *             output[i] = NaN
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_K;
      goto __pyx_L11;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":392
 *             output[i] = K
 *         else:
 *             output[i] = NaN             # <<<<<<<<<<<<<<
 * 
 *     return output
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L11:;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":394
 *             output[i] = NaN
 * 
 *     return output             # <<<<<<<<<<<<<<
 * 
 * #-------------------------------------------------------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_output));
  __pyx_r = ((PyObject *)__pyx_v_output);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.roll_kurt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":401
 * ctypedef double_t (* skiplist_f)(object sl, int n, int p)
 * 
 * cdef _roll_skiplist_op(ndarray arg, int win, int minp, skiplist_f op):             # <<<<<<<<<<<<<<
 *     cdef ndarray[double_t] input = arg
 *     cdef double val, prev, midpoint
 */

static PyObject *__pyx_f_6pandas_8_tseries__roll_skiplist_op(PyArrayObject *__pyx_v_arg, int __pyx_v_win, int __pyx_v_minp, __pyx_t_6pandas_8_tseries_skiplist_f __pyx_v_op) {
  PyArrayObject *__pyx_v_input = 0;
  double __pyx_v_val;
  double __pyx_v_prev;
  struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_skiplist = 0;
  Py_ssize_t __pyx_v_nobs;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_N;
  PyArrayObject *__pyx_v_output = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_output;
  __Pyx_Buffer __pyx_pybuffer_output;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_input;
  __Pyx_Buffer __pyx_pybuffer_input;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_roll_skiplist_op");
  __pyx_pybuffer_input.pybuffer.buf = NULL;
  __pyx_pybuffer_input.refcount = 0;
  __pyx_pybuffernd_input.data = NULL;
  __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input;
  __pyx_pybuffer_output.pybuffer.buf = NULL;
  __pyx_pybuffer_output.refcount = 0;
  __pyx_pybuffernd_output.data = NULL;
  __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":402
 * 
 * cdef _roll_skiplist_op(ndarray arg, int win, int minp, skiplist_f op):
 *     cdef ndarray[double_t] input = arg             # <<<<<<<<<<<<<<
 *     cdef double val, prev, midpoint
 *     cdef IndexableSkiplist skiplist
 */
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_arg), &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_input = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_input.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0];
    }
  }
  __Pyx_INCREF(((PyObject *)__pyx_v_arg));
  __pyx_v_input = ((PyArrayObject *)__pyx_v_arg);

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":405
 *     cdef double val, prev, midpoint
 *     cdef IndexableSkiplist skiplist
 *     cdef Py_ssize_t nobs = 0, i             # <<<<<<<<<<<<<<
 * 
 *     cdef Py_ssize_t N = len(input)
 */
  __pyx_v_nobs = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":407
 *     cdef Py_ssize_t nobs = 0, i
 * 
 *     cdef Py_ssize_t N = len(input)             # <<<<<<<<<<<<<<
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_N = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":408
 * 
 *     cdef Py_ssize_t N = len(input)
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)             # <<<<<<<<<<<<<<
 * 
 *     skiplist = IndexableSkiplist(win)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":410
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)
 * 
 *     skiplist = IndexableSkiplist(win)             # <<<<<<<<<<<<<<
 * 
 *     minp = _check_minp(minp, N)
 */
  __pyx_t_5 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_8_tseries_IndexableSkiplist)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_skiplist = ((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":412
 *     skiplist = IndexableSkiplist(win)
 * 
 *     minp = _check_minp(minp, N)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < minp - 1:
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_minp = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":414
 *     minp = _check_minp(minp, N)
 * 
 *     for i from 0 <= i < minp - 1:             # <<<<<<<<<<<<<<
 *         val = input[i]
 * 
 */
  __pyx_t_8 = (__pyx_v_minp - 1);
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":415
 * 
 *     for i from 0 <= i < minp - 1:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         # Not NaN
 */
    __pyx_t_1 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_1 < 0) {
      __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape;
      if (unlikely(__pyx_t_1 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":418
 * 
 *         # Not NaN
 *         if val == val:             # <<<<<<<<<<<<<<
 *             nobs += 1
 *             skiplist.insert(val)
 */
    __pyx_t_9 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":419
 *         # Not NaN
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             skiplist.insert(val)
 * 
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":420
 *         if val == val:
 *             nobs += 1
 *             skiplist.insert(val)             # <<<<<<<<<<<<<<
 * 
 *         output[i] = NaN
 */
      __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->insert(__pyx_v_skiplist, __pyx_v_val, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":422
 *             skiplist.insert(val)
 * 
 *         output[i] = NaN             # <<<<<<<<<<<<<<
 * 
 *     for i from minp - 1 <= i < N:
 */
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_pybuffernd_output.diminfo[0].shape;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_NaN;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":424
 *         output[i] = NaN
 * 
 *     for i from minp - 1 <= i < N:             # <<<<<<<<<<<<<<
 *         val = input[i]
 * 
 */
  __pyx_t_11 = __pyx_v_N;
  for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_11; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":425
 * 
 *     for i from minp - 1 <= i < N:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         if i > win - 1:
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_input.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_input.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":427
 *         val = input[i]
 * 
 *         if i > win - 1:             # <<<<<<<<<<<<<<
 *             prev = input[i - win]
 * 
 */
    __pyx_t_9 = (__pyx_v_i > (__pyx_v_win - 1));
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":428
 * 
 *         if i > win - 1:
 *             prev = input[i - win]             # <<<<<<<<<<<<<<
 * 
 *             if prev == prev:
 */
      __pyx_t_13 = (__pyx_v_i - __pyx_v_win);
      __pyx_t_7 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":430
 *             prev = input[i - win]
 * 
 *             if prev == prev:             # <<<<<<<<<<<<<<
 *                 skiplist.remove(prev)
 *                 nobs -= 1
 */
      __pyx_t_9 = (__pyx_v_prev == __pyx_v_prev);
      if (__pyx_t_9) {

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":431
 * 
 *             if prev == prev:
 *                 skiplist.remove(prev)             # <<<<<<<<<<<<<<
 *                 nobs -= 1
 * 
 */
        __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->remove(__pyx_v_skiplist, __pyx_v_prev, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":432
 *             if prev == prev:
 *                 skiplist.remove(prev)
 *                 nobs -= 1             # <<<<<<<<<<<<<<
 * 
 *         if val == val:
 */
        __pyx_v_nobs = (__pyx_v_nobs - 1);
        goto __pyx_L9;
      }
      __pyx_L9:;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":434
 *                 nobs -= 1
 * 
 *         if val == val:             # <<<<<<<<<<<<<<
 *             nobs += 1
 *             skiplist.insert(val)
 */
    __pyx_t_9 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":435
 * 
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             skiplist.insert(val)
 * 
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":436
 *         if val == val:
 *             nobs += 1
 *             skiplist.insert(val)             # <<<<<<<<<<<<<<
 * 
 *         output[i] = op(skiplist, nobs, minp)
 */
      __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->insert(__pyx_v_skiplist, __pyx_v_val, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":438
 *             skiplist.insert(val)
 * 
 *         output[i] = op(skiplist, nobs, minp)             # <<<<<<<<<<<<<<
 * 
 *     return output
 */
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_output.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_op(((PyObject *)__pyx_v_skiplist), __pyx_v_nobs, __pyx_v_minp);
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":440
 *         output[i] = op(skiplist, nobs, minp)
 * 
 *     return output             # <<<<<<<<<<<<<<
 * 
 * from skiplist cimport *
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_output));
  __pyx_r = ((PyObject *)__pyx_v_output);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries._roll_skiplist_op", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_input);
  __Pyx_XDECREF((PyObject *)__pyx_v_skiplist);
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_107roll_median_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_107roll_median_c = {__Pyx_NAMESTR("roll_median_c"), (PyCFunction)__pyx_pw_6pandas_8_tseries_107roll_median_c, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_107roll_median_c(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arg = 0;
  int __pyx_v_win;
  int __pyx_v_minp;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arg,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("roll_median_c (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arg);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_median_c", 1, 3, 3, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_median_c", 1, 3, 3, 2); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_median_c") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_arg = ((PyArrayObject *)values[0]);
      __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_arg = ((PyArrayObject *)values[0]);
    __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("roll_median_c", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.roll_median_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arg), __pyx_ptype_5numpy_ndarray, 1, "arg", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_106roll_median_c(__pyx_self, __pyx_v_arg, __pyx_v_win, __pyx_v_minp);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":444
 * from skiplist cimport *
 * 
 * def roll_median_c(ndarray[float64_t] arg, int win, int minp):             # <<<<<<<<<<<<<<
 *     cdef double val, res, prev
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_106roll_median_c(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arg, int __pyx_v_win, int __pyx_v_minp) {
  double __pyx_v_val;
  double __pyx_v_res;
  double __pyx_v_prev;
  int __pyx_v_ret;
  skiplist_t *__pyx_v_sl;
  Py_ssize_t __pyx_v_midpoint;
  Py_ssize_t __pyx_v_nobs;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_N;
  PyArrayObject *__pyx_v_output = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arg;
  __Pyx_Buffer __pyx_pybuffer_arg;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_output;
  __Pyx_Buffer __pyx_pybuffer_output;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("roll_median_c");
  __pyx_pybuffer_output.pybuffer.buf = NULL;
  __pyx_pybuffer_output.refcount = 0;
  __pyx_pybuffernd_output.data = NULL;
  __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output;
  __pyx_pybuffer_arg.pybuffer.buf = NULL;
  __pyx_pybuffer_arg.refcount = 0;
  __pyx_pybuffernd_arg.data = NULL;
  __pyx_pybuffernd_arg.rcbuffer = &__pyx_pybuffer_arg;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arg.rcbuffer->pybuffer, (PyObject*)__pyx_v_arg, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arg.diminfo[0].strides = __pyx_pybuffernd_arg.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arg.diminfo[0].shape = __pyx_pybuffernd_arg.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":447
 *     cdef double val, res, prev
 *     cdef:
 *         int ret=0             # <<<<<<<<<<<<<<
 *         skiplist_t *sl
 *         Py_ssize_t midpoint, nobs = 0, i
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":449
 *         int ret=0
 *         skiplist_t *sl
 *         Py_ssize_t midpoint, nobs = 0, i             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_nobs = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":452
 * 
 * 
 *     cdef Py_ssize_t N = len(arg)             # <<<<<<<<<<<<<<
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arg)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_N = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":453
 * 
 *     cdef Py_ssize_t N = len(arg)
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)             # <<<<<<<<<<<<<<
 * 
 *     sl = skiplist_init(win)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":455
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)
 * 
 *     sl = skiplist_init(win)             # <<<<<<<<<<<<<<
 * 
 *     minp = _check_minp(minp, N)
 */
  __pyx_v_sl = skiplist_init(__pyx_v_win);

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":457
 *     sl = skiplist_init(win)
 * 
 *     minp = _check_minp(minp, N)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < minp - 1:
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_minp = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":459
 *     minp = _check_minp(minp, N)
 * 
 *     for i from 0 <= i < minp - 1:             # <<<<<<<<<<<<<<
 *         val = arg[i]
 * 
 */
  __pyx_t_8 = (__pyx_v_minp - 1);
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":460
 * 
 *     for i from 0 <= i < minp - 1:
 *         val = arg[i]             # <<<<<<<<<<<<<<
 * 
 *         # Not NaN
 */
    __pyx_t_1 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_1 < 0) {
      __pyx_t_1 += __pyx_pybuffernd_arg.diminfo[0].shape;
      if (unlikely(__pyx_t_1 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_arg.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arg.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_arg.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":463
 * 
 *         # Not NaN
 *         if val == val:             # <<<<<<<<<<<<<<
 *             nobs += 1
 *             skiplist_insert(sl, val)
 */
    __pyx_t_9 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":464
 *         # Not NaN
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             skiplist_insert(sl, val)
 * 
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":465
 *         if val == val:
 *             nobs += 1
 *             skiplist_insert(sl, val)             # <<<<<<<<<<<<<<
 * 
 *         output[i] = NaN
 */
      skiplist_insert(__pyx_v_sl, __pyx_v_val);
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":467
 *             skiplist_insert(sl, val)
 * 
 *         output[i] = NaN             # <<<<<<<<<<<<<<
 * 
 *     for i from minp - 1 <= i < N:
 */
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_pybuffernd_output.diminfo[0].shape;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_NaN;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":469
 *         output[i] = NaN
 * 
 *     for i from minp - 1 <= i < N:             # <<<<<<<<<<<<<<
 *         val = arg[i]
 * 
 */
  __pyx_t_11 = __pyx_v_N;
  for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_11; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":470
 * 
 *     for i from minp - 1 <= i < N:
 *         val = arg[i]             # <<<<<<<<<<<<<<
 * 
 *         if i > win - 1:
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_arg.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_arg.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arg.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_arg.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":472
 *         val = arg[i]
 * 
 *         if i > win - 1:             # <<<<<<<<<<<<<<
 *             prev = arg[i - win]
 * 
 */
    __pyx_t_9 = (__pyx_v_i > (__pyx_v_win - 1));
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":473
 * 
 *         if i > win - 1:
 *             prev = arg[i - win]             # <<<<<<<<<<<<<<
 * 
 *             if prev == prev:
 */
      __pyx_t_13 = (__pyx_v_i - __pyx_v_win);
      __pyx_t_7 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_arg.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_arg.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arg.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_arg.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":475
 *             prev = arg[i - win]
 * 
 *             if prev == prev:             # <<<<<<<<<<<<<<
 *                 skiplist_remove(sl, prev)
 *                 nobs -= 1
 */
      __pyx_t_9 = (__pyx_v_prev == __pyx_v_prev);
      if (__pyx_t_9) {

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":476
 * 
 *             if prev == prev:
 *                 skiplist_remove(sl, prev)             # <<<<<<<<<<<<<<
 *                 nobs -= 1
 * 
 */
        skiplist_remove(__pyx_v_sl, __pyx_v_prev);

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":477
 *             if prev == prev:
 *                 skiplist_remove(sl, prev)
 *                 nobs -= 1             # <<<<<<<<<<<<<<
 * 
 *         if val == val:
 */
        __pyx_v_nobs = (__pyx_v_nobs - 1);
        goto __pyx_L9;
      }
      __pyx_L9:;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":479
 *                 nobs -= 1
 * 
 *         if val == val:             # <<<<<<<<<<<<<<
 *             nobs += 1
 *             skiplist_insert(sl, val)
 */
    __pyx_t_9 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":480
 * 
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             skiplist_insert(sl, val)
 * 
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":481
 *         if val == val:
 *             nobs += 1
 *             skiplist_insert(sl, val)             # <<<<<<<<<<<<<<
 * 
 *         if nobs >= minp:
 */
      skiplist_insert(__pyx_v_sl, __pyx_v_val);
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":483
 *             skiplist_insert(sl, val)
 * 
 *         if nobs >= minp:             # <<<<<<<<<<<<<<
 *             midpoint = nobs / 2
 *             if nobs % 2:
 */
    __pyx_t_9 = (__pyx_v_nobs >= __pyx_v_minp);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":484
 * 
 *         if nobs >= minp:
 *             midpoint = nobs / 2             # <<<<<<<<<<<<<<
 *             if nobs % 2:
 *                 res = skiplist_get(sl, midpoint, &ret)
 */
      __pyx_v_midpoint = __Pyx_div_Py_ssize_t(__pyx_v_nobs, 2);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":485
 *         if nobs >= minp:
 *             midpoint = nobs / 2
 *             if nobs % 2:             # <<<<<<<<<<<<<<
 *                 res = skiplist_get(sl, midpoint, &ret)
 *             else:
 */
      __pyx_t_14 = __Pyx_mod_Py_ssize_t(__pyx_v_nobs, 2);
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":486
 *             midpoint = nobs / 2
 *             if nobs % 2:
 *                 res = skiplist_get(sl, midpoint, &ret)             # <<<<<<<<<<<<<<
 *             else:
 *                 res = (skiplist_get(sl, midpoint, &ret) +
 */
        __pyx_v_res = skiplist_get(__pyx_v_sl, __pyx_v_midpoint, (&__pyx_v_ret));
        goto __pyx_L12;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":489
 *             else:
 *                 res = (skiplist_get(sl, midpoint, &ret) +
 *                        skiplist_get(sl, (midpoint - 1), &ret)) / 2             # <<<<<<<<<<<<<<
 *         else:
 *             res = NaN
 */
        __pyx_v_res = ((skiplist_get(__pyx_v_sl, __pyx_v_midpoint, (&__pyx_v_ret)) + skiplist_get(__pyx_v_sl, (__pyx_v_midpoint - 1), (&__pyx_v_ret))) / 2.0);
      }
      __pyx_L12:;
      goto __pyx_L11;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":491
 *                        skiplist_get(sl, (midpoint - 1), &ret)) / 2
 *         else:
 *             res = NaN             # <<<<<<<<<<<<<<
 * 
 *         output[i] = res
 */
      __pyx_v_res = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L11:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":493
 *             res = NaN
 * 
 *         output[i] = res             # <<<<<<<<<<<<<<
 * 
 *     skiplist_destroy(sl)
 */
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_output.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_res;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":495
 *         output[i] = res
 * 
 *     skiplist_destroy(sl)             # <<<<<<<<<<<<<<
 * 
 *     return output
 */
  skiplist_destroy(__pyx_v_sl);

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":497
 *     skiplist_destroy(sl)
 * 
 *     return output             # <<<<<<<<<<<<<<
 * 
 * def roll_median_cython(ndarray input, int win, int minp):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_output));
  __pyx_r = ((PyObject *)__pyx_v_output);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arg.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.roll_median_c", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arg.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_109roll_median_cython(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_108roll_median_cython[] = "\n    O(N log(window)) implementation using skip list\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_109roll_median_cython = {__Pyx_NAMESTR("roll_median_cython"), (PyCFunction)__pyx_pw_6pandas_8_tseries_109roll_median_cython, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_108roll_median_cython)};
static PyObject *__pyx_pw_6pandas_8_tseries_109roll_median_cython(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_input = 0;
  int __pyx_v_win;
  int __pyx_v_minp;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("roll_median_cython (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_median_cython", 1, 3, 3, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_median_cython", 1, 3, 3, 2); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_median_cython") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_input = ((PyArrayObject *)values[0]);
      __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_input = ((PyArrayObject *)values[0]);
    __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("roll_median_cython", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.roll_median_cython", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_108roll_median_cython(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":499
 *     return output
 * 
 * def roll_median_cython(ndarray input, int win, int minp):             # <<<<<<<<<<<<<<
 *     '''
 *     O(N log(window)) implementation using skip list
 */

static PyObject *__pyx_pf_6pandas_8_tseries_108roll_median_cython(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("roll_median_cython");

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":503
 *     O(N log(window)) implementation using skip list
 *     '''
 *     return _roll_skiplist_op(input, win, minp, _get_median)             # <<<<<<<<<<<<<<
 * 
 * # Unfortunately had to resort to some hackery here, would like for
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_8_tseries__roll_skiplist_op(__pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_f_6pandas_8_tseries__get_median); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.roll_median_cython", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":508
 * # Cython to be able to get this right.
 * 
 * cdef double_t _get_median(object sl, int nobs, int minp):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t midpoint
 *     cdef IndexableSkiplist skiplist = <IndexableSkiplist> sl
 */

static __pyx_t_5numpy_double_t __pyx_f_6pandas_8_tseries__get_median(PyObject *__pyx_v_sl, int __pyx_v_nobs, int __pyx_v_minp) {
  Py_ssize_t __pyx_v_midpoint;
  struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_skiplist = 0;
  __pyx_t_5numpy_double_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  long __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_5numpy_double_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_median");

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":510
 * cdef double_t _get_median(object sl, int nobs, int minp):
 *     cdef Py_ssize_t midpoint
 *     cdef IndexableSkiplist skiplist = <IndexableSkiplist> sl             # <<<<<<<<<<<<<<
 *     if nobs >= minp:
 *         midpoint = nobs / 2
 */
  __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_sl)));
  __pyx_v_skiplist = ((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_sl);

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":511
 *     cdef Py_ssize_t midpoint
 *     cdef IndexableSkiplist skiplist = <IndexableSkiplist> sl
 *     if nobs >= minp:             # <<<<<<<<<<<<<<
 *         midpoint = nobs / 2
 *         if nobs % 2:
 */
  __pyx_t_1 = (__pyx_v_nobs >= __pyx_v_minp);
  if (__pyx_t_1) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":512
 *     cdef IndexableSkiplist skiplist = <IndexableSkiplist> sl
 *     if nobs >= minp:
 *         midpoint = nobs / 2             # <<<<<<<<<<<<<<
 *         if nobs % 2:
 *             return skiplist.get(midpoint)
 */
    __pyx_v_midpoint = __Pyx_div_long(__pyx_v_nobs, 2);

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":513
 *     if nobs >= minp:
 *         midpoint = nobs / 2
 *         if nobs % 2:             # <<<<<<<<<<<<<<
 *             return skiplist.get(midpoint)
 *         else:
 */
    __pyx_t_2 = __Pyx_mod_long(__pyx_v_nobs, 2);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":514
 *         midpoint = nobs / 2
 *         if nobs % 2:
 *             return skiplist.get(midpoint)             # <<<<<<<<<<<<<<
 *         else:
 *             return (skiplist.get(midpoint) +
 */
      __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->get(__pyx_v_skiplist, __pyx_v_midpoint, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_4;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":516
 *             return skiplist.get(midpoint)
 *         else:
 *             return (skiplist.get(midpoint) +             # <<<<<<<<<<<<<<
 *                     skiplist.get(midpoint - 1)) / 2
 *     else:
 */
      __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->get(__pyx_v_skiplist, __pyx_v_midpoint, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":517
 *         else:
 *             return (skiplist.get(midpoint) +
 *                     skiplist.get(midpoint - 1)) / 2             # <<<<<<<<<<<<<<
 *     else:
 *         return NaN
 */
      __pyx_t_5 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->get(__pyx_v_skiplist, (__pyx_v_midpoint - 1), 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_int_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_4 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_4;
      goto __pyx_L0;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":519
 *                     skiplist.get(midpoint - 1)) / 2
 *     else:
 *         return NaN             # <<<<<<<<<<<<<<
 * 
 * def roll_max(ndarray input, int win, int minp):
 */
    __pyx_r = __pyx_v_6pandas_8_tseries_NaN;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("pandas._tseries._get_median", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_skiplist);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_111roll_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_110roll_max[] = "\n    O(N log(window)) implementation using skip list\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_111roll_max = {__Pyx_NAMESTR("roll_max"), (PyCFunction)__pyx_pw_6pandas_8_tseries_111roll_max, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_110roll_max)};
static PyObject *__pyx_pw_6pandas_8_tseries_111roll_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_input = 0;
  int __pyx_v_win;
  int __pyx_v_minp;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("roll_max (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_max", 1, 3, 3, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_max", 1, 3, 3, 2); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_max") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_input = ((PyArrayObject *)values[0]);
      __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_input = ((PyArrayObject *)values[0]);
    __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("roll_max", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.roll_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_110roll_max(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":521
 *         return NaN
 * 
 * def roll_max(ndarray input, int win, int minp):             # <<<<<<<<<<<<<<
 *     '''
 *     O(N log(window)) implementation using skip list
 */

static PyObject *__pyx_pf_6pandas_8_tseries_110roll_max(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("roll_max");

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":525
 *     O(N log(window)) implementation using skip list
 *     '''
 *     return _roll_skiplist_op(input, win, minp, _get_max)             # <<<<<<<<<<<<<<
 * 
 * cdef double_t _get_max(object skiplist, int nobs, int minp):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_8_tseries__roll_skiplist_op(__pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_f_6pandas_8_tseries__get_max); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.roll_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":527
 *     return _roll_skiplist_op(input, win, minp, _get_max)
 * 
 * cdef double_t _get_max(object skiplist, int nobs, int minp):             # <<<<<<<<<<<<<<
 *     if nobs >= minp:
 *         return <IndexableSkiplist> skiplist.get(nobs - 1)
 */

static __pyx_t_5numpy_double_t __pyx_f_6pandas_8_tseries__get_max(PyObject *__pyx_v_skiplist, int __pyx_v_nobs, int __pyx_v_minp) {
  __pyx_t_5numpy_double_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __pyx_t_5numpy_double_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_max");

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":528
 * 
 * cdef double_t _get_max(object skiplist, int nobs, int minp):
 *     if nobs >= minp:             # <<<<<<<<<<<<<<
 *         return <IndexableSkiplist> skiplist.get(nobs - 1)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_nobs >= __pyx_v_minp);
  if (__pyx_t_1) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":529
 * cdef double_t _get_max(object skiplist, int nobs, int minp):
 *     if nobs >= minp:
 *         return <IndexableSkiplist> skiplist.get(nobs - 1)             # <<<<<<<<<<<<<<
 *     else:
 *         return NaN
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_skiplist, __pyx_n_s__get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyInt_FromLong((__pyx_v_nobs - 1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_5 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_5;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":531
 *         return <IndexableSkiplist> skiplist.get(nobs - 1)
 *     else:
 *         return NaN             # <<<<<<<<<<<<<<
 * 
 * def roll_min(ndarray input, int win, int minp):
 */
    __pyx_r = __pyx_v_6pandas_8_tseries_NaN;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("pandas._tseries._get_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_113roll_min(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_112roll_min[] = "\n    O(N log(window)) implementation using skip list\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_113roll_min = {__Pyx_NAMESTR("roll_min"), (PyCFunction)__pyx_pw_6pandas_8_tseries_113roll_min, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_112roll_min)};
static PyObject *__pyx_pw_6pandas_8_tseries_113roll_min(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_input = 0;
  int __pyx_v_win;
  int __pyx_v_minp;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("roll_min (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_min", 1, 3, 3, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_min", 1, 3, 3, 2); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_min") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_input = ((PyArrayObject *)values[0]);
      __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_input = ((PyArrayObject *)values[0]);
    __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("roll_min", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.roll_min", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_112roll_min(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":533
 *         return NaN
 * 
 * def roll_min(ndarray input, int win, int minp):             # <<<<<<<<<<<<<<
 *     '''
 *     O(N log(window)) implementation using skip list
 */

static PyObject *__pyx_pf_6pandas_8_tseries_112roll_min(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("roll_min");

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":537
 *     O(N log(window)) implementation using skip list
 *     '''
 *     return _roll_skiplist_op(input, win, minp, _get_min)             # <<<<<<<<<<<<<<
 * 
 * cdef double_t _get_min(object skiplist, int nobs, int minp):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_8_tseries__roll_skiplist_op(__pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_f_6pandas_8_tseries__get_min); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.roll_min", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":539
 *     return _roll_skiplist_op(input, win, minp, _get_min)
 * 
 * cdef double_t _get_min(object skiplist, int nobs, int minp):             # <<<<<<<<<<<<<<
 *     if nobs >= minp:
 *         return <IndexableSkiplist> skiplist.get(0)
 */

static __pyx_t_5numpy_double_t __pyx_f_6pandas_8_tseries__get_min(PyObject *__pyx_v_skiplist, int __pyx_v_nobs, int __pyx_v_minp) {
  __pyx_t_5numpy_double_t __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __pyx_t_5numpy_double_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_min");

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":540
 * 
 * cdef double_t _get_min(object skiplist, int nobs, int minp):
 *     if nobs >= minp:             # <<<<<<<<<<<<<<
 *         return <IndexableSkiplist> skiplist.get(0)
 *     else:
 */
  __pyx_t_1 = (__pyx_v_nobs >= __pyx_v_minp);
  if (__pyx_t_1) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":541
 * cdef double_t _get_min(object skiplist, int nobs, int minp):
 *     if nobs >= minp:
 *         return <IndexableSkiplist> skiplist.get(0)             # <<<<<<<<<<<<<<
 *     else:
 *         return NaN
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_skiplist, __pyx_n_s__get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_4 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":543
 *         return <IndexableSkiplist> skiplist.get(0)
 *     else:
 *         return NaN             # <<<<<<<<<<<<<<
 * 
 * def roll_quantile(ndarray[float64_t, cast=True] input, int win,
 */
    __pyx_r = __pyx_v_6pandas_8_tseries_NaN;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("pandas._tseries._get_min", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_115roll_quantile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_114roll_quantile[] = "\n    O(N log(window)) implementation using skip list\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_115roll_quantile = {__Pyx_NAMESTR("roll_quantile"), (PyCFunction)__pyx_pw_6pandas_8_tseries_115roll_quantile, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_114roll_quantile)};
static PyObject *__pyx_pw_6pandas_8_tseries_115roll_quantile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_input = 0;
  int __pyx_v_win;
  int __pyx_v_minp;
  double __pyx_v_quantile;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,&__pyx_n_s__quantile,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("roll_quantile (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_quantile", 1, 4, 4, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_quantile", 1, 4, 4, 2); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__quantile);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_quantile", 1, 4, 4, 3); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_quantile") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_input = ((PyArrayObject *)values[0]);
      __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_quantile = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_quantile == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_input = ((PyArrayObject *)values[0]);
    __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_quantile = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_quantile == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("roll_quantile", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.roll_quantile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_114roll_quantile(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_v_quantile);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":545
 *         return NaN
 * 
 * def roll_quantile(ndarray[float64_t, cast=True] input, int win,             # <<<<<<<<<<<<<<
 *                   int minp, double quantile):
 *     '''
 */

static PyObject *__pyx_pf_6pandas_8_tseries_114roll_quantile(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp, double __pyx_v_quantile) {
  double __pyx_v_val;
  double __pyx_v_prev;
  struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *__pyx_v_skiplist = 0;
  Py_ssize_t __pyx_v_nobs;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_N;
  PyArrayObject *__pyx_v_output = 0;
  PyObject *__pyx_v_idx = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_output;
  __Pyx_Buffer __pyx_pybuffer_output;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_input;
  __Pyx_Buffer __pyx_pybuffer_input;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  long __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  __pyx_t_5numpy_double_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("roll_quantile");
  __pyx_pybuffer_output.pybuffer.buf = NULL;
  __pyx_pybuffer_output.refcount = 0;
  __pyx_pybuffernd_output.data = NULL;
  __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output;
  __pyx_pybuffer_input.pybuffer.buf = NULL;
  __pyx_pybuffer_input.refcount = 0;
  __pyx_pybuffernd_input.data = NULL;
  __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":552
 *     cdef double val, prev, midpoint
 *     cdef IndexableSkiplist skiplist
 *     cdef Py_ssize_t nobs = 0, i             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t N = len(input)
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)
 */
  __pyx_v_nobs = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":553
 *     cdef IndexableSkiplist skiplist
 *     cdef Py_ssize_t nobs = 0, i
 *     cdef Py_ssize_t N = len(input)             # <<<<<<<<<<<<<<
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_N = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":554
 *     cdef Py_ssize_t nobs = 0, i
 *     cdef Py_ssize_t N = len(input)
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)             # <<<<<<<<<<<<<<
 * 
 *     skiplist = IndexableSkiplist(win)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":556
 *     cdef ndarray[double_t] output = np.empty(N, dtype=float)
 * 
 *     skiplist = IndexableSkiplist(win)             # <<<<<<<<<<<<<<
 * 
 *     minp = _check_minp(minp, N)
 */
  __pyx_t_5 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_8_tseries_IndexableSkiplist)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_skiplist = ((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":558
 *     skiplist = IndexableSkiplist(win)
 * 
 *     minp = _check_minp(minp, N)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < minp - 1:
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___check_minp); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_N); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_minp = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":560
 *     minp = _check_minp(minp, N)
 * 
 *     for i from 0 <= i < minp - 1:             # <<<<<<<<<<<<<<
 *         val = input[i]
 * 
 */
  __pyx_t_8 = (__pyx_v_minp - 1);
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":561
 * 
 *     for i from 0 <= i < minp - 1:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         # Not NaN
 */
    __pyx_t_1 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_1 < 0) {
      __pyx_t_1 += __pyx_pybuffernd_input.diminfo[0].shape;
      if (unlikely(__pyx_t_1 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_input.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":564
 * 
 *         # Not NaN
 *         if val == val:             # <<<<<<<<<<<<<<
 *             nobs += 1
 *             skiplist.insert(val)
 */
    __pyx_t_9 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":565
 *         # Not NaN
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             skiplist.insert(val)
 * 
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":566
 *         if val == val:
 *             nobs += 1
 *             skiplist.insert(val)             # <<<<<<<<<<<<<<
 * 
 *         output[i] = NaN
 */
      __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->insert(__pyx_v_skiplist, __pyx_v_val, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":568
 *             skiplist.insert(val)
 * 
 *         output[i] = NaN             # <<<<<<<<<<<<<<
 * 
 *     for i from minp - 1 <= i < N:
 */
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_pybuffernd_output.diminfo[0].shape;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_NaN;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":570
 *         output[i] = NaN
 * 
 *     for i from minp - 1 <= i < N:             # <<<<<<<<<<<<<<
 *         val = input[i]
 * 
 */
  __pyx_t_11 = __pyx_v_N;
  for (__pyx_v_i = (__pyx_v_minp - 1); __pyx_v_i < __pyx_t_11; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":571
 * 
 *     for i from minp - 1 <= i < N:
 *         val = input[i]             # <<<<<<<<<<<<<<
 * 
 *         if i > win - 1:
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_input.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_input.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":573
 *         val = input[i]
 * 
 *         if i > win - 1:             # <<<<<<<<<<<<<<
 *             prev = input[i - win]
 * 
 */
    __pyx_t_9 = (__pyx_v_i > (__pyx_v_win - 1));
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":574
 * 
 *         if i > win - 1:
 *             prev = input[i - win]             # <<<<<<<<<<<<<<
 * 
 *             if prev == prev:
 */
      __pyx_t_13 = (__pyx_v_i - __pyx_v_win);
      __pyx_t_7 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_input.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_input.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_input.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_input.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":576
 *             prev = input[i - win]
 * 
 *             if prev == prev:             # <<<<<<<<<<<<<<
 *                 skiplist.remove(prev)
 *                 nobs -= 1
 */
      __pyx_t_9 = (__pyx_v_prev == __pyx_v_prev);
      if (__pyx_t_9) {

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":577
 * 
 *             if prev == prev:
 *                 skiplist.remove(prev)             # <<<<<<<<<<<<<<
 *                 nobs -= 1
 * 
 */
        __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->remove(__pyx_v_skiplist, __pyx_v_prev, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "/home/wesm/code/pandas/pandas/src/moments.pyx":578
 *             if prev == prev:
 *                 skiplist.remove(prev)
 *                 nobs -= 1             # <<<<<<<<<<<<<<
 * 
 *         if val == val:
 */
        __pyx_v_nobs = (__pyx_v_nobs - 1);
        goto __pyx_L9;
      }
      __pyx_L9:;
      goto __pyx_L8;
    }
    __pyx_L8:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":580
 *                 nobs -= 1
 * 
 *         if val == val:             # <<<<<<<<<<<<<<
 *             nobs += 1
 *             skiplist.insert(val)
 */
    __pyx_t_9 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":581
 * 
 *         if val == val:
 *             nobs += 1             # <<<<<<<<<<<<<<
 *             skiplist.insert(val)
 * 
 */
      __pyx_v_nobs = (__pyx_v_nobs + 1);

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":582
 *         if val == val:
 *             nobs += 1
 *             skiplist.insert(val)             # <<<<<<<<<<<<<<
 * 
 *         if nobs >= minp:
 */
      __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->insert(__pyx_v_skiplist, __pyx_v_val, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L10;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":584
 *             skiplist.insert(val)
 * 
 *         if nobs >= minp:             # <<<<<<<<<<<<<<
 *             idx = int((quantile / 1.) * (nobs - 1))
 *             output[i] = skiplist.get(idx)
 */
    __pyx_t_9 = (__pyx_v_nobs >= __pyx_v_minp);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":585
 * 
 *         if nobs >= minp:
 *             idx = int((quantile / 1.) * (nobs - 1))             # <<<<<<<<<<<<<<
 *             output[i] = skiplist.get(idx)
 *         else:
 */
      __pyx_t_4 = PyFloat_FromDouble(((__pyx_v_quantile / 1.) * (__pyx_v_nobs - 1))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_v_idx);
      __pyx_v_idx = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":586
 *         if nobs >= minp:
 *             idx = int((quantile / 1.) * (nobs - 1))
 *             output[i] = skiplist.get(idx)             # <<<<<<<<<<<<<<
 *         else:
 *             output[i] = NaN
 */
      __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_4 = ((struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist *)__pyx_v_skiplist->__pyx_vtab)->get(__pyx_v_skiplist, __pyx_t_14, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_15 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_t_15;
      goto __pyx_L11;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":588
 *             output[i] = skiplist.get(idx)
 *         else:
 *             output[i] = NaN             # <<<<<<<<<<<<<<
 * 
 *     return output
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L11:;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":590
 *             output[i] = NaN
 * 
 *     return output             # <<<<<<<<<<<<<<
 * 
 * def roll_generic(ndarray[float64_t, cast=True] input, int win,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_output));
  __pyx_r = ((PyObject *)__pyx_v_output);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.roll_quantile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_skiplist);
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_117roll_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_117roll_generic = {__Pyx_NAMESTR("roll_generic"), (PyCFunction)__pyx_pw_6pandas_8_tseries_117roll_generic, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_117roll_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_input = 0;
  int __pyx_v_win;
  int __pyx_v_minp;
  PyObject *__pyx_v_func = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__input,&__pyx_n_s__win,&__pyx_n_s__minp,&__pyx_n_s__func,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("roll_generic (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__input);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__win);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_generic", 1, 4, 4, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__minp);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_generic", 1, 4, 4, 2); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("roll_generic", 1, 4, 4, 3); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "roll_generic") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_input = ((PyArrayObject *)values[0]);
      __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_func = values[3];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_input = ((PyArrayObject *)values[0]);
    __pyx_v_win = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_win == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_minp = __Pyx_PyInt_AsInt(values[2]); if (unlikely((__pyx_v_minp == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_func = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("roll_generic", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.roll_generic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input), __pyx_ptype_5numpy_ndarray, 1, "input", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_116roll_generic(__pyx_self, __pyx_v_input, __pyx_v_win, __pyx_v_minp, __pyx_v_func);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/moments.pyx":592
 *     return output
 * 
 * def roll_generic(ndarray[float64_t, cast=True] input, int win,             # <<<<<<<<<<<<<<
 *                  int minp, object func):
 *     cdef ndarray[double_t] output, counts, bufarr
 */

static PyObject *__pyx_pf_6pandas_8_tseries_116roll_generic(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_input, int __pyx_v_win, int __pyx_v_minp, PyObject *__pyx_v_func) {
  PyArrayObject *__pyx_v_output = 0;
  PyArrayObject *__pyx_v_counts = 0;
  PyArrayObject *__pyx_v_bufarr = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_float64_t *__pyx_v_buf;
  __pyx_t_5numpy_float64_t *__pyx_v_oldbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_bufarr;
  __Pyx_Buffer __pyx_pybuffer_bufarr;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_output;
  __Pyx_Buffer __pyx_pybuffer_output;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_input;
  __Pyx_Buffer __pyx_pybuffer_input;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyArrayObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  __pyx_t_5numpy_double_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("roll_generic");
  __Pyx_INCREF((PyObject *)__pyx_v_input);
  __pyx_pybuffer_output.pybuffer.buf = NULL;
  __pyx_pybuffer_output.refcount = 0;
  __pyx_pybuffernd_output.data = NULL;
  __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output;
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_bufarr.pybuffer.buf = NULL;
  __pyx_pybuffer_bufarr.refcount = 0;
  __pyx_pybuffernd_bufarr.data = NULL;
  __pyx_pybuffernd_bufarr.rcbuffer = &__pyx_pybuffer_bufarr;
  __pyx_pybuffer_input.pybuffer.buf = NULL;
  __pyx_pybuffer_input.refcount = 0;
  __pyx_pybuffernd_input.data = NULL;
  __pyx_pybuffernd_input.rcbuffer = &__pyx_pybuffer_input;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":598
 *     cdef float64_t *buf, *oldbuf
 * 
 *     if not input.flags.c_contiguous:             # <<<<<<<<<<<<<<
 *         input = input.copy('C')
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_input), __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__c_contiguous); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = (!__pyx_t_3);
  if (__pyx_t_4) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":599
 * 
 *     if not input.flags.c_contiguous:
 *         input = input.copy('C')             # <<<<<<<<<<<<<<
 * 
 *     buf = <float64_t*> input.data
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_input), __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack);
      if (unlikely(__pyx_t_6 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_input.rcbuffer->pybuffer, (PyObject*)__pyx_v_input, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_input.diminfo[0].strides = __pyx_pybuffernd_input.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_input.diminfo[0].shape = __pyx_pybuffernd_input.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_input));
    __pyx_v_input = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":601
 *         input = input.copy('C')
 * 
 *     buf = <float64_t*> input.data             # <<<<<<<<<<<<<<
 * 
 *     n = len(input)
 */
  __pyx_v_buf = ((__pyx_t_5numpy_float64_t *)__pyx_v_input->data);

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":603
 *     buf = <float64_t*> input.data
 * 
 *     n = len(input)             # <<<<<<<<<<<<<<
 *     minp = _check_minp(minp, n)
 *     output = np.empty(n, dtype=float)
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_10;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":604
 * 
 *     n = len(input)
 *     minp = _check_minp(minp, n)             # <<<<<<<<<<<<<<
 *     output = np.empty(n, dtype=float)
 *     counts = roll_sum(np.isfinite(input).astype(float), win, minp)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___check_minp); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_2 = 0;
  __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
  __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_11); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_v_minp = __pyx_t_6;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":605
 *     n = len(input)
 *     minp = _check_minp(minp, n)
 *     output = np.empty(n, dtype=float)             # <<<<<<<<<<<<<<
 *     counts = roll_sum(np.isfinite(input).astype(float), win, minp)
 * 
 */
  __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__empty); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;
  __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_11));
  if (PyDict_SetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_v_output, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      }
    }
    __pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_13 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":606
 *     minp = _check_minp(minp, n)
 *     output = np.empty(n, dtype=float)
 *     counts = roll_sum(np.isfinite(input).astype(float), win, minp)             # <<<<<<<<<<<<<<
 * 
 *     bufarr = np.empty(win, dtype=float)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__roll_sum); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__isfinite); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_INCREF(((PyObject *)__pyx_v_input));
  PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_input));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_input));
  __pyx_t_12 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__astype); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
  PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)((PyObject*)(&PyFloat_Type))));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
  __pyx_t_1 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
  __pyx_t_12 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_11 = PyInt_FromLong(__pyx_v_minp); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_14);
  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_1 = 0;
  __pyx_t_12 = 0;
  __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
  if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = ((PyArrayObject *)__pyx_t_11);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_13 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":608
 *     counts = roll_sum(np.isfinite(input).astype(float), win, minp)
 * 
 *     bufarr = np.empty(win, dtype=float)             # <<<<<<<<<<<<<<
 *     oldbuf = <float64_t*> bufarr.data
 * 
 */
  __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_14 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__empty); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyInt_FromLong(__pyx_v_win); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;
  __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_11));
  if (PyDict_SetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)((PyObject*)(&PyFloat_Type)))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = PyObject_Call(__pyx_t_14, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
  if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = ((PyArrayObject *)__pyx_t_12);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bufarr.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bufarr.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bufarr.rcbuffer->pybuffer, (PyObject*)__pyx_v_bufarr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      }
    }
    __pyx_pybuffernd_bufarr.diminfo[0].strides = __pyx_pybuffernd_bufarr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bufarr.diminfo[0].shape = __pyx_pybuffernd_bufarr.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_13 = 0;
  __pyx_v_bufarr = ((PyArrayObject *)__pyx_t_12);
  __pyx_t_12 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":609
 * 
 *     bufarr = np.empty(win, dtype=float)
 *     oldbuf = <float64_t*> bufarr.data             # <<<<<<<<<<<<<<
 * 
 *     n = len(input)
 */
  __pyx_v_oldbuf = ((__pyx_t_5numpy_float64_t *)__pyx_v_bufarr->data);

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":611
 *     oldbuf = <float64_t*> bufarr.data
 * 
 *     n = len(input)             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < win:
 *         if counts[i] >= minp:
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_input)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_10;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":612
 * 
 *     n = len(input)
 *     for i from 0 <= i < win:             # <<<<<<<<<<<<<<
 *         if counts[i] >= minp:
 *             output[i] = func(input[int_max(i - win + 1, 0) : i + 1])
 */
  __pyx_t_6 = __pyx_v_win;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":613
 *     n = len(input)
 *     for i from 0 <= i < win:
 *         if counts[i] >= minp:             # <<<<<<<<<<<<<<
 *             output[i] = func(input[int_max(i - win + 1, 0) : i + 1])
 *         else:
 */
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_15 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_pybuffernd_counts.diminfo[0].shape;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_15 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_15 = 0;
    if (unlikely(__pyx_t_15 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_15);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_counts.diminfo[0].strides)) >= __pyx_v_minp);
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":614
 *     for i from 0 <= i < win:
 *         if counts[i] >= minp:
 *             output[i] = func(input[int_max(i - win + 1, 0) : i + 1])             # <<<<<<<<<<<<<<
 *         else:
 *             output[i] = NaN
 */
      __pyx_t_12 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_input), __pyx_f_6pandas_8_tseries_int_max(((__pyx_v_i - __pyx_v_win) + 1), 0), (__pyx_v_i + 1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      __pyx_t_12 = 0;
      __pyx_t_12 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_16 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_15 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_15 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_15 = 0;
      if (unlikely(__pyx_t_15 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_15);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_t_16;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":616
 *             output[i] = func(input[int_max(i - win + 1, 0) : i + 1])
 *         else:
 *             output[i] = NaN             # <<<<<<<<<<<<<<
 * 
 *     for i from win <= i < n:
 */
      __pyx_t_18 = __pyx_v_i;
      __pyx_t_15 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_15 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_15 = 0;
      if (unlikely(__pyx_t_15 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_15);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L6:;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":618
 *             output[i] = NaN
 * 
 *     for i from win <= i < n:             # <<<<<<<<<<<<<<
 *         buf = buf + 1
 *         bufarr.data = <char*> buf
 */
  __pyx_t_19 = __pyx_v_n;
  for (__pyx_v_i = __pyx_v_win; __pyx_v_i < __pyx_t_19; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":619
 * 
 *     for i from win <= i < n:
 *         buf = buf + 1             # <<<<<<<<<<<<<<
 *         bufarr.data = <char*> buf
 *         if counts[i] >= minp:
 */
    __pyx_v_buf = (__pyx_v_buf + 1);

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":620
 *     for i from win <= i < n:
 *         buf = buf + 1
 *         bufarr.data = <char*> buf             # <<<<<<<<<<<<<<
 *         if counts[i] >= minp:
 *             output[i] = func(bufarr)
 */
    __pyx_v_bufarr->data = ((char *)__pyx_v_buf);

    /* "/home/wesm/code/pandas/pandas/src/moments.pyx":621
 *         buf = buf + 1
 *         bufarr.data = <char*> buf
 *         if counts[i] >= minp:             # <<<<<<<<<<<<<<
 *             output[i] = func(bufarr)
 *         else:
 */
    __pyx_t_20 = __pyx_v_i;
    __pyx_t_6 = -1;
    if (__pyx_t_20 < 0) {
      __pyx_t_20 += __pyx_pybuffernd_counts.diminfo[0].shape;
      if (unlikely(__pyx_t_20 < 0)) __pyx_t_6 = 0;
    } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_6 = 0;
    if (unlikely(__pyx_t_6 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_6);
      {__pyx_filename = __pyx_f[6]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides)) >= __pyx_v_minp);
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":622
 *         bufarr.data = <char*> buf
 *         if counts[i] >= minp:
 *             output[i] = func(bufarr)             # <<<<<<<<<<<<<<
 *         else:
 *             output[i] = NaN
 */
      __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_INCREF(((PyObject *)__pyx_v_bufarr));
      PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_bufarr));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_bufarr));
      __pyx_t_11 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
      __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_t_11); if (unlikely((__pyx_t_16 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_21 = __pyx_v_i;
      __pyx_t_6 = -1;
      if (__pyx_t_21 < 0) {
        __pyx_t_21 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_t_16;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/moments.pyx":624
 *             output[i] = func(bufarr)
 *         else:
 *             output[i] = NaN             # <<<<<<<<<<<<<<
 * 
 *     bufarr.data = <char*> oldbuf
 */
      __pyx_t_22 = __pyx_v_i;
      __pyx_t_6 = -1;
      if (__pyx_t_22 < 0) {
        __pyx_t_22 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_22 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[6]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_double_t *, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_output.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L9:;
  }

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":626
 *             output[i] = NaN
 * 
 *     bufarr.data = <char*> oldbuf             # <<<<<<<<<<<<<<
 * 
 *     return output
 */
  __pyx_v_bufarr->data = ((char *)__pyx_v_oldbuf);

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":628
 *     bufarr.data = <char*> oldbuf
 * 
 *     return output             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_output));
  __pyx_r = ((PyObject *)__pyx_v_output);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_14);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bufarr.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.roll_generic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bufarr.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_input.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XDECREF((PyObject *)__pyx_v_bufarr);
  __Pyx_XDECREF((PyObject *)__pyx_v_input);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_119pad_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_118pad_inplace_float64[] = "\n    mask: True if needs to be padded otherwise False\n\n    e.g.\n    pad_inplace_float64(values, isnull(values))\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_119pad_inplace_float64 = {__Pyx_NAMESTR("pad_inplace_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_119pad_inplace_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_118pad_inplace_float64)};
static PyObject *__pyx_pw_6pandas_8_tseries_119pad_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pad_inplace_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_inplace_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_inplace_float64") < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_mask = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_mask = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pad_inplace_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.pad_inplace_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_118pad_inplace_float64(__pyx_self, __pyx_v_values, __pyx_v_mask);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reindex.pyx":1
 * def pad_inplace_float64(ndarray[float64_t] values,             # <<<<<<<<<<<<<<
 *                         ndarray[np.uint8_t, cast=True] mask):
 *     '''
 */

static PyObject *__pyx_pf_6pandas_8_tseries_118pad_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  __pyx_t_5numpy_uint8_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pad_inplace_float64");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":13
 *         float64_t val
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     val = NaN
 *     for i from 0 <= i < n:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":14
 * 
 *     n = len(values)
 *     val = NaN             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         if mask[i]:
 */
  __pyx_v_val = __pyx_v_6pandas_8_tseries_NaN;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":15
 *     n = len(values)
 *     val = NaN
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         if mask[i]:
 *             values[i] = val
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":16
 *     val = NaN
 *     for i from 0 <= i < n:
 *         if mask[i]:             # <<<<<<<<<<<<<<
 *             values[i] = val
 *         else:
 */
    __pyx_t_2 = __pyx_v_i;
    __pyx_t_3 = -1;
    if (__pyx_t_2 < 0) {
      __pyx_t_2 += __pyx_pybuffernd_mask.diminfo[0].shape;
      if (unlikely(__pyx_t_2 < 0)) __pyx_t_3 = 0;
    } else if (unlikely(__pyx_t_2 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_3 = 0;
    if (unlikely(__pyx_t_3 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_3);
      {__pyx_filename = __pyx_f[7]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_mask.diminfo[0].strides));
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":17
 *     for i from 0 <= i < n:
 *         if mask[i]:
 *             values[i] = val             # <<<<<<<<<<<<<<
 *         else:
 *             val = values[i]
 */
      __pyx_t_5 = __pyx_v_i;
      __pyx_t_3 = -1;
      if (__pyx_t_5 < 0) {
        __pyx_t_5 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_5 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[7]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":19
 *             values[i] = val
 *         else:
 *             val = values[i]             # <<<<<<<<<<<<<<
 * 
 * def get_pad_indexer(ndarray[np.uint8_t, cast=True] mask):
 */
      __pyx_t_6 = __pyx_v_i;
      __pyx_t_3 = -1;
      if (__pyx_t_6 < 0) {
        __pyx_t_6 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_6 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[7]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides));
    }
    __pyx_L5:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_inplace_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_121get_pad_indexer(PyObject *__pyx_self, PyObject *__pyx_v_mask); /*proto*/
static char __pyx_doc_6pandas_8_tseries_120get_pad_indexer[] = "\n    mask: True if needs to be padded otherwise False\n\n    e.g.\n    pad_inplace_float64(values, isnull(values))\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_121get_pad_indexer = {__Pyx_NAMESTR("get_pad_indexer"), (PyCFunction)__pyx_pw_6pandas_8_tseries_121get_pad_indexer, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_120get_pad_indexer)};
static PyObject *__pyx_pw_6pandas_8_tseries_121get_pad_indexer(PyObject *__pyx_self, PyObject *__pyx_v_mask) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_pad_indexer (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_120get_pad_indexer(__pyx_self, ((PyArrayObject *)__pyx_v_mask));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reindex.pyx":21
 *             val = values[i]
 * 
 * def get_pad_indexer(ndarray[np.uint8_t, cast=True] mask):             # <<<<<<<<<<<<<<
 *     '''
 *     mask: True if needs to be padded otherwise False
 */

static PyObject *__pyx_pf_6pandas_8_tseries_120get_pad_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_int32_t __pyx_v_idx;
  PyArrayObject *__pyx_v_indexer = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_pad_indexer");
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":33
 *         ndarray[int32_t] indexer
 * 
 *     n = len(mask)             # <<<<<<<<<<<<<<
 *     indexer = np.empty(n, dtype=np.int32)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_mask)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":34
 * 
 *     n = len(mask)
 *     indexer = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 * 
 *     idx = 0
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":36
 *     indexer = np.empty(n, dtype=np.int32)
 * 
 *     idx = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         if not mask[i]:
 */
  __pyx_v_idx = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":37
 * 
 *     idx = 0
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         if not mask[i]:
 *             idx = i
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":38
 *     idx = 0
 *     for i from 0 <= i < n:
 *         if not mask[i]:             # <<<<<<<<<<<<<<
 *             idx = i
 *         indexer[i] = idx
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_mask.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[7]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_13 = (!(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_mask.diminfo[0].strides)));
    if (__pyx_t_13) {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":39
 *     for i from 0 <= i < n:
 *         if not mask[i]:
 *             idx = i             # <<<<<<<<<<<<<<
 *         indexer[i] = idx
 * 
 */
      __pyx_v_idx = __pyx_v_i;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":40
 *         if not mask[i]:
 *             idx = i
 *         indexer[i] = idx             # <<<<<<<<<<<<<<
 * 
 *     return indexer
 */
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_indexer.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[7]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_idx;
  }

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":42
 *         indexer[i] = idx
 * 
 *     return indexer             # <<<<<<<<<<<<<<
 * 
 * def get_backfill_indexer(ndarray[np.uint8_t, cast=True] mask):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_indexer));
  __pyx_r = ((PyObject *)__pyx_v_indexer);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.get_pad_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_123get_backfill_indexer(PyObject *__pyx_self, PyObject *__pyx_v_mask); /*proto*/
static char __pyx_doc_6pandas_8_tseries_122get_backfill_indexer[] = "\n    mask: True if needs to be padded otherwise False\n\n    e.g.\n    pad_inplace_float64(values, isnull(values))\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_123get_backfill_indexer = {__Pyx_NAMESTR("get_backfill_indexer"), (PyCFunction)__pyx_pw_6pandas_8_tseries_123get_backfill_indexer, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_122get_backfill_indexer)};
static PyObject *__pyx_pw_6pandas_8_tseries_123get_backfill_indexer(PyObject *__pyx_self, PyObject *__pyx_v_mask) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_backfill_indexer (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_122get_backfill_indexer(__pyx_self, ((PyArrayObject *)__pyx_v_mask));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reindex.pyx":44
 *     return indexer
 * 
 * def get_backfill_indexer(ndarray[np.uint8_t, cast=True] mask):             # <<<<<<<<<<<<<<
 *     '''
 *     mask: True if needs to be padded otherwise False
 */

static PyObject *__pyx_pf_6pandas_8_tseries_122get_backfill_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_int32_t __pyx_v_idx;
  PyArrayObject *__pyx_v_indexer = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_backfill_indexer");
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":56
 *         ndarray[int32_t] indexer
 * 
 *     n = len(mask)             # <<<<<<<<<<<<<<
 *     indexer = np.empty(n, dtype=np.int32)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_mask)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":57
 * 
 *     n = len(mask)
 *     indexer = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 * 
 *     idx = n - 1
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":59
 *     indexer = np.empty(n, dtype=np.int32)
 * 
 *     idx = n - 1             # <<<<<<<<<<<<<<
 *     i = n - 1
 *     while i >= 0:
 */
  __pyx_v_idx = (__pyx_v_n - 1);

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":60
 * 
 *     idx = n - 1
 *     i = n - 1             # <<<<<<<<<<<<<<
 *     while i >= 0:
 *         if not mask[i]:
 */
  __pyx_v_i = (__pyx_v_n - 1);

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":61
 *     idx = n - 1
 *     i = n - 1
 *     while i >= 0:             # <<<<<<<<<<<<<<
 *         if not mask[i]:
 *             idx = i
 */
  while (1) {
    __pyx_t_12 = (__pyx_v_i >= 0);
    if (!__pyx_t_12) break;

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":62
 *     i = n - 1
 *     while i >= 0:
 *         if not mask[i]:             # <<<<<<<<<<<<<<
 *             idx = i
 *         indexer[i] = idx
 */
    __pyx_t_1 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_1 < 0) {
      __pyx_t_1 += __pyx_pybuffernd_mask.diminfo[0].shape;
      if (unlikely(__pyx_t_1 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[7]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_12 = (!(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_mask.diminfo[0].strides)));
    if (__pyx_t_12) {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":63
 *     while i >= 0:
 *         if not mask[i]:
 *             idx = i             # <<<<<<<<<<<<<<
 *         indexer[i] = idx
 *         i -= 1
 */
      __pyx_v_idx = __pyx_v_i;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":64
 *         if not mask[i]:
 *             idx = i
 *         indexer[i] = idx             # <<<<<<<<<<<<<<
 *         i -= 1
 * 
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_indexer.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[7]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_idx;

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":65
 *             idx = i
 *         indexer[i] = idx
 *         i -= 1             # <<<<<<<<<<<<<<
 * 
 *     return indexer
 */
    __pyx_v_i = (__pyx_v_i - 1);
  }

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":67
 *         i -= 1
 * 
 *     return indexer             # <<<<<<<<<<<<<<
 * 
 * def backfill_inplace_float64(ndarray[float64_t] values,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_indexer));
  __pyx_r = ((PyObject *)__pyx_v_indexer);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.get_backfill_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_125backfill_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_124backfill_inplace_float64[] = "\n    mask: True if needs to be backfilled otherwise False\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_125backfill_inplace_float64 = {__Pyx_NAMESTR("backfill_inplace_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_125backfill_inplace_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_124backfill_inplace_float64)};
static PyObject *__pyx_pw_6pandas_8_tseries_125backfill_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("backfill_inplace_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_inplace_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_inplace_float64") < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_mask = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_mask = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("backfill_inplace_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.backfill_inplace_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_124backfill_inplace_float64(__pyx_self, __pyx_v_values, __pyx_v_mask);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reindex.pyx":69
 *     return indexer
 * 
 * def backfill_inplace_float64(ndarray[float64_t] values,             # <<<<<<<<<<<<<<
 *                              ndarray[np.uint8_t, cast=True] mask):
 *     '''
 */

static PyObject *__pyx_pf_6pandas_8_tseries_124backfill_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  __pyx_t_5numpy_uint8_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("backfill_inplace_float64");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 1, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":78
 *         float64_t val
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     val = NaN
 *     i = n - 1
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":79
 * 
 *     n = len(values)
 *     val = NaN             # <<<<<<<<<<<<<<
 *     i = n - 1
 *     while i >= 0:
 */
  __pyx_v_val = __pyx_v_6pandas_8_tseries_NaN;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":80
 *     n = len(values)
 *     val = NaN
 *     i = n - 1             # <<<<<<<<<<<<<<
 *     while i >= 0:
 *         if mask[i]:
 */
  __pyx_v_i = (__pyx_v_n - 1);

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":81
 *     val = NaN
 *     i = n - 1
 *     while i >= 0:             # <<<<<<<<<<<<<<
 *         if mask[i]:
 *             values[i] = val
 */
  while (1) {
    __pyx_t_2 = (__pyx_v_i >= 0);
    if (!__pyx_t_2) break;

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":82
 *     i = n - 1
 *     while i >= 0:
 *         if mask[i]:             # <<<<<<<<<<<<<<
 *             values[i] = val
 *         else:
 */
    __pyx_t_1 = __pyx_v_i;
    __pyx_t_3 = -1;
    if (__pyx_t_1 < 0) {
      __pyx_t_1 += __pyx_pybuffernd_mask.diminfo[0].shape;
      if (unlikely(__pyx_t_1 < 0)) __pyx_t_3 = 0;
    } else if (unlikely(__pyx_t_1 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_3 = 0;
    if (unlikely(__pyx_t_3 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_3);
      {__pyx_filename = __pyx_f[7]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_4 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_mask.diminfo[0].strides));
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":83
 *     while i >= 0:
 *         if mask[i]:
 *             values[i] = val             # <<<<<<<<<<<<<<
 *         else:
 *             val = values[i]
 */
      __pyx_t_5 = __pyx_v_i;
      __pyx_t_3 = -1;
      if (__pyx_t_5 < 0) {
        __pyx_t_5 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_5 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[7]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_values.diminfo[0].strides) = __pyx_v_val;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":85
 *             values[i] = val
 *         else:
 *             val = values[i]             # <<<<<<<<<<<<<<
 *         i -= 1
 * 
 */
      __pyx_t_6 = __pyx_v_i;
      __pyx_t_3 = -1;
      if (__pyx_t_6 < 0) {
        __pyx_t_6 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_6 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[7]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides));
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":86
 *         else:
 *             val = values[i]
 *         i -= 1             # <<<<<<<<<<<<<<
 * 
 * def ordered_left_join(ndarray[object] left, ndarray[object] right):
 */
    __pyx_v_i = (__pyx_v_i - 1);
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_inplace_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_127ordered_left_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_127ordered_left_join = {__Pyx_NAMESTR("ordered_left_join"), (PyCFunction)__pyx_pw_6pandas_8_tseries_127ordered_left_join, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_127ordered_left_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ordered_left_join (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("ordered_left_join", 1, 2, 2, 1); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ordered_left_join") < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ordered_left_join", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.ordered_left_join", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_126ordered_left_join(__pyx_self, __pyx_v_left, __pyx_v_right);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reindex.pyx":88
 *         i -= 1
 * 
 * def ordered_left_join(ndarray[object] left, ndarray[object] right):             # <<<<<<<<<<<<<<
 *     # cdef dict right_map = map_indices_buf(right)
 *     # return merge_indexer(left, right_map)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_126ordered_left_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_indexer = 0;
  PyArrayObject *__pyx_v_mask = 0;
  PyObject *__pyx_v_val = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyArrayObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ordered_left_join");
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":97
 *         object val
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     n = len(left)
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":98
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     n = len(left)
 *     k = len(right)
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":99
 *     i = 0
 *     j = 0
 *     n = len(left)             # <<<<<<<<<<<<<<
 *     k = len(right)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":100
 *     j = 0
 *     n = len(left)
 *     k = len(right)             # <<<<<<<<<<<<<<
 * 
 *     indexer = np.zeros(n, dtype=np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_k = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":102
 *     k = len(right)
 * 
 *     indexer = np.zeros(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     mask = np.ones(n, dtype=np.uint8)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":103
 * 
 *     indexer = np.zeros(n, dtype=np.int32)
 *     mask = np.ones(n, dtype=np.uint8)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__ones); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__uint8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_12 = 0;
  __pyx_v_mask = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":105
 *     mask = np.ones(n, dtype=np.uint8)
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         val = left[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":106
 * 
 *     for i from 0 <= i < n:
 *         val = left[i]             # <<<<<<<<<<<<<<
 * 
 *         while j < k and right[j] < val:
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_left.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_left.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[7]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_left.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":108
 *         val = left[i]
 * 
 *         while j < k and right[j] < val:             # <<<<<<<<<<<<<<
 *             j += 1
 * 
 */
    while (1) {
      __pyx_t_14 = (__pyx_v_j < __pyx_v_k);
      if (__pyx_t_14) {
        __pyx_t_15 = __pyx_v_j;
        __pyx_t_8 = -1;
        if (__pyx_t_15 < 0) {
          __pyx_t_15 += __pyx_pybuffernd_right.diminfo[0].shape;
          if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0;
        } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_8 = 0;
        if (unlikely(__pyx_t_8 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_8);
          {__pyx_filename = __pyx_f[7]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_right.diminfo[0].strides);
        __Pyx_INCREF((PyObject*)__pyx_t_5);
        __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_v_val, Py_LT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_17 = __pyx_t_16;
      } else {
        __pyx_t_17 = __pyx_t_14;
      }
      if (!__pyx_t_17) break;

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":109
 * 
 *         while j < k and right[j] < val:
 *             j += 1             # <<<<<<<<<<<<<<
 * 
 *         if j == k:
 */
      __pyx_v_j = (__pyx_v_j + 1);
    }

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":111
 *             j += 1
 * 
 *         if j == k:             # <<<<<<<<<<<<<<
 *             break
 * 
 */
    __pyx_t_17 = (__pyx_v_j == __pyx_v_k);
    if (__pyx_t_17) {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":112
 * 
 *         if j == k:
 *             break             # <<<<<<<<<<<<<<
 * 
 *         if val == right[j]:
 */
      goto __pyx_L4_break;
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":114
 *             break
 * 
 *         if val == right[j]:             # <<<<<<<<<<<<<<
 *             indexer[i] = j
 *             mask[i] = 0
 */
    __pyx_t_18 = __pyx_v_j;
    __pyx_t_8 = -1;
    if (__pyx_t_18 < 0) {
      __pyx_t_18 += __pyx_pybuffernd_right.diminfo[0].shape;
      if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_right.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[7]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_right.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_val, __pyx_t_6, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_17 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_17) {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":115
 * 
 *         if val == right[j]:
 *             indexer[i] = j             # <<<<<<<<<<<<<<
 *             mask[i] = 0
 * 
 */
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_indexer.diminfo[0].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[7]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j;

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":116
 *         if val == right[j]:
 *             indexer[i] = j
 *             mask[i] = 0             # <<<<<<<<<<<<<<
 * 
 *     return indexer, mask.view(np.bool_)
 */
      __pyx_t_20 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_pybuffernd_mask.diminfo[0].shape;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_mask.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[7]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_mask.diminfo[0].strides) = 0;
      goto __pyx_L8;
    }
    __pyx_L8:;
  }
  __pyx_L4_break:;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":118
 *             mask[i] = 0
 * 
 *     return indexer, mask.view(np.bool_)             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_mask), __pyx_n_s__view); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_v_indexer));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_indexer));
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_r = ((PyObject *)__pyx_t_6);
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.ordered_left_join", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_mask);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_129left_join_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_129left_join_2d = {__Pyx_NAMESTR("left_join_2d"), (PyCFunction)__pyx_pw_6pandas_8_tseries_129left_join_2d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_129left_join_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  PyArrayObject *__pyx_v_lvalues = 0;
  PyArrayObject *__pyx_v_rvalues = 0;
  PyArrayObject *__pyx_v_out = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__lvalues,&__pyx_n_s__rvalues,&__pyx_n_s__out,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("left_join_2d (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("left_join_2d", 1, 5, 5, 1); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lvalues);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("left_join_2d", 1, 5, 5, 2); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rvalues);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("left_join_2d", 1, 5, 5, 3); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
        if (likely(values[4])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("left_join_2d", 1, 5, 5, 4); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_2d") < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
      __pyx_v_lvalues = ((PyArrayObject *)values[2]);
      __pyx_v_rvalues = ((PyArrayObject *)values[3]);
      __pyx_v_out = ((PyArrayObject *)values[4]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
    __pyx_v_lvalues = ((PyArrayObject *)values[2]);
    __pyx_v_rvalues = ((PyArrayObject *)values[3]);
    __pyx_v_out = ((PyArrayObject *)values[4]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("left_join_2d", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.left_join_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lvalues), __pyx_ptype_5numpy_ndarray, 1, "lvalues", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rvalues), __pyx_ptype_5numpy_ndarray, 1, "rvalues", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_128left_join_2d(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_lvalues, __pyx_v_rvalues, __pyx_v_out);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reindex.pyx":122
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_2d(ndarray[int64_t] left, ndarray[int64_t] right,             # <<<<<<<<<<<<<<
 *                  ndarray[float64_t, ndim=2] lvalues,
 *                  ndarray[float64_t, ndim=2] rvalues,
 */

static PyObject *__pyx_pf_6pandas_8_tseries_128left_join_2d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyArrayObject *__pyx_v_lvalues, PyArrayObject *__pyx_v_rvalues, PyArrayObject *__pyx_v_out) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_nright;
  Py_ssize_t __pyx_v_nleft;
  Py_ssize_t __pyx_v_kright;
  Py_ssize_t __pyx_v_kleft;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_rvalues;
  __Pyx_Buffer __pyx_pybuffer_rvalues;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lvalues;
  __Pyx_Buffer __pyx_pybuffer_lvalues;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("left_join_2d");
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  __pyx_pybuffer_lvalues.pybuffer.buf = NULL;
  __pyx_pybuffer_lvalues.refcount = 0;
  __pyx_pybuffernd_lvalues.data = NULL;
  __pyx_pybuffernd_lvalues.rcbuffer = &__pyx_pybuffer_lvalues;
  __pyx_pybuffer_rvalues.pybuffer.buf = NULL;
  __pyx_pybuffer_rvalues.refcount = 0;
  __pyx_pybuffernd_rvalues.data = NULL;
  __pyx_pybuffernd_rvalues.rcbuffer = &__pyx_pybuffer_rvalues;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lvalues.rcbuffer->pybuffer, (PyObject*)__pyx_v_lvalues, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_lvalues.diminfo[0].strides = __pyx_pybuffernd_lvalues.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lvalues.diminfo[0].shape = __pyx_pybuffernd_lvalues.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_lvalues.diminfo[1].strides = __pyx_pybuffernd_lvalues.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_lvalues.diminfo[1].shape = __pyx_pybuffernd_lvalues.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rvalues.rcbuffer->pybuffer, (PyObject*)__pyx_v_rvalues, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_rvalues.diminfo[0].strides = __pyx_pybuffernd_rvalues.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rvalues.diminfo[0].shape = __pyx_pybuffernd_rvalues.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_rvalues.diminfo[1].strides = __pyx_pybuffernd_rvalues.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_rvalues.diminfo[1].shape = __pyx_pybuffernd_rvalues.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1];

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":130
 *         int64_t val
 * 
 *     nleft, kleft = (<object> lvalues).shape             # <<<<<<<<<<<<<<
 *     nright, kright = (<object> rvalues).shape
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_lvalues), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[7]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[7]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[7]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_nleft = __pyx_t_6;
  __pyx_v_kleft = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":131
 * 
 *     nleft, kleft = (<object> lvalues).shape
 *     nright, kright = (<object> rvalues).shape             # <<<<<<<<<<<<<<
 * 
 *     j = 0
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_rvalues), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[7]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[7]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L6_unpacking_done;
    __pyx_L5_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[7]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L6_unpacking_done:;
  }
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_nright = __pyx_t_7;
  __pyx_v_kright = __pyx_t_6;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":133
 *     nright, kright = (<object> rvalues).shape
 * 
 *     j = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < nleft:
 *         for k from 0 <= k < kleft:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":134
 * 
 *     j = 0
 *     for i from 0 <= i < nleft:             # <<<<<<<<<<<<<<
 *         for k from 0 <= k < kleft:
 *             out[i, k] = lvalues[i, k]
 */
  __pyx_t_6 = __pyx_v_nleft;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":135
 *     j = 0
 *     for i from 0 <= i < nleft:
 *         for k from 0 <= k < kleft:             # <<<<<<<<<<<<<<
 *             out[i, k] = lvalues[i, k]
 * 
 */
    __pyx_t_7 = __pyx_v_kleft;
    for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_7; __pyx_v_k++) {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":136
 *     for i from 0 <= i < nleft:
 *         for k from 0 <= k < kleft:
 *             out[i, k] = lvalues[i, k]             # <<<<<<<<<<<<<<
 * 
 *         val = left[i]
 */
      __pyx_t_8 = __pyx_v_i;
      __pyx_t_9 = __pyx_v_k;
      __pyx_t_10 = __pyx_v_i;
      __pyx_t_11 = __pyx_v_k;
      *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_lvalues.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_lvalues.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_lvalues.diminfo[1].strides));
    }

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":138
 *             out[i, k] = lvalues[i, k]
 * 
 *         val = left[i]             # <<<<<<<<<<<<<<
 * 
 *         while j < nright and right[j] < val:
 */
    __pyx_t_7 = __pyx_v_i;
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":140
 *         val = left[i]
 * 
 *         while j < nright and right[j] < val:             # <<<<<<<<<<<<<<
 *             j += 1
 * 
 */
    while (1) {
      __pyx_t_12 = (__pyx_v_j < __pyx_v_nright);
      if (__pyx_t_12) {
        __pyx_t_13 = __pyx_v_j;
        __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right.diminfo[0].strides)) < __pyx_v_val);
        __pyx_t_15 = __pyx_t_14;
      } else {
        __pyx_t_15 = __pyx_t_12;
      }
      if (!__pyx_t_15) break;

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":141
 * 
 *         while j < nright and right[j] < val:
 *             j += 1             # <<<<<<<<<<<<<<
 * 
 *         if j == nright:
 */
      __pyx_v_j = (__pyx_v_j + 1);
    }

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":143
 *             j += 1
 * 
 *         if j == nright:             # <<<<<<<<<<<<<<
 *             for k from kleft <= k < kleft + kright:
 *                 out[i, k] = NaN
 */
    __pyx_t_15 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_15) {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":144
 * 
 *         if j == nright:
 *             for k from kleft <= k < kleft + kright:             # <<<<<<<<<<<<<<
 *                 out[i, k] = NaN
 *             continue
 */
      __pyx_t_16 = (__pyx_v_kleft + __pyx_v_kright);
      for (__pyx_v_k = __pyx_v_kleft; __pyx_v_k < __pyx_t_16; __pyx_v_k++) {

        /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":145
 *         if j == nright:
 *             for k from kleft <= k < kleft + kright:
 *                 out[i, k] = NaN             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
        __pyx_t_17 = __pyx_v_i;
        __pyx_t_18 = __pyx_v_k;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_8_tseries_NaN;
      }

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":146
 *             for k from kleft <= k < kleft + kright:
 *                 out[i, k] = NaN
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         if val == right[j]:
 */
      goto __pyx_L7_continue;
      goto __pyx_L13;
    }
    __pyx_L13:;

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":148
 *             continue
 * 
 *         if val == right[j]:             # <<<<<<<<<<<<<<
 *             for k from kleft <= k < kleft + kright:
 *                 out[i, k] = rvalues[j, k - kleft]
 */
    __pyx_t_16 = __pyx_v_j;
    __pyx_t_15 = (__pyx_v_val == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_right.diminfo[0].strides)));
    if (__pyx_t_15) {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":149
 * 
 *         if val == right[j]:
 *             for k from kleft <= k < kleft + kright:             # <<<<<<<<<<<<<<
 *                 out[i, k] = rvalues[j, k - kleft]
 *         else:
 */
      __pyx_t_19 = (__pyx_v_kleft + __pyx_v_kright);
      for (__pyx_v_k = __pyx_v_kleft; __pyx_v_k < __pyx_t_19; __pyx_v_k++) {

        /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":150
 *         if val == right[j]:
 *             for k from kleft <= k < kleft + kright:
 *                 out[i, k] = rvalues[j, k - kleft]             # <<<<<<<<<<<<<<
 *         else:
 *             for k from kleft <= k < kleft + kright:
 */
        __pyx_t_20 = __pyx_v_j;
        __pyx_t_21 = (__pyx_v_k - __pyx_v_kleft);
        __pyx_t_22 = __pyx_v_i;
        __pyx_t_23 = __pyx_v_k;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_rvalues.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_rvalues.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_rvalues.diminfo[1].strides));
      }
      goto __pyx_L16;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":152
 *                 out[i, k] = rvalues[j, k - kleft]
 *         else:
 *             for k from kleft <= k < kleft + kright:             # <<<<<<<<<<<<<<
 *                 out[i, k] = NaN
 * 
 */
      __pyx_t_19 = (__pyx_v_kleft + __pyx_v_kright);
      for (__pyx_v_k = __pyx_v_kleft; __pyx_v_k < __pyx_t_19; __pyx_v_k++) {

        /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":153
 *         else:
 *             for k from kleft <= k < kleft + kright:
 *                 out[i, k] = NaN             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
        __pyx_t_24 = __pyx_v_i;
        __pyx_t_25 = __pyx_v_k;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_8_tseries_NaN;
      }
    }
    __pyx_L16:;
    __pyx_L7_continue:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rvalues.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lvalues.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.left_join_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rvalues.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lvalues.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_131left_join_1d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_131left_join_1d = {__Pyx_NAMESTR("left_join_1d"), (PyCFunction)__pyx_pw_6pandas_8_tseries_131left_join_1d, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_131left_join_1d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  PyArrayObject *__pyx_v_lvalues = 0;
  PyArrayObject *__pyx_v_rvalues = 0;
  PyArrayObject *__pyx_v_out = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__lvalues,&__pyx_n_s__rvalues,&__pyx_n_s__out,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("left_join_1d (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("left_join_1d", 1, 5, 5, 1); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lvalues);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("left_join_1d", 1, 5, 5, 2); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rvalues);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("left_join_1d", 1, 5, 5, 3); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
        if (likely(values[4])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("left_join_1d", 1, 5, 5, 4); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_1d") < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
      __pyx_v_lvalues = ((PyArrayObject *)values[2]);
      __pyx_v_rvalues = ((PyArrayObject *)values[3]);
      __pyx_v_out = ((PyArrayObject *)values[4]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
    __pyx_v_lvalues = ((PyArrayObject *)values[2]);
    __pyx_v_rvalues = ((PyArrayObject *)values[3]);
    __pyx_v_out = ((PyArrayObject *)values[4]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("left_join_1d", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.left_join_1d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lvalues), __pyx_ptype_5numpy_ndarray, 1, "lvalues", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rvalues), __pyx_ptype_5numpy_ndarray, 1, "rvalues", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_130left_join_1d(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_lvalues, __pyx_v_rvalues, __pyx_v_out);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reindex.pyx":157
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_1d(ndarray[int64_t] left, ndarray[int64_t] right,             # <<<<<<<<<<<<<<
 *                  ndarray[float64_t] lvalues,
 *                  ndarray[float64_t] rvalues,
 */

static PyObject *__pyx_pf_6pandas_8_tseries_130left_join_1d(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, PyArrayObject *__pyx_v_lvalues, PyArrayObject *__pyx_v_rvalues, PyArrayObject *__pyx_v_out) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_nright;
  Py_ssize_t __pyx_v_nleft;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_rvalues;
  __Pyx_Buffer __pyx_pybuffer_rvalues;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lvalues;
  __Pyx_Buffer __pyx_pybuffer_lvalues;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_out;
  __Pyx_Buffer __pyx_pybuffer_out;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  long __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  long __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  long __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("left_join_1d");
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  __pyx_pybuffer_lvalues.pybuffer.buf = NULL;
  __pyx_pybuffer_lvalues.refcount = 0;
  __pyx_pybuffernd_lvalues.data = NULL;
  __pyx_pybuffernd_lvalues.rcbuffer = &__pyx_pybuffer_lvalues;
  __pyx_pybuffer_rvalues.pybuffer.buf = NULL;
  __pyx_pybuffer_rvalues.refcount = 0;
  __pyx_pybuffernd_rvalues.data = NULL;
  __pyx_pybuffernd_rvalues.rcbuffer = &__pyx_pybuffer_rvalues;
  __pyx_pybuffer_out.pybuffer.buf = NULL;
  __pyx_pybuffer_out.refcount = 0;
  __pyx_pybuffernd_out.data = NULL;
  __pyx_pybuffernd_out.rcbuffer = &__pyx_pybuffer_out;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lvalues.rcbuffer->pybuffer, (PyObject*)__pyx_v_lvalues, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_lvalues.diminfo[0].strides = __pyx_pybuffernd_lvalues.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lvalues.diminfo[0].shape = __pyx_pybuffernd_lvalues.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rvalues.rcbuffer->pybuffer, (PyObject*)__pyx_v_rvalues, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_rvalues.diminfo[0].strides = __pyx_pybuffernd_rvalues.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rvalues.diminfo[0].shape = __pyx_pybuffernd_rvalues.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_out.rcbuffer->pybuffer, (PyObject*)__pyx_v_out, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_out.diminfo[0].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_out.diminfo[0].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_out.diminfo[1].strides = __pyx_pybuffernd_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_out.diminfo[1].shape = __pyx_pybuffernd_out.rcbuffer->pybuffer.shape[1];

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":165
 *         int64_t val
 * 
 *     nleft = len(lvalues)             # <<<<<<<<<<<<<<
 *     nright = len(rvalues)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_lvalues)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nleft = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":166
 * 
 *     nleft = len(lvalues)
 *     nright = len(rvalues)             # <<<<<<<<<<<<<<
 * 
 *     j = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_rvalues)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nright = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":168
 *     nright = len(rvalues)
 * 
 *     j = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < nleft:
 *         out[i, 0] = lvalues[i]
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":169
 * 
 *     j = 0
 *     for i from 0 <= i < nleft:             # <<<<<<<<<<<<<<
 *         out[i, 0] = lvalues[i]
 * 
 */
  __pyx_t_1 = __pyx_v_nleft;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":170
 *     j = 0
 *     for i from 0 <= i < nleft:
 *         out[i, 0] = lvalues[i]             # <<<<<<<<<<<<<<
 * 
 *         val = left[i]
 */
    __pyx_t_2 = __pyx_v_i;
    __pyx_t_3 = __pyx_v_i;
    __pyx_t_4 = 0;
    *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_4, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_lvalues.rcbuffer->pybuffer.buf, __pyx_t_2, __pyx_pybuffernd_lvalues.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":172
 *         out[i, 0] = lvalues[i]
 * 
 *         val = left[i]             # <<<<<<<<<<<<<<
 * 
 *         while j < nright and right[j] < val:
 */
    __pyx_t_5 = __pyx_v_i;
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_left.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":174
 *         val = left[i]
 * 
 *         while j < nright and right[j] < val:             # <<<<<<<<<<<<<<
 *             j += 1
 * 
 */
    while (1) {
      __pyx_t_6 = (__pyx_v_j < __pyx_v_nright);
      if (__pyx_t_6) {
        __pyx_t_7 = __pyx_v_j;
        __pyx_t_8 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_right.diminfo[0].strides)) < __pyx_v_val);
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = __pyx_t_6;
      }
      if (!__pyx_t_9) break;

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":175
 * 
 *         while j < nright and right[j] < val:
 *             j += 1             # <<<<<<<<<<<<<<
 * 
 *         if j == nright:
 */
      __pyx_v_j = (__pyx_v_j + 1);
    }

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":177
 *             j += 1
 * 
 *         if j == nright:             # <<<<<<<<<<<<<<
 *             out[i, 1] = NaN
 *             continue
 */
    __pyx_t_9 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":178
 * 
 *         if j == nright:
 *             out[i, 1] = NaN             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
      __pyx_t_10 = __pyx_v_i;
      __pyx_t_11 = 1;
      *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_8_tseries_NaN;

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":179
 *         if j == nright:
 *             out[i, 1] = NaN
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         if val == right[j]:
 */
      goto __pyx_L3_continue;
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":181
 *             continue
 * 
 *         if val == right[j]:             # <<<<<<<<<<<<<<
 *             out[i, 1] = rvalues[j]
 *         else:
 */
    __pyx_t_12 = __pyx_v_j;
    __pyx_t_9 = (__pyx_v_val == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_right.diminfo[0].strides)));
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":182
 * 
 *         if val == right[j]:
 *             out[i, 1] = rvalues[j]             # <<<<<<<<<<<<<<
 *         else:
 *             out[i, 1] = NaN
 */
      __pyx_t_13 = __pyx_v_j;
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_15 = 1;
      *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_out.diminfo[1].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_rvalues.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_rvalues.diminfo[0].strides));
      goto __pyx_L8;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":184
 *             out[i, 1] = rvalues[j]
 *         else:
 *             out[i, 1] = NaN             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_17 = 1;
      *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_out.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_out.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_out.diminfo[1].strides) = __pyx_v_6pandas_8_tseries_NaN;
    }
    __pyx_L8:;
    __pyx_L3_continue:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rvalues.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lvalues.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.left_join_1d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rvalues.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lvalues.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_out.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_133take_join_contiguous(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_133take_join_contiguous = {__Pyx_NAMESTR("take_join_contiguous"), (PyCFunction)__pyx_pw_6pandas_8_tseries_133take_join_contiguous, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_133take_join_contiguous(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_lvalues = 0;
  PyArrayObject *__pyx_v_rvalues = 0;
  PyArrayObject *__pyx_v_lindexer = 0;
  PyArrayObject *__pyx_v_rindexer = 0;
  PyArrayObject *__pyx_v_out = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__lvalues,&__pyx_n_s__rvalues,&__pyx_n_s__lindexer,&__pyx_n_s__rindexer,&__pyx_n_s__out,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_join_contiguous (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lvalues);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rvalues);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_join_contiguous", 1, 5, 5, 1); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lindexer);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_join_contiguous", 1, 5, 5, 2); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rindexer);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_join_contiguous", 1, 5, 5, 3); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
        if (likely(values[4])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_join_contiguous", 1, 5, 5, 4); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_join_contiguous") < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_lvalues = ((PyArrayObject *)values[0]);
      __pyx_v_rvalues = ((PyArrayObject *)values[1]);
      __pyx_v_lindexer = ((PyArrayObject *)values[2]);
      __pyx_v_rindexer = ((PyArrayObject *)values[3]);
      __pyx_v_out = ((PyArrayObject *)values[4]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_lvalues = ((PyArrayObject *)values[0]);
    __pyx_v_rvalues = ((PyArrayObject *)values[1]);
    __pyx_v_lindexer = ((PyArrayObject *)values[2]);
    __pyx_v_rindexer = ((PyArrayObject *)values[3]);
    __pyx_v_out = ((PyArrayObject *)values[4]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_join_contiguous", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.take_join_contiguous", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lvalues), __pyx_ptype_5numpy_ndarray, 1, "lvalues", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rvalues), __pyx_ptype_5numpy_ndarray, 1, "rvalues", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lindexer), __pyx_ptype_5numpy_ndarray, 1, "lindexer", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rindexer), __pyx_ptype_5numpy_ndarray, 1, "rindexer", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_out), __pyx_ptype_5numpy_ndarray, 1, "out", 0))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_132take_join_contiguous(__pyx_self, __pyx_v_lvalues, __pyx_v_rvalues, __pyx_v_lindexer, __pyx_v_rindexer, __pyx_v_out);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reindex.pyx":189
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_join_contiguous(ndarray[float64_t, ndim=2] lvalues,             # <<<<<<<<<<<<<<
 *                          ndarray[float64_t, ndim=2] rvalues,
 *                          ndarray[int32_t] lindexer,
 */

static PyObject *__pyx_pf_6pandas_8_tseries_132take_join_contiguous(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_lvalues, PyArrayObject *__pyx_v_rvalues, PyArrayObject *__pyx_v_lindexer, PyArrayObject *__pyx_v_rindexer, PyArrayObject *__pyx_v_out) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_rk;
  Py_ssize_t __pyx_v_lk;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_lidx;
  Py_ssize_t __pyx_v_ridx;
  __pyx_t_5numpy_float64_t *__pyx_v_outbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer;
  __Pyx_Buffer __pyx_pybuffer_lindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_rvalues;
  __Pyx_Buffer __pyx_pybuffer_rvalues;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer;
  __Pyx_Buffer __pyx_pybuffer_rindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lvalues;
  __Pyx_Buffer __pyx_pybuffer_lvalues;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("take_join_contiguous");
  __pyx_pybuffer_lvalues.pybuffer.buf = NULL;
  __pyx_pybuffer_lvalues.refcount = 0;
  __pyx_pybuffernd_lvalues.data = NULL;
  __pyx_pybuffernd_lvalues.rcbuffer = &__pyx_pybuffer_lvalues;
  __pyx_pybuffer_rvalues.pybuffer.buf = NULL;
  __pyx_pybuffer_rvalues.refcount = 0;
  __pyx_pybuffernd_rvalues.data = NULL;
  __pyx_pybuffernd_rvalues.rcbuffer = &__pyx_pybuffer_rvalues;
  __pyx_pybuffer_lindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_lindexer.refcount = 0;
  __pyx_pybuffernd_lindexer.data = NULL;
  __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer;
  __pyx_pybuffer_rindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_rindexer.refcount = 0;
  __pyx_pybuffernd_rindexer.data = NULL;
  __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lvalues.rcbuffer->pybuffer, (PyObject*)__pyx_v_lvalues, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_lvalues.diminfo[0].strides = __pyx_pybuffernd_lvalues.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lvalues.diminfo[0].shape = __pyx_pybuffernd_lvalues.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_lvalues.diminfo[1].strides = __pyx_pybuffernd_lvalues.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_lvalues.diminfo[1].shape = __pyx_pybuffernd_lvalues.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rvalues.rcbuffer->pybuffer, (PyObject*)__pyx_v_rvalues, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_rvalues.diminfo[0].strides = __pyx_pybuffernd_rvalues.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rvalues.diminfo[0].shape = __pyx_pybuffernd_rvalues.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_rvalues.diminfo[1].strides = __pyx_pybuffernd_rvalues.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_rvalues.diminfo[1].shape = __pyx_pybuffernd_rvalues.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":198
 *         float64_t *outbuf
 * 
 *     assert(out.flags.contiguous)             # <<<<<<<<<<<<<<
 * 
 *     outbuf = <float64_t*> out.data
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_out), __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__contiguous); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_3)) {
    PyErr_SetNone(PyExc_AssertionError);
    {__pyx_filename = __pyx_f[7]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":200
 *     assert(out.flags.contiguous)
 * 
 *     outbuf = <float64_t*> out.data             # <<<<<<<<<<<<<<
 * 
 *     n = len(lindexer)
 */
  __pyx_v_outbuf = ((__pyx_t_5numpy_float64_t *)__pyx_v_out->data);

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":202
 *     outbuf = <float64_t*> out.data
 * 
 *     n = len(lindexer)             # <<<<<<<<<<<<<<
 *     lk = lvalues.shape[1]
 *     rk = rvalues.shape[1]
 */
  __pyx_t_4 = PyObject_Length(((PyObject *)__pyx_v_lindexer)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_4;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":203
 * 
 *     n = len(lindexer)
 *     lk = lvalues.shape[1]             # <<<<<<<<<<<<<<
 *     rk = rvalues.shape[1]
 * 
 */
  __pyx_v_lk = (__pyx_v_lvalues->dimensions[1]);

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":204
 *     n = len(lindexer)
 *     lk = lvalues.shape[1]
 *     rk = rvalues.shape[1]             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_v_rk = (__pyx_v_rvalues->dimensions[1]);

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":206
 *     rk = rvalues.shape[1]
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         lidx = lindexer[i]
 *         ridx = rindexer[i]
 */
  __pyx_t_4 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":207
 * 
 *     for i from 0 <= i < n:
 *         lidx = lindexer[i]             # <<<<<<<<<<<<<<
 *         ridx = rindexer[i]
 * 
 */
    __pyx_t_5 = __pyx_v_i;
    __pyx_v_lidx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_lindexer.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":208
 *     for i from 0 <= i < n:
 *         lidx = lindexer[i]
 *         ridx = rindexer[i]             # <<<<<<<<<<<<<<
 * 
 *         if lidx == -1:
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_v_ridx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_rindexer.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":210
 *         ridx = rindexer[i]
 * 
 *         if lidx == -1:             # <<<<<<<<<<<<<<
 *             for j from 0 <= j < lk:
 *                 outbuf[0] = NaN
 */
    __pyx_t_3 = (__pyx_v_lidx == -1);
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":211
 * 
 *         if lidx == -1:
 *             for j from 0 <= j < lk:             # <<<<<<<<<<<<<<
 *                 outbuf[0] = NaN
 *                 outbuf = outbuf + 1
 */
      __pyx_t_7 = __pyx_v_lk;
      for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) {

        /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":212
 *         if lidx == -1:
 *             for j from 0 <= j < lk:
 *                 outbuf[0] = NaN             # <<<<<<<<<<<<<<
 *                 outbuf = outbuf + 1
 *         else:
 */
        (__pyx_v_outbuf[0]) = __pyx_v_6pandas_8_tseries_NaN;

        /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":213
 *             for j from 0 <= j < lk:
 *                 outbuf[0] = NaN
 *                 outbuf = outbuf + 1             # <<<<<<<<<<<<<<
 *         else:
 *             for j from 0 <= j < lk:
 */
        __pyx_v_outbuf = (__pyx_v_outbuf + 1);
      }
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":215
 *                 outbuf = outbuf + 1
 *         else:
 *             for j from 0 <= j < lk:             # <<<<<<<<<<<<<<
 *                 outbuf[0] = lvalues[lidx, j]
 *                 outbuf = outbuf + 1
 */
      __pyx_t_7 = __pyx_v_lk;
      for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) {

        /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":216
 *         else:
 *             for j from 0 <= j < lk:
 *                 outbuf[0] = lvalues[lidx, j]             # <<<<<<<<<<<<<<
 *                 outbuf = outbuf + 1
 * 
 */
        __pyx_t_8 = __pyx_v_lidx;
        __pyx_t_9 = __pyx_v_j;
        (__pyx_v_outbuf[0]) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_lvalues.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_lvalues.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_lvalues.diminfo[1].strides));

        /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":217
 *             for j from 0 <= j < lk:
 *                 outbuf[0] = lvalues[lidx, j]
 *                 outbuf = outbuf + 1             # <<<<<<<<<<<<<<
 * 
 *         if lidx == -1:
 */
        __pyx_v_outbuf = (__pyx_v_outbuf + 1);
      }
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":219
 *                 outbuf = outbuf + 1
 * 
 *         if lidx == -1:             # <<<<<<<<<<<<<<
 *             for j from 0 <= j < rk:
 *                 outbuf[0] = NaN
 */
    __pyx_t_3 = (__pyx_v_lidx == -1);
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":220
 * 
 *         if lidx == -1:
 *             for j from 0 <= j < rk:             # <<<<<<<<<<<<<<
 *                 outbuf[0] = NaN
 *                 outbuf = outbuf + 1
 */
      __pyx_t_7 = __pyx_v_rk;
      for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) {

        /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":221
 *         if lidx == -1:
 *             for j from 0 <= j < rk:
 *                 outbuf[0] = NaN             # <<<<<<<<<<<<<<
 *                 outbuf = outbuf + 1
 *         else:
 */
        (__pyx_v_outbuf[0]) = __pyx_v_6pandas_8_tseries_NaN;

        /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":222
 *             for j from 0 <= j < rk:
 *                 outbuf[0] = NaN
 *                 outbuf = outbuf + 1             # <<<<<<<<<<<<<<
 *         else:
 *             for j from 0 <= j < rk:
 */
        __pyx_v_outbuf = (__pyx_v_outbuf + 1);
      }
      goto __pyx_L10;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":224
 *                 outbuf = outbuf + 1
 *         else:
 *             for j from 0 <= j < rk:             # <<<<<<<<<<<<<<
 *                 outbuf[0] = rvalues[ridx, j]
 *                 outbuf = outbuf + 1
 */
      __pyx_t_7 = __pyx_v_rk;
      for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_7; __pyx_v_j++) {

        /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":225
 *         else:
 *             for j from 0 <= j < rk:
 *                 outbuf[0] = rvalues[ridx, j]             # <<<<<<<<<<<<<<
 *                 outbuf = outbuf + 1
 * 
 */
        __pyx_t_10 = __pyx_v_ridx;
        __pyx_t_11 = __pyx_v_j;
        (__pyx_v_outbuf[0]) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_rvalues.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_rvalues.diminfo[0].strides, __pyx_t_11, __pyx_pybuffernd_rvalues.diminfo[1].strides));

        /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":226
 *             for j from 0 <= j < rk:
 *                 outbuf[0] = rvalues[ridx, j]
 *                 outbuf = outbuf + 1             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
        __pyx_v_outbuf = (__pyx_v_outbuf + 1);
      }
    }
    __pyx_L10:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rvalues.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lvalues.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_join_contiguous", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rvalues.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lvalues.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_135merge_indexer_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_135merge_indexer_list = {__Pyx_NAMESTR("merge_indexer_list"), (PyCFunction)__pyx_pw_6pandas_8_tseries_135merge_indexer_list, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_135merge_indexer_list(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_values = 0;
  PyObject *__pyx_v_oldMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__oldMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("merge_indexer_list (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldMap);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("merge_indexer_list", 1, 2, 2, 1); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "merge_indexer_list") < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyObject*)values[0]);
      __pyx_v_oldMap = ((PyObject*)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyObject*)values[0]);
    __pyx_v_oldMap = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("merge_indexer_list", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyList_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), (&PyDict_Type), 1, "oldMap", 1))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_134merge_indexer_list(__pyx_self, __pyx_v_values, __pyx_v_oldMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reindex.pyx":230
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_list(list values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef int i, j, length, newLength
 *     cdef object idx
 */

static PyObject *__pyx_pf_6pandas_8_tseries_134merge_indexer_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values, PyObject *__pyx_v_oldMap) {
  int __pyx_v_i;
  int __pyx_v_newLength;
  PyObject *__pyx_v_idx = 0;
  PyArrayObject *__pyx_v_fill_vec = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fill_vec;
  __Pyx_Buffer __pyx_pybuffer_fill_vec;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  __pyx_t_5numpy_int32_t __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("merge_indexer_list");
  __pyx_pybuffer_fill_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_fill_vec.refcount = 0;
  __pyx_pybuffernd_fill_vec.data = NULL;
  __pyx_pybuffernd_fill_vec.rcbuffer = &__pyx_pybuffer_fill_vec;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":235
 *     cdef ndarray[int32_t] fill_vec
 * 
 *     newLength = len(values)             # <<<<<<<<<<<<<<
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i from 0 <= i < newLength:
 */
  if (unlikely(((PyObject *)__pyx_v_values) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_values)); 
  __pyx_v_newLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":236
 * 
 *     newLength = len(values)
 *     fill_vec = np.empty(newLength, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < newLength:
 *         idx = values[i]
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromLong(__pyx_v_newLength); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fill_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fill_vec.diminfo[0].strides = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fill_vec.diminfo[0].shape = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":237
 *     newLength = len(values)
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i from 0 <= i < newLength:             # <<<<<<<<<<<<<<
 *         idx = values[i]
 *         if idx in oldMap:
 */
  __pyx_t_8 = __pyx_v_newLength;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":238
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i from 0 <= i < newLength:
 *         idx = values[i]             # <<<<<<<<<<<<<<
 *         if idx in oldMap:
 *             fill_vec[i] = oldMap[idx]
 */
    __Pyx_INCREF(PyList_GET_ITEM(__pyx_v_values, __pyx_v_i));
    __Pyx_XDECREF(__pyx_v_idx);
    __pyx_v_idx = PyList_GET_ITEM(__pyx_v_values, __pyx_v_i);

    /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":239
 *     for i from 0 <= i < newLength:
 *         idx = values[i]
 *         if idx in oldMap:             # <<<<<<<<<<<<<<
 *             fill_vec[i] = oldMap[idx]
 *         else:
 */
    if (unlikely(((PyObject *)__pyx_v_oldMap) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[7]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_12 = ((PyDict_Contains(((PyObject *)__pyx_v_oldMap), __pyx_v_idx))); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_12) {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":240
 *         idx = values[i]
 *         if idx in oldMap:
 *             fill_vec[i] = oldMap[idx]             # <<<<<<<<<<<<<<
 *         else:
 *             fill_vec[i] = -1
 */
      __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_oldMap), __pyx_v_idx); if (!__pyx_t_6) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_13 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_6); if (unlikely((__pyx_t_13 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_14 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = __pyx_t_13;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":242
 *             fill_vec[i] = oldMap[idx]
 *         else:
 *             fill_vec[i] = -1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
      __pyx_t_15 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = -1;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":244
 *             fill_vec[i] = -1
 * 
 *     return fill_vec             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_r = ((PyObject *)__pyx_v_fill_vec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":3
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * cpdef map_indices_float64(ndarray[float64_t] index):             # <<<<<<<<<<<<<<
 *     '''
 *     Produce a dict mapping the values of the input array to their respective
 */

static PyObject *__pyx_pw_6pandas_8_tseries_137map_indices_float64(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_map_indices_float64(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_indices_float64");
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":14
 *     '''
 *     cdef Py_ssize_t i, length
 *     cdef dict result = {}             # <<<<<<<<<<<<<<
 * 
 *     length = len(index)
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":16
 *     cdef dict result = {}
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_length = __pyx_t_2;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":18
 *     length = len(index)
 * 
 *     for i in range(length):             # <<<<<<<<<<<<<<
 *         result[index[i]] = i
 * 
 */
  __pyx_t_2 = __pyx_v_length;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":19
 * 
 *     for i in range(length):
 *         result[index[i]] = i             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_5, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":21
 *         result[index[i]] = i
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_137map_indices_float64(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_6pandas_8_tseries_136map_indices_float64[] = "\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    ";
static PyObject *__pyx_pw_6pandas_8_tseries_137map_indices_float64(PyObject *__pyx_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map_indices_float64 (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_136map_indices_float64(__pyx_self, ((PyArrayObject *)__pyx_v_index));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":3
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * cpdef map_indices_float64(ndarray[float64_t] index):             # <<<<<<<<<<<<<<
 *     '''
 *     Produce a dict mapping the values of the input array to their respective
 */

static PyObject *__pyx_pf_6pandas_8_tseries_136map_indices_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_indices_float64");
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_8_tseries_map_indices_float64(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":25
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * cpdef map_indices_object(ndarray[object] index):             # <<<<<<<<<<<<<<
 *     '''
 *     Produce a dict mapping the values of the input array to their respective
 */

static PyObject *__pyx_pw_6pandas_8_tseries_139map_indices_object(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_map_indices_object(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_indices_object");
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":36
 *     '''
 *     cdef Py_ssize_t i, length
 *     cdef dict result = {}             # <<<<<<<<<<<<<<
 * 
 *     length = len(index)
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":38
 *     cdef dict result = {}
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_length = __pyx_t_2;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":40
 *     length = len(index)
 * 
 *     for i in range(length):             # <<<<<<<<<<<<<<
 *         result[index[i]] = i
 * 
 */
  __pyx_t_2 = __pyx_v_length;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":41
 * 
 *     for i in range(length):
 *         result[index[i]] = i             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_v_i;
    __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_4);
    if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_t_4, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":43
 *         result[index[i]] = i
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_139map_indices_object(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_6pandas_8_tseries_138map_indices_object[] = "\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    ";
static PyObject *__pyx_pw_6pandas_8_tseries_139map_indices_object(PyObject *__pyx_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map_indices_object (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_138map_indices_object(__pyx_self, ((PyArrayObject *)__pyx_v_index));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":25
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * cpdef map_indices_object(ndarray[object] index):             # <<<<<<<<<<<<<<
 *     '''
 *     Produce a dict mapping the values of the input array to their respective
 */

static PyObject *__pyx_pf_6pandas_8_tseries_138map_indices_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_indices_object");
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_8_tseries_map_indices_object(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":47
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * cpdef map_indices_int32(ndarray[int32_t] index):             # <<<<<<<<<<<<<<
 *     '''
 *     Produce a dict mapping the values of the input array to their respective
 */

static PyObject *__pyx_pw_6pandas_8_tseries_141map_indices_int32(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_map_indices_int32(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  __pyx_t_5numpy_int32_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_indices_int32");
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":58
 *     '''
 *     cdef Py_ssize_t i, length
 *     cdef dict result = {}             # <<<<<<<<<<<<<<
 * 
 *     length = len(index)
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":60
 *     cdef dict result = {}
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_length = __pyx_t_2;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":62
 *     length = len(index)
 * 
 *     for i in range(length):             # <<<<<<<<<<<<<<
 *         result[index[i]] = i
 * 
 */
  __pyx_t_2 = __pyx_v_length;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":63
 * 
 *     for i in range(length):
 *         result[index[i]] = i             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_index.diminfo[0].strides));
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_t_5, __pyx_t_1, sizeof(__pyx_t_5numpy_int32_t), __Pyx_PyInt_to_py_npy_int32) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":65
 *         result[index[i]] = i
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_141map_indices_int32(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_6pandas_8_tseries_140map_indices_int32[] = "\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    ";
static PyObject *__pyx_pw_6pandas_8_tseries_141map_indices_int32(PyObject *__pyx_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map_indices_int32 (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_140map_indices_int32(__pyx_self, ((PyArrayObject *)__pyx_v_index));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":47
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * cpdef map_indices_int32(ndarray[int32_t] index):             # <<<<<<<<<<<<<<
 *     '''
 *     Produce a dict mapping the values of the input array to their respective
 */

static PyObject *__pyx_pf_6pandas_8_tseries_140map_indices_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_indices_int32");
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_8_tseries_map_indices_int32(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":69
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * cpdef map_indices_int64(ndarray[int64_t] index):             # <<<<<<<<<<<<<<
 *     '''
 *     Produce a dict mapping the values of the input array to their respective
 */

static PyObject *__pyx_pw_6pandas_8_tseries_143map_indices_int64(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_map_indices_int64(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  __pyx_t_5numpy_int64_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_indices_int64");
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":80
 *     '''
 *     cdef Py_ssize_t i, length
 *     cdef dict result = {}             # <<<<<<<<<<<<<<
 * 
 *     length = len(index)
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":82
 *     cdef dict result = {}
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_length = __pyx_t_2;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":84
 *     length = len(index)
 * 
 *     for i in range(length):             # <<<<<<<<<<<<<<
 *         result[index[i]] = i
 * 
 */
  __pyx_t_2 = __pyx_v_length;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":85
 * 
 *     for i in range(length):
 *         result[index[i]] = i             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_index.diminfo[0].strides));
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_t_5, __pyx_t_1, sizeof(__pyx_t_5numpy_int64_t), __Pyx_PyInt_to_py_npy_int64) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":87
 *         result[index[i]] = i
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_143map_indices_int64(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_6pandas_8_tseries_142map_indices_int64[] = "\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    ";
static PyObject *__pyx_pw_6pandas_8_tseries_143map_indices_int64(PyObject *__pyx_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map_indices_int64 (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_142map_indices_int64(__pyx_self, ((PyArrayObject *)__pyx_v_index));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":69
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * cpdef map_indices_int64(ndarray[int64_t] index):             # <<<<<<<<<<<<<<
 *     '''
 *     Produce a dict mapping the values of the input array to their respective
 */

static PyObject *__pyx_pf_6pandas_8_tseries_142map_indices_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_indices_int64");
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_8_tseries_map_indices_int64(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":91
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * cpdef map_indices_bool(ndarray[uint8_t] index):             # <<<<<<<<<<<<<<
 *     '''
 *     Produce a dict mapping the values of the input array to their respective
 */

static PyObject *__pyx_pw_6pandas_8_tseries_145map_indices_bool(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_map_indices_bool(PyArrayObject *__pyx_v_index, CYTHON_UNUSED int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  __pyx_t_5numpy_uint8_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_indices_bool");
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":102
 *     '''
 *     cdef Py_ssize_t i, length
 *     cdef dict result = {}             # <<<<<<<<<<<<<<
 * 
 *     length = len(index)
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":104
 *     cdef dict result = {}
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_length = __pyx_t_2;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":106
 *     length = len(index)
 * 
 *     for i in range(length):             # <<<<<<<<<<<<<<
 *         result[index[i]] = i
 * 
 */
  __pyx_t_2 = __pyx_v_length;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":107
 * 
 *     for i in range(length):
 *         result[index[i]] = i             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_index.diminfo[0].strides));
    if (__Pyx_SetItemInt(((PyObject *)__pyx_v_result), __pyx_t_5, __pyx_t_1, sizeof(__pyx_t_5numpy_uint8_t)+1, __Pyx_PyInt_to_py_npy_uint8) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":109
 *         result[index[i]] = i
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_145map_indices_bool(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static char __pyx_doc_6pandas_8_tseries_144map_indices_bool[] = "\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    ";
static PyObject *__pyx_pw_6pandas_8_tseries_145map_indices_bool(PyObject *__pyx_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map_indices_bool (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_144map_indices_bool(__pyx_self, ((PyArrayObject *)__pyx_v_index));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":91
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * cpdef map_indices_bool(ndarray[uint8_t] index):             # <<<<<<<<<<<<<<
 *     '''
 *     Produce a dict mapping the values of the input array to their respective
 */

static PyObject *__pyx_pf_6pandas_8_tseries_144map_indices_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_indices_bool");
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6pandas_8_tseries_map_indices_bool(__pyx_v_index, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_indices_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_147merge_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_147merge_indexer_float64 = {__Pyx_NAMESTR("merge_indexer_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_147merge_indexer_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_147merge_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_oldMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__oldMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("merge_indexer_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldMap);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("merge_indexer_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "merge_indexer_float64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_oldMap = ((PyObject*)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_oldMap = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("merge_indexer_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), (&PyDict_Type), 1, "oldMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_146merge_indexer_float64(__pyx_self, __pyx_v_values, __pyx_v_oldMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":114
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_float64(ndarray[float64_t] values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, length, newLength
 *     cdef float64_t idx
 */

static PyObject *__pyx_pf_6pandas_8_tseries_146merge_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_oldMap) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_newLength;
  __pyx_t_5numpy_float64_t __pyx_v_idx;
  PyArrayObject *__pyx_v_fill_vec = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fill_vec;
  __Pyx_Buffer __pyx_pybuffer_fill_vec;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  __pyx_t_5numpy_int32_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("merge_indexer_float64");
  __pyx_pybuffer_fill_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_fill_vec.refcount = 0;
  __pyx_pybuffernd_fill_vec.data = NULL;
  __pyx_pybuffernd_fill_vec.rcbuffer = &__pyx_pybuffer_fill_vec;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":119
 *     cdef ndarray[int32_t] fill_vec
 * 
 *     newLength = len(values)             # <<<<<<<<<<<<<<
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i in range(newLength):
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":120
 * 
 *     newLength = len(values)
 *     fill_vec = np.empty(newLength, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     for i in range(newLength):
 *         idx = values[i]
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_newLength); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fill_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fill_vec.diminfo[0].strides = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fill_vec.diminfo[0].shape = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":121
 *     newLength = len(values)
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i in range(newLength):             # <<<<<<<<<<<<<<
 *         idx = values[i]
 *         if idx in oldMap:
 */
  __pyx_t_1 = __pyx_v_newLength;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":122
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i in range(newLength):
 *         idx = values[i]             # <<<<<<<<<<<<<<
 *         if idx in oldMap:
 *             fill_vec[i] = oldMap[idx]
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":123
 *     for i in range(newLength):
 *         idx = values[i]
 *         if idx in oldMap:             # <<<<<<<<<<<<<<
 *             fill_vec[i] = oldMap[idx]
 *         else:
 */
    __pyx_t_6 = PyFloat_FromDouble(__pyx_v_idx); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(((PyObject *)__pyx_v_oldMap) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_14 = ((PyDict_Contains(((PyObject *)__pyx_v_oldMap), __pyx_t_6))); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":124
 *         idx = values[i]
 *         if idx in oldMap:
 *             fill_vec[i] = oldMap[idx]             # <<<<<<<<<<<<<<
 *         else:
 *             fill_vec[i] = -1
 */
      __pyx_t_6 = PyFloat_FromDouble(__pyx_v_idx); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_oldMap), __pyx_t_6); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_15 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_2); if (unlikely((__pyx_t_15 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_16 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = __pyx_t_15;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":126
 *             fill_vec[i] = oldMap[idx]
 *         else:
 *             fill_vec[i] = -1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
      __pyx_t_17 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = -1;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":128
 *             fill_vec[i] = -1
 * 
 *     return fill_vec             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_r = ((PyObject *)__pyx_v_fill_vec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_149merge_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_149merge_indexer_object = {__Pyx_NAMESTR("merge_indexer_object"), (PyCFunction)__pyx_pw_6pandas_8_tseries_149merge_indexer_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_149merge_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_oldMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__oldMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("merge_indexer_object (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldMap);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("merge_indexer_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "merge_indexer_object") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_oldMap = ((PyObject*)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_oldMap = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("merge_indexer_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), (&PyDict_Type), 1, "oldMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_148merge_indexer_object(__pyx_self, __pyx_v_values, __pyx_v_oldMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":132
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_object(ndarray[object] values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, length, newLength
 *     cdef object idx
 */

static PyObject *__pyx_pf_6pandas_8_tseries_148merge_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_oldMap) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_newLength;
  PyObject *__pyx_v_idx = 0;
  PyArrayObject *__pyx_v_fill_vec = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fill_vec;
  __Pyx_Buffer __pyx_pybuffer_fill_vec;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  __pyx_t_5numpy_int32_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("merge_indexer_object");
  __pyx_pybuffer_fill_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_fill_vec.refcount = 0;
  __pyx_pybuffernd_fill_vec.data = NULL;
  __pyx_pybuffernd_fill_vec.rcbuffer = &__pyx_pybuffer_fill_vec;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":137
 *     cdef ndarray[int32_t] fill_vec
 * 
 *     newLength = len(values)             # <<<<<<<<<<<<<<
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i in range(newLength):
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":138
 * 
 *     newLength = len(values)
 *     fill_vec = np.empty(newLength, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     for i in range(newLength):
 *         idx = values[i]
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_newLength); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fill_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fill_vec.diminfo[0].strides = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fill_vec.diminfo[0].shape = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":139
 *     newLength = len(values)
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i in range(newLength):             # <<<<<<<<<<<<<<
 *         idx = values[i]
 *         if idx in oldMap:
 */
  __pyx_t_1 = __pyx_v_newLength;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":140
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i in range(newLength):
 *         idx = values[i]             # <<<<<<<<<<<<<<
 *         if idx in oldMap:
 *             fill_vec[i] = oldMap[idx]
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_XDECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":141
 *     for i in range(newLength):
 *         idx = values[i]
 *         if idx in oldMap:             # <<<<<<<<<<<<<<
 *             fill_vec[i] = oldMap[idx]
 *         else:
 */
    if (unlikely(((PyObject *)__pyx_v_oldMap) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_14 = ((PyDict_Contains(((PyObject *)__pyx_v_oldMap), __pyx_v_idx))); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":142
 *         idx = values[i]
 *         if idx in oldMap:
 *             fill_vec[i] = oldMap[idx]             # <<<<<<<<<<<<<<
 *         else:
 *             fill_vec[i] = -1
 */
      __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_oldMap), __pyx_v_idx); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_15 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_6); if (unlikely((__pyx_t_15 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_16 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = __pyx_t_15;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":144
 *             fill_vec[i] = oldMap[idx]
 *         else:
 *             fill_vec[i] = -1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
      __pyx_t_17 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = -1;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":146
 *             fill_vec[i] = -1
 * 
 *     return fill_vec             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_r = ((PyObject *)__pyx_v_fill_vec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_151merge_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_151merge_indexer_int32 = {__Pyx_NAMESTR("merge_indexer_int32"), (PyCFunction)__pyx_pw_6pandas_8_tseries_151merge_indexer_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_151merge_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_oldMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__oldMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("merge_indexer_int32 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldMap);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("merge_indexer_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "merge_indexer_int32") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_oldMap = ((PyObject*)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_oldMap = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("merge_indexer_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), (&PyDict_Type), 1, "oldMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_150merge_indexer_int32(__pyx_self, __pyx_v_values, __pyx_v_oldMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":150
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_int32(ndarray[int32_t] values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, length, newLength
 *     cdef int32_t idx
 */

static PyObject *__pyx_pf_6pandas_8_tseries_150merge_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_oldMap) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_newLength;
  __pyx_t_5numpy_int32_t __pyx_v_idx;
  PyArrayObject *__pyx_v_fill_vec = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fill_vec;
  __Pyx_Buffer __pyx_pybuffer_fill_vec;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  __pyx_t_5numpy_int32_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("merge_indexer_int32");
  __pyx_pybuffer_fill_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_fill_vec.refcount = 0;
  __pyx_pybuffernd_fill_vec.data = NULL;
  __pyx_pybuffernd_fill_vec.rcbuffer = &__pyx_pybuffer_fill_vec;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":155
 *     cdef ndarray[int32_t] fill_vec
 * 
 *     newLength = len(values)             # <<<<<<<<<<<<<<
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i in range(newLength):
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":156
 * 
 *     newLength = len(values)
 *     fill_vec = np.empty(newLength, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     for i in range(newLength):
 *         idx = values[i]
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_newLength); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fill_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fill_vec.diminfo[0].strides = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fill_vec.diminfo[0].shape = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":157
 *     newLength = len(values)
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i in range(newLength):             # <<<<<<<<<<<<<<
 *         idx = values[i]
 *         if idx in oldMap:
 */
  __pyx_t_1 = __pyx_v_newLength;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":158
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i in range(newLength):
 *         idx = values[i]             # <<<<<<<<<<<<<<
 *         if idx in oldMap:
 *             fill_vec[i] = oldMap[idx]
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":159
 *     for i in range(newLength):
 *         idx = values[i]
 *         if idx in oldMap:             # <<<<<<<<<<<<<<
 *             fill_vec[i] = oldMap[idx]
 *         else:
 */
    __pyx_t_6 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_idx); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(((PyObject *)__pyx_v_oldMap) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_14 = ((PyDict_Contains(((PyObject *)__pyx_v_oldMap), __pyx_t_6))); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":160
 *         idx = values[i]
 *         if idx in oldMap:
 *             fill_vec[i] = oldMap[idx]             # <<<<<<<<<<<<<<
 *         else:
 *             fill_vec[i] = -1
 */
      __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_oldMap), __pyx_v_idx, sizeof(__pyx_t_5numpy_int32_t), __Pyx_PyInt_to_py_npy_int32); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_15 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_6); if (unlikely((__pyx_t_15 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_16 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = __pyx_t_15;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":162
 *             fill_vec[i] = oldMap[idx]
 *         else:
 *             fill_vec[i] = -1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
      __pyx_t_17 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = -1;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":164
 *             fill_vec[i] = -1
 * 
 *     return fill_vec             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_r = ((PyObject *)__pyx_v_fill_vec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_153merge_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_153merge_indexer_int64 = {__Pyx_NAMESTR("merge_indexer_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_153merge_indexer_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_153merge_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_oldMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__oldMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("merge_indexer_int64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldMap);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("merge_indexer_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "merge_indexer_int64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_oldMap = ((PyObject*)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_oldMap = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("merge_indexer_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), (&PyDict_Type), 1, "oldMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_152merge_indexer_int64(__pyx_self, __pyx_v_values, __pyx_v_oldMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":168
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_int64(ndarray[int64_t] values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, length, newLength
 *     cdef int64_t idx
 */

static PyObject *__pyx_pf_6pandas_8_tseries_152merge_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_oldMap) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_newLength;
  __pyx_t_5numpy_int64_t __pyx_v_idx;
  PyArrayObject *__pyx_v_fill_vec = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fill_vec;
  __Pyx_Buffer __pyx_pybuffer_fill_vec;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  __pyx_t_5numpy_int32_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("merge_indexer_int64");
  __pyx_pybuffer_fill_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_fill_vec.refcount = 0;
  __pyx_pybuffernd_fill_vec.data = NULL;
  __pyx_pybuffernd_fill_vec.rcbuffer = &__pyx_pybuffer_fill_vec;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":173
 *     cdef ndarray[int32_t] fill_vec
 * 
 *     newLength = len(values)             # <<<<<<<<<<<<<<
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i in range(newLength):
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":174
 * 
 *     newLength = len(values)
 *     fill_vec = np.empty(newLength, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     for i in range(newLength):
 *         idx = values[i]
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_newLength); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fill_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fill_vec.diminfo[0].strides = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fill_vec.diminfo[0].shape = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":175
 *     newLength = len(values)
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i in range(newLength):             # <<<<<<<<<<<<<<
 *         idx = values[i]
 *         if idx in oldMap:
 */
  __pyx_t_1 = __pyx_v_newLength;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":176
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i in range(newLength):
 *         idx = values[i]             # <<<<<<<<<<<<<<
 *         if idx in oldMap:
 *             fill_vec[i] = oldMap[idx]
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":177
 *     for i in range(newLength):
 *         idx = values[i]
 *         if idx in oldMap:             # <<<<<<<<<<<<<<
 *             fill_vec[i] = oldMap[idx]
 *         else:
 */
    __pyx_t_6 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_idx); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(((PyObject *)__pyx_v_oldMap) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_14 = ((PyDict_Contains(((PyObject *)__pyx_v_oldMap), __pyx_t_6))); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":178
 *         idx = values[i]
 *         if idx in oldMap:
 *             fill_vec[i] = oldMap[idx]             # <<<<<<<<<<<<<<
 *         else:
 *             fill_vec[i] = -1
 */
      __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_oldMap), __pyx_v_idx, sizeof(__pyx_t_5numpy_int64_t), __Pyx_PyInt_to_py_npy_int64); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_15 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_6); if (unlikely((__pyx_t_15 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_16 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = __pyx_t_15;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":180
 *             fill_vec[i] = oldMap[idx]
 *         else:
 *             fill_vec[i] = -1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
      __pyx_t_17 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = -1;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":182
 *             fill_vec[i] = -1
 * 
 *     return fill_vec             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_r = ((PyObject *)__pyx_v_fill_vec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_155merge_indexer_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_155merge_indexer_bool = {__Pyx_NAMESTR("merge_indexer_bool"), (PyCFunction)__pyx_pw_6pandas_8_tseries_155merge_indexer_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_155merge_indexer_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_oldMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__oldMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("merge_indexer_bool (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldMap);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("merge_indexer_bool", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "merge_indexer_bool") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_oldMap = ((PyObject*)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_oldMap = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("merge_indexer_bool", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), (&PyDict_Type), 1, "oldMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_154merge_indexer_bool(__pyx_self, __pyx_v_values, __pyx_v_oldMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":186
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_bool(ndarray[uint8_t] values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, length, newLength
 *     cdef uint8_t idx
 */

static PyObject *__pyx_pf_6pandas_8_tseries_154merge_indexer_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_oldMap) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_newLength;
  __pyx_t_5numpy_uint8_t __pyx_v_idx;
  PyArrayObject *__pyx_v_fill_vec = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fill_vec;
  __Pyx_Buffer __pyx_pybuffer_fill_vec;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  __pyx_t_5numpy_int32_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("merge_indexer_bool");
  __pyx_pybuffer_fill_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_fill_vec.refcount = 0;
  __pyx_pybuffernd_fill_vec.data = NULL;
  __pyx_pybuffernd_fill_vec.rcbuffer = &__pyx_pybuffer_fill_vec;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":191
 *     cdef ndarray[int32_t] fill_vec
 * 
 *     newLength = len(values)             # <<<<<<<<<<<<<<
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i in range(newLength):
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":192
 * 
 *     newLength = len(values)
 *     fill_vec = np.empty(newLength, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     for i in range(newLength):
 *         idx = values[i]
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_newLength); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fill_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fill_vec.diminfo[0].strides = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fill_vec.diminfo[0].shape = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":193
 *     newLength = len(values)
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i in range(newLength):             # <<<<<<<<<<<<<<
 *         idx = values[i]
 *         if idx in oldMap:
 */
  __pyx_t_1 = __pyx_v_newLength;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":194
 *     fill_vec = np.empty(newLength, dtype=np.int32)
 *     for i in range(newLength):
 *         idx = values[i]             # <<<<<<<<<<<<<<
 *         if idx in oldMap:
 *             fill_vec[i] = oldMap[idx]
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":195
 *     for i in range(newLength):
 *         idx = values[i]
 *         if idx in oldMap:             # <<<<<<<<<<<<<<
 *             fill_vec[i] = oldMap[idx]
 *         else:
 */
    __pyx_t_6 = __Pyx_PyInt_to_py_npy_uint8(__pyx_v_idx); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(((PyObject *)__pyx_v_oldMap) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_14 = ((PyDict_Contains(((PyObject *)__pyx_v_oldMap), __pyx_t_6))); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":196
 *         idx = values[i]
 *         if idx in oldMap:
 *             fill_vec[i] = oldMap[idx]             # <<<<<<<<<<<<<<
 *         else:
 *             fill_vec[i] = -1
 */
      __pyx_t_6 = __Pyx_GetItemInt(((PyObject *)__pyx_v_oldMap), __pyx_v_idx, sizeof(__pyx_t_5numpy_uint8_t)+1, __Pyx_PyInt_to_py_npy_uint8); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_15 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_6); if (unlikely((__pyx_t_15 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_16 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = __pyx_t_15;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":198
 *             fill_vec[i] = oldMap[idx]
 *         else:
 *             fill_vec[i] = -1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
      __pyx_t_17 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = -1;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":200
 *             fill_vec[i] = -1
 * 
 *     return fill_vec             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_r = ((PyObject *)__pyx_v_fill_vec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.merge_indexer_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_157pad_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_157pad_float64 = {__Pyx_NAMESTR("pad_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_157pad_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_157pad_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_oldIndex = 0;
  PyArrayObject *__pyx_v_newIndex = 0;
  PyObject *__pyx_v_oldMap = 0;
  CYTHON_UNUSED PyObject *__pyx_v_newMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pad_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldIndex);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newIndex);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldMap);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newMap);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_float64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
      __pyx_v_newIndex = ((PyArrayObject *)values[1]);
      __pyx_v_oldMap = ((PyObject*)values[2]);
      __pyx_v_newMap = ((PyObject*)values[3]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
    __pyx_v_newIndex = ((PyArrayObject *)values[1]);
    __pyx_v_oldMap = ((PyObject*)values[2]);
    __pyx_v_newMap = ((PyObject*)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pad_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.pad_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldIndex), __pyx_ptype_5numpy_ndarray, 1, "oldIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newIndex), __pyx_ptype_5numpy_ndarray, 1, "newIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), (&PyDict_Type), 1, "oldMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newMap), (&PyDict_Type), 1, "newMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_156pad_float64(__pyx_self, __pyx_v_oldIndex, __pyx_v_newIndex, __pyx_v_oldMap, __pyx_v_newMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":205
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_float64(ndarray[float64_t] oldIndex,             # <<<<<<<<<<<<<<
 *                  ndarray[float64_t] newIndex,
 *                  dict oldMap, dict newMap):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_156pad_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap) {
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec = 0;
  Py_ssize_t __pyx_v_newPos;
  Py_ssize_t __pyx_v_oldPos;
  __pyx_t_5numpy_float64_t __pyx_v_curOld;
  PyObject *__pyx_v_nextOld = NULL;
  long __pyx_v_done;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_oldIndex;
  __Pyx_Buffer __pyx_pybuffer_oldIndex;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fill_vec;
  __Pyx_Buffer __pyx_pybuffer_fill_vec;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_newIndex;
  __Pyx_Buffer __pyx_pybuffer_newIndex;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  long __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pad_float64");
  __pyx_pybuffer_fill_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_fill_vec.refcount = 0;
  __pyx_pybuffernd_fill_vec.data = NULL;
  __pyx_pybuffernd_fill_vec.rcbuffer = &__pyx_pybuffer_fill_vec;
  __pyx_pybuffer_oldIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_oldIndex.refcount = 0;
  __pyx_pybuffernd_oldIndex.data = NULL;
  __pyx_pybuffernd_oldIndex.rcbuffer = &__pyx_pybuffer_oldIndex;
  __pyx_pybuffer_newIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_newIndex.refcount = 0;
  __pyx_pybuffernd_newIndex.data = NULL;
  __pyx_pybuffernd_newIndex.rcbuffer = &__pyx_pybuffer_newIndex;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_oldIndex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_oldIndex.diminfo[0].strides = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oldIndex.diminfo[0].shape = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_newIndex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_newIndex.diminfo[0].strides = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_newIndex.diminfo[0].shape = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":213
 *     cdef float64_t prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_oldIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_oldLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":214
 * 
 *     oldLength = len(oldIndex)
 *     newLength = len(newIndex)             # <<<<<<<<<<<<<<
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":216
 *     newLength = len(newIndex)
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)             # <<<<<<<<<<<<<<
 *     fill_vec.fill(-1)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fill_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fill_vec.diminfo[0].strides = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fill_vec.diminfo[0].shape = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":217
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_fill_vec), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_17), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":219
 *     fill_vec.fill(-1)
 * 
 *     if oldLength == 0 or newLength == 0:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_12 = (__pyx_v_oldLength == 0);
  if (!__pyx_t_12) {
    __pyx_t_13 = (__pyx_v_newLength == 0);
    __pyx_t_14 = __pyx_t_13;
  } else {
    __pyx_t_14 = __pyx_t_12;
  }
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":220
 * 
 *     if oldLength == 0 or newLength == 0:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     oldPos = 0
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":222
 *         return fill_vec
 * 
 *     oldPos = 0             # <<<<<<<<<<<<<<
 *     newPos = 0
 * 
 */
  __pyx_v_oldPos = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":223
 * 
 *     oldPos = 0
 *     newPos = 0             # <<<<<<<<<<<<<<
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:
 */
  __pyx_v_newPos = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":225
 *     newPos = 0
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_1 = (__pyx_v_newLength - 1);
  __pyx_t_15 = 0;
  __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_newIndex.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_oldIndex.diminfo[0].strides)));
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":226
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     while newPos < newLength:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":228
 *         return fill_vec
 * 
 *     while newPos < newLength:             # <<<<<<<<<<<<<<
 *         curOld = oldIndex[oldPos]
 * 
 */
  while (1) {
    __pyx_t_14 = (__pyx_v_newPos < __pyx_v_newLength);
    if (!__pyx_t_14) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":229
 * 
 *     while newPos < newLength:
 *         curOld = oldIndex[oldPos]             # <<<<<<<<<<<<<<
 * 
 *         while newIndex[newPos] < curOld:
 */
    __pyx_t_16 = __pyx_v_oldPos;
    __pyx_v_curOld = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_oldIndex.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":231
 *         curOld = oldIndex[oldPos]
 * 
 *         while newIndex[newPos] < curOld:             # <<<<<<<<<<<<<<
 *             newPos += 1
 *             if newPos > newLength - 1:
 */
    while (1) {
      __pyx_t_17 = __pyx_v_newPos;
      __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_newIndex.diminfo[0].strides)) < __pyx_v_curOld);
      if (!__pyx_t_14) break;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":232
 * 
 *         while newIndex[newPos] < curOld:
 *             newPos += 1             # <<<<<<<<<<<<<<
 *             if newPos > newLength - 1:
 *                 break
 */
      __pyx_v_newPos = (__pyx_v_newPos + 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":233
 *         while newIndex[newPos] < curOld:
 *             newPos += 1
 *             if newPos > newLength - 1:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_t_14 = (__pyx_v_newPos > (__pyx_v_newLength - 1));
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":234
 *             newPos += 1
 *             if newPos > newLength - 1:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L8_break;
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
    __pyx_L8_break:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":236
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == oldLength - 1:
 */
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_curOld); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_oldMap), __pyx_t_2); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_curLoc = __pyx_t_18;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":238
 *         curLoc = oldMap[curOld]
 * 
 *         if oldPos == oldLength - 1:             # <<<<<<<<<<<<<<
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc
 */
    __pyx_t_14 = (__pyx_v_oldPos == (__pyx_v_oldLength - 1));
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":239
 * 
 *         if oldPos == oldLength - 1:
 *             if newIndex[newPos] >= curOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[newPos:] = curLoc
 *             break
 */
      __pyx_t_18 = __pyx_v_newPos;
      __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_newIndex.diminfo[0].strides)) >= __pyx_v_curOld);
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":240
 *         if oldPos == oldLength - 1:
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_curLoc); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_fill_vec), __pyx_v_newPos, PY_SSIZE_T_MAX, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":241
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 */
      goto __pyx_L6_break;
      goto __pyx_L10;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":243
 *             break
 *         else:
 *             nextOld = oldIndex[oldPos + 1]             # <<<<<<<<<<<<<<
 *             done = 0
 * 
 */
      __pyx_t_19 = (__pyx_v_oldPos + 1);
      __pyx_t_6 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_oldIndex.diminfo[0].strides))); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_v_nextOld);
      __pyx_v_nextOld = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":244
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 *             done = 0             # <<<<<<<<<<<<<<
 * 
 *             while newIndex[newPos] < nextOld:
 */
      __pyx_v_done = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":246
 *             done = 0
 * 
 *             while newIndex[newPos] < nextOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[newPos] = curLoc
 *                 newPos += 1
 */
      while (1) {
        __pyx_t_20 = __pyx_v_newPos;
        __pyx_t_6 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_newIndex.diminfo[0].strides))); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_v_nextOld, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!__pyx_t_14) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":247
 * 
 *             while newIndex[newPos] < nextOld:
 *                 fill_vec[newPos] = curLoc             # <<<<<<<<<<<<<<
 *                 newPos += 1
 * 
 */
        __pyx_t_21 = __pyx_v_newPos;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = __pyx_v_curLoc;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":248
 *             while newIndex[newPos] < nextOld:
 *                 fill_vec[newPos] = curLoc
 *                 newPos += 1             # <<<<<<<<<<<<<<
 * 
 *                 if newPos > newLength - 1:
 */
        __pyx_v_newPos = (__pyx_v_newPos + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":250
 *                 newPos += 1
 * 
 *                 if newPos > newLength - 1:             # <<<<<<<<<<<<<<
 *                     done = 1
 *                     break
 */
        __pyx_t_14 = (__pyx_v_newPos > (__pyx_v_newLength - 1));
        if (__pyx_t_14) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":251
 * 
 *                 if newPos > newLength - 1:
 *                     done = 1             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
          __pyx_v_done = 1;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":252
 *                 if newPos > newLength - 1:
 *                     done = 1
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             if done:
 */
          goto __pyx_L13_break;
          goto __pyx_L14;
        }
        __pyx_L14:;
      }
      __pyx_L13_break:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":254
 *                     break
 * 
 *             if done:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      if (__pyx_v_done) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":255
 * 
 *             if done:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         oldPos += 1
 */
        goto __pyx_L6_break;
        goto __pyx_L15;
      }
      __pyx_L15:;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":257
 *                 break
 * 
 *         oldPos += 1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
    __pyx_v_oldPos = (__pyx_v_oldPos + 1);
  }
  __pyx_L6_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":259
 *         oldPos += 1
 * 
 *     return fill_vec             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_r = ((PyObject *)__pyx_v_fill_vec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XDECREF(__pyx_v_nextOld);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_159pad_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_159pad_object = {__Pyx_NAMESTR("pad_object"), (PyCFunction)__pyx_pw_6pandas_8_tseries_159pad_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_159pad_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_oldIndex = 0;
  PyArrayObject *__pyx_v_newIndex = 0;
  PyObject *__pyx_v_oldMap = 0;
  CYTHON_UNUSED PyObject *__pyx_v_newMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pad_object (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldIndex);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newIndex);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_object", 1, 4, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldMap);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_object", 1, 4, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newMap);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_object", 1, 4, 4, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_object") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
      __pyx_v_newIndex = ((PyArrayObject *)values[1]);
      __pyx_v_oldMap = ((PyObject*)values[2]);
      __pyx_v_newMap = ((PyObject*)values[3]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
    __pyx_v_newIndex = ((PyArrayObject *)values[1]);
    __pyx_v_oldMap = ((PyObject*)values[2]);
    __pyx_v_newMap = ((PyObject*)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pad_object", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.pad_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldIndex), __pyx_ptype_5numpy_ndarray, 1, "oldIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newIndex), __pyx_ptype_5numpy_ndarray, 1, "newIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), (&PyDict_Type), 1, "oldMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newMap), (&PyDict_Type), 1, "newMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_158pad_object(__pyx_self, __pyx_v_oldIndex, __pyx_v_newIndex, __pyx_v_oldMap, __pyx_v_newMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":263
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_object(ndarray[object] oldIndex,             # <<<<<<<<<<<<<<
 *                  ndarray[object] newIndex,
 *                  dict oldMap, dict newMap):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_158pad_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap) {
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec = 0;
  Py_ssize_t __pyx_v_newPos;
  Py_ssize_t __pyx_v_oldPos;
  PyObject *__pyx_v_curOld = 0;
  PyObject *__pyx_v_nextOld = NULL;
  long __pyx_v_done;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_oldIndex;
  __Pyx_Buffer __pyx_pybuffer_oldIndex;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fill_vec;
  __Pyx_Buffer __pyx_pybuffer_fill_vec;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_newIndex;
  __Pyx_Buffer __pyx_pybuffer_newIndex;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  long __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pad_object");
  __pyx_pybuffer_fill_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_fill_vec.refcount = 0;
  __pyx_pybuffernd_fill_vec.data = NULL;
  __pyx_pybuffernd_fill_vec.rcbuffer = &__pyx_pybuffer_fill_vec;
  __pyx_pybuffer_oldIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_oldIndex.refcount = 0;
  __pyx_pybuffernd_oldIndex.data = NULL;
  __pyx_pybuffernd_oldIndex.rcbuffer = &__pyx_pybuffer_oldIndex;
  __pyx_pybuffer_newIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_newIndex.refcount = 0;
  __pyx_pybuffernd_newIndex.data = NULL;
  __pyx_pybuffernd_newIndex.rcbuffer = &__pyx_pybuffer_newIndex;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_oldIndex, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_oldIndex.diminfo[0].strides = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oldIndex.diminfo[0].shape = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_newIndex, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_newIndex.diminfo[0].strides = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_newIndex.diminfo[0].shape = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":271
 *     cdef object prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_oldIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_oldLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":272
 * 
 *     oldLength = len(oldIndex)
 *     newLength = len(newIndex)             # <<<<<<<<<<<<<<
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":274
 *     newLength = len(newIndex)
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)             # <<<<<<<<<<<<<<
 *     fill_vec.fill(-1)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fill_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fill_vec.diminfo[0].strides = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fill_vec.diminfo[0].shape = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":275
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_fill_vec), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_18), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":277
 *     fill_vec.fill(-1)
 * 
 *     if oldLength == 0 or newLength == 0:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_12 = (__pyx_v_oldLength == 0);
  if (!__pyx_t_12) {
    __pyx_t_13 = (__pyx_v_newLength == 0);
    __pyx_t_14 = __pyx_t_13;
  } else {
    __pyx_t_14 = __pyx_t_12;
  }
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":278
 * 
 *     if oldLength == 0 or newLength == 0:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     oldPos = 0
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":280
 *         return fill_vec
 * 
 *     oldPos = 0             # <<<<<<<<<<<<<<
 *     newPos = 0
 * 
 */
  __pyx_v_oldPos = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":281
 * 
 *     oldPos = 0
 *     newPos = 0             # <<<<<<<<<<<<<<
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:
 */
  __pyx_v_newPos = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":283
 *     newPos = 0
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_1 = (__pyx_v_newLength - 1);
  __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_newIndex.diminfo[0].strides);
  __Pyx_INCREF((PyObject*)__pyx_t_2);
  __pyx_t_15 = 0;
  __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_oldIndex.diminfo[0].strides);
  __Pyx_INCREF((PyObject*)__pyx_t_6);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_LT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":284
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     while newPos < newLength:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":286
 *         return fill_vec
 * 
 *     while newPos < newLength:             # <<<<<<<<<<<<<<
 *         curOld = oldIndex[oldPos]
 * 
 */
  while (1) {
    __pyx_t_14 = (__pyx_v_newPos < __pyx_v_newLength);
    if (!__pyx_t_14) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":287
 * 
 *     while newPos < newLength:
 *         curOld = oldIndex[oldPos]             # <<<<<<<<<<<<<<
 * 
 *         while newIndex[newPos] < curOld:
 */
    __pyx_t_16 = __pyx_v_oldPos;
    __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_oldIndex.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_4);
    __Pyx_XDECREF(__pyx_v_curOld);
    __pyx_v_curOld = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":289
 *         curOld = oldIndex[oldPos]
 * 
 *         while newIndex[newPos] < curOld:             # <<<<<<<<<<<<<<
 *             newPos += 1
 *             if newPos > newLength - 1:
 */
    while (1) {
      __pyx_t_17 = __pyx_v_newPos;
      __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_newIndex.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_4);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_curOld, Py_LT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (!__pyx_t_14) break;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":290
 * 
 *         while newIndex[newPos] < curOld:
 *             newPos += 1             # <<<<<<<<<<<<<<
 *             if newPos > newLength - 1:
 *                 break
 */
      __pyx_v_newPos = (__pyx_v_newPos + 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":291
 *         while newIndex[newPos] < curOld:
 *             newPos += 1
 *             if newPos > newLength - 1:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_t_14 = (__pyx_v_newPos > (__pyx_v_newLength - 1));
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":292
 *             newPos += 1
 *             if newPos > newLength - 1:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L8_break;
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
    __pyx_L8_break:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":294
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == oldLength - 1:
 */
    __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_oldMap), __pyx_v_curOld); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_curLoc = __pyx_t_18;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":296
 *         curLoc = oldMap[curOld]
 * 
 *         if oldPos == oldLength - 1:             # <<<<<<<<<<<<<<
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc
 */
    __pyx_t_14 = (__pyx_v_oldPos == (__pyx_v_oldLength - 1));
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":297
 * 
 *         if oldPos == oldLength - 1:
 *             if newIndex[newPos] >= curOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[newPos:] = curLoc
 *             break
 */
      __pyx_t_18 = __pyx_v_newPos;
      __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_newIndex.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_6);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_curOld, Py_GE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":298
 *         if oldPos == oldLength - 1:
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_curLoc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_fill_vec), __pyx_v_newPos, PY_SSIZE_T_MAX, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":299
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 */
      goto __pyx_L6_break;
      goto __pyx_L10;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":301
 *             break
 *         else:
 *             nextOld = oldIndex[oldPos + 1]             # <<<<<<<<<<<<<<
 *             done = 0
 * 
 */
      __pyx_t_19 = (__pyx_v_oldPos + 1);
      __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_oldIndex.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_4);
      __Pyx_XDECREF(__pyx_v_nextOld);
      __pyx_v_nextOld = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":302
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 *             done = 0             # <<<<<<<<<<<<<<
 * 
 *             while newIndex[newPos] < nextOld:
 */
      __pyx_v_done = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":304
 *             done = 0
 * 
 *             while newIndex[newPos] < nextOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[newPos] = curLoc
 *                 newPos += 1
 */
      while (1) {
        __pyx_t_20 = __pyx_v_newPos;
        __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_newIndex.diminfo[0].strides);
        __Pyx_INCREF((PyObject*)__pyx_t_4);
        __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_nextOld, Py_LT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (!__pyx_t_14) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":305
 * 
 *             while newIndex[newPos] < nextOld:
 *                 fill_vec[newPos] = curLoc             # <<<<<<<<<<<<<<
 *                 newPos += 1
 * 
 */
        __pyx_t_21 = __pyx_v_newPos;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = __pyx_v_curLoc;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":306
 *             while newIndex[newPos] < nextOld:
 *                 fill_vec[newPos] = curLoc
 *                 newPos += 1             # <<<<<<<<<<<<<<
 * 
 *                 if newPos > newLength - 1:
 */
        __pyx_v_newPos = (__pyx_v_newPos + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":308
 *                 newPos += 1
 * 
 *                 if newPos > newLength - 1:             # <<<<<<<<<<<<<<
 *                     done = 1
 *                     break
 */
        __pyx_t_14 = (__pyx_v_newPos > (__pyx_v_newLength - 1));
        if (__pyx_t_14) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":309
 * 
 *                 if newPos > newLength - 1:
 *                     done = 1             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
          __pyx_v_done = 1;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":310
 *                 if newPos > newLength - 1:
 *                     done = 1
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             if done:
 */
          goto __pyx_L13_break;
          goto __pyx_L14;
        }
        __pyx_L14:;
      }
      __pyx_L13_break:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":312
 *                     break
 * 
 *             if done:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      if (__pyx_v_done) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":313
 * 
 *             if done:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         oldPos += 1
 */
        goto __pyx_L6_break;
        goto __pyx_L15;
      }
      __pyx_L15:;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":315
 *                 break
 * 
 *         oldPos += 1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
    __pyx_v_oldPos = (__pyx_v_oldPos + 1);
  }
  __pyx_L6_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":317
 *         oldPos += 1
 * 
 *     return fill_vec             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_r = ((PyObject *)__pyx_v_fill_vec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XDECREF(__pyx_v_curOld);
  __Pyx_XDECREF(__pyx_v_nextOld);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_161pad_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_161pad_int32 = {__Pyx_NAMESTR("pad_int32"), (PyCFunction)__pyx_pw_6pandas_8_tseries_161pad_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_161pad_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_oldIndex = 0;
  PyArrayObject *__pyx_v_newIndex = 0;
  PyObject *__pyx_v_oldMap = 0;
  CYTHON_UNUSED PyObject *__pyx_v_newMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pad_int32 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldIndex);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newIndex);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_int32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldMap);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_int32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newMap);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_int32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_int32") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
      __pyx_v_newIndex = ((PyArrayObject *)values[1]);
      __pyx_v_oldMap = ((PyObject*)values[2]);
      __pyx_v_newMap = ((PyObject*)values[3]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
    __pyx_v_newIndex = ((PyArrayObject *)values[1]);
    __pyx_v_oldMap = ((PyObject*)values[2]);
    __pyx_v_newMap = ((PyObject*)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pad_int32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.pad_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldIndex), __pyx_ptype_5numpy_ndarray, 1, "oldIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newIndex), __pyx_ptype_5numpy_ndarray, 1, "newIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), (&PyDict_Type), 1, "oldMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newMap), (&PyDict_Type), 1, "newMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_160pad_int32(__pyx_self, __pyx_v_oldIndex, __pyx_v_newIndex, __pyx_v_oldMap, __pyx_v_newMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":321
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_int32(ndarray[int32_t] oldIndex,             # <<<<<<<<<<<<<<
 *                  ndarray[int32_t] newIndex,
 *                  dict oldMap, dict newMap):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_160pad_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap) {
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec = 0;
  Py_ssize_t __pyx_v_newPos;
  Py_ssize_t __pyx_v_oldPos;
  __pyx_t_5numpy_int32_t __pyx_v_curOld;
  PyObject *__pyx_v_nextOld = NULL;
  long __pyx_v_done;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_oldIndex;
  __Pyx_Buffer __pyx_pybuffer_oldIndex;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fill_vec;
  __Pyx_Buffer __pyx_pybuffer_fill_vec;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_newIndex;
  __Pyx_Buffer __pyx_pybuffer_newIndex;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  long __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pad_int32");
  __pyx_pybuffer_fill_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_fill_vec.refcount = 0;
  __pyx_pybuffernd_fill_vec.data = NULL;
  __pyx_pybuffernd_fill_vec.rcbuffer = &__pyx_pybuffer_fill_vec;
  __pyx_pybuffer_oldIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_oldIndex.refcount = 0;
  __pyx_pybuffernd_oldIndex.data = NULL;
  __pyx_pybuffernd_oldIndex.rcbuffer = &__pyx_pybuffer_oldIndex;
  __pyx_pybuffer_newIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_newIndex.refcount = 0;
  __pyx_pybuffernd_newIndex.data = NULL;
  __pyx_pybuffernd_newIndex.rcbuffer = &__pyx_pybuffer_newIndex;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_oldIndex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_oldIndex.diminfo[0].strides = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oldIndex.diminfo[0].shape = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_newIndex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_newIndex.diminfo[0].strides = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_newIndex.diminfo[0].shape = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":329
 *     cdef int32_t prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_oldIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_oldLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":330
 * 
 *     oldLength = len(oldIndex)
 *     newLength = len(newIndex)             # <<<<<<<<<<<<<<
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":332
 *     newLength = len(newIndex)
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)             # <<<<<<<<<<<<<<
 *     fill_vec.fill(-1)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fill_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fill_vec.diminfo[0].strides = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fill_vec.diminfo[0].shape = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":333
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_fill_vec), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":335
 *     fill_vec.fill(-1)
 * 
 *     if oldLength == 0 or newLength == 0:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_12 = (__pyx_v_oldLength == 0);
  if (!__pyx_t_12) {
    __pyx_t_13 = (__pyx_v_newLength == 0);
    __pyx_t_14 = __pyx_t_13;
  } else {
    __pyx_t_14 = __pyx_t_12;
  }
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":336
 * 
 *     if oldLength == 0 or newLength == 0:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     oldPos = 0
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":338
 *         return fill_vec
 * 
 *     oldPos = 0             # <<<<<<<<<<<<<<
 *     newPos = 0
 * 
 */
  __pyx_v_oldPos = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":339
 * 
 *     oldPos = 0
 *     newPos = 0             # <<<<<<<<<<<<<<
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:
 */
  __pyx_v_newPos = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":341
 *     newPos = 0
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_1 = (__pyx_v_newLength - 1);
  __pyx_t_15 = 0;
  __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_newIndex.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_oldIndex.diminfo[0].strides)));
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":342
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     while newPos < newLength:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":344
 *         return fill_vec
 * 
 *     while newPos < newLength:             # <<<<<<<<<<<<<<
 *         curOld = oldIndex[oldPos]
 * 
 */
  while (1) {
    __pyx_t_14 = (__pyx_v_newPos < __pyx_v_newLength);
    if (!__pyx_t_14) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":345
 * 
 *     while newPos < newLength:
 *         curOld = oldIndex[oldPos]             # <<<<<<<<<<<<<<
 * 
 *         while newIndex[newPos] < curOld:
 */
    __pyx_t_16 = __pyx_v_oldPos;
    __pyx_v_curOld = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_oldIndex.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":347
 *         curOld = oldIndex[oldPos]
 * 
 *         while newIndex[newPos] < curOld:             # <<<<<<<<<<<<<<
 *             newPos += 1
 *             if newPos > newLength - 1:
 */
    while (1) {
      __pyx_t_17 = __pyx_v_newPos;
      __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_newIndex.diminfo[0].strides)) < __pyx_v_curOld);
      if (!__pyx_t_14) break;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":348
 * 
 *         while newIndex[newPos] < curOld:
 *             newPos += 1             # <<<<<<<<<<<<<<
 *             if newPos > newLength - 1:
 *                 break
 */
      __pyx_v_newPos = (__pyx_v_newPos + 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":349
 *         while newIndex[newPos] < curOld:
 *             newPos += 1
 *             if newPos > newLength - 1:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_t_14 = (__pyx_v_newPos > (__pyx_v_newLength - 1));
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":350
 *             newPos += 1
 *             if newPos > newLength - 1:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L8_break;
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
    __pyx_L8_break:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":352
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == oldLength - 1:
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_oldMap), __pyx_v_curOld, sizeof(__pyx_t_5numpy_int32_t), __Pyx_PyInt_to_py_npy_int32); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_curLoc = __pyx_t_18;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":354
 *         curLoc = oldMap[curOld]
 * 
 *         if oldPos == oldLength - 1:             # <<<<<<<<<<<<<<
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc
 */
    __pyx_t_14 = (__pyx_v_oldPos == (__pyx_v_oldLength - 1));
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":355
 * 
 *         if oldPos == oldLength - 1:
 *             if newIndex[newPos] >= curOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[newPos:] = curLoc
 *             break
 */
      __pyx_t_18 = __pyx_v_newPos;
      __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_newIndex.diminfo[0].strides)) >= __pyx_v_curOld);
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":356
 *         if oldPos == oldLength - 1:
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_curLoc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_fill_vec), __pyx_v_newPos, PY_SSIZE_T_MAX, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":357
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 */
      goto __pyx_L6_break;
      goto __pyx_L10;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":359
 *             break
 *         else:
 *             nextOld = oldIndex[oldPos + 1]             # <<<<<<<<<<<<<<
 *             done = 0
 * 
 */
      __pyx_t_19 = (__pyx_v_oldPos + 1);
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_oldIndex.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_v_nextOld);
      __pyx_v_nextOld = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":360
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 *             done = 0             # <<<<<<<<<<<<<<
 * 
 *             while newIndex[newPos] < nextOld:
 */
      __pyx_v_done = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":362
 *             done = 0
 * 
 *             while newIndex[newPos] < nextOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[newPos] = curLoc
 *                 newPos += 1
 */
      while (1) {
        __pyx_t_20 = __pyx_v_newPos;
        __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_newIndex.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_v_nextOld, Py_LT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (!__pyx_t_14) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":363
 * 
 *             while newIndex[newPos] < nextOld:
 *                 fill_vec[newPos] = curLoc             # <<<<<<<<<<<<<<
 *                 newPos += 1
 * 
 */
        __pyx_t_21 = __pyx_v_newPos;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = __pyx_v_curLoc;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":364
 *             while newIndex[newPos] < nextOld:
 *                 fill_vec[newPos] = curLoc
 *                 newPos += 1             # <<<<<<<<<<<<<<
 * 
 *                 if newPos > newLength - 1:
 */
        __pyx_v_newPos = (__pyx_v_newPos + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":366
 *                 newPos += 1
 * 
 *                 if newPos > newLength - 1:             # <<<<<<<<<<<<<<
 *                     done = 1
 *                     break
 */
        __pyx_t_14 = (__pyx_v_newPos > (__pyx_v_newLength - 1));
        if (__pyx_t_14) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":367
 * 
 *                 if newPos > newLength - 1:
 *                     done = 1             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
          __pyx_v_done = 1;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":368
 *                 if newPos > newLength - 1:
 *                     done = 1
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             if done:
 */
          goto __pyx_L13_break;
          goto __pyx_L14;
        }
        __pyx_L14:;
      }
      __pyx_L13_break:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":370
 *                     break
 * 
 *             if done:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      if (__pyx_v_done) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":371
 * 
 *             if done:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         oldPos += 1
 */
        goto __pyx_L6_break;
        goto __pyx_L15;
      }
      __pyx_L15:;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":373
 *                 break
 * 
 *         oldPos += 1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
    __pyx_v_oldPos = (__pyx_v_oldPos + 1);
  }
  __pyx_L6_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":375
 *         oldPos += 1
 * 
 *     return fill_vec             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_r = ((PyObject *)__pyx_v_fill_vec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XDECREF(__pyx_v_nextOld);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_163pad_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_163pad_int64 = {__Pyx_NAMESTR("pad_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_163pad_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_163pad_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_oldIndex = 0;
  PyArrayObject *__pyx_v_newIndex = 0;
  PyObject *__pyx_v_oldMap = 0;
  CYTHON_UNUSED PyObject *__pyx_v_newMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pad_int64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldIndex);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newIndex);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_int64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldMap);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_int64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newMap);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_int64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_int64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
      __pyx_v_newIndex = ((PyArrayObject *)values[1]);
      __pyx_v_oldMap = ((PyObject*)values[2]);
      __pyx_v_newMap = ((PyObject*)values[3]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
    __pyx_v_newIndex = ((PyArrayObject *)values[1]);
    __pyx_v_oldMap = ((PyObject*)values[2]);
    __pyx_v_newMap = ((PyObject*)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pad_int64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.pad_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldIndex), __pyx_ptype_5numpy_ndarray, 1, "oldIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newIndex), __pyx_ptype_5numpy_ndarray, 1, "newIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), (&PyDict_Type), 1, "oldMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newMap), (&PyDict_Type), 1, "newMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_162pad_int64(__pyx_self, __pyx_v_oldIndex, __pyx_v_newIndex, __pyx_v_oldMap, __pyx_v_newMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":379
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_int64(ndarray[int64_t] oldIndex,             # <<<<<<<<<<<<<<
 *                  ndarray[int64_t] newIndex,
 *                  dict oldMap, dict newMap):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_162pad_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap) {
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec = 0;
  Py_ssize_t __pyx_v_newPos;
  Py_ssize_t __pyx_v_oldPos;
  __pyx_t_5numpy_int64_t __pyx_v_curOld;
  PyObject *__pyx_v_nextOld = NULL;
  long __pyx_v_done;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_oldIndex;
  __Pyx_Buffer __pyx_pybuffer_oldIndex;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fill_vec;
  __Pyx_Buffer __pyx_pybuffer_fill_vec;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_newIndex;
  __Pyx_Buffer __pyx_pybuffer_newIndex;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  long __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pad_int64");
  __pyx_pybuffer_fill_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_fill_vec.refcount = 0;
  __pyx_pybuffernd_fill_vec.data = NULL;
  __pyx_pybuffernd_fill_vec.rcbuffer = &__pyx_pybuffer_fill_vec;
  __pyx_pybuffer_oldIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_oldIndex.refcount = 0;
  __pyx_pybuffernd_oldIndex.data = NULL;
  __pyx_pybuffernd_oldIndex.rcbuffer = &__pyx_pybuffer_oldIndex;
  __pyx_pybuffer_newIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_newIndex.refcount = 0;
  __pyx_pybuffernd_newIndex.data = NULL;
  __pyx_pybuffernd_newIndex.rcbuffer = &__pyx_pybuffer_newIndex;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_oldIndex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_oldIndex.diminfo[0].strides = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oldIndex.diminfo[0].shape = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_newIndex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_newIndex.diminfo[0].strides = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_newIndex.diminfo[0].shape = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":387
 *     cdef int64_t prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_oldIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_oldLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":388
 * 
 *     oldLength = len(oldIndex)
 *     newLength = len(newIndex)             # <<<<<<<<<<<<<<
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":390
 *     newLength = len(newIndex)
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)             # <<<<<<<<<<<<<<
 *     fill_vec.fill(-1)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fill_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fill_vec.diminfo[0].strides = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fill_vec.diminfo[0].shape = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":391
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_fill_vec), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_20), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":393
 *     fill_vec.fill(-1)
 * 
 *     if oldLength == 0 or newLength == 0:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_12 = (__pyx_v_oldLength == 0);
  if (!__pyx_t_12) {
    __pyx_t_13 = (__pyx_v_newLength == 0);
    __pyx_t_14 = __pyx_t_13;
  } else {
    __pyx_t_14 = __pyx_t_12;
  }
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":394
 * 
 *     if oldLength == 0 or newLength == 0:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     oldPos = 0
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":396
 *         return fill_vec
 * 
 *     oldPos = 0             # <<<<<<<<<<<<<<
 *     newPos = 0
 * 
 */
  __pyx_v_oldPos = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":397
 * 
 *     oldPos = 0
 *     newPos = 0             # <<<<<<<<<<<<<<
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:
 */
  __pyx_v_newPos = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":399
 *     newPos = 0
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_1 = (__pyx_v_newLength - 1);
  __pyx_t_15 = 0;
  __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_newIndex.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_oldIndex.diminfo[0].strides)));
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":400
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     while newPos < newLength:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":402
 *         return fill_vec
 * 
 *     while newPos < newLength:             # <<<<<<<<<<<<<<
 *         curOld = oldIndex[oldPos]
 * 
 */
  while (1) {
    __pyx_t_14 = (__pyx_v_newPos < __pyx_v_newLength);
    if (!__pyx_t_14) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":403
 * 
 *     while newPos < newLength:
 *         curOld = oldIndex[oldPos]             # <<<<<<<<<<<<<<
 * 
 *         while newIndex[newPos] < curOld:
 */
    __pyx_t_16 = __pyx_v_oldPos;
    __pyx_v_curOld = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_oldIndex.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":405
 *         curOld = oldIndex[oldPos]
 * 
 *         while newIndex[newPos] < curOld:             # <<<<<<<<<<<<<<
 *             newPos += 1
 *             if newPos > newLength - 1:
 */
    while (1) {
      __pyx_t_17 = __pyx_v_newPos;
      __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_newIndex.diminfo[0].strides)) < __pyx_v_curOld);
      if (!__pyx_t_14) break;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":406
 * 
 *         while newIndex[newPos] < curOld:
 *             newPos += 1             # <<<<<<<<<<<<<<
 *             if newPos > newLength - 1:
 *                 break
 */
      __pyx_v_newPos = (__pyx_v_newPos + 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":407
 *         while newIndex[newPos] < curOld:
 *             newPos += 1
 *             if newPos > newLength - 1:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_t_14 = (__pyx_v_newPos > (__pyx_v_newLength - 1));
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":408
 *             newPos += 1
 *             if newPos > newLength - 1:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L8_break;
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
    __pyx_L8_break:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":410
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == oldLength - 1:
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_oldMap), __pyx_v_curOld, sizeof(__pyx_t_5numpy_int64_t), __Pyx_PyInt_to_py_npy_int64); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_curLoc = __pyx_t_18;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":412
 *         curLoc = oldMap[curOld]
 * 
 *         if oldPos == oldLength - 1:             # <<<<<<<<<<<<<<
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc
 */
    __pyx_t_14 = (__pyx_v_oldPos == (__pyx_v_oldLength - 1));
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":413
 * 
 *         if oldPos == oldLength - 1:
 *             if newIndex[newPos] >= curOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[newPos:] = curLoc
 *             break
 */
      __pyx_t_18 = __pyx_v_newPos;
      __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_newIndex.diminfo[0].strides)) >= __pyx_v_curOld);
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":414
 *         if oldPos == oldLength - 1:
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_curLoc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_fill_vec), __pyx_v_newPos, PY_SSIZE_T_MAX, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":415
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 */
      goto __pyx_L6_break;
      goto __pyx_L10;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":417
 *             break
 *         else:
 *             nextOld = oldIndex[oldPos + 1]             # <<<<<<<<<<<<<<
 *             done = 0
 * 
 */
      __pyx_t_19 = (__pyx_v_oldPos + 1);
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_oldIndex.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_v_nextOld);
      __pyx_v_nextOld = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":418
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 *             done = 0             # <<<<<<<<<<<<<<
 * 
 *             while newIndex[newPos] < nextOld:
 */
      __pyx_v_done = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":420
 *             done = 0
 * 
 *             while newIndex[newPos] < nextOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[newPos] = curLoc
 *                 newPos += 1
 */
      while (1) {
        __pyx_t_20 = __pyx_v_newPos;
        __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_newIndex.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_v_nextOld, Py_LT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (!__pyx_t_14) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":421
 * 
 *             while newIndex[newPos] < nextOld:
 *                 fill_vec[newPos] = curLoc             # <<<<<<<<<<<<<<
 *                 newPos += 1
 * 
 */
        __pyx_t_21 = __pyx_v_newPos;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = __pyx_v_curLoc;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":422
 *             while newIndex[newPos] < nextOld:
 *                 fill_vec[newPos] = curLoc
 *                 newPos += 1             # <<<<<<<<<<<<<<
 * 
 *                 if newPos > newLength - 1:
 */
        __pyx_v_newPos = (__pyx_v_newPos + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":424
 *                 newPos += 1
 * 
 *                 if newPos > newLength - 1:             # <<<<<<<<<<<<<<
 *                     done = 1
 *                     break
 */
        __pyx_t_14 = (__pyx_v_newPos > (__pyx_v_newLength - 1));
        if (__pyx_t_14) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":425
 * 
 *                 if newPos > newLength - 1:
 *                     done = 1             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
          __pyx_v_done = 1;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":426
 *                 if newPos > newLength - 1:
 *                     done = 1
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             if done:
 */
          goto __pyx_L13_break;
          goto __pyx_L14;
        }
        __pyx_L14:;
      }
      __pyx_L13_break:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":428
 *                     break
 * 
 *             if done:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      if (__pyx_v_done) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":429
 * 
 *             if done:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         oldPos += 1
 */
        goto __pyx_L6_break;
        goto __pyx_L15;
      }
      __pyx_L15:;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":431
 *                 break
 * 
 *         oldPos += 1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
    __pyx_v_oldPos = (__pyx_v_oldPos + 1);
  }
  __pyx_L6_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":433
 *         oldPos += 1
 * 
 *     return fill_vec             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_r = ((PyObject *)__pyx_v_fill_vec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XDECREF(__pyx_v_nextOld);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_165pad_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_165pad_bool = {__Pyx_NAMESTR("pad_bool"), (PyCFunction)__pyx_pw_6pandas_8_tseries_165pad_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_165pad_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_oldIndex = 0;
  PyArrayObject *__pyx_v_newIndex = 0;
  PyObject *__pyx_v_oldMap = 0;
  CYTHON_UNUSED PyObject *__pyx_v_newMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pad_bool (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldIndex);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newIndex);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_bool", 1, 4, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldMap);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_bool", 1, 4, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newMap);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_bool", 1, 4, 4, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_bool") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
      __pyx_v_newIndex = ((PyArrayObject *)values[1]);
      __pyx_v_oldMap = ((PyObject*)values[2]);
      __pyx_v_newMap = ((PyObject*)values[3]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
    __pyx_v_newIndex = ((PyArrayObject *)values[1]);
    __pyx_v_oldMap = ((PyObject*)values[2]);
    __pyx_v_newMap = ((PyObject*)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pad_bool", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.pad_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldIndex), __pyx_ptype_5numpy_ndarray, 1, "oldIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newIndex), __pyx_ptype_5numpy_ndarray, 1, "newIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), (&PyDict_Type), 1, "oldMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newMap), (&PyDict_Type), 1, "newMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_164pad_bool(__pyx_self, __pyx_v_oldIndex, __pyx_v_newIndex, __pyx_v_oldMap, __pyx_v_newMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":437
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_bool(ndarray[uint8_t] oldIndex,             # <<<<<<<<<<<<<<
 *                  ndarray[uint8_t] newIndex,
 *                  dict oldMap, dict newMap):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_164pad_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap) {
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec = 0;
  Py_ssize_t __pyx_v_newPos;
  Py_ssize_t __pyx_v_oldPos;
  __pyx_t_5numpy_uint8_t __pyx_v_curOld;
  PyObject *__pyx_v_nextOld = NULL;
  long __pyx_v_done;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_oldIndex;
  __Pyx_Buffer __pyx_pybuffer_oldIndex;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fill_vec;
  __Pyx_Buffer __pyx_pybuffer_fill_vec;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_newIndex;
  __Pyx_Buffer __pyx_pybuffer_newIndex;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  long __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pad_bool");
  __pyx_pybuffer_fill_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_fill_vec.refcount = 0;
  __pyx_pybuffernd_fill_vec.data = NULL;
  __pyx_pybuffernd_fill_vec.rcbuffer = &__pyx_pybuffer_fill_vec;
  __pyx_pybuffer_oldIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_oldIndex.refcount = 0;
  __pyx_pybuffernd_oldIndex.data = NULL;
  __pyx_pybuffernd_oldIndex.rcbuffer = &__pyx_pybuffer_oldIndex;
  __pyx_pybuffer_newIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_newIndex.refcount = 0;
  __pyx_pybuffernd_newIndex.data = NULL;
  __pyx_pybuffernd_newIndex.rcbuffer = &__pyx_pybuffer_newIndex;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_oldIndex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_oldIndex.diminfo[0].strides = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oldIndex.diminfo[0].shape = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_newIndex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_newIndex.diminfo[0].strides = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_newIndex.diminfo[0].shape = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":445
 *     cdef uint8_t prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_oldIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_oldLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":446
 * 
 *     oldLength = len(oldIndex)
 *     newLength = len(newIndex)             # <<<<<<<<<<<<<<
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":448
 *     newLength = len(newIndex)
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)             # <<<<<<<<<<<<<<
 *     fill_vec.fill(-1)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fill_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fill_vec.diminfo[0].strides = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fill_vec.diminfo[0].shape = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":449
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_fill_vec), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":451
 *     fill_vec.fill(-1)
 * 
 *     if oldLength == 0 or newLength == 0:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_12 = (__pyx_v_oldLength == 0);
  if (!__pyx_t_12) {
    __pyx_t_13 = (__pyx_v_newLength == 0);
    __pyx_t_14 = __pyx_t_13;
  } else {
    __pyx_t_14 = __pyx_t_12;
  }
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":452
 * 
 *     if oldLength == 0 or newLength == 0:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     oldPos = 0
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":454
 *         return fill_vec
 * 
 *     oldPos = 0             # <<<<<<<<<<<<<<
 *     newPos = 0
 * 
 */
  __pyx_v_oldPos = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":455
 * 
 *     oldPos = 0
 *     newPos = 0             # <<<<<<<<<<<<<<
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:
 */
  __pyx_v_newPos = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":457
 *     newPos = 0
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_1 = (__pyx_v_newLength - 1);
  __pyx_t_15 = 0;
  __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_newIndex.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_oldIndex.diminfo[0].strides)));
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":458
 * 
 *     if newIndex[newLength - 1] < oldIndex[0]:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     while newPos < newLength:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":460
 *         return fill_vec
 * 
 *     while newPos < newLength:             # <<<<<<<<<<<<<<
 *         curOld = oldIndex[oldPos]
 * 
 */
  while (1) {
    __pyx_t_14 = (__pyx_v_newPos < __pyx_v_newLength);
    if (!__pyx_t_14) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":461
 * 
 *     while newPos < newLength:
 *         curOld = oldIndex[oldPos]             # <<<<<<<<<<<<<<
 * 
 *         while newIndex[newPos] < curOld:
 */
    __pyx_t_16 = __pyx_v_oldPos;
    __pyx_v_curOld = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_oldIndex.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":463
 *         curOld = oldIndex[oldPos]
 * 
 *         while newIndex[newPos] < curOld:             # <<<<<<<<<<<<<<
 *             newPos += 1
 *             if newPos > newLength - 1:
 */
    while (1) {
      __pyx_t_17 = __pyx_v_newPos;
      __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_newIndex.diminfo[0].strides)) < __pyx_v_curOld);
      if (!__pyx_t_14) break;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":464
 * 
 *         while newIndex[newPos] < curOld:
 *             newPos += 1             # <<<<<<<<<<<<<<
 *             if newPos > newLength - 1:
 *                 break
 */
      __pyx_v_newPos = (__pyx_v_newPos + 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":465
 *         while newIndex[newPos] < curOld:
 *             newPos += 1
 *             if newPos > newLength - 1:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_t_14 = (__pyx_v_newPos > (__pyx_v_newLength - 1));
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":466
 *             newPos += 1
 *             if newPos > newLength - 1:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L8_break;
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
    __pyx_L8_break:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":468
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == oldLength - 1:
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_oldMap), __pyx_v_curOld, sizeof(__pyx_t_5numpy_uint8_t)+1, __Pyx_PyInt_to_py_npy_uint8); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_curLoc = __pyx_t_18;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":470
 *         curLoc = oldMap[curOld]
 * 
 *         if oldPos == oldLength - 1:             # <<<<<<<<<<<<<<
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc
 */
    __pyx_t_14 = (__pyx_v_oldPos == (__pyx_v_oldLength - 1));
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":471
 * 
 *         if oldPos == oldLength - 1:
 *             if newIndex[newPos] >= curOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[newPos:] = curLoc
 *             break
 */
      __pyx_t_18 = __pyx_v_newPos;
      __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_newIndex.diminfo[0].strides)) >= __pyx_v_curOld);
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":472
 *         if oldPos == oldLength - 1:
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_curLoc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_fill_vec), __pyx_v_newPos, PY_SSIZE_T_MAX, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":473
 *             if newIndex[newPos] >= curOld:
 *                 fill_vec[newPos:] = curLoc
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 */
      goto __pyx_L6_break;
      goto __pyx_L10;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":475
 *             break
 *         else:
 *             nextOld = oldIndex[oldPos + 1]             # <<<<<<<<<<<<<<
 *             done = 0
 * 
 */
      __pyx_t_19 = (__pyx_v_oldPos + 1);
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_uint8((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_oldIndex.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_v_nextOld);
      __pyx_v_nextOld = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":476
 *         else:
 *             nextOld = oldIndex[oldPos + 1]
 *             done = 0             # <<<<<<<<<<<<<<
 * 
 *             while newIndex[newPos] < nextOld:
 */
      __pyx_v_done = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":478
 *             done = 0
 * 
 *             while newIndex[newPos] < nextOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[newPos] = curLoc
 *                 newPos += 1
 */
      while (1) {
        __pyx_t_20 = __pyx_v_newPos;
        __pyx_t_2 = __Pyx_PyInt_to_py_npy_uint8((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_newIndex.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_v_nextOld, Py_LT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (!__pyx_t_14) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":479
 * 
 *             while newIndex[newPos] < nextOld:
 *                 fill_vec[newPos] = curLoc             # <<<<<<<<<<<<<<
 *                 newPos += 1
 * 
 */
        __pyx_t_21 = __pyx_v_newPos;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = __pyx_v_curLoc;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":480
 *             while newIndex[newPos] < nextOld:
 *                 fill_vec[newPos] = curLoc
 *                 newPos += 1             # <<<<<<<<<<<<<<
 * 
 *                 if newPos > newLength - 1:
 */
        __pyx_v_newPos = (__pyx_v_newPos + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":482
 *                 newPos += 1
 * 
 *                 if newPos > newLength - 1:             # <<<<<<<<<<<<<<
 *                     done = 1
 *                     break
 */
        __pyx_t_14 = (__pyx_v_newPos > (__pyx_v_newLength - 1));
        if (__pyx_t_14) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":483
 * 
 *                 if newPos > newLength - 1:
 *                     done = 1             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
          __pyx_v_done = 1;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":484
 *                 if newPos > newLength - 1:
 *                     done = 1
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             if done:
 */
          goto __pyx_L13_break;
          goto __pyx_L14;
        }
        __pyx_L14:;
      }
      __pyx_L13_break:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":486
 *                     break
 * 
 *             if done:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      if (__pyx_v_done) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":487
 * 
 *             if done:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         oldPos += 1
 */
        goto __pyx_L6_break;
        goto __pyx_L15;
      }
      __pyx_L15:;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":489
 *                 break
 * 
 *         oldPos += 1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
    __pyx_v_oldPos = (__pyx_v_oldPos + 1);
  }
  __pyx_L6_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":491
 *         oldPos += 1
 * 
 *     return fill_vec             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_r = ((PyObject *)__pyx_v_fill_vec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XDECREF(__pyx_v_nextOld);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_167backfill_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_167backfill_float64 = {__Pyx_NAMESTR("backfill_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_167backfill_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_167backfill_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_oldIndex = 0;
  PyArrayObject *__pyx_v_newIndex = 0;
  PyObject *__pyx_v_oldMap = 0;
  CYTHON_UNUSED PyObject *__pyx_v_newMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("backfill_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldIndex);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newIndex);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_float64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldMap);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_float64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newMap);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_float64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_float64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
      __pyx_v_newIndex = ((PyArrayObject *)values[1]);
      __pyx_v_oldMap = ((PyObject*)values[2]);
      __pyx_v_newMap = ((PyObject*)values[3]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
    __pyx_v_newIndex = ((PyArrayObject *)values[1]);
    __pyx_v_oldMap = ((PyObject*)values[2]);
    __pyx_v_newMap = ((PyObject*)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("backfill_float64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.backfill_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldIndex), __pyx_ptype_5numpy_ndarray, 1, "oldIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newIndex), __pyx_ptype_5numpy_ndarray, 1, "newIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), (&PyDict_Type), 1, "oldMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newMap), (&PyDict_Type), 1, "newMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_166backfill_float64(__pyx_self, __pyx_v_oldIndex, __pyx_v_newIndex, __pyx_v_oldMap, __pyx_v_newMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":496
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_float64(ndarray[float64_t] oldIndex,             # <<<<<<<<<<<<<<
 *                       ndarray[float64_t] newIndex,
 *                       dict oldMap, dict newMap):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_166backfill_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap) {
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec = 0;
  Py_ssize_t __pyx_v_newPos;
  Py_ssize_t __pyx_v_oldPos;
  __pyx_t_5numpy_float64_t __pyx_v_prevOld;
  __pyx_t_5numpy_float64_t __pyx_v_curOld;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_oldIndex;
  __Pyx_Buffer __pyx_pybuffer_oldIndex;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fill_vec;
  __Pyx_Buffer __pyx_pybuffer_fill_vec;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_newIndex;
  __Pyx_Buffer __pyx_pybuffer_newIndex;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  long __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("backfill_float64");
  __pyx_pybuffer_fill_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_fill_vec.refcount = 0;
  __pyx_pybuffernd_fill_vec.data = NULL;
  __pyx_pybuffernd_fill_vec.rcbuffer = &__pyx_pybuffer_fill_vec;
  __pyx_pybuffer_oldIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_oldIndex.refcount = 0;
  __pyx_pybuffernd_oldIndex.data = NULL;
  __pyx_pybuffernd_oldIndex.rcbuffer = &__pyx_pybuffer_oldIndex;
  __pyx_pybuffer_newIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_newIndex.refcount = 0;
  __pyx_pybuffernd_newIndex.data = NULL;
  __pyx_pybuffernd_newIndex.rcbuffer = &__pyx_pybuffer_newIndex;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_oldIndex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_oldIndex.diminfo[0].strides = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oldIndex.diminfo[0].shape = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_newIndex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_newIndex.diminfo[0].strides = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_newIndex.diminfo[0].shape = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":504
 *     cdef float64_t prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_oldIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_oldLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":505
 * 
 *     oldLength = len(oldIndex)
 *     newLength = len(newIndex)             # <<<<<<<<<<<<<<
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":507
 *     newLength = len(newIndex)
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)             # <<<<<<<<<<<<<<
 *     fill_vec.fill(-1)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fill_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fill_vec.diminfo[0].strides = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fill_vec.diminfo[0].shape = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":508
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_fill_vec), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_22), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":510
 *     fill_vec.fill(-1)
 * 
 *     if oldLength == 0 or newLength == 0:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_12 = (__pyx_v_oldLength == 0);
  if (!__pyx_t_12) {
    __pyx_t_13 = (__pyx_v_newLength == 0);
    __pyx_t_14 = __pyx_t_13;
  } else {
    __pyx_t_14 = __pyx_t_12;
  }
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":511
 * 
 *     if oldLength == 0 or newLength == 0:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     oldPos = oldLength - 1
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":513
 *         return fill_vec
 * 
 *     oldPos = oldLength - 1             # <<<<<<<<<<<<<<
 *     newPos = newLength - 1
 * 
 */
  __pyx_v_oldPos = (__pyx_v_oldLength - 1);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":514
 * 
 *     oldPos = oldLength - 1
 *     newPos = newLength - 1             # <<<<<<<<<<<<<<
 * 
 *     if newIndex[0] > oldIndex[oldLength - 1]:
 */
  __pyx_v_newPos = (__pyx_v_newLength - 1);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":516
 *     newPos = newLength - 1
 * 
 *     if newIndex[0] > oldIndex[oldLength - 1]:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_15 = 0;
  __pyx_t_1 = (__pyx_v_oldLength - 1);
  __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_newIndex.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_oldIndex.diminfo[0].strides)));
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":517
 * 
 *     if newIndex[0] > oldIndex[oldLength - 1]:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     while newPos >= 0:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":519
 *         return fill_vec
 * 
 *     while newPos >= 0:             # <<<<<<<<<<<<<<
 *         curOld = oldIndex[oldPos]
 * 
 */
  while (1) {
    __pyx_t_14 = (__pyx_v_newPos >= 0);
    if (!__pyx_t_14) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":520
 * 
 *     while newPos >= 0:
 *         curOld = oldIndex[oldPos]             # <<<<<<<<<<<<<<
 * 
 *         while newIndex[newPos] > curOld:
 */
    __pyx_t_16 = __pyx_v_oldPos;
    __pyx_v_curOld = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_oldIndex.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":522
 *         curOld = oldIndex[oldPos]
 * 
 *         while newIndex[newPos] > curOld:             # <<<<<<<<<<<<<<
 *             newPos -= 1
 *             if newPos < 0:
 */
    while (1) {
      __pyx_t_17 = __pyx_v_newPos;
      __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_newIndex.diminfo[0].strides)) > __pyx_v_curOld);
      if (!__pyx_t_14) break;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":523
 * 
 *         while newIndex[newPos] > curOld:
 *             newPos -= 1             # <<<<<<<<<<<<<<
 *             if newPos < 0:
 *                 break
 */
      __pyx_v_newPos = (__pyx_v_newPos - 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":524
 *         while newIndex[newPos] > curOld:
 *             newPos -= 1
 *             if newPos < 0:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_t_14 = (__pyx_v_newPos < 0);
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":525
 *             newPos -= 1
 *             if newPos < 0:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L8_break;
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
    __pyx_L8_break:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":527
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == 0:
 */
    __pyx_t_2 = PyFloat_FromDouble(__pyx_v_curOld); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_oldMap), __pyx_t_2); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_curLoc = __pyx_t_18;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":529
 *         curLoc = oldMap[curOld]
 * 
 *         if oldPos == 0:             # <<<<<<<<<<<<<<
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc
 */
    __pyx_t_14 = (__pyx_v_oldPos == 0);
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":530
 * 
 *         if oldPos == 0:
 *             if newIndex[newPos] <= curOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[:newPos + 1] = curLoc
 *             break
 */
      __pyx_t_18 = __pyx_v_newPos;
      __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_newIndex.diminfo[0].strides)) <= __pyx_v_curOld);
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":531
 *         if oldPos == 0:
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_curLoc); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_fill_vec), 0, (__pyx_v_newPos + 1), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":532
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             prevOld = oldIndex[oldPos - 1]
 */
      goto __pyx_L6_break;
      goto __pyx_L10;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":534
 *             break
 *         else:
 *             prevOld = oldIndex[oldPos - 1]             # <<<<<<<<<<<<<<
 * 
 *             while newIndex[newPos] > prevOld:
 */
      __pyx_t_19 = (__pyx_v_oldPos - 1);
      __pyx_v_prevOld = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_oldIndex.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":536
 *             prevOld = oldIndex[oldPos - 1]
 * 
 *             while newIndex[newPos] > prevOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[newPos] = curLoc
 * 
 */
      while (1) {
        __pyx_t_20 = __pyx_v_newPos;
        __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_newIndex.diminfo[0].strides)) > __pyx_v_prevOld);
        if (!__pyx_t_14) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":537
 * 
 *             while newIndex[newPos] > prevOld:
 *                 fill_vec[newPos] = curLoc             # <<<<<<<<<<<<<<
 * 
 *                 newPos -= 1
 */
        __pyx_t_21 = __pyx_v_newPos;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = __pyx_v_curLoc;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":539
 *                 fill_vec[newPos] = curLoc
 * 
 *                 newPos -= 1             # <<<<<<<<<<<<<<
 *                 if newPos < 0:
 *                     break
 */
        __pyx_v_newPos = (__pyx_v_newPos - 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":540
 * 
 *                 newPos -= 1
 *                 if newPos < 0:             # <<<<<<<<<<<<<<
 *                     break
 *         oldPos -= 1
 */
        __pyx_t_14 = (__pyx_v_newPos < 0);
        if (__pyx_t_14) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":541
 *                 newPos -= 1
 *                 if newPos < 0:
 *                     break             # <<<<<<<<<<<<<<
 *         oldPos -= 1
 * 
 */
          goto __pyx_L13_break;
          goto __pyx_L14;
        }
        __pyx_L14:;
      }
      __pyx_L13_break:;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":542
 *                 if newPos < 0:
 *                     break
 *         oldPos -= 1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
    __pyx_v_oldPos = (__pyx_v_oldPos - 1);
  }
  __pyx_L6_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":544
 *         oldPos -= 1
 * 
 *     return fill_vec             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_r = ((PyObject *)__pyx_v_fill_vec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_169backfill_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_169backfill_object = {__Pyx_NAMESTR("backfill_object"), (PyCFunction)__pyx_pw_6pandas_8_tseries_169backfill_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_169backfill_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_oldIndex = 0;
  PyArrayObject *__pyx_v_newIndex = 0;
  PyObject *__pyx_v_oldMap = 0;
  CYTHON_UNUSED PyObject *__pyx_v_newMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("backfill_object (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldIndex);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newIndex);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_object", 1, 4, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldMap);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_object", 1, 4, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newMap);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_object", 1, 4, 4, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_object") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
      __pyx_v_newIndex = ((PyArrayObject *)values[1]);
      __pyx_v_oldMap = ((PyObject*)values[2]);
      __pyx_v_newMap = ((PyObject*)values[3]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
    __pyx_v_newIndex = ((PyArrayObject *)values[1]);
    __pyx_v_oldMap = ((PyObject*)values[2]);
    __pyx_v_newMap = ((PyObject*)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("backfill_object", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.backfill_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldIndex), __pyx_ptype_5numpy_ndarray, 1, "oldIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newIndex), __pyx_ptype_5numpy_ndarray, 1, "newIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), (&PyDict_Type), 1, "oldMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newMap), (&PyDict_Type), 1, "newMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_168backfill_object(__pyx_self, __pyx_v_oldIndex, __pyx_v_newIndex, __pyx_v_oldMap, __pyx_v_newMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":548
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_object(ndarray[object] oldIndex,             # <<<<<<<<<<<<<<
 *                       ndarray[object] newIndex,
 *                       dict oldMap, dict newMap):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_168backfill_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap) {
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec = 0;
  Py_ssize_t __pyx_v_newPos;
  Py_ssize_t __pyx_v_oldPos;
  PyObject *__pyx_v_prevOld = 0;
  PyObject *__pyx_v_curOld = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_oldIndex;
  __Pyx_Buffer __pyx_pybuffer_oldIndex;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fill_vec;
  __Pyx_Buffer __pyx_pybuffer_fill_vec;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_newIndex;
  __Pyx_Buffer __pyx_pybuffer_newIndex;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  long __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("backfill_object");
  __pyx_pybuffer_fill_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_fill_vec.refcount = 0;
  __pyx_pybuffernd_fill_vec.data = NULL;
  __pyx_pybuffernd_fill_vec.rcbuffer = &__pyx_pybuffer_fill_vec;
  __pyx_pybuffer_oldIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_oldIndex.refcount = 0;
  __pyx_pybuffernd_oldIndex.data = NULL;
  __pyx_pybuffernd_oldIndex.rcbuffer = &__pyx_pybuffer_oldIndex;
  __pyx_pybuffer_newIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_newIndex.refcount = 0;
  __pyx_pybuffernd_newIndex.data = NULL;
  __pyx_pybuffernd_newIndex.rcbuffer = &__pyx_pybuffer_newIndex;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_oldIndex, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_oldIndex.diminfo[0].strides = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oldIndex.diminfo[0].shape = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_newIndex, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_newIndex.diminfo[0].strides = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_newIndex.diminfo[0].shape = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":556
 *     cdef object prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_oldIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_oldLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":557
 * 
 *     oldLength = len(oldIndex)
 *     newLength = len(newIndex)             # <<<<<<<<<<<<<<
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":559
 *     newLength = len(newIndex)
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)             # <<<<<<<<<<<<<<
 *     fill_vec.fill(-1)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fill_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fill_vec.diminfo[0].strides = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fill_vec.diminfo[0].shape = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":560
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_fill_vec), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_23), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":562
 *     fill_vec.fill(-1)
 * 
 *     if oldLength == 0 or newLength == 0:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_12 = (__pyx_v_oldLength == 0);
  if (!__pyx_t_12) {
    __pyx_t_13 = (__pyx_v_newLength == 0);
    __pyx_t_14 = __pyx_t_13;
  } else {
    __pyx_t_14 = __pyx_t_12;
  }
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":563
 * 
 *     if oldLength == 0 or newLength == 0:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     oldPos = oldLength - 1
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":565
 *         return fill_vec
 * 
 *     oldPos = oldLength - 1             # <<<<<<<<<<<<<<
 *     newPos = newLength - 1
 * 
 */
  __pyx_v_oldPos = (__pyx_v_oldLength - 1);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":566
 * 
 *     oldPos = oldLength - 1
 *     newPos = newLength - 1             # <<<<<<<<<<<<<<
 * 
 *     if newIndex[0] > oldIndex[oldLength - 1]:
 */
  __pyx_v_newPos = (__pyx_v_newLength - 1);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":568
 *     newPos = newLength - 1
 * 
 *     if newIndex[0] > oldIndex[oldLength - 1]:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_15 = 0;
  __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_newIndex.diminfo[0].strides);
  __Pyx_INCREF((PyObject*)__pyx_t_2);
  __pyx_t_1 = (__pyx_v_oldLength - 1);
  __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_oldIndex.diminfo[0].strides);
  __Pyx_INCREF((PyObject*)__pyx_t_6);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_GT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":569
 * 
 *     if newIndex[0] > oldIndex[oldLength - 1]:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     while newPos >= 0:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":571
 *         return fill_vec
 * 
 *     while newPos >= 0:             # <<<<<<<<<<<<<<
 *         curOld = oldIndex[oldPos]
 * 
 */
  while (1) {
    __pyx_t_14 = (__pyx_v_newPos >= 0);
    if (!__pyx_t_14) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":572
 * 
 *     while newPos >= 0:
 *         curOld = oldIndex[oldPos]             # <<<<<<<<<<<<<<
 * 
 *         while newIndex[newPos] > curOld:
 */
    __pyx_t_16 = __pyx_v_oldPos;
    __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_oldIndex.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_4);
    __Pyx_XDECREF(__pyx_v_curOld);
    __pyx_v_curOld = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":574
 *         curOld = oldIndex[oldPos]
 * 
 *         while newIndex[newPos] > curOld:             # <<<<<<<<<<<<<<
 *             newPos -= 1
 *             if newPos < 0:
 */
    while (1) {
      __pyx_t_17 = __pyx_v_newPos;
      __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_newIndex.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_4);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_curOld, Py_GT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (!__pyx_t_14) break;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":575
 * 
 *         while newIndex[newPos] > curOld:
 *             newPos -= 1             # <<<<<<<<<<<<<<
 *             if newPos < 0:
 *                 break
 */
      __pyx_v_newPos = (__pyx_v_newPos - 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":576
 *         while newIndex[newPos] > curOld:
 *             newPos -= 1
 *             if newPos < 0:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_t_14 = (__pyx_v_newPos < 0);
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":577
 *             newPos -= 1
 *             if newPos < 0:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L8_break;
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
    __pyx_L8_break:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":579
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == 0:
 */
    __pyx_t_6 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_oldMap), __pyx_v_curOld); if (!__pyx_t_6) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_curLoc = __pyx_t_18;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":581
 *         curLoc = oldMap[curOld]
 * 
 *         if oldPos == 0:             # <<<<<<<<<<<<<<
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc
 */
    __pyx_t_14 = (__pyx_v_oldPos == 0);
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":582
 * 
 *         if oldPos == 0:
 *             if newIndex[newPos] <= curOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[:newPos + 1] = curLoc
 *             break
 */
      __pyx_t_18 = __pyx_v_newPos;
      __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_newIndex.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_6);
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_curOld, Py_LE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":583
 *         if oldPos == 0:
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_curLoc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_fill_vec), 0, (__pyx_v_newPos + 1), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":584
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             prevOld = oldIndex[oldPos - 1]
 */
      goto __pyx_L6_break;
      goto __pyx_L10;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":586
 *             break
 *         else:
 *             prevOld = oldIndex[oldPos - 1]             # <<<<<<<<<<<<<<
 * 
 *             while newIndex[newPos] > prevOld:
 */
      __pyx_t_19 = (__pyx_v_oldPos - 1);
      __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_oldIndex.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_4);
      __Pyx_XDECREF(__pyx_v_prevOld);
      __pyx_v_prevOld = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":588
 *             prevOld = oldIndex[oldPos - 1]
 * 
 *             while newIndex[newPos] > prevOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[newPos] = curLoc
 * 
 */
      while (1) {
        __pyx_t_20 = __pyx_v_newPos;
        __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_newIndex.diminfo[0].strides);
        __Pyx_INCREF((PyObject*)__pyx_t_4);
        __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_prevOld, Py_GT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (!__pyx_t_14) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":589
 * 
 *             while newIndex[newPos] > prevOld:
 *                 fill_vec[newPos] = curLoc             # <<<<<<<<<<<<<<
 * 
 *                 newPos -= 1
 */
        __pyx_t_21 = __pyx_v_newPos;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = __pyx_v_curLoc;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":591
 *                 fill_vec[newPos] = curLoc
 * 
 *                 newPos -= 1             # <<<<<<<<<<<<<<
 *                 if newPos < 0:
 *                     break
 */
        __pyx_v_newPos = (__pyx_v_newPos - 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":592
 * 
 *                 newPos -= 1
 *                 if newPos < 0:             # <<<<<<<<<<<<<<
 *                     break
 *         oldPos -= 1
 */
        __pyx_t_14 = (__pyx_v_newPos < 0);
        if (__pyx_t_14) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":593
 *                 newPos -= 1
 *                 if newPos < 0:
 *                     break             # <<<<<<<<<<<<<<
 *         oldPos -= 1
 * 
 */
          goto __pyx_L13_break;
          goto __pyx_L14;
        }
        __pyx_L14:;
      }
      __pyx_L13_break:;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":594
 *                 if newPos < 0:
 *                     break
 *         oldPos -= 1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
    __pyx_v_oldPos = (__pyx_v_oldPos - 1);
  }
  __pyx_L6_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":596
 *         oldPos -= 1
 * 
 *     return fill_vec             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_r = ((PyObject *)__pyx_v_fill_vec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XDECREF(__pyx_v_prevOld);
  __Pyx_XDECREF(__pyx_v_curOld);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_171backfill_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_171backfill_int32 = {__Pyx_NAMESTR("backfill_int32"), (PyCFunction)__pyx_pw_6pandas_8_tseries_171backfill_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_171backfill_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_oldIndex = 0;
  PyArrayObject *__pyx_v_newIndex = 0;
  PyObject *__pyx_v_oldMap = 0;
  CYTHON_UNUSED PyObject *__pyx_v_newMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("backfill_int32 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldIndex);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newIndex);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_int32", 1, 4, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldMap);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_int32", 1, 4, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newMap);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_int32", 1, 4, 4, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_int32") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
      __pyx_v_newIndex = ((PyArrayObject *)values[1]);
      __pyx_v_oldMap = ((PyObject*)values[2]);
      __pyx_v_newMap = ((PyObject*)values[3]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
    __pyx_v_newIndex = ((PyArrayObject *)values[1]);
    __pyx_v_oldMap = ((PyObject*)values[2]);
    __pyx_v_newMap = ((PyObject*)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("backfill_int32", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.backfill_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldIndex), __pyx_ptype_5numpy_ndarray, 1, "oldIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newIndex), __pyx_ptype_5numpy_ndarray, 1, "newIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), (&PyDict_Type), 1, "oldMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newMap), (&PyDict_Type), 1, "newMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_170backfill_int32(__pyx_self, __pyx_v_oldIndex, __pyx_v_newIndex, __pyx_v_oldMap, __pyx_v_newMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":600
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_int32(ndarray[int32_t] oldIndex,             # <<<<<<<<<<<<<<
 *                       ndarray[int32_t] newIndex,
 *                       dict oldMap, dict newMap):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_170backfill_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap) {
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec = 0;
  Py_ssize_t __pyx_v_newPos;
  Py_ssize_t __pyx_v_oldPos;
  __pyx_t_5numpy_int32_t __pyx_v_prevOld;
  __pyx_t_5numpy_int32_t __pyx_v_curOld;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_oldIndex;
  __Pyx_Buffer __pyx_pybuffer_oldIndex;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fill_vec;
  __Pyx_Buffer __pyx_pybuffer_fill_vec;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_newIndex;
  __Pyx_Buffer __pyx_pybuffer_newIndex;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  long __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("backfill_int32");
  __pyx_pybuffer_fill_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_fill_vec.refcount = 0;
  __pyx_pybuffernd_fill_vec.data = NULL;
  __pyx_pybuffernd_fill_vec.rcbuffer = &__pyx_pybuffer_fill_vec;
  __pyx_pybuffer_oldIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_oldIndex.refcount = 0;
  __pyx_pybuffernd_oldIndex.data = NULL;
  __pyx_pybuffernd_oldIndex.rcbuffer = &__pyx_pybuffer_oldIndex;
  __pyx_pybuffer_newIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_newIndex.refcount = 0;
  __pyx_pybuffernd_newIndex.data = NULL;
  __pyx_pybuffernd_newIndex.rcbuffer = &__pyx_pybuffer_newIndex;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_oldIndex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_oldIndex.diminfo[0].strides = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oldIndex.diminfo[0].shape = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_newIndex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_newIndex.diminfo[0].strides = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_newIndex.diminfo[0].shape = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":608
 *     cdef int32_t prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_oldIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_oldLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":609
 * 
 *     oldLength = len(oldIndex)
 *     newLength = len(newIndex)             # <<<<<<<<<<<<<<
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":611
 *     newLength = len(newIndex)
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)             # <<<<<<<<<<<<<<
 *     fill_vec.fill(-1)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fill_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fill_vec.diminfo[0].strides = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fill_vec.diminfo[0].shape = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":612
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_fill_vec), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_24), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":614
 *     fill_vec.fill(-1)
 * 
 *     if oldLength == 0 or newLength == 0:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_12 = (__pyx_v_oldLength == 0);
  if (!__pyx_t_12) {
    __pyx_t_13 = (__pyx_v_newLength == 0);
    __pyx_t_14 = __pyx_t_13;
  } else {
    __pyx_t_14 = __pyx_t_12;
  }
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":615
 * 
 *     if oldLength == 0 or newLength == 0:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     oldPos = oldLength - 1
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":617
 *         return fill_vec
 * 
 *     oldPos = oldLength - 1             # <<<<<<<<<<<<<<
 *     newPos = newLength - 1
 * 
 */
  __pyx_v_oldPos = (__pyx_v_oldLength - 1);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":618
 * 
 *     oldPos = oldLength - 1
 *     newPos = newLength - 1             # <<<<<<<<<<<<<<
 * 
 *     if newIndex[0] > oldIndex[oldLength - 1]:
 */
  __pyx_v_newPos = (__pyx_v_newLength - 1);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":620
 *     newPos = newLength - 1
 * 
 *     if newIndex[0] > oldIndex[oldLength - 1]:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_15 = 0;
  __pyx_t_1 = (__pyx_v_oldLength - 1);
  __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_newIndex.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_oldIndex.diminfo[0].strides)));
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":621
 * 
 *     if newIndex[0] > oldIndex[oldLength - 1]:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     while newPos >= 0:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":623
 *         return fill_vec
 * 
 *     while newPos >= 0:             # <<<<<<<<<<<<<<
 *         curOld = oldIndex[oldPos]
 * 
 */
  while (1) {
    __pyx_t_14 = (__pyx_v_newPos >= 0);
    if (!__pyx_t_14) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":624
 * 
 *     while newPos >= 0:
 *         curOld = oldIndex[oldPos]             # <<<<<<<<<<<<<<
 * 
 *         while newIndex[newPos] > curOld:
 */
    __pyx_t_16 = __pyx_v_oldPos;
    __pyx_v_curOld = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_oldIndex.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":626
 *         curOld = oldIndex[oldPos]
 * 
 *         while newIndex[newPos] > curOld:             # <<<<<<<<<<<<<<
 *             newPos -= 1
 *             if newPos < 0:
 */
    while (1) {
      __pyx_t_17 = __pyx_v_newPos;
      __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_newIndex.diminfo[0].strides)) > __pyx_v_curOld);
      if (!__pyx_t_14) break;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":627
 * 
 *         while newIndex[newPos] > curOld:
 *             newPos -= 1             # <<<<<<<<<<<<<<
 *             if newPos < 0:
 *                 break
 */
      __pyx_v_newPos = (__pyx_v_newPos - 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":628
 *         while newIndex[newPos] > curOld:
 *             newPos -= 1
 *             if newPos < 0:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_t_14 = (__pyx_v_newPos < 0);
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":629
 *             newPos -= 1
 *             if newPos < 0:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L8_break;
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
    __pyx_L8_break:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":631
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == 0:
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_oldMap), __pyx_v_curOld, sizeof(__pyx_t_5numpy_int32_t), __Pyx_PyInt_to_py_npy_int32); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_curLoc = __pyx_t_18;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":633
 *         curLoc = oldMap[curOld]
 * 
 *         if oldPos == 0:             # <<<<<<<<<<<<<<
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc
 */
    __pyx_t_14 = (__pyx_v_oldPos == 0);
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":634
 * 
 *         if oldPos == 0:
 *             if newIndex[newPos] <= curOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[:newPos + 1] = curLoc
 *             break
 */
      __pyx_t_18 = __pyx_v_newPos;
      __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_newIndex.diminfo[0].strides)) <= __pyx_v_curOld);
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":635
 *         if oldPos == 0:
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_curLoc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_fill_vec), 0, (__pyx_v_newPos + 1), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":636
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             prevOld = oldIndex[oldPos - 1]
 */
      goto __pyx_L6_break;
      goto __pyx_L10;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":638
 *             break
 *         else:
 *             prevOld = oldIndex[oldPos - 1]             # <<<<<<<<<<<<<<
 * 
 *             while newIndex[newPos] > prevOld:
 */
      __pyx_t_19 = (__pyx_v_oldPos - 1);
      __pyx_v_prevOld = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_oldIndex.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":640
 *             prevOld = oldIndex[oldPos - 1]
 * 
 *             while newIndex[newPos] > prevOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[newPos] = curLoc
 * 
 */
      while (1) {
        __pyx_t_20 = __pyx_v_newPos;
        __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_newIndex.diminfo[0].strides)) > __pyx_v_prevOld);
        if (!__pyx_t_14) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":641
 * 
 *             while newIndex[newPos] > prevOld:
 *                 fill_vec[newPos] = curLoc             # <<<<<<<<<<<<<<
 * 
 *                 newPos -= 1
 */
        __pyx_t_21 = __pyx_v_newPos;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = __pyx_v_curLoc;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":643
 *                 fill_vec[newPos] = curLoc
 * 
 *                 newPos -= 1             # <<<<<<<<<<<<<<
 *                 if newPos < 0:
 *                     break
 */
        __pyx_v_newPos = (__pyx_v_newPos - 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":644
 * 
 *                 newPos -= 1
 *                 if newPos < 0:             # <<<<<<<<<<<<<<
 *                     break
 *         oldPos -= 1
 */
        __pyx_t_14 = (__pyx_v_newPos < 0);
        if (__pyx_t_14) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":645
 *                 newPos -= 1
 *                 if newPos < 0:
 *                     break             # <<<<<<<<<<<<<<
 *         oldPos -= 1
 * 
 */
          goto __pyx_L13_break;
          goto __pyx_L14;
        }
        __pyx_L14:;
      }
      __pyx_L13_break:;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":646
 *                 if newPos < 0:
 *                     break
 *         oldPos -= 1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
    __pyx_v_oldPos = (__pyx_v_oldPos - 1);
  }
  __pyx_L6_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":648
 *         oldPos -= 1
 * 
 *     return fill_vec             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_r = ((PyObject *)__pyx_v_fill_vec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_173backfill_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_173backfill_int64 = {__Pyx_NAMESTR("backfill_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_173backfill_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_173backfill_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_oldIndex = 0;
  PyArrayObject *__pyx_v_newIndex = 0;
  PyObject *__pyx_v_oldMap = 0;
  CYTHON_UNUSED PyObject *__pyx_v_newMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("backfill_int64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldIndex);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newIndex);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_int64", 1, 4, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldMap);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_int64", 1, 4, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newMap);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_int64", 1, 4, 4, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_int64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
      __pyx_v_newIndex = ((PyArrayObject *)values[1]);
      __pyx_v_oldMap = ((PyObject*)values[2]);
      __pyx_v_newMap = ((PyObject*)values[3]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
    __pyx_v_newIndex = ((PyArrayObject *)values[1]);
    __pyx_v_oldMap = ((PyObject*)values[2]);
    __pyx_v_newMap = ((PyObject*)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("backfill_int64", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.backfill_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldIndex), __pyx_ptype_5numpy_ndarray, 1, "oldIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newIndex), __pyx_ptype_5numpy_ndarray, 1, "newIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 653; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), (&PyDict_Type), 1, "oldMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newMap), (&PyDict_Type), 1, "newMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_172backfill_int64(__pyx_self, __pyx_v_oldIndex, __pyx_v_newIndex, __pyx_v_oldMap, __pyx_v_newMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":652
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_int64(ndarray[int64_t] oldIndex,             # <<<<<<<<<<<<<<
 *                       ndarray[int64_t] newIndex,
 *                       dict oldMap, dict newMap):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_172backfill_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap) {
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec = 0;
  Py_ssize_t __pyx_v_newPos;
  Py_ssize_t __pyx_v_oldPos;
  __pyx_t_5numpy_int64_t __pyx_v_prevOld;
  __pyx_t_5numpy_int64_t __pyx_v_curOld;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_oldIndex;
  __Pyx_Buffer __pyx_pybuffer_oldIndex;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fill_vec;
  __Pyx_Buffer __pyx_pybuffer_fill_vec;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_newIndex;
  __Pyx_Buffer __pyx_pybuffer_newIndex;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  long __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("backfill_int64");
  __pyx_pybuffer_fill_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_fill_vec.refcount = 0;
  __pyx_pybuffernd_fill_vec.data = NULL;
  __pyx_pybuffernd_fill_vec.rcbuffer = &__pyx_pybuffer_fill_vec;
  __pyx_pybuffer_oldIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_oldIndex.refcount = 0;
  __pyx_pybuffernd_oldIndex.data = NULL;
  __pyx_pybuffernd_oldIndex.rcbuffer = &__pyx_pybuffer_oldIndex;
  __pyx_pybuffer_newIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_newIndex.refcount = 0;
  __pyx_pybuffernd_newIndex.data = NULL;
  __pyx_pybuffernd_newIndex.rcbuffer = &__pyx_pybuffer_newIndex;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_oldIndex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_oldIndex.diminfo[0].strides = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oldIndex.diminfo[0].shape = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_newIndex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_newIndex.diminfo[0].strides = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_newIndex.diminfo[0].shape = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":660
 *     cdef int64_t prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_oldIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_oldLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":661
 * 
 *     oldLength = len(oldIndex)
 *     newLength = len(newIndex)             # <<<<<<<<<<<<<<
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":663
 *     newLength = len(newIndex)
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)             # <<<<<<<<<<<<<<
 *     fill_vec.fill(-1)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fill_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fill_vec.diminfo[0].strides = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fill_vec.diminfo[0].shape = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":664
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_fill_vec), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":666
 *     fill_vec.fill(-1)
 * 
 *     if oldLength == 0 or newLength == 0:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_12 = (__pyx_v_oldLength == 0);
  if (!__pyx_t_12) {
    __pyx_t_13 = (__pyx_v_newLength == 0);
    __pyx_t_14 = __pyx_t_13;
  } else {
    __pyx_t_14 = __pyx_t_12;
  }
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":667
 * 
 *     if oldLength == 0 or newLength == 0:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     oldPos = oldLength - 1
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":669
 *         return fill_vec
 * 
 *     oldPos = oldLength - 1             # <<<<<<<<<<<<<<
 *     newPos = newLength - 1
 * 
 */
  __pyx_v_oldPos = (__pyx_v_oldLength - 1);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":670
 * 
 *     oldPos = oldLength - 1
 *     newPos = newLength - 1             # <<<<<<<<<<<<<<
 * 
 *     if newIndex[0] > oldIndex[oldLength - 1]:
 */
  __pyx_v_newPos = (__pyx_v_newLength - 1);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":672
 *     newPos = newLength - 1
 * 
 *     if newIndex[0] > oldIndex[oldLength - 1]:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_15 = 0;
  __pyx_t_1 = (__pyx_v_oldLength - 1);
  __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_newIndex.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_oldIndex.diminfo[0].strides)));
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":673
 * 
 *     if newIndex[0] > oldIndex[oldLength - 1]:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     while newPos >= 0:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":675
 *         return fill_vec
 * 
 *     while newPos >= 0:             # <<<<<<<<<<<<<<
 *         curOld = oldIndex[oldPos]
 * 
 */
  while (1) {
    __pyx_t_14 = (__pyx_v_newPos >= 0);
    if (!__pyx_t_14) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":676
 * 
 *     while newPos >= 0:
 *         curOld = oldIndex[oldPos]             # <<<<<<<<<<<<<<
 * 
 *         while newIndex[newPos] > curOld:
 */
    __pyx_t_16 = __pyx_v_oldPos;
    __pyx_v_curOld = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_oldIndex.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":678
 *         curOld = oldIndex[oldPos]
 * 
 *         while newIndex[newPos] > curOld:             # <<<<<<<<<<<<<<
 *             newPos -= 1
 *             if newPos < 0:
 */
    while (1) {
      __pyx_t_17 = __pyx_v_newPos;
      __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_newIndex.diminfo[0].strides)) > __pyx_v_curOld);
      if (!__pyx_t_14) break;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":679
 * 
 *         while newIndex[newPos] > curOld:
 *             newPos -= 1             # <<<<<<<<<<<<<<
 *             if newPos < 0:
 *                 break
 */
      __pyx_v_newPos = (__pyx_v_newPos - 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":680
 *         while newIndex[newPos] > curOld:
 *             newPos -= 1
 *             if newPos < 0:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_t_14 = (__pyx_v_newPos < 0);
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":681
 *             newPos -= 1
 *             if newPos < 0:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L8_break;
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
    __pyx_L8_break:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":683
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == 0:
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_oldMap), __pyx_v_curOld, sizeof(__pyx_t_5numpy_int64_t), __Pyx_PyInt_to_py_npy_int64); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_curLoc = __pyx_t_18;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":685
 *         curLoc = oldMap[curOld]
 * 
 *         if oldPos == 0:             # <<<<<<<<<<<<<<
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc
 */
    __pyx_t_14 = (__pyx_v_oldPos == 0);
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":686
 * 
 *         if oldPos == 0:
 *             if newIndex[newPos] <= curOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[:newPos + 1] = curLoc
 *             break
 */
      __pyx_t_18 = __pyx_v_newPos;
      __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_newIndex.diminfo[0].strides)) <= __pyx_v_curOld);
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":687
 *         if oldPos == 0:
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_curLoc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_fill_vec), 0, (__pyx_v_newPos + 1), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":688
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             prevOld = oldIndex[oldPos - 1]
 */
      goto __pyx_L6_break;
      goto __pyx_L10;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":690
 *             break
 *         else:
 *             prevOld = oldIndex[oldPos - 1]             # <<<<<<<<<<<<<<
 * 
 *             while newIndex[newPos] > prevOld:
 */
      __pyx_t_19 = (__pyx_v_oldPos - 1);
      __pyx_v_prevOld = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_oldIndex.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":692
 *             prevOld = oldIndex[oldPos - 1]
 * 
 *             while newIndex[newPos] > prevOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[newPos] = curLoc
 * 
 */
      while (1) {
        __pyx_t_20 = __pyx_v_newPos;
        __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_newIndex.diminfo[0].strides)) > __pyx_v_prevOld);
        if (!__pyx_t_14) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":693
 * 
 *             while newIndex[newPos] > prevOld:
 *                 fill_vec[newPos] = curLoc             # <<<<<<<<<<<<<<
 * 
 *                 newPos -= 1
 */
        __pyx_t_21 = __pyx_v_newPos;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = __pyx_v_curLoc;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":695
 *                 fill_vec[newPos] = curLoc
 * 
 *                 newPos -= 1             # <<<<<<<<<<<<<<
 *                 if newPos < 0:
 *                     break
 */
        __pyx_v_newPos = (__pyx_v_newPos - 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":696
 * 
 *                 newPos -= 1
 *                 if newPos < 0:             # <<<<<<<<<<<<<<
 *                     break
 *         oldPos -= 1
 */
        __pyx_t_14 = (__pyx_v_newPos < 0);
        if (__pyx_t_14) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":697
 *                 newPos -= 1
 *                 if newPos < 0:
 *                     break             # <<<<<<<<<<<<<<
 *         oldPos -= 1
 * 
 */
          goto __pyx_L13_break;
          goto __pyx_L14;
        }
        __pyx_L14:;
      }
      __pyx_L13_break:;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":698
 *                 if newPos < 0:
 *                     break
 *         oldPos -= 1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
    __pyx_v_oldPos = (__pyx_v_oldPos - 1);
  }
  __pyx_L6_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":700
 *         oldPos -= 1
 * 
 *     return fill_vec             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_r = ((PyObject *)__pyx_v_fill_vec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_175backfill_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_175backfill_bool = {__Pyx_NAMESTR("backfill_bool"), (PyCFunction)__pyx_pw_6pandas_8_tseries_175backfill_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_175backfill_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_oldIndex = 0;
  PyArrayObject *__pyx_v_newIndex = 0;
  PyObject *__pyx_v_oldMap = 0;
  CYTHON_UNUSED PyObject *__pyx_v_newMap = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__oldIndex,&__pyx_n_s__newIndex,&__pyx_n_s__oldMap,&__pyx_n_s__newMap,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("backfill_bool (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldIndex);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newIndex);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_bool", 1, 4, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__oldMap);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_bool", 1, 4, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__newMap);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_bool", 1, 4, 4, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_bool") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
      __pyx_v_newIndex = ((PyArrayObject *)values[1]);
      __pyx_v_oldMap = ((PyObject*)values[2]);
      __pyx_v_newMap = ((PyObject*)values[3]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_oldIndex = ((PyArrayObject *)values[0]);
    __pyx_v_newIndex = ((PyArrayObject *)values[1]);
    __pyx_v_oldMap = ((PyObject*)values[2]);
    __pyx_v_newMap = ((PyObject*)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("backfill_bool", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.backfill_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldIndex), __pyx_ptype_5numpy_ndarray, 1, "oldIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newIndex), __pyx_ptype_5numpy_ndarray, 1, "newIndex", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_oldMap), (&PyDict_Type), 1, "oldMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_newMap), (&PyDict_Type), 1, "newMap", 1))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_174backfill_bool(__pyx_self, __pyx_v_oldIndex, __pyx_v_newIndex, __pyx_v_oldMap, __pyx_v_newMap);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":704
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_bool(ndarray[uint8_t] oldIndex,             # <<<<<<<<<<<<<<
 *                       ndarray[uint8_t] newIndex,
 *                       dict oldMap, dict newMap):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_174backfill_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_oldIndex, PyArrayObject *__pyx_v_newIndex, PyObject *__pyx_v_oldMap, CYTHON_UNUSED PyObject *__pyx_v_newMap) {
  Py_ssize_t __pyx_v_oldLength;
  Py_ssize_t __pyx_v_newLength;
  Py_ssize_t __pyx_v_curLoc;
  PyArrayObject *__pyx_v_fill_vec = 0;
  Py_ssize_t __pyx_v_newPos;
  Py_ssize_t __pyx_v_oldPos;
  __pyx_t_5numpy_uint8_t __pyx_v_prevOld;
  __pyx_t_5numpy_uint8_t __pyx_v_curOld;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_oldIndex;
  __Pyx_Buffer __pyx_pybuffer_oldIndex;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_fill_vec;
  __Pyx_Buffer __pyx_pybuffer_fill_vec;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_newIndex;
  __Pyx_Buffer __pyx_pybuffer_newIndex;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  long __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("backfill_bool");
  __pyx_pybuffer_fill_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_fill_vec.refcount = 0;
  __pyx_pybuffernd_fill_vec.data = NULL;
  __pyx_pybuffernd_fill_vec.rcbuffer = &__pyx_pybuffer_fill_vec;
  __pyx_pybuffer_oldIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_oldIndex.refcount = 0;
  __pyx_pybuffernd_oldIndex.data = NULL;
  __pyx_pybuffernd_oldIndex.rcbuffer = &__pyx_pybuffer_oldIndex;
  __pyx_pybuffer_newIndex.pybuffer.buf = NULL;
  __pyx_pybuffer_newIndex.refcount = 0;
  __pyx_pybuffernd_newIndex.data = NULL;
  __pyx_pybuffernd_newIndex.rcbuffer = &__pyx_pybuffer_newIndex;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_oldIndex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_oldIndex.diminfo[0].strides = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_oldIndex.diminfo[0].shape = __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer, (PyObject*)__pyx_v_newIndex, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_newIndex.diminfo[0].strides = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_newIndex.diminfo[0].shape = __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":712
 *     cdef uint8_t prevOld, curOld
 * 
 *     oldLength = len(oldIndex)             # <<<<<<<<<<<<<<
 *     newLength = len(newIndex)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_oldIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_oldLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":713
 * 
 *     oldLength = len(oldIndex)
 *     newLength = len(newIndex)             # <<<<<<<<<<<<<<
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_newLength = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":715
 *     newLength = len(newIndex)
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)             # <<<<<<<<<<<<<<
 *     fill_vec.fill(-1)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_newIndex)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer, (PyObject*)__pyx_v_fill_vec, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_fill_vec.diminfo[0].strides = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_fill_vec.diminfo[0].shape = __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_fill_vec = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":716
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_fill_vec), __pyx_n_s__fill); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":718
 *     fill_vec.fill(-1)
 * 
 *     if oldLength == 0 or newLength == 0:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_12 = (__pyx_v_oldLength == 0);
  if (!__pyx_t_12) {
    __pyx_t_13 = (__pyx_v_newLength == 0);
    __pyx_t_14 = __pyx_t_13;
  } else {
    __pyx_t_14 = __pyx_t_12;
  }
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":719
 * 
 *     if oldLength == 0 or newLength == 0:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     oldPos = oldLength - 1
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":721
 *         return fill_vec
 * 
 *     oldPos = oldLength - 1             # <<<<<<<<<<<<<<
 *     newPos = newLength - 1
 * 
 */
  __pyx_v_oldPos = (__pyx_v_oldLength - 1);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":722
 * 
 *     oldPos = oldLength - 1
 *     newPos = newLength - 1             # <<<<<<<<<<<<<<
 * 
 *     if newIndex[0] > oldIndex[oldLength - 1]:
 */
  __pyx_v_newPos = (__pyx_v_newLength - 1);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":724
 *     newPos = newLength - 1
 * 
 *     if newIndex[0] > oldIndex[oldLength - 1]:             # <<<<<<<<<<<<<<
 *         return fill_vec
 * 
 */
  __pyx_t_15 = 0;
  __pyx_t_1 = (__pyx_v_oldLength - 1);
  __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_newIndex.diminfo[0].strides)) > (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_oldIndex.diminfo[0].strides)));
  if (__pyx_t_14) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":725
 * 
 *     if newIndex[0] > oldIndex[oldLength - 1]:
 *         return fill_vec             # <<<<<<<<<<<<<<
 * 
 *     while newPos >= 0:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
    __pyx_r = ((PyObject *)__pyx_v_fill_vec);
    goto __pyx_L0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":727
 *         return fill_vec
 * 
 *     while newPos >= 0:             # <<<<<<<<<<<<<<
 *         curOld = oldIndex[oldPos]
 * 
 */
  while (1) {
    __pyx_t_14 = (__pyx_v_newPos >= 0);
    if (!__pyx_t_14) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":728
 * 
 *     while newPos >= 0:
 *         curOld = oldIndex[oldPos]             # <<<<<<<<<<<<<<
 * 
 *         while newIndex[newPos] > curOld:
 */
    __pyx_t_16 = __pyx_v_oldPos;
    __pyx_v_curOld = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_oldIndex.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":730
 *         curOld = oldIndex[oldPos]
 * 
 *         while newIndex[newPos] > curOld:             # <<<<<<<<<<<<<<
 *             newPos -= 1
 *             if newPos < 0:
 */
    while (1) {
      __pyx_t_17 = __pyx_v_newPos;
      __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_newIndex.diminfo[0].strides)) > __pyx_v_curOld);
      if (!__pyx_t_14) break;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":731
 * 
 *         while newIndex[newPos] > curOld:
 *             newPos -= 1             # <<<<<<<<<<<<<<
 *             if newPos < 0:
 *                 break
 */
      __pyx_v_newPos = (__pyx_v_newPos - 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":732
 *         while newIndex[newPos] > curOld:
 *             newPos -= 1
 *             if newPos < 0:             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_t_14 = (__pyx_v_newPos < 0);
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":733
 *             newPos -= 1
 *             if newPos < 0:
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         curLoc = oldMap[curOld]
 */
        goto __pyx_L8_break;
        goto __pyx_L9;
      }
      __pyx_L9:;
    }
    __pyx_L8_break:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":735
 *                 break
 * 
 *         curLoc = oldMap[curOld]             # <<<<<<<<<<<<<<
 * 
 *         if oldPos == 0:
 */
    __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_oldMap), __pyx_v_curOld, sizeof(__pyx_t_5numpy_uint8_t)+1, __Pyx_PyInt_to_py_npy_uint8); if (!__pyx_t_2) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_curLoc = __pyx_t_18;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":737
 *         curLoc = oldMap[curOld]
 * 
 *         if oldPos == 0:             # <<<<<<<<<<<<<<
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc
 */
    __pyx_t_14 = (__pyx_v_oldPos == 0);
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":738
 * 
 *         if oldPos == 0:
 *             if newIndex[newPos] <= curOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[:newPos + 1] = curLoc
 *             break
 */
      __pyx_t_18 = __pyx_v_newPos;
      __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_newIndex.diminfo[0].strides)) <= __pyx_v_curOld);
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":739
 *         if oldPos == 0:
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_curLoc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_PySequence_SetSlice(((PyObject *)__pyx_v_fill_vec), 0, (__pyx_v_newPos + 1), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":740
 *             if newIndex[newPos] <= curOld:
 *                 fill_vec[:newPos + 1] = curLoc
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             prevOld = oldIndex[oldPos - 1]
 */
      goto __pyx_L6_break;
      goto __pyx_L10;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":742
 *             break
 *         else:
 *             prevOld = oldIndex[oldPos - 1]             # <<<<<<<<<<<<<<
 * 
 *             while newIndex[newPos] > prevOld:
 */
      __pyx_t_19 = (__pyx_v_oldPos - 1);
      __pyx_v_prevOld = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_oldIndex.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_oldIndex.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":744
 *             prevOld = oldIndex[oldPos - 1]
 * 
 *             while newIndex[newPos] > prevOld:             # <<<<<<<<<<<<<<
 *                 fill_vec[newPos] = curLoc
 * 
 */
      while (1) {
        __pyx_t_20 = __pyx_v_newPos;
        __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_newIndex.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_newIndex.diminfo[0].strides)) > __pyx_v_prevOld);
        if (!__pyx_t_14) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":745
 * 
 *             while newIndex[newPos] > prevOld:
 *                 fill_vec[newPos] = curLoc             # <<<<<<<<<<<<<<
 * 
 *                 newPos -= 1
 */
        __pyx_t_21 = __pyx_v_newPos;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_fill_vec.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_fill_vec.diminfo[0].strides) = __pyx_v_curLoc;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":747
 *                 fill_vec[newPos] = curLoc
 * 
 *                 newPos -= 1             # <<<<<<<<<<<<<<
 *                 if newPos < 0:
 *                     break
 */
        __pyx_v_newPos = (__pyx_v_newPos - 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":748
 * 
 *                 newPos -= 1
 *                 if newPos < 0:             # <<<<<<<<<<<<<<
 *                     break
 *         oldPos -= 1
 */
        __pyx_t_14 = (__pyx_v_newPos < 0);
        if (__pyx_t_14) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":749
 *                 newPos -= 1
 *                 if newPos < 0:
 *                     break             # <<<<<<<<<<<<<<
 *         oldPos -= 1
 * 
 */
          goto __pyx_L13_break;
          goto __pyx_L14;
        }
        __pyx_L14:;
      }
      __pyx_L13_break:;
    }
    __pyx_L10:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":750
 *                 if newPos < 0:
 *                     break
 *         oldPos -= 1             # <<<<<<<<<<<<<<
 * 
 *     return fill_vec
 */
    __pyx_v_oldPos = (__pyx_v_oldPos - 1);
  }
  __pyx_L6_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":752
 *         oldPos -= 1
 * 
 *     return fill_vec             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_fill_vec));
  __pyx_r = ((PyObject *)__pyx_v_fill_vec);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_oldIndex.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_fill_vec.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_newIndex.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_fill_vec);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_177pad_2d_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_177pad_2d_inplace_float64 = {__Pyx_NAMESTR("pad_2d_inplace_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_177pad_2d_inplace_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_177pad_2d_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pad_2d_inplace_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_float64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_mask = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_mask = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.pad_2d_inplace_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_176pad_2d_inplace_float64(__pyx_self, __pyx_v_values, __pyx_v_mask);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":757
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_2d_inplace_float64(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                             ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */

static PyObject *__pyx_pf_6pandas_8_tseries_176pad_2d_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  Py_ssize_t __pyx_v_K;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  __pyx_t_5numpy_float64_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  long __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  __pyx_t_5numpy_uint8_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pad_2d_inplace_float64");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":762
 *     cdef float64_t val
 * 
 *     K, N = (<object> values).shape             # <<<<<<<<<<<<<<
 * 
 *     val = np.nan
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[8]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_K = __pyx_t_6;
  __pyx_v_N = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":764
 *     K, N = (<object> values).shape
 * 
 *     val = np.nan             # <<<<<<<<<<<<<<
 * 
 *     for j in range(K):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_8 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_val = __pyx_t_8;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":766
 *     val = np.nan
 * 
 *     for j in range(K):             # <<<<<<<<<<<<<<
 *         val = values[j, 0]
 *         for i in range(N):
 */
  __pyx_t_7 = __pyx_v_K;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) {
    __pyx_v_j = __pyx_t_6;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":767
 * 
 *     for j in range(K):
 *         val = values[j, 0]             # <<<<<<<<<<<<<<
 *         for i in range(N):
 *             if mask[j, i]:
 */
    __pyx_t_9 = __pyx_v_j;
    __pyx_t_10 = 0;
    __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_values.diminfo[1].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":768
 *     for j in range(K):
 *         val = values[j, 0]
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             if mask[j, i]:
 *                 values[j, i] = val
 */
    __pyx_t_11 = __pyx_v_N;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_v_i = __pyx_t_12;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":769
 *         val = values[j, 0]
 *         for i in range(N):
 *             if mask[j, i]:             # <<<<<<<<<<<<<<
 *                 values[j, i] = val
 *             else:
 */
      __pyx_t_13 = __pyx_v_j;
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_15 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[1].strides));
      if (__pyx_t_15) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":770
 *         for i in range(N):
 *             if mask[j, i]:
 *                 values[j, i] = val             # <<<<<<<<<<<<<<
 *             else:
 *                 val = values[j, i]
 */
        __pyx_t_16 = __pyx_v_j;
        __pyx_t_17 = __pyx_v_i;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":772
 *                 values[j, i] = val
 *             else:
 *                 val = values[j, i]             # <<<<<<<<<<<<<<
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 */
        __pyx_t_18 = __pyx_v_j;
        __pyx_t_19 = __pyx_v_i;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides));
      }
      __pyx_L9:;
    }
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_2d_inplace_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_179pad_2d_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_179pad_2d_inplace_object = {__Pyx_NAMESTR("pad_2d_inplace_object"), (PyCFunction)__pyx_pw_6pandas_8_tseries_179pad_2d_inplace_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_179pad_2d_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pad_2d_inplace_object (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_object") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_mask = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_mask = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.pad_2d_inplace_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_178pad_2d_inplace_object(__pyx_self, __pyx_v_values, __pyx_v_mask);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":775
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_2d_inplace_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
 *                             ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */

static PyObject *__pyx_pf_6pandas_8_tseries_178pad_2d_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  Py_ssize_t __pyx_v_K;
  PyObject *__pyx_v_val = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  long __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  __pyx_t_5numpy_uint8_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  PyObject **__pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pad_2d_inplace_object");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":780
 *     cdef object val
 * 
 *     K, N = (<object> values).shape             # <<<<<<<<<<<<<<
 * 
 *     val = np.nan
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_K = __pyx_t_6;
  __pyx_v_N = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":782
 *     K, N = (<object> values).shape
 * 
 *     val = np.nan             # <<<<<<<<<<<<<<
 * 
 *     for j in range(K):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_val = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":784
 *     val = np.nan
 * 
 *     for j in range(K):             # <<<<<<<<<<<<<<
 *         val = values[j, 0]
 *         for i in range(N):
 */
  __pyx_t_7 = __pyx_v_K;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) {
    __pyx_v_j = __pyx_t_6;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":785
 * 
 *     for j in range(K):
 *         val = values[j, 0]             # <<<<<<<<<<<<<<
 *         for i in range(N):
 *             if mask[j, i]:
 */
    __pyx_t_8 = __pyx_v_j;
    __pyx_t_9 = 0;
    __pyx_t_3 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":786
 *     for j in range(K):
 *         val = values[j, 0]
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             if mask[j, i]:
 *                 values[j, i] = val
 */
    __pyx_t_10 = __pyx_v_N;
    for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":787
 *         val = values[j, 0]
 *         for i in range(N):
 *             if mask[j, i]:             # <<<<<<<<<<<<<<
 *                 values[j, i] = val
 *             else:
 */
      __pyx_t_12 = __pyx_v_j;
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_mask.diminfo[1].strides));
      if (__pyx_t_14) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":788
 *         for i in range(N):
 *             if mask[j, i]:
 *                 values[j, i] = val             # <<<<<<<<<<<<<<
 *             else:
 *                 val = values[j, i]
 */
        __pyx_t_15 = __pyx_v_j;
        __pyx_t_16 = __pyx_v_i;
        __pyx_t_17 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides);
        __Pyx_GOTREF(*__pyx_t_17);
        __Pyx_DECREF(*__pyx_t_17); __Pyx_INCREF(__pyx_v_val);
        *__pyx_t_17 = __pyx_v_val;
        __Pyx_GIVEREF(*__pyx_t_17);
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":790
 *                 values[j, i] = val
 *             else:
 *                 val = values[j, i]             # <<<<<<<<<<<<<<
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 */
        __pyx_t_18 = __pyx_v_j;
        __pyx_t_19 = __pyx_v_i;
        __pyx_t_3 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides);
        __Pyx_INCREF((PyObject*)__pyx_t_3);
        __Pyx_DECREF(__pyx_v_val);
        __pyx_v_val = __pyx_t_3;
        __pyx_t_3 = 0;
      }
      __pyx_L9:;
    }
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_2d_inplace_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_181pad_2d_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_181pad_2d_inplace_int32 = {__Pyx_NAMESTR("pad_2d_inplace_int32"), (PyCFunction)__pyx_pw_6pandas_8_tseries_181pad_2d_inplace_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_181pad_2d_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pad_2d_inplace_int32 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_int32") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_mask = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_mask = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.pad_2d_inplace_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_180pad_2d_inplace_int32(__pyx_self, __pyx_v_values, __pyx_v_mask);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":793
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_2d_inplace_int32(ndarray[int32_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                             ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */

static PyObject *__pyx_pf_6pandas_8_tseries_180pad_2d_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  Py_ssize_t __pyx_v_K;
  __pyx_t_5numpy_int32_t __pyx_v_val;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  __pyx_t_5numpy_int32_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  long __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  __pyx_t_5numpy_uint8_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pad_2d_inplace_int32");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":798
 *     cdef int32_t val
 * 
 *     K, N = (<object> values).shape             # <<<<<<<<<<<<<<
 * 
 *     val = np.nan
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[8]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_K = __pyx_t_6;
  __pyx_v_N = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":800
 *     K, N = (<object> values).shape
 * 
 *     val = np.nan             # <<<<<<<<<<<<<<
 * 
 *     for j in range(K):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __Pyx_PyInt_from_py_npy_int32(__pyx_t_3); if (unlikely((__pyx_t_8 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_val = __pyx_t_8;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":802
 *     val = np.nan
 * 
 *     for j in range(K):             # <<<<<<<<<<<<<<
 *         val = values[j, 0]
 *         for i in range(N):
 */
  __pyx_t_7 = __pyx_v_K;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) {
    __pyx_v_j = __pyx_t_6;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":803
 * 
 *     for j in range(K):
 *         val = values[j, 0]             # <<<<<<<<<<<<<<
 *         for i in range(N):
 *             if mask[j, i]:
 */
    __pyx_t_9 = __pyx_v_j;
    __pyx_t_10 = 0;
    __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_values.diminfo[1].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":804
 *     for j in range(K):
 *         val = values[j, 0]
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             if mask[j, i]:
 *                 values[j, i] = val
 */
    __pyx_t_11 = __pyx_v_N;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_v_i = __pyx_t_12;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":805
 *         val = values[j, 0]
 *         for i in range(N):
 *             if mask[j, i]:             # <<<<<<<<<<<<<<
 *                 values[j, i] = val
 *             else:
 */
      __pyx_t_13 = __pyx_v_j;
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_15 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[1].strides));
      if (__pyx_t_15) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":806
 *         for i in range(N):
 *             if mask[j, i]:
 *                 values[j, i] = val             # <<<<<<<<<<<<<<
 *             else:
 *                 val = values[j, i]
 */
        __pyx_t_16 = __pyx_v_j;
        __pyx_t_17 = __pyx_v_i;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":808
 *                 values[j, i] = val
 *             else:
 *                 val = values[j, i]             # <<<<<<<<<<<<<<
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 */
        __pyx_t_18 = __pyx_v_j;
        __pyx_t_19 = __pyx_v_i;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides));
      }
      __pyx_L9:;
    }
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_2d_inplace_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_183pad_2d_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_183pad_2d_inplace_int64 = {__Pyx_NAMESTR("pad_2d_inplace_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_183pad_2d_inplace_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_183pad_2d_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pad_2d_inplace_int64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_int64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_mask = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_mask = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.pad_2d_inplace_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_182pad_2d_inplace_int64(__pyx_self, __pyx_v_values, __pyx_v_mask);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":811
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_2d_inplace_int64(ndarray[int64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                             ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */

static PyObject *__pyx_pf_6pandas_8_tseries_182pad_2d_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  Py_ssize_t __pyx_v_K;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  __pyx_t_5numpy_int64_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  long __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  __pyx_t_5numpy_uint8_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pad_2d_inplace_int64");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":816
 *     cdef int64_t val
 * 
 *     K, N = (<object> values).shape             # <<<<<<<<<<<<<<
 * 
 *     val = np.nan
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[8]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_K = __pyx_t_6;
  __pyx_v_N = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":818
 *     K, N = (<object> values).shape
 * 
 *     val = np.nan             # <<<<<<<<<<<<<<
 * 
 *     for j in range(K):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __Pyx_PyInt_from_py_npy_int64(__pyx_t_3); if (unlikely((__pyx_t_8 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_val = __pyx_t_8;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":820
 *     val = np.nan
 * 
 *     for j in range(K):             # <<<<<<<<<<<<<<
 *         val = values[j, 0]
 *         for i in range(N):
 */
  __pyx_t_7 = __pyx_v_K;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) {
    __pyx_v_j = __pyx_t_6;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":821
 * 
 *     for j in range(K):
 *         val = values[j, 0]             # <<<<<<<<<<<<<<
 *         for i in range(N):
 *             if mask[j, i]:
 */
    __pyx_t_9 = __pyx_v_j;
    __pyx_t_10 = 0;
    __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_values.diminfo[1].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":822
 *     for j in range(K):
 *         val = values[j, 0]
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             if mask[j, i]:
 *                 values[j, i] = val
 */
    __pyx_t_11 = __pyx_v_N;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_v_i = __pyx_t_12;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":823
 *         val = values[j, 0]
 *         for i in range(N):
 *             if mask[j, i]:             # <<<<<<<<<<<<<<
 *                 values[j, i] = val
 *             else:
 */
      __pyx_t_13 = __pyx_v_j;
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_15 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[1].strides));
      if (__pyx_t_15) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":824
 *         for i in range(N):
 *             if mask[j, i]:
 *                 values[j, i] = val             # <<<<<<<<<<<<<<
 *             else:
 *                 val = values[j, i]
 */
        __pyx_t_16 = __pyx_v_j;
        __pyx_t_17 = __pyx_v_i;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":826
 *                 values[j, i] = val
 *             else:
 *                 val = values[j, i]             # <<<<<<<<<<<<<<
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 */
        __pyx_t_18 = __pyx_v_j;
        __pyx_t_19 = __pyx_v_i;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides));
      }
      __pyx_L9:;
    }
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_2d_inplace_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_185pad_2d_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_185pad_2d_inplace_bool = {__Pyx_NAMESTR("pad_2d_inplace_bool"), (PyCFunction)__pyx_pw_6pandas_8_tseries_185pad_2d_inplace_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_185pad_2d_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pad_2d_inplace_bool (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_bool", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pad_2d_inplace_bool") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_mask = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_mask = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("pad_2d_inplace_bool", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.pad_2d_inplace_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_184pad_2d_inplace_bool(__pyx_self, __pyx_v_values, __pyx_v_mask);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":829
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_2d_inplace_bool(ndarray[uint8_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                             ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */

static PyObject *__pyx_pf_6pandas_8_tseries_184pad_2d_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  Py_ssize_t __pyx_v_K;
  __pyx_t_5numpy_uint8_t __pyx_v_val;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  __pyx_t_5numpy_uint8_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  long __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pad_2d_inplace_bool");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":834
 *     cdef uint8_t val
 * 
 *     K, N = (<object> values).shape             # <<<<<<<<<<<<<<
 * 
 *     val = np.nan
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[8]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_K = __pyx_t_6;
  __pyx_v_N = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":836
 *     K, N = (<object> values).shape
 * 
 *     val = np.nan             # <<<<<<<<<<<<<<
 * 
 *     for j in range(K):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __Pyx_PyInt_from_py_npy_uint8(__pyx_t_3); if (unlikely((__pyx_t_8 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_val = __pyx_t_8;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":838
 *     val = np.nan
 * 
 *     for j in range(K):             # <<<<<<<<<<<<<<
 *         val = values[j, 0]
 *         for i in range(N):
 */
  __pyx_t_7 = __pyx_v_K;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) {
    __pyx_v_j = __pyx_t_6;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":839
 * 
 *     for j in range(K):
 *         val = values[j, 0]             # <<<<<<<<<<<<<<
 *         for i in range(N):
 *             if mask[j, i]:
 */
    __pyx_t_9 = __pyx_v_j;
    __pyx_t_10 = 0;
    __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_values.diminfo[1].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":840
 *     for j in range(K):
 *         val = values[j, 0]
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             if mask[j, i]:
 *                 values[j, i] = val
 */
    __pyx_t_11 = __pyx_v_N;
    for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
      __pyx_v_i = __pyx_t_12;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":841
 *         val = values[j, 0]
 *         for i in range(N):
 *             if mask[j, i]:             # <<<<<<<<<<<<<<
 *                 values[j, i] = val
 *             else:
 */
      __pyx_t_13 = __pyx_v_j;
      __pyx_t_14 = __pyx_v_i;
      __pyx_t_8 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_mask.diminfo[1].strides));
      if (__pyx_t_8) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":842
 *         for i in range(N):
 *             if mask[j, i]:
 *                 values[j, i] = val             # <<<<<<<<<<<<<<
 *             else:
 *                 val = values[j, i]
 */
        __pyx_t_15 = __pyx_v_j;
        __pyx_t_16 = __pyx_v_i;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":844
 *                 values[j, i] = val
 *             else:
 *                 val = values[j, i]             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
        __pyx_t_17 = __pyx_v_j;
        __pyx_t_18 = __pyx_v_i;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides));
      }
      __pyx_L9:;
    }
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.pad_2d_inplace_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_187backfill_2d_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_187backfill_2d_inplace_float64 = {__Pyx_NAMESTR("backfill_2d_inplace_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_187backfill_2d_inplace_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_187backfill_2d_inplace_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("backfill_2d_inplace_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_float64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_mask = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_mask = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.backfill_2d_inplace_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_186backfill_2d_inplace_float64(__pyx_self, __pyx_v_values, __pyx_v_mask);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":848
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_2d_inplace_float64(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                                  ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */

static PyObject *__pyx_pf_6pandas_8_tseries_186backfill_2d_inplace_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  Py_ssize_t __pyx_v_K;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  __pyx_t_5numpy_uint8_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("backfill_2d_inplace_float64");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":853
 *     cdef float64_t val
 * 
 *     K, N = (<object> values).shape             # <<<<<<<<<<<<<<
 * 
 *     for j in range(K):
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[8]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_K = __pyx_t_6;
  __pyx_v_N = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":855
 *     K, N = (<object> values).shape
 * 
 *     for j in range(K):             # <<<<<<<<<<<<<<
 *         val = values[j, N - 1]
 *         for i in range(N - 1, -1 , -1):
 */
  __pyx_t_7 = __pyx_v_K;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) {
    __pyx_v_j = __pyx_t_6;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":856
 * 
 *     for j in range(K):
 *         val = values[j, N - 1]             # <<<<<<<<<<<<<<
 *         for i in range(N - 1, -1 , -1):
 *             if mask[j, i]:
 */
    __pyx_t_8 = __pyx_v_j;
    __pyx_t_9 = (__pyx_v_N - 1);
    __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":857
 *     for j in range(K):
 *         val = values[j, N - 1]
 *         for i in range(N - 1, -1 , -1):             # <<<<<<<<<<<<<<
 *             if mask[j, i]:
 *                 values[j, i] = val
 */
    for (__pyx_t_10 = (__pyx_v_N - 1); __pyx_t_10 > -1; __pyx_t_10-=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":858
 *         val = values[j, N - 1]
 *         for i in range(N - 1, -1 , -1):
 *             if mask[j, i]:             # <<<<<<<<<<<<<<
 *                 values[j, i] = val
 *             else:
 */
      __pyx_t_11 = __pyx_v_j;
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_13 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_mask.diminfo[1].strides));
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":859
 *         for i in range(N - 1, -1 , -1):
 *             if mask[j, i]:
 *                 values[j, i] = val             # <<<<<<<<<<<<<<
 *             else:
 *                 val = values[j, i]
 */
        __pyx_t_14 = __pyx_v_j;
        __pyx_t_15 = __pyx_v_i;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":861
 *                 values[j, i] = val
 *             else:
 *                 val = values[j, i]             # <<<<<<<<<<<<<<
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 */
        __pyx_t_16 = __pyx_v_j;
        __pyx_t_17 = __pyx_v_i;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides));
      }
      __pyx_L9:;
    }
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_2d_inplace_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_189backfill_2d_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_189backfill_2d_inplace_object = {__Pyx_NAMESTR("backfill_2d_inplace_object"), (PyCFunction)__pyx_pw_6pandas_8_tseries_189backfill_2d_inplace_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_189backfill_2d_inplace_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("backfill_2d_inplace_object (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_object") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_mask = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_mask = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.backfill_2d_inplace_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_188backfill_2d_inplace_object(__pyx_self, __pyx_v_values, __pyx_v_mask);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":864
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_2d_inplace_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
 *                                  ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */

static PyObject *__pyx_pf_6pandas_8_tseries_188backfill_2d_inplace_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  Py_ssize_t __pyx_v_K;
  PyObject *__pyx_v_val = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  __pyx_t_5numpy_uint8_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject **__pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("backfill_2d_inplace_object");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":869
 *     cdef object val
 * 
 *     K, N = (<object> values).shape             # <<<<<<<<<<<<<<
 * 
 *     for j in range(K):
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_K = __pyx_t_6;
  __pyx_v_N = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":871
 *     K, N = (<object> values).shape
 * 
 *     for j in range(K):             # <<<<<<<<<<<<<<
 *         val = values[j, N - 1]
 *         for i in range(N - 1, -1 , -1):
 */
  __pyx_t_7 = __pyx_v_K;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) {
    __pyx_v_j = __pyx_t_6;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":872
 * 
 *     for j in range(K):
 *         val = values[j, N - 1]             # <<<<<<<<<<<<<<
 *         for i in range(N - 1, -1 , -1):
 *             if mask[j, i]:
 */
    __pyx_t_8 = __pyx_v_j;
    __pyx_t_9 = (__pyx_v_N - 1);
    __pyx_t_1 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":873
 *     for j in range(K):
 *         val = values[j, N - 1]
 *         for i in range(N - 1, -1 , -1):             # <<<<<<<<<<<<<<
 *             if mask[j, i]:
 *                 values[j, i] = val
 */
    for (__pyx_t_10 = (__pyx_v_N - 1); __pyx_t_10 > -1; __pyx_t_10-=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":874
 *         val = values[j, N - 1]
 *         for i in range(N - 1, -1 , -1):
 *             if mask[j, i]:             # <<<<<<<<<<<<<<
 *                 values[j, i] = val
 *             else:
 */
      __pyx_t_11 = __pyx_v_j;
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_13 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_mask.diminfo[1].strides));
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":875
 *         for i in range(N - 1, -1 , -1):
 *             if mask[j, i]:
 *                 values[j, i] = val             # <<<<<<<<<<<<<<
 *             else:
 *                 val = values[j, i]
 */
        __pyx_t_14 = __pyx_v_j;
        __pyx_t_15 = __pyx_v_i;
        __pyx_t_16 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_values.diminfo[1].strides);
        __Pyx_GOTREF(*__pyx_t_16);
        __Pyx_DECREF(*__pyx_t_16); __Pyx_INCREF(__pyx_v_val);
        *__pyx_t_16 = __pyx_v_val;
        __Pyx_GIVEREF(*__pyx_t_16);
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":877
 *                 values[j, i] = val
 *             else:
 *                 val = values[j, i]             # <<<<<<<<<<<<<<
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 */
        __pyx_t_17 = __pyx_v_j;
        __pyx_t_18 = __pyx_v_i;
        __pyx_t_1 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides);
        __Pyx_INCREF((PyObject*)__pyx_t_1);
        __Pyx_DECREF(__pyx_v_val);
        __pyx_v_val = __pyx_t_1;
        __pyx_t_1 = 0;
      }
      __pyx_L9:;
    }
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_2d_inplace_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_191backfill_2d_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_191backfill_2d_inplace_int32 = {__Pyx_NAMESTR("backfill_2d_inplace_int32"), (PyCFunction)__pyx_pw_6pandas_8_tseries_191backfill_2d_inplace_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_191backfill_2d_inplace_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("backfill_2d_inplace_int32 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_int32") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_mask = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_mask = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.backfill_2d_inplace_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_190backfill_2d_inplace_int32(__pyx_self, __pyx_v_values, __pyx_v_mask);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":880
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_2d_inplace_int32(ndarray[int32_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                                  ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */

static PyObject *__pyx_pf_6pandas_8_tseries_190backfill_2d_inplace_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  Py_ssize_t __pyx_v_K;
  __pyx_t_5numpy_int32_t __pyx_v_val;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  __pyx_t_5numpy_uint8_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("backfill_2d_inplace_int32");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":885
 *     cdef int32_t val
 * 
 *     K, N = (<object> values).shape             # <<<<<<<<<<<<<<
 * 
 *     for j in range(K):
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_K = __pyx_t_6;
  __pyx_v_N = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":887
 *     K, N = (<object> values).shape
 * 
 *     for j in range(K):             # <<<<<<<<<<<<<<
 *         val = values[j, N - 1]
 *         for i in range(N - 1, -1 , -1):
 */
  __pyx_t_7 = __pyx_v_K;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) {
    __pyx_v_j = __pyx_t_6;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":888
 * 
 *     for j in range(K):
 *         val = values[j, N - 1]             # <<<<<<<<<<<<<<
 *         for i in range(N - 1, -1 , -1):
 *             if mask[j, i]:
 */
    __pyx_t_8 = __pyx_v_j;
    __pyx_t_9 = (__pyx_v_N - 1);
    __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":889
 *     for j in range(K):
 *         val = values[j, N - 1]
 *         for i in range(N - 1, -1 , -1):             # <<<<<<<<<<<<<<
 *             if mask[j, i]:
 *                 values[j, i] = val
 */
    for (__pyx_t_10 = (__pyx_v_N - 1); __pyx_t_10 > -1; __pyx_t_10-=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":890
 *         val = values[j, N - 1]
 *         for i in range(N - 1, -1 , -1):
 *             if mask[j, i]:             # <<<<<<<<<<<<<<
 *                 values[j, i] = val
 *             else:
 */
      __pyx_t_11 = __pyx_v_j;
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_13 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_mask.diminfo[1].strides));
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":891
 *         for i in range(N - 1, -1 , -1):
 *             if mask[j, i]:
 *                 values[j, i] = val             # <<<<<<<<<<<<<<
 *             else:
 *                 val = values[j, i]
 */
        __pyx_t_14 = __pyx_v_j;
        __pyx_t_15 = __pyx_v_i;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":893
 *                 values[j, i] = val
 *             else:
 *                 val = values[j, i]             # <<<<<<<<<<<<<<
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 */
        __pyx_t_16 = __pyx_v_j;
        __pyx_t_17 = __pyx_v_i;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides));
      }
      __pyx_L9:;
    }
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_2d_inplace_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_193backfill_2d_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_193backfill_2d_inplace_int64 = {__Pyx_NAMESTR("backfill_2d_inplace_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_193backfill_2d_inplace_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_193backfill_2d_inplace_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("backfill_2d_inplace_int64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_int64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_mask = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_mask = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.backfill_2d_inplace_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_192backfill_2d_inplace_int64(__pyx_self, __pyx_v_values, __pyx_v_mask);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":896
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_2d_inplace_int64(ndarray[int64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                                  ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */

static PyObject *__pyx_pf_6pandas_8_tseries_192backfill_2d_inplace_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  Py_ssize_t __pyx_v_K;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  __pyx_t_5numpy_uint8_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("backfill_2d_inplace_int64");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":901
 *     cdef int64_t val
 * 
 *     K, N = (<object> values).shape             # <<<<<<<<<<<<<<
 * 
 *     for j in range(K):
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[8]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_K = __pyx_t_6;
  __pyx_v_N = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":903
 *     K, N = (<object> values).shape
 * 
 *     for j in range(K):             # <<<<<<<<<<<<<<
 *         val = values[j, N - 1]
 *         for i in range(N - 1, -1 , -1):
 */
  __pyx_t_7 = __pyx_v_K;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) {
    __pyx_v_j = __pyx_t_6;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":904
 * 
 *     for j in range(K):
 *         val = values[j, N - 1]             # <<<<<<<<<<<<<<
 *         for i in range(N - 1, -1 , -1):
 *             if mask[j, i]:
 */
    __pyx_t_8 = __pyx_v_j;
    __pyx_t_9 = (__pyx_v_N - 1);
    __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":905
 *     for j in range(K):
 *         val = values[j, N - 1]
 *         for i in range(N - 1, -1 , -1):             # <<<<<<<<<<<<<<
 *             if mask[j, i]:
 *                 values[j, i] = val
 */
    for (__pyx_t_10 = (__pyx_v_N - 1); __pyx_t_10 > -1; __pyx_t_10-=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":906
 *         val = values[j, N - 1]
 *         for i in range(N - 1, -1 , -1):
 *             if mask[j, i]:             # <<<<<<<<<<<<<<
 *                 values[j, i] = val
 *             else:
 */
      __pyx_t_11 = __pyx_v_j;
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_13 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_mask.diminfo[1].strides));
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":907
 *         for i in range(N - 1, -1 , -1):
 *             if mask[j, i]:
 *                 values[j, i] = val             # <<<<<<<<<<<<<<
 *             else:
 *                 val = values[j, i]
 */
        __pyx_t_14 = __pyx_v_j;
        __pyx_t_15 = __pyx_v_i;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":909
 *                 values[j, i] = val
 *             else:
 *                 val = values[j, i]             # <<<<<<<<<<<<<<
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 */
        __pyx_t_16 = __pyx_v_j;
        __pyx_t_17 = __pyx_v_i;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides));
      }
      __pyx_L9:;
    }
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_2d_inplace_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_195backfill_2d_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_195backfill_2d_inplace_bool = {__Pyx_NAMESTR("backfill_2d_inplace_bool"), (PyCFunction)__pyx_pw_6pandas_8_tseries_195backfill_2d_inplace_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_195backfill_2d_inplace_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_mask = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__mask,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("backfill_2d_inplace_bool (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mask);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_bool", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "backfill_2d_inplace_bool") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_mask = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_mask = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("backfill_2d_inplace_bool", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.backfill_2d_inplace_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_194backfill_2d_inplace_bool(__pyx_self, __pyx_v_values, __pyx_v_mask);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":912
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_2d_inplace_bool(ndarray[uint8_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                                  ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */

static PyObject *__pyx_pf_6pandas_8_tseries_194backfill_2d_inplace_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_mask) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  Py_ssize_t __pyx_v_K;
  __pyx_t_5numpy_uint8_t __pyx_v_val;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_mask;
  __Pyx_Buffer __pyx_pybuffer_mask;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  __pyx_t_5numpy_uint8_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("backfill_2d_inplace_bool");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_mask.pybuffer.buf = NULL;
  __pyx_pybuffer_mask.refcount = 0;
  __pyx_pybuffernd_mask.data = NULL;
  __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":917
 *     cdef uint8_t val
 * 
 *     K, N = (<object> values).shape             # <<<<<<<<<<<<<<
 * 
 *     for j in range(K):
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_K = __pyx_t_6;
  __pyx_v_N = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":919
 *     K, N = (<object> values).shape
 * 
 *     for j in range(K):             # <<<<<<<<<<<<<<
 *         val = values[j, N - 1]
 *         for i in range(N - 1, -1 , -1):
 */
  __pyx_t_7 = __pyx_v_K;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_7; __pyx_t_6+=1) {
    __pyx_v_j = __pyx_t_6;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":920
 * 
 *     for j in range(K):
 *         val = values[j, N - 1]             # <<<<<<<<<<<<<<
 *         for i in range(N - 1, -1 , -1):
 *             if mask[j, i]:
 */
    __pyx_t_8 = __pyx_v_j;
    __pyx_t_9 = (__pyx_v_N - 1);
    __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_values.diminfo[1].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":921
 *     for j in range(K):
 *         val = values[j, N - 1]
 *         for i in range(N - 1, -1 , -1):             # <<<<<<<<<<<<<<
 *             if mask[j, i]:
 *                 values[j, i] = val
 */
    for (__pyx_t_10 = (__pyx_v_N - 1); __pyx_t_10 > -1; __pyx_t_10-=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":922
 *         val = values[j, N - 1]
 *         for i in range(N - 1, -1 , -1):
 *             if mask[j, i]:             # <<<<<<<<<<<<<<
 *                 values[j, i] = val
 *             else:
 */
      __pyx_t_11 = __pyx_v_j;
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_13 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_mask.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_mask.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_mask.diminfo[1].strides));
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":923
 *         for i in range(N - 1, -1 , -1):
 *             if mask[j, i]:
 *                 values[j, i] = val             # <<<<<<<<<<<<<<
 *             else:
 *                 val = values[j, i]
 */
        __pyx_t_14 = __pyx_v_j;
        __pyx_t_15 = __pyx_v_i;
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_values.diminfo[1].strides) = __pyx_v_val;
        goto __pyx_L9;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":925
 *                 values[j, i] = val
 *             else:
 *                 val = values[j, i]             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
        __pyx_t_16 = __pyx_v_j;
        __pyx_t_17 = __pyx_v_i;
        __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides));
      }
      __pyx_L9:;
    }
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.backfill_2d_inplace_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_197take_1d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_197take_1d_float64 = {__Pyx_NAMESTR("take_1d_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_197take_1d_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_197take_1d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_fill_value = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_1d_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":930
 * @cython.boundscheck(False)
 * def take_1d_float64(ndarray[float64_t] values, ndarray[int32_t] indexer,
 *                      out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n, idx
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_27;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_1d_float64", 0, 2, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_float64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_indexer = ((PyArrayObject *)values[1]);
      __pyx_v_out = values[2];
      __pyx_v_fill_value = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_indexer = ((PyArrayObject *)values[1]);
    __pyx_v_out = values[2];
    __pyx_v_fill_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_1d_float64", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.take_1d_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_196take_1d_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":929
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_1d_float64(ndarray[float64_t] values, ndarray[int32_t] indexer,             # <<<<<<<<<<<<<<
 *                      out=None, fill_value=np.nan):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_196take_1d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf = 0;
  __pyx_t_5numpy_float64_t __pyx_v_fv;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_outbuf;
  __Pyx_Buffer __pyx_pybuffer_outbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  __pyx_t_5numpy_float64_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("take_1d_float64");
  __pyx_pybuffer_outbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_outbuf.refcount = 0;
  __pyx_pybuffernd_outbuf.data = NULL;
  __pyx_pybuffernd_outbuf.rcbuffer = &__pyx_pybuffer_outbuf;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":936
 *         float64_t fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":938
 *     n = len(indexer)
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         outbuf = np.empty(n, dtype=values.dtype)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_out == Py_None);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":939
 * 
 *     if out is None:
 *         outbuf = np.empty(n, dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":941
 *         outbuf = np.empty(n, dtype=values.dtype)
 *     else:
 *         outbuf = out             # <<<<<<<<<<<<<<
 * 
 *     if False and _checknan(fill_value):
 */
    if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_v_out);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_v_out);
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":943
 *         outbuf = out
 * 
 *     if False and _checknan(fill_value):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
  if (0) {
    __pyx_t_2 = __pyx_f_6pandas_8_tseries__checknan(__pyx_v_fill_value);
    __pyx_t_12 = __pyx_t_2;
  } else {
    __pyx_t_12 = 0;
  }
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":944
 * 
 *     if False and _checknan(fill_value):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":945
 *     if False and _checknan(fill_value):
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 raise ValueError('No NA values allowed')
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":946
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 raise ValueError('No NA values allowed')
 *             else:
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":947
 *             idx = indexer[i]
 *             if idx == -1:
 *                 raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 outbuf[i] = values[idx]
 */
        __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_29), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":949
 *                 raise ValueError('No NA values allowed')
 *             else:
 *                 outbuf[i] = values[idx]             # <<<<<<<<<<<<<<
 *     else:
 *         fv = fill_value
 */
        __pyx_t_15 = __pyx_v_idx;
        __pyx_t_16 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_outbuf.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides));
      }
      __pyx_L7:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":951
 *                 outbuf[i] = values[idx]
 *     else:
 *         fv = fill_value             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
    __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_17 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_fv = __pyx_t_17;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":952
 *     else:
 *         fv = fill_value
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":953
 *         fv = fill_value
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 outbuf[i] = fv
 */
      __pyx_t_18 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":954
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 outbuf[i] = fv
 *             else:
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":955
 *             idx = indexer[i]
 *             if idx == -1:
 *                 outbuf[i] = fv             # <<<<<<<<<<<<<<
 *             else:
 *                 outbuf[i] = values[idx]
 */
        __pyx_t_19 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_outbuf.diminfo[0].strides) = __pyx_v_fv;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":957
 *                 outbuf[i] = fv
 *             else:
 *                 outbuf[i] = values[idx]             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
        __pyx_t_20 = __pyx_v_idx;
        __pyx_t_21 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_outbuf.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides));
      }
      __pyx_L10:;
    }
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_1d_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_199take_1d_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_199take_1d_object = {__Pyx_NAMESTR("take_1d_object"), (PyCFunction)__pyx_pw_6pandas_8_tseries_199take_1d_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_199take_1d_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_fill_value = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_1d_object (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":962
 * @cython.boundscheck(False)
 * def take_1d_object(ndarray[object] values, ndarray[int32_t] indexer,
 *                      out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n, idx
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_30;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_1d_object", 0, 2, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_object") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_indexer = ((PyArrayObject *)values[1]);
      __pyx_v_out = values[2];
      __pyx_v_fill_value = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_indexer = ((PyArrayObject *)values[1]);
    __pyx_v_out = values[2];
    __pyx_v_fill_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_1d_object", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.take_1d_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_198take_1d_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":961
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_1d_object(ndarray[object] values, ndarray[int32_t] indexer,             # <<<<<<<<<<<<<<
 *                      out=None, fill_value=np.nan):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_198take_1d_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf = 0;
  PyObject *__pyx_v_fv = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_outbuf;
  __Pyx_Buffer __pyx_pybuffer_outbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  PyObject **__pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("take_1d_object");
  __pyx_pybuffer_outbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_outbuf.refcount = 0;
  __pyx_pybuffernd_outbuf.data = NULL;
  __pyx_pybuffernd_outbuf.rcbuffer = &__pyx_pybuffer_outbuf;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":968
 *         object fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":970
 *     n = len(indexer)
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         outbuf = np.empty(n, dtype=values.dtype)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_out == Py_None);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":971
 * 
 *     if out is None:
 *         outbuf = np.empty(n, dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":973
 *         outbuf = np.empty(n, dtype=values.dtype)
 *     else:
 *         outbuf = out             # <<<<<<<<<<<<<<
 * 
 *     if False and _checknan(fill_value):
 */
    if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_v_out);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_v_out);
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":975
 *         outbuf = out
 * 
 *     if False and _checknan(fill_value):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
  if (0) {
    __pyx_t_2 = __pyx_f_6pandas_8_tseries__checknan(__pyx_v_fill_value);
    __pyx_t_12 = __pyx_t_2;
  } else {
    __pyx_t_12 = 0;
  }
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":976
 * 
 *     if False and _checknan(fill_value):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":977
 *     if False and _checknan(fill_value):
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 raise ValueError('No NA values allowed')
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":978
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 raise ValueError('No NA values allowed')
 *             else:
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":979
 *             idx = indexer[i]
 *             if idx == -1:
 *                 raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 outbuf[i] = values[idx]
 */
        __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_31), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":981
 *                 raise ValueError('No NA values allowed')
 *             else:
 *                 outbuf[i] = values[idx]             # <<<<<<<<<<<<<<
 *     else:
 *         fv = fill_value
 */
        __pyx_t_15 = __pyx_v_idx;
        __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides);
        __Pyx_INCREF((PyObject*)__pyx_t_6);
        __pyx_t_16 = __pyx_v_i;
        __pyx_t_17 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_outbuf.diminfo[0].strides);
        __Pyx_GOTREF(*__pyx_t_17);
        __Pyx_DECREF(*__pyx_t_17); __Pyx_INCREF(__pyx_t_6);
        *__pyx_t_17 = __pyx_t_6;
        __Pyx_GIVEREF(*__pyx_t_17);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_L7:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":983
 *                 outbuf[i] = values[idx]
 *     else:
 *         fv = fill_value             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
    __Pyx_INCREF(__pyx_v_fill_value);
    __pyx_v_fv = __pyx_v_fill_value;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":984
 *     else:
 *         fv = fill_value
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":985
 *         fv = fill_value
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 outbuf[i] = fv
 */
      __pyx_t_18 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":986
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 outbuf[i] = fv
 *             else:
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":987
 *             idx = indexer[i]
 *             if idx == -1:
 *                 outbuf[i] = fv             # <<<<<<<<<<<<<<
 *             else:
 *                 outbuf[i] = values[idx]
 */
        __pyx_t_19 = __pyx_v_i;
        __pyx_t_17 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_outbuf.diminfo[0].strides);
        __Pyx_GOTREF(*__pyx_t_17);
        __Pyx_DECREF(*__pyx_t_17); __Pyx_INCREF(__pyx_v_fv);
        *__pyx_t_17 = __pyx_v_fv;
        __Pyx_GIVEREF(*__pyx_t_17);
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":989
 *                 outbuf[i] = fv
 *             else:
 *                 outbuf[i] = values[idx]             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
        __pyx_t_20 = __pyx_v_idx;
        __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides);
        __Pyx_INCREF((PyObject*)__pyx_t_6);
        __pyx_t_21 = __pyx_v_i;
        __pyx_t_17 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_outbuf.diminfo[0].strides);
        __Pyx_GOTREF(*__pyx_t_17);
        __Pyx_DECREF(*__pyx_t_17); __Pyx_INCREF(__pyx_t_6);
        *__pyx_t_17 = __pyx_t_6;
        __Pyx_GIVEREF(*__pyx_t_17);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_L10:;
    }
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_1d_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XDECREF(__pyx_v_fv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_201take_1d_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_201take_1d_int32 = {__Pyx_NAMESTR("take_1d_int32"), (PyCFunction)__pyx_pw_6pandas_8_tseries_201take_1d_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_201take_1d_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_fill_value = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_1d_int32 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":994
 * @cython.boundscheck(False)
 * def take_1d_int32(ndarray[int32_t] values, ndarray[int32_t] indexer,
 *                      out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n, idx
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_32;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_1d_int32", 0, 2, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int32") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_indexer = ((PyArrayObject *)values[1]);
      __pyx_v_out = values[2];
      __pyx_v_fill_value = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_indexer = ((PyArrayObject *)values[1]);
    __pyx_v_out = values[2];
    __pyx_v_fill_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_1d_int32", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.take_1d_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_200take_1d_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":993
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_1d_int32(ndarray[int32_t] values, ndarray[int32_t] indexer,             # <<<<<<<<<<<<<<
 *                      out=None, fill_value=np.nan):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_200take_1d_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf = 0;
  __pyx_t_5numpy_int32_t __pyx_v_fv;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_outbuf;
  __Pyx_Buffer __pyx_pybuffer_outbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  __pyx_t_5numpy_int32_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("take_1d_int32");
  __pyx_pybuffer_outbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_outbuf.refcount = 0;
  __pyx_pybuffernd_outbuf.data = NULL;
  __pyx_pybuffernd_outbuf.rcbuffer = &__pyx_pybuffer_outbuf;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1000
 *         int32_t fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1002
 *     n = len(indexer)
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         outbuf = np.empty(n, dtype=values.dtype)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_out == Py_None);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1003
 * 
 *     if out is None:
 *         outbuf = np.empty(n, dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1005
 *         outbuf = np.empty(n, dtype=values.dtype)
 *     else:
 *         outbuf = out             # <<<<<<<<<<<<<<
 * 
 *     if True and _checknan(fill_value):
 */
    if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_v_out);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_v_out);
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1007
 *         outbuf = out
 * 
 *     if True and _checknan(fill_value):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
  if (1) {
    __pyx_t_2 = __pyx_f_6pandas_8_tseries__checknan(__pyx_v_fill_value);
    __pyx_t_12 = __pyx_t_2;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1008
 * 
 *     if True and _checknan(fill_value):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1009
 *     if True and _checknan(fill_value):
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 raise ValueError('No NA values allowed')
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1010
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 raise ValueError('No NA values allowed')
 *             else:
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1011
 *             idx = indexer[i]
 *             if idx == -1:
 *                 raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 outbuf[i] = values[idx]
 */
        __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_33), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1013
 *                 raise ValueError('No NA values allowed')
 *             else:
 *                 outbuf[i] = values[idx]             # <<<<<<<<<<<<<<
 *     else:
 *         fv = fill_value
 */
        __pyx_t_15 = __pyx_v_idx;
        __pyx_t_16 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_outbuf.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides));
      }
      __pyx_L7:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1015
 *                 outbuf[i] = values[idx]
 *     else:
 *         fv = fill_value             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
    __pyx_t_17 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_17 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_fv = __pyx_t_17;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1016
 *     else:
 *         fv = fill_value
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1017
 *         fv = fill_value
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 outbuf[i] = fv
 */
      __pyx_t_18 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1018
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 outbuf[i] = fv
 *             else:
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1019
 *             idx = indexer[i]
 *             if idx == -1:
 *                 outbuf[i] = fv             # <<<<<<<<<<<<<<
 *             else:
 *                 outbuf[i] = values[idx]
 */
        __pyx_t_19 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_outbuf.diminfo[0].strides) = __pyx_v_fv;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1021
 *                 outbuf[i] = fv
 *             else:
 *                 outbuf[i] = values[idx]             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
        __pyx_t_20 = __pyx_v_idx;
        __pyx_t_21 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_outbuf.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides));
      }
      __pyx_L10:;
    }
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_1d_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_203take_1d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_203take_1d_int64 = {__Pyx_NAMESTR("take_1d_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_203take_1d_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_203take_1d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_fill_value = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_1d_int64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1026
 * @cython.boundscheck(False)
 * def take_1d_int64(ndarray[int64_t] values, ndarray[int32_t] indexer,
 *                      out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n, idx
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_34;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_1d_int64", 0, 2, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_int64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_indexer = ((PyArrayObject *)values[1]);
      __pyx_v_out = values[2];
      __pyx_v_fill_value = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_indexer = ((PyArrayObject *)values[1]);
    __pyx_v_out = values[2];
    __pyx_v_fill_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_1d_int64", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.take_1d_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_202take_1d_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1025
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_1d_int64(ndarray[int64_t] values, ndarray[int32_t] indexer,             # <<<<<<<<<<<<<<
 *                      out=None, fill_value=np.nan):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_202take_1d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf = 0;
  __pyx_t_5numpy_int64_t __pyx_v_fv;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_outbuf;
  __Pyx_Buffer __pyx_pybuffer_outbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  __pyx_t_5numpy_int64_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("take_1d_int64");
  __pyx_pybuffer_outbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_outbuf.refcount = 0;
  __pyx_pybuffernd_outbuf.data = NULL;
  __pyx_pybuffernd_outbuf.rcbuffer = &__pyx_pybuffer_outbuf;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1032
 *         int64_t fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1034
 *     n = len(indexer)
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         outbuf = np.empty(n, dtype=values.dtype)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_out == Py_None);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1035
 * 
 *     if out is None:
 *         outbuf = np.empty(n, dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1037
 *         outbuf = np.empty(n, dtype=values.dtype)
 *     else:
 *         outbuf = out             # <<<<<<<<<<<<<<
 * 
 *     if True and _checknan(fill_value):
 */
    if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_v_out);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_v_out);
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1039
 *         outbuf = out
 * 
 *     if True and _checknan(fill_value):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
  if (1) {
    __pyx_t_2 = __pyx_f_6pandas_8_tseries__checknan(__pyx_v_fill_value);
    __pyx_t_12 = __pyx_t_2;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1040
 * 
 *     if True and _checknan(fill_value):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1041
 *     if True and _checknan(fill_value):
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 raise ValueError('No NA values allowed')
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1042
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 raise ValueError('No NA values allowed')
 *             else:
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1043
 *             idx = indexer[i]
 *             if idx == -1:
 *                 raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 outbuf[i] = values[idx]
 */
        __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_35), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1045
 *                 raise ValueError('No NA values allowed')
 *             else:
 *                 outbuf[i] = values[idx]             # <<<<<<<<<<<<<<
 *     else:
 *         fv = fill_value
 */
        __pyx_t_15 = __pyx_v_idx;
        __pyx_t_16 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_outbuf.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides));
      }
      __pyx_L7:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1047
 *                 outbuf[i] = values[idx]
 *     else:
 *         fv = fill_value             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
    __pyx_t_17 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_17 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_fv = __pyx_t_17;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1048
 *     else:
 *         fv = fill_value
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1049
 *         fv = fill_value
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 outbuf[i] = fv
 */
      __pyx_t_18 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1050
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 outbuf[i] = fv
 *             else:
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1051
 *             idx = indexer[i]
 *             if idx == -1:
 *                 outbuf[i] = fv             # <<<<<<<<<<<<<<
 *             else:
 *                 outbuf[i] = values[idx]
 */
        __pyx_t_19 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_outbuf.diminfo[0].strides) = __pyx_v_fv;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1053
 *                 outbuf[i] = fv
 *             else:
 *                 outbuf[i] = values[idx]             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
        __pyx_t_20 = __pyx_v_idx;
        __pyx_t_21 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_outbuf.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides));
      }
      __pyx_L10:;
    }
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_1d_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_205take_1d_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_205take_1d_bool = {__Pyx_NAMESTR("take_1d_bool"), (PyCFunction)__pyx_pw_6pandas_8_tseries_205take_1d_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_205take_1d_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_fill_value = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_1d_bool (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1058
 * @cython.boundscheck(False)
 * def take_1d_bool(ndarray[uint8_t] values, ndarray[int32_t] indexer,
 *                      out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n, idx
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_36;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_1d_bool", 0, 2, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_1d_bool") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_indexer = ((PyArrayObject *)values[1]);
      __pyx_v_out = values[2];
      __pyx_v_fill_value = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_indexer = ((PyArrayObject *)values[1]);
    __pyx_v_out = values[2];
    __pyx_v_fill_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_1d_bool", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.take_1d_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_204take_1d_bool(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1057
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_1d_bool(ndarray[uint8_t] values, ndarray[int32_t] indexer,             # <<<<<<<<<<<<<<
 *                      out=None, fill_value=np.nan):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_204take_1d_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf = 0;
  __pyx_t_5numpy_uint8_t __pyx_v_fv;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_outbuf;
  __Pyx_Buffer __pyx_pybuffer_outbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  __pyx_t_5numpy_uint8_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("take_1d_bool");
  __pyx_pybuffer_outbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_outbuf.refcount = 0;
  __pyx_pybuffernd_outbuf.data = NULL;
  __pyx_pybuffernd_outbuf.rcbuffer = &__pyx_pybuffer_outbuf;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1064
 *         uint8_t fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1066
 *     n = len(indexer)
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         outbuf = np.empty(n, dtype=values.dtype)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_out == Py_None);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1067
 * 
 *     if out is None:
 *         outbuf = np.empty(n, dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1067; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1069
 *         outbuf = np.empty(n, dtype=values.dtype)
 *     else:
 *         outbuf = out             # <<<<<<<<<<<<<<
 * 
 *     if True and _checknan(fill_value):
 */
    if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_v_out);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1069; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_v_out);
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1071
 *         outbuf = out
 * 
 *     if True and _checknan(fill_value):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
  if (1) {
    __pyx_t_2 = __pyx_f_6pandas_8_tseries__checknan(__pyx_v_fill_value);
    __pyx_t_12 = __pyx_t_2;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1072
 * 
 *     if True and _checknan(fill_value):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1073
 *     if True and _checknan(fill_value):
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 raise ValueError('No NA values allowed')
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1074
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 raise ValueError('No NA values allowed')
 *             else:
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1075
 *             idx = indexer[i]
 *             if idx == -1:
 *                 raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 outbuf[i] = values[idx]
 */
        __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_37), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1077
 *                 raise ValueError('No NA values allowed')
 *             else:
 *                 outbuf[i] = values[idx]             # <<<<<<<<<<<<<<
 *     else:
 *         fv = fill_value
 */
        __pyx_t_15 = __pyx_v_idx;
        __pyx_t_16 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_outbuf.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides));
      }
      __pyx_L7:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1079
 *                 outbuf[i] = values[idx]
 *     else:
 *         fv = fill_value             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
    __pyx_t_17 = __Pyx_PyInt_from_py_npy_uint8(__pyx_v_fill_value); if (unlikely((__pyx_t_17 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_fv = __pyx_t_17;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1080
 *     else:
 *         fv = fill_value
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1081
 *         fv = fill_value
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 outbuf[i] = fv
 */
      __pyx_t_18 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1082
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 outbuf[i] = fv
 *             else:
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1083
 *             idx = indexer[i]
 *             if idx == -1:
 *                 outbuf[i] = fv             # <<<<<<<<<<<<<<
 *             else:
 *                 outbuf[i] = values[idx]
 */
        __pyx_t_19 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_outbuf.diminfo[0].strides) = __pyx_v_fv;
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1085
 *                 outbuf[i] = fv
 *             else:
 *                 outbuf[i] = values[idx]             # <<<<<<<<<<<<<<
 * 
 * 
 */
        __pyx_t_20 = __pyx_v_idx;
        __pyx_t_21 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_outbuf.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_values.diminfo[0].strides));
      }
      __pyx_L10:;
    }
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_1d_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_207is_monotonic_float64(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_207is_monotonic_float64 = {__Pyx_NAMESTR("is_monotonic_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_207is_monotonic_float64, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_207is_monotonic_float64(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_monotonic_float64 (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_206is_monotonic_float64(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1090
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def is_monotonic_float64(ndarray[float64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */

static PyObject *__pyx_pf_6pandas_8_tseries_206is_monotonic_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_float64_t __pyx_v_prev;
  __pyx_t_5numpy_float64_t __pyx_v_cur;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_monotonic_float64");
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1095
 *         float64_t prev, cur
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 * 
 *     if n < 2:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1097
 *     n = len(arr)
 * 
 *     if n < 2:             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_t_2 = (__pyx_v_n < 2);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1098
 * 
 *     if n < 2:
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     prev = arr[0]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1100
 *         return True
 * 
 *     prev = arr[0]             # <<<<<<<<<<<<<<
 *     for i in range(1, n):
 *         cur = arr[i]
 */
  __pyx_t_4 = 0;
  __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_arr.diminfo[0].strides));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1101
 * 
 *     prev = arr[0]
 *     for i in range(1, n):             # <<<<<<<<<<<<<<
 *         cur = arr[i]
 *         if cur < prev:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1102
 *     prev = arr[0]
 *     for i in range(1, n):
 *         cur = arr[i]             # <<<<<<<<<<<<<<
 *         if cur < prev:
 *             return False
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1103
 *     for i in range(1, n):
 *         cur = arr[i]
 *         if cur < prev:             # <<<<<<<<<<<<<<
 *             return False
 *         prev = cur
 */
    __pyx_t_2 = (__pyx_v_cur < __pyx_v_prev);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1104
 *         cur = arr[i]
 *         if cur < prev:
 *             return False             # <<<<<<<<<<<<<<
 *         prev = cur
 *     return True
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1105
 *         if cur < prev:
 *             return False
 *         prev = cur             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
    __pyx_v_prev = __pyx_v_cur;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1106
 *             return False
 *         prev = cur
 *     return True             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_monotonic_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_209is_monotonic_object(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_209is_monotonic_object = {__Pyx_NAMESTR("is_monotonic_object"), (PyCFunction)__pyx_pw_6pandas_8_tseries_209is_monotonic_object, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_209is_monotonic_object(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_monotonic_object (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_208is_monotonic_object(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1110
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def is_monotonic_object(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */

static PyObject *__pyx_pf_6pandas_8_tseries_208is_monotonic_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_prev = 0;
  PyObject *__pyx_v_cur = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_monotonic_object");
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1115
 *         object prev, cur
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 * 
 *     if n < 2:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1117
 *     n = len(arr)
 * 
 *     if n < 2:             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_t_2 = (__pyx_v_n < 2);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1118
 * 
 *     if n < 2:
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     prev = arr[0]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1120
 *         return True
 * 
 *     prev = arr[0]             # <<<<<<<<<<<<<<
 *     for i in range(1, n):
 *         cur = arr[i]
 */
  __pyx_t_4 = 0;
  __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_arr.diminfo[0].strides);
  __Pyx_INCREF((PyObject*)__pyx_t_3);
  __pyx_v_prev = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1121
 * 
 *     prev = arr[0]
 *     for i in range(1, n):             # <<<<<<<<<<<<<<
 *         cur = arr[i]
 *         if cur < prev:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1122
 *     prev = arr[0]
 *     for i in range(1, n):
 *         cur = arr[i]             # <<<<<<<<<<<<<<
 *         if cur < prev:
 *             return False
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_cur);
    __pyx_v_cur = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1123
 *     for i in range(1, n):
 *         cur = arr[i]
 *         if cur < prev:             # <<<<<<<<<<<<<<
 *             return False
 *         prev = cur
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_cur, __pyx_v_prev, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1124
 *         cur = arr[i]
 *         if cur < prev:
 *             return False             # <<<<<<<<<<<<<<
 *         prev = cur
 *     return True
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1125
 *         if cur < prev:
 *             return False
 *         prev = cur             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
    __Pyx_INCREF(__pyx_v_cur);
    __Pyx_DECREF(__pyx_v_prev);
    __pyx_v_prev = __pyx_v_cur;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1126
 *             return False
 *         prev = cur
 *     return True             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_monotonic_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_prev);
  __Pyx_XDECREF(__pyx_v_cur);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_211is_monotonic_int32(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_211is_monotonic_int32 = {__Pyx_NAMESTR("is_monotonic_int32"), (PyCFunction)__pyx_pw_6pandas_8_tseries_211is_monotonic_int32, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_211is_monotonic_int32(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_monotonic_int32 (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_210is_monotonic_int32(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1130
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def is_monotonic_int32(ndarray[int32_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */

static PyObject *__pyx_pf_6pandas_8_tseries_210is_monotonic_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_int32_t __pyx_v_prev;
  __pyx_t_5numpy_int32_t __pyx_v_cur;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_monotonic_int32");
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1135
 *         int32_t prev, cur
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 * 
 *     if n < 2:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1137
 *     n = len(arr)
 * 
 *     if n < 2:             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_t_2 = (__pyx_v_n < 2);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1138
 * 
 *     if n < 2:
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     prev = arr[0]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1140
 *         return True
 * 
 *     prev = arr[0]             # <<<<<<<<<<<<<<
 *     for i in range(1, n):
 *         cur = arr[i]
 */
  __pyx_t_4 = 0;
  __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_arr.diminfo[0].strides));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1141
 * 
 *     prev = arr[0]
 *     for i in range(1, n):             # <<<<<<<<<<<<<<
 *         cur = arr[i]
 *         if cur < prev:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1142
 *     prev = arr[0]
 *     for i in range(1, n):
 *         cur = arr[i]             # <<<<<<<<<<<<<<
 *         if cur < prev:
 *             return False
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1143
 *     for i in range(1, n):
 *         cur = arr[i]
 *         if cur < prev:             # <<<<<<<<<<<<<<
 *             return False
 *         prev = cur
 */
    __pyx_t_2 = (__pyx_v_cur < __pyx_v_prev);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1144
 *         cur = arr[i]
 *         if cur < prev:
 *             return False             # <<<<<<<<<<<<<<
 *         prev = cur
 *     return True
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1145
 *         if cur < prev:
 *             return False
 *         prev = cur             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
    __pyx_v_prev = __pyx_v_cur;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1146
 *             return False
 *         prev = cur
 *     return True             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_monotonic_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_213is_monotonic_int64(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_213is_monotonic_int64 = {__Pyx_NAMESTR("is_monotonic_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_213is_monotonic_int64, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_213is_monotonic_int64(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_monotonic_int64 (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_212is_monotonic_int64(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1150
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def is_monotonic_int64(ndarray[int64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */

static PyObject *__pyx_pf_6pandas_8_tseries_212is_monotonic_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_int64_t __pyx_v_prev;
  __pyx_t_5numpy_int64_t __pyx_v_cur;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_monotonic_int64");
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1155
 *         int64_t prev, cur
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 * 
 *     if n < 2:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1157
 *     n = len(arr)
 * 
 *     if n < 2:             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_t_2 = (__pyx_v_n < 2);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1158
 * 
 *     if n < 2:
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     prev = arr[0]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1160
 *         return True
 * 
 *     prev = arr[0]             # <<<<<<<<<<<<<<
 *     for i in range(1, n):
 *         cur = arr[i]
 */
  __pyx_t_4 = 0;
  __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_arr.diminfo[0].strides));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1161
 * 
 *     prev = arr[0]
 *     for i in range(1, n):             # <<<<<<<<<<<<<<
 *         cur = arr[i]
 *         if cur < prev:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1162
 *     prev = arr[0]
 *     for i in range(1, n):
 *         cur = arr[i]             # <<<<<<<<<<<<<<
 *         if cur < prev:
 *             return False
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1163
 *     for i in range(1, n):
 *         cur = arr[i]
 *         if cur < prev:             # <<<<<<<<<<<<<<
 *             return False
 *         prev = cur
 */
    __pyx_t_2 = (__pyx_v_cur < __pyx_v_prev);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1164
 *         cur = arr[i]
 *         if cur < prev:
 *             return False             # <<<<<<<<<<<<<<
 *         prev = cur
 *     return True
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1165
 *         if cur < prev:
 *             return False
 *         prev = cur             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
    __pyx_v_prev = __pyx_v_cur;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1166
 *             return False
 *         prev = cur
 *     return True             # <<<<<<<<<<<<<<
 * 
 * @cython.boundscheck(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_monotonic_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_215is_monotonic_bool(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_215is_monotonic_bool = {__Pyx_NAMESTR("is_monotonic_bool"), (PyCFunction)__pyx_pw_6pandas_8_tseries_215is_monotonic_bool, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_215is_monotonic_bool(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_monotonic_bool (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_214is_monotonic_bool(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1170
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def is_monotonic_bool(ndarray[uint8_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */

static PyObject *__pyx_pf_6pandas_8_tseries_214is_monotonic_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  __pyx_t_5numpy_uint8_t __pyx_v_prev;
  __pyx_t_5numpy_uint8_t __pyx_v_cur;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  long __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_monotonic_bool");
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1175
 *         uint8_t prev, cur
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 * 
 *     if n < 2:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1177
 *     n = len(arr)
 * 
 *     if n < 2:             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_t_2 = (__pyx_v_n < 2);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1178
 * 
 *     if n < 2:
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     prev = arr[0]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1180
 *         return True
 * 
 *     prev = arr[0]             # <<<<<<<<<<<<<<
 *     for i in range(1, n):
 *         cur = arr[i]
 */
  __pyx_t_4 = 0;
  __pyx_v_prev = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_arr.diminfo[0].strides));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1181
 * 
 *     prev = arr[0]
 *     for i in range(1, n):             # <<<<<<<<<<<<<<
 *         cur = arr[i]
 *         if cur < prev:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_1; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1182
 *     prev = arr[0]
 *     for i in range(1, n):
 *         cur = arr[i]             # <<<<<<<<<<<<<<
 *         if cur < prev:
 *             return False
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_v_cur = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_arr.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1183
 *     for i in range(1, n):
 *         cur = arr[i]
 *         if cur < prev:             # <<<<<<<<<<<<<<
 *             return False
 *         prev = cur
 */
    __pyx_t_2 = (__pyx_v_cur < __pyx_v_prev);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1184
 *         cur = arr[i]
 *         if cur < prev:
 *             return False             # <<<<<<<<<<<<<<
 *         prev = cur
 *     return True
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1185
 *         if cur < prev:
 *             return False
 *         prev = cur             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
    __pyx_v_prev = __pyx_v_cur;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1186
 *             return False
 *         prev = cur
 *     return True             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_monotonic_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_217groupby_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_217groupby_float64 = {__Pyx_NAMESTR("groupby_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_217groupby_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_217groupby_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyArrayObject *__pyx_v_labels = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("groupby_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("groupby_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_float64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_index = ((PyArrayObject *)values[0]);
      __pyx_v_labels = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_index = ((PyArrayObject *)values[0]);
    __pyx_v_labels = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("groupby_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.groupby_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_216groupby_float64(__pyx_self, __pyx_v_index, __pyx_v_labels);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1191
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def groupby_float64(ndarray[float64_t] index, ndarray labels):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef Py_ssize_t i, length
 */

static PyObject *__pyx_pf_6pandas_8_tseries_216groupby_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) {
  PyObject *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_members = 0;
  PyObject *__pyx_v_idx = 0;
  PyObject *__pyx_v_key = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("groupby_float64");
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1192
 * @cython.boundscheck(False)
 * def groupby_float64(ndarray[float64_t] index, ndarray labels):
 *     cdef dict result = {}             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, length
 *     cdef list members
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1197
 *     cdef object idx, key
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_length = __pyx_t_2;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1199
 *     length = len(index)
 * 
 *     for i in range(length):             # <<<<<<<<<<<<<<
 *         key = util.get_value_1d(labels, i)
 * 
 */
  __pyx_t_2 = __pyx_v_length;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1200
 * 
 *     for i in range(length):
 *         key = util.get_value_1d(labels, i)             # <<<<<<<<<<<<<<
 * 
 *         if _checknull(key):
 */
    __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1202
 *         key = util.get_value_1d(labels, i)
 * 
 *         if _checknull(key):             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
    __pyx_t_4 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_key);
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1203
 * 
 *         if _checknull(key):
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         idx = index[i]
 */
      goto __pyx_L3_continue;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1205
 *             continue
 * 
 *         idx = index[i]             # <<<<<<<<<<<<<<
 *         if key in result:
 *             members = result[key]
 */
    __pyx_t_5 = __pyx_v_i;
    __pyx_t_1 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1206
 * 
 *         idx = index[i]
 *         if key in result:             # <<<<<<<<<<<<<<
 *             members = result[key]
 *             members.append(idx)
 */
    __pyx_t_4 = ((PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_key))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1207
 *         idx = index[i]
 *         if key in result:
 *             members = result[key]             # <<<<<<<<<<<<<<
 *             members.append(idx)
 *         else:
 */
      __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_XDECREF(((PyObject *)__pyx_v_members));
      __pyx_v_members = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1208
 *         if key in result:
 *             members = result[key]
 *             members.append(idx)             # <<<<<<<<<<<<<<
 *         else:
 *             result[key] = [idx]
 */
      if (unlikely(((PyObject *)__pyx_v_members) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_6 = PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1210
 *             members.append(idx)
 *         else:
 *             result[key] = [idx]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_idx);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx);
      __Pyx_GIVEREF(__pyx_v_idx);
      if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_key, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    }
    __pyx_L6:;
    __pyx_L3_continue:;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1212
 *             result[key] = [idx]
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_members);
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_219groupby_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_219groupby_object = {__Pyx_NAMESTR("groupby_object"), (PyCFunction)__pyx_pw_6pandas_8_tseries_219groupby_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_219groupby_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyArrayObject *__pyx_v_labels = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("groupby_object (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("groupby_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_object") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_index = ((PyArrayObject *)values[0]);
      __pyx_v_labels = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_index = ((PyArrayObject *)values[0]);
    __pyx_v_labels = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("groupby_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.groupby_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_218groupby_object(__pyx_self, __pyx_v_index, __pyx_v_labels);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1216
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def groupby_object(ndarray[object] index, ndarray labels):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef Py_ssize_t i, length
 */

static PyObject *__pyx_pf_6pandas_8_tseries_218groupby_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) {
  PyObject *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_members = 0;
  PyObject *__pyx_v_idx = 0;
  PyObject *__pyx_v_key = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("groupby_object");
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1217
 * @cython.boundscheck(False)
 * def groupby_object(ndarray[object] index, ndarray labels):
 *     cdef dict result = {}             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, length
 *     cdef list members
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1222
 *     cdef object idx, key
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_length = __pyx_t_2;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1224
 *     length = len(index)
 * 
 *     for i in range(length):             # <<<<<<<<<<<<<<
 *         key = util.get_value_1d(labels, i)
 * 
 */
  __pyx_t_2 = __pyx_v_length;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1225
 * 
 *     for i in range(length):
 *         key = util.get_value_1d(labels, i)             # <<<<<<<<<<<<<<
 * 
 *         if _checknull(key):
 */
    __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1227
 *         key = util.get_value_1d(labels, i)
 * 
 *         if _checknull(key):             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
    __pyx_t_4 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_key);
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1228
 * 
 *         if _checknull(key):
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         idx = index[i]
 */
      goto __pyx_L3_continue;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1230
 *             continue
 * 
 *         idx = index[i]             # <<<<<<<<<<<<<<
 *         if key in result:
 *             members = result[key]
 */
    __pyx_t_5 = __pyx_v_i;
    __pyx_t_1 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1231
 * 
 *         idx = index[i]
 *         if key in result:             # <<<<<<<<<<<<<<
 *             members = result[key]
 *             members.append(idx)
 */
    __pyx_t_4 = ((PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_key))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1232
 *         idx = index[i]
 *         if key in result:
 *             members = result[key]             # <<<<<<<<<<<<<<
 *             members.append(idx)
 *         else:
 */
      __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_XDECREF(((PyObject *)__pyx_v_members));
      __pyx_v_members = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1233
 *         if key in result:
 *             members = result[key]
 *             members.append(idx)             # <<<<<<<<<<<<<<
 *         else:
 *             result[key] = [idx]
 */
      if (unlikely(((PyObject *)__pyx_v_members) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_6 = PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1235
 *             members.append(idx)
 *         else:
 *             result[key] = [idx]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_idx);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx);
      __Pyx_GIVEREF(__pyx_v_idx);
      if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_key, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    }
    __pyx_L6:;
    __pyx_L3_continue:;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1237
 *             result[key] = [idx]
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_members);
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_221groupby_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_221groupby_int32 = {__Pyx_NAMESTR("groupby_int32"), (PyCFunction)__pyx_pw_6pandas_8_tseries_221groupby_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_221groupby_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyArrayObject *__pyx_v_labels = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("groupby_int32 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("groupby_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_int32") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_index = ((PyArrayObject *)values[0]);
      __pyx_v_labels = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_index = ((PyArrayObject *)values[0]);
    __pyx_v_labels = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("groupby_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.groupby_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_220groupby_int32(__pyx_self, __pyx_v_index, __pyx_v_labels);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1241
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def groupby_int32(ndarray[int32_t] index, ndarray labels):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef Py_ssize_t i, length
 */

static PyObject *__pyx_pf_6pandas_8_tseries_220groupby_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) {
  PyObject *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_members = 0;
  PyObject *__pyx_v_idx = 0;
  PyObject *__pyx_v_key = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("groupby_int32");
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1242
 * @cython.boundscheck(False)
 * def groupby_int32(ndarray[int32_t] index, ndarray labels):
 *     cdef dict result = {}             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, length
 *     cdef list members
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1247
 *     cdef object idx, key
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_length = __pyx_t_2;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1249
 *     length = len(index)
 * 
 *     for i in range(length):             # <<<<<<<<<<<<<<
 *         key = util.get_value_1d(labels, i)
 * 
 */
  __pyx_t_2 = __pyx_v_length;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1250
 * 
 *     for i in range(length):
 *         key = util.get_value_1d(labels, i)             # <<<<<<<<<<<<<<
 * 
 *         if _checknull(key):
 */
    __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1252
 *         key = util.get_value_1d(labels, i)
 * 
 *         if _checknull(key):             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
    __pyx_t_4 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_key);
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1253
 * 
 *         if _checknull(key):
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         idx = index[i]
 */
      goto __pyx_L3_continue;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1255
 *             continue
 * 
 *         idx = index[i]             # <<<<<<<<<<<<<<
 *         if key in result:
 *             members = result[key]
 */
    __pyx_t_5 = __pyx_v_i;
    __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1256
 * 
 *         idx = index[i]
 *         if key in result:             # <<<<<<<<<<<<<<
 *             members = result[key]
 *             members.append(idx)
 */
    __pyx_t_4 = ((PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_key))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1257
 *         idx = index[i]
 *         if key in result:
 *             members = result[key]             # <<<<<<<<<<<<<<
 *             members.append(idx)
 *         else:
 */
      __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_XDECREF(((PyObject *)__pyx_v_members));
      __pyx_v_members = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1258
 *         if key in result:
 *             members = result[key]
 *             members.append(idx)             # <<<<<<<<<<<<<<
 *         else:
 *             result[key] = [idx]
 */
      if (unlikely(((PyObject *)__pyx_v_members) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_6 = PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1260
 *             members.append(idx)
 *         else:
 *             result[key] = [idx]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_idx);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx);
      __Pyx_GIVEREF(__pyx_v_idx);
      if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_key, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    }
    __pyx_L6:;
    __pyx_L3_continue:;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1262
 *             result[key] = [idx]
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_members);
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_223groupby_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_223groupby_int64 = {__Pyx_NAMESTR("groupby_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_223groupby_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_223groupby_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyArrayObject *__pyx_v_labels = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("groupby_int64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("groupby_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_int64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_index = ((PyArrayObject *)values[0]);
      __pyx_v_labels = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_index = ((PyArrayObject *)values[0]);
    __pyx_v_labels = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("groupby_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.groupby_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_222groupby_int64(__pyx_self, __pyx_v_index, __pyx_v_labels);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1266
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def groupby_int64(ndarray[int64_t] index, ndarray labels):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef Py_ssize_t i, length
 */

static PyObject *__pyx_pf_6pandas_8_tseries_222groupby_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) {
  PyObject *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_members = 0;
  PyObject *__pyx_v_idx = 0;
  PyObject *__pyx_v_key = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("groupby_int64");
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1267
 * @cython.boundscheck(False)
 * def groupby_int64(ndarray[int64_t] index, ndarray labels):
 *     cdef dict result = {}             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, length
 *     cdef list members
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1272
 *     cdef object idx, key
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_length = __pyx_t_2;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1274
 *     length = len(index)
 * 
 *     for i in range(length):             # <<<<<<<<<<<<<<
 *         key = util.get_value_1d(labels, i)
 * 
 */
  __pyx_t_2 = __pyx_v_length;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1275
 * 
 *     for i in range(length):
 *         key = util.get_value_1d(labels, i)             # <<<<<<<<<<<<<<
 * 
 *         if _checknull(key):
 */
    __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1277
 *         key = util.get_value_1d(labels, i)
 * 
 *         if _checknull(key):             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
    __pyx_t_4 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_key);
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1278
 * 
 *         if _checknull(key):
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         idx = index[i]
 */
      goto __pyx_L3_continue;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1280
 *             continue
 * 
 *         idx = index[i]             # <<<<<<<<<<<<<<
 *         if key in result:
 *             members = result[key]
 */
    __pyx_t_5 = __pyx_v_i;
    __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1281
 * 
 *         idx = index[i]
 *         if key in result:             # <<<<<<<<<<<<<<
 *             members = result[key]
 *             members.append(idx)
 */
    __pyx_t_4 = ((PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_key))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1282
 *         idx = index[i]
 *         if key in result:
 *             members = result[key]             # <<<<<<<<<<<<<<
 *             members.append(idx)
 *         else:
 */
      __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_XDECREF(((PyObject *)__pyx_v_members));
      __pyx_v_members = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1283
 *         if key in result:
 *             members = result[key]
 *             members.append(idx)             # <<<<<<<<<<<<<<
 *         else:
 *             result[key] = [idx]
 */
      if (unlikely(((PyObject *)__pyx_v_members) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_6 = PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1285
 *             members.append(idx)
 *         else:
 *             result[key] = [idx]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_idx);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx);
      __Pyx_GIVEREF(__pyx_v_idx);
      if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_key, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    }
    __pyx_L6:;
    __pyx_L3_continue:;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1287
 *             result[key] = [idx]
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_members);
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_225groupby_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_225groupby_bool = {__Pyx_NAMESTR("groupby_bool"), (PyCFunction)__pyx_pw_6pandas_8_tseries_225groupby_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_225groupby_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyArrayObject *__pyx_v_labels = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__labels,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("groupby_bool (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("groupby_bool", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "groupby_bool") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_index = ((PyArrayObject *)values[0]);
      __pyx_v_labels = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_index = ((PyArrayObject *)values[0]);
    __pyx_v_labels = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("groupby_bool", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.groupby_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_labels), __pyx_ptype_5numpy_ndarray, 1, "labels", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_224groupby_bool(__pyx_self, __pyx_v_index, __pyx_v_labels);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1291
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def groupby_bool(ndarray[uint8_t] index, ndarray labels):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef Py_ssize_t i, length
 */

static PyObject *__pyx_pf_6pandas_8_tseries_224groupby_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyArrayObject *__pyx_v_labels) {
  PyObject *__pyx_v_result = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_length;
  PyObject *__pyx_v_members = 0;
  PyObject *__pyx_v_idx = 0;
  PyObject *__pyx_v_key = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("groupby_bool");
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1292
 * @cython.boundscheck(False)
 * def groupby_bool(ndarray[uint8_t] index, ndarray labels):
 *     cdef dict result = {}             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, length
 *     cdef list members
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1297
 *     cdef object idx, key
 * 
 *     length = len(index)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_length = __pyx_t_2;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1299
 *     length = len(index)
 * 
 *     for i in range(length):             # <<<<<<<<<<<<<<
 *         key = util.get_value_1d(labels, i)
 * 
 */
  __pyx_t_2 = __pyx_v_length;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1300
 * 
 *     for i in range(length):
 *         key = util.get_value_1d(labels, i)             # <<<<<<<<<<<<<<
 * 
 *         if _checknull(key):
 */
    __pyx_t_1 = get_value_1d(__pyx_v_labels, __pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1302
 *         key = util.get_value_1d(labels, i)
 * 
 *         if _checknull(key):             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
    __pyx_t_4 = __pyx_f_6pandas_8_tseries__checknull(__pyx_v_key);
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1303
 * 
 *         if _checknull(key):
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         idx = index[i]
 */
      goto __pyx_L3_continue;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1305
 *             continue
 * 
 *         idx = index[i]             # <<<<<<<<<<<<<<
 *         if key in result:
 *             members = result[key]
 */
    __pyx_t_5 = __pyx_v_i;
    __pyx_t_1 = __Pyx_PyInt_to_py_npy_uint8((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_v_idx);
    __pyx_v_idx = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1306
 * 
 *         idx = index[i]
 *         if key in result:             # <<<<<<<<<<<<<<
 *             members = result[key]
 *             members.append(idx)
 */
    __pyx_t_4 = ((PyDict_Contains(((PyObject *)__pyx_v_result), __pyx_v_key))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1307
 *         idx = index[i]
 *         if key in result:
 *             members = result[key]             # <<<<<<<<<<<<<<
 *             members.append(idx)
 *         else:
 */
      __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_result), __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_XDECREF(((PyObject *)__pyx_v_members));
      __pyx_v_members = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1308
 *         if key in result:
 *             members = result[key]
 *             members.append(idx)             # <<<<<<<<<<<<<<
 *         else:
 *             result[key] = [idx]
 */
      if (unlikely(((PyObject *)__pyx_v_members) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_6 = PyList_Append(__pyx_v_members, __pyx_v_idx); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1310
 *             members.append(idx)
 *         else:
 *             result[key] = [idx]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v_idx);
      PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_idx);
      __Pyx_GIVEREF(__pyx_v_idx);
      if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_key, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    }
    __pyx_L6:;
    __pyx_L3_continue:;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1312
 *             result[key] = [idx]
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.groupby_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_members);
  __Pyx_XDECREF(__pyx_v_idx);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_227arrmap_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_227arrmap_float64 = {__Pyx_NAMESTR("arrmap_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_227arrmap_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_227arrmap_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyObject *__pyx_v_func = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("arrmap_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("arrmap_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_float64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_index = ((PyArrayObject *)values[0]);
      __pyx_v_func = values[1];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_index = ((PyArrayObject *)values[0]);
    __pyx_v_func = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("arrmap_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.arrmap_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_226arrmap_float64(__pyx_self, __pyx_v_index, __pyx_v_func);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1317
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def arrmap_float64(ndarray[float64_t] index, object func):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0
 */

static PyObject *__pyx_pf_6pandas_8_tseries_226arrmap_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) {
  Py_ssize_t __pyx_v_length;
  Py_ssize_t __pyx_v_i;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject **__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arrmap_float64");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1318
 * @cython.boundscheck(False)
 * def arrmap_float64(ndarray[float64_t] index, object func):
 *     cdef Py_ssize_t length = index.shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = 0
 * 
 */
  __pyx_v_length = (__pyx_v_index->dimensions[0]);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1319
 * def arrmap_float64(ndarray[float64_t] index, object func):
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0             # <<<<<<<<<<<<<<
 * 
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1321
 *     cdef Py_ssize_t i = 0
 * 
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1323
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)
 * 
 *     for i in range(length):             # <<<<<<<<<<<<<<
 *         result[i] = func(index[i])
 * 
 */
  __pyx_t_7 = __pyx_v_length;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1324
 * 
 *     for i in range(length):
 *         result[i] = func(index[i])             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_objects(result)
 */
    __pyx_t_9 = __pyx_v_i;
    __pyx_t_5 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_11);
    __Pyx_DECREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_5);
    *__pyx_t_11 = __pyx_t_5;
    __Pyx_GIVEREF(*__pyx_t_11);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1326
 *         result[i] = func(index[i])
 * 
 *     return maybe_convert_objects(result)             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.arrmap_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_229arrmap_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_229arrmap_object = {__Pyx_NAMESTR("arrmap_object"), (PyCFunction)__pyx_pw_6pandas_8_tseries_229arrmap_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_229arrmap_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyObject *__pyx_v_func = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("arrmap_object (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("arrmap_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_object") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_index = ((PyArrayObject *)values[0]);
      __pyx_v_func = values[1];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_index = ((PyArrayObject *)values[0]);
    __pyx_v_func = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("arrmap_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.arrmap_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_228arrmap_object(__pyx_self, __pyx_v_index, __pyx_v_func);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1330
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def arrmap_object(ndarray[object] index, object func):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0
 */

static PyObject *__pyx_pf_6pandas_8_tseries_228arrmap_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) {
  Py_ssize_t __pyx_v_length;
  Py_ssize_t __pyx_v_i;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject **__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arrmap_object");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1331
 * @cython.boundscheck(False)
 * def arrmap_object(ndarray[object] index, object func):
 *     cdef Py_ssize_t length = index.shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = 0
 * 
 */
  __pyx_v_length = (__pyx_v_index->dimensions[0]);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1332
 * def arrmap_object(ndarray[object] index, object func):
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0             # <<<<<<<<<<<<<<
 * 
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1334
 *     cdef Py_ssize_t i = 0
 * 
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1336
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)
 * 
 *     for i in range(length):             # <<<<<<<<<<<<<<
 *         result[i] = func(index[i])
 * 
 */
  __pyx_t_7 = __pyx_v_length;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1337
 * 
 *     for i in range(length):
 *         result[i] = func(index[i])             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_objects(result)
 */
    __pyx_t_9 = __pyx_v_i;
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_11);
    __Pyx_DECREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_5);
    *__pyx_t_11 = __pyx_t_5;
    __Pyx_GIVEREF(*__pyx_t_11);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1339
 *         result[i] = func(index[i])
 * 
 *     return maybe_convert_objects(result)             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.arrmap_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_231arrmap_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_231arrmap_int32 = {__Pyx_NAMESTR("arrmap_int32"), (PyCFunction)__pyx_pw_6pandas_8_tseries_231arrmap_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_231arrmap_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyObject *__pyx_v_func = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("arrmap_int32 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("arrmap_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_int32") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_index = ((PyArrayObject *)values[0]);
      __pyx_v_func = values[1];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_index = ((PyArrayObject *)values[0]);
    __pyx_v_func = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("arrmap_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.arrmap_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_230arrmap_int32(__pyx_self, __pyx_v_index, __pyx_v_func);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1343
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def arrmap_int32(ndarray[int32_t] index, object func):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0
 */

static PyObject *__pyx_pf_6pandas_8_tseries_230arrmap_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) {
  Py_ssize_t __pyx_v_length;
  Py_ssize_t __pyx_v_i;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject **__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arrmap_int32");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1344
 * @cython.boundscheck(False)
 * def arrmap_int32(ndarray[int32_t] index, object func):
 *     cdef Py_ssize_t length = index.shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = 0
 * 
 */
  __pyx_v_length = (__pyx_v_index->dimensions[0]);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1345
 * def arrmap_int32(ndarray[int32_t] index, object func):
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0             # <<<<<<<<<<<<<<
 * 
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1347
 *     cdef Py_ssize_t i = 0
 * 
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1349
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)
 * 
 *     for i in range(length):             # <<<<<<<<<<<<<<
 *         result[i] = func(index[i])
 * 
 */
  __pyx_t_7 = __pyx_v_length;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1350
 * 
 *     for i in range(length):
 *         result[i] = func(index[i])             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_objects(result)
 */
    __pyx_t_9 = __pyx_v_i;
    __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_11);
    __Pyx_DECREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_5);
    *__pyx_t_11 = __pyx_t_5;
    __Pyx_GIVEREF(*__pyx_t_11);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1352
 *         result[i] = func(index[i])
 * 
 *     return maybe_convert_objects(result)             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.arrmap_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_233arrmap_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_233arrmap_int64 = {__Pyx_NAMESTR("arrmap_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_233arrmap_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_233arrmap_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyObject *__pyx_v_func = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("arrmap_int64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("arrmap_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_int64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_index = ((PyArrayObject *)values[0]);
      __pyx_v_func = values[1];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_index = ((PyArrayObject *)values[0]);
    __pyx_v_func = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("arrmap_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.arrmap_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_232arrmap_int64(__pyx_self, __pyx_v_index, __pyx_v_func);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1356
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def arrmap_int64(ndarray[int64_t] index, object func):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0
 */

static PyObject *__pyx_pf_6pandas_8_tseries_232arrmap_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) {
  Py_ssize_t __pyx_v_length;
  Py_ssize_t __pyx_v_i;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject **__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arrmap_int64");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1357
 * @cython.boundscheck(False)
 * def arrmap_int64(ndarray[int64_t] index, object func):
 *     cdef Py_ssize_t length = index.shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = 0
 * 
 */
  __pyx_v_length = (__pyx_v_index->dimensions[0]);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1358
 * def arrmap_int64(ndarray[int64_t] index, object func):
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0             # <<<<<<<<<<<<<<
 * 
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1360
 *     cdef Py_ssize_t i = 0
 * 
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1362
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)
 * 
 *     for i in range(length):             # <<<<<<<<<<<<<<
 *         result[i] = func(index[i])
 * 
 */
  __pyx_t_7 = __pyx_v_length;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1363
 * 
 *     for i in range(length):
 *         result[i] = func(index[i])             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_objects(result)
 */
    __pyx_t_9 = __pyx_v_i;
    __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_11);
    __Pyx_DECREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_5);
    *__pyx_t_11 = __pyx_t_5;
    __Pyx_GIVEREF(*__pyx_t_11);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1365
 *         result[i] = func(index[i])
 * 
 *     return maybe_convert_objects(result)             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.arrmap_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_235arrmap_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_235arrmap_bool = {__Pyx_NAMESTR("arrmap_bool"), (PyCFunction)__pyx_pw_6pandas_8_tseries_235arrmap_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_235arrmap_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  PyObject *__pyx_v_func = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__func,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("arrmap_bool (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("arrmap_bool", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arrmap_bool") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_index = ((PyArrayObject *)values[0]);
      __pyx_v_func = values[1];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_index = ((PyArrayObject *)values[0]);
    __pyx_v_func = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("arrmap_bool", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.arrmap_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_234arrmap_bool(__pyx_self, __pyx_v_index, __pyx_v_func);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1369
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def arrmap_bool(ndarray[uint8_t] index, object func):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0
 */

static PyObject *__pyx_pf_6pandas_8_tseries_234arrmap_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, PyObject *__pyx_v_func) {
  Py_ssize_t __pyx_v_length;
  Py_ssize_t __pyx_v_i;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject **__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("arrmap_bool");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1370
 * @cython.boundscheck(False)
 * def arrmap_bool(ndarray[uint8_t] index, object func):
 *     cdef Py_ssize_t length = index.shape[0]             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i = 0
 * 
 */
  __pyx_v_length = (__pyx_v_index->dimensions[0]);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1371
 * def arrmap_bool(ndarray[uint8_t] index, object func):
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0             # <<<<<<<<<<<<<<
 * 
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1373
 *     cdef Py_ssize_t i = 0
 * 
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(length):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_result = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_result.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1375
 *     cdef ndarray[object] result = np.empty(length, dtype=np.object_)
 * 
 *     for i in range(length):             # <<<<<<<<<<<<<<
 *         result[i] = func(index[i])
 * 
 */
  __pyx_t_7 = __pyx_v_length;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1376
 * 
 *     for i in range(length):
 *         result[i] = func(index[i])             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_objects(result)
 */
    __pyx_t_9 = __pyx_v_i;
    __pyx_t_5 = __Pyx_PyInt_to_py_npy_uint8((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_index.diminfo[0].strides))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_v_func, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_11);
    __Pyx_DECREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_5);
    *__pyx_t_11 = __pyx_t_5;
    __Pyx_GIVEREF(*__pyx_t_11);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1378
 *         result[i] = func(index[i])
 * 
 *     return maybe_convert_objects(result)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.arrmap_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_237take_2d_axis0_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_237take_2d_axis0_float64 = {__Pyx_NAMESTR("take_2d_axis0_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_237take_2d_axis0_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_237take_2d_axis0_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_fill_value = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_2d_axis0_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1385
 * def take_2d_axis0_float64(ndarray[float64_t, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_38;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float64", 0, 2, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_float64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_indexer = ((PyArrayObject *)values[1]);
      __pyx_v_out = values[2];
      __pyx_v_fill_value = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_indexer = ((PyArrayObject *)values[1]);
    __pyx_v_out = values[2];
    __pyx_v_fill_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_2d_axis0_float64", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis0_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_236take_2d_axis0_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1383
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis0_float64(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_236take_2d_axis0_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf = 0;
  __pyx_t_5numpy_float64_t __pyx_v_fv;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_outbuf;
  __Pyx_Buffer __pyx_pybuffer_outbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  __pyx_t_5numpy_float64_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("take_2d_axis0_float64");
  __pyx_pybuffer_outbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_outbuf.refcount = 0;
  __pyx_pybuffernd_outbuf.data = NULL;
  __pyx_pybuffernd_outbuf.rcbuffer = &__pyx_pybuffer_outbuf;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1391
 *         float64_t fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 *     k = values.shape[1]
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1392
 * 
 *     n = len(indexer)
 *     k = values.shape[1]             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_v_k = (__pyx_v_values->dimensions[1]);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1394
 *     k = values.shape[1]
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_out == Py_None);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1395
 * 
 *     if out is None:
 *         outbuf = np.empty((n, k), dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
    __pyx_t_6 = 0;
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1397
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 *         outbuf = out             # <<<<<<<<<<<<<<
 * 
 *     if False and _checknan(fill_value):
 */
    if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_v_out);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_v_out);
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1399
 *         outbuf = out
 * 
 *     if False and _checknan(fill_value):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
  if (0) {
    __pyx_t_2 = __pyx_f_6pandas_8_tseries__checknan(__pyx_v_fill_value);
    __pyx_t_12 = __pyx_t_2;
  } else {
    __pyx_t_12 = 0;
  }
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1400
 * 
 *     if False and _checknan(fill_value):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1401
 *     if False and _checknan(fill_value):
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1402
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for j from 0 <= j < k:
 *                     raise ValueError('No NA values allowed')
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1403
 *             idx = indexer[i]
 *             if idx == -1:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     raise ValueError('No NA values allowed')
 *             else:
 */
        __pyx_t_15 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1404
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for j from 0 <= j < k:
 */
          __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_39), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1406
 *                     raise ValueError('No NA values allowed')
 *             else:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[idx, j]
 *     else:
 */
        __pyx_t_15 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1407
 *             else:
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = values[idx, j]             # <<<<<<<<<<<<<<
 *     else:
 *         fv = fill_value
 */
          __pyx_t_16 = __pyx_v_idx;
          __pyx_t_17 = __pyx_v_j;
          __pyx_t_18 = __pyx_v_i;
          __pyx_t_19 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_outbuf.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides));
        }
      }
      __pyx_L7:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1409
 *                     outbuf[i, j] = values[idx, j]
 *     else:
 *         fv = fill_value             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
    __pyx_t_20 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_20 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_fv = __pyx_t_20;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1410
 *     else:
 *         fv = fill_value
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1411
 *         fv = fill_value
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1412
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = fv
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1413
 *             idx = indexer[i]
 *             if idx == -1:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = fv
 *             else:
 */
        __pyx_t_21 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_21; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1414
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = fv             # <<<<<<<<<<<<<<
 *             else:
 *                 for j from 0 <= j < k:
 */
          __pyx_t_22 = __pyx_v_i;
          __pyx_t_23 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_outbuf.diminfo[1].strides) = __pyx_v_fv;
        }
        goto __pyx_L14;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1416
 *                     outbuf[i, j] = fv
 *             else:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[idx, j]
 * 
 */
        __pyx_t_21 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_21; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1417
 *             else:
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = values[idx, j]             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
          __pyx_t_24 = __pyx_v_idx;
          __pyx_t_25 = __pyx_v_j;
          __pyx_t_26 = __pyx_v_i;
          __pyx_t_27 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_outbuf.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides));
        }
      }
      __pyx_L14:;
    }
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis0_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_239take_2d_axis0_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_239take_2d_axis0_object = {__Pyx_NAMESTR("take_2d_axis0_object"), (PyCFunction)__pyx_pw_6pandas_8_tseries_239take_2d_axis0_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_239take_2d_axis0_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_fill_value = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_2d_axis0_object (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1423
 * def take_2d_axis0_object(ndarray[object, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_40;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_2d_axis0_object", 0, 2, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_object") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_indexer = ((PyArrayObject *)values[1]);
      __pyx_v_out = values[2];
      __pyx_v_fill_value = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_indexer = ((PyArrayObject *)values[1]);
    __pyx_v_out = values[2];
    __pyx_v_fill_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_2d_axis0_object", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis0_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_238take_2d_axis0_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1421
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis0_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_238take_2d_axis0_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf = 0;
  PyObject *__pyx_v_fv = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_outbuf;
  __Pyx_Buffer __pyx_pybuffer_outbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  PyObject **__pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("take_2d_axis0_object");
  __pyx_pybuffer_outbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_outbuf.refcount = 0;
  __pyx_pybuffernd_outbuf.data = NULL;
  __pyx_pybuffernd_outbuf.rcbuffer = &__pyx_pybuffer_outbuf;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1429
 *         object fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 *     k = values.shape[1]
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1430
 * 
 *     n = len(indexer)
 *     k = values.shape[1]             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_v_k = (__pyx_v_values->dimensions[1]);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1432
 *     k = values.shape[1]
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_out == Py_None);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1433
 * 
 *     if out is None:
 *         outbuf = np.empty((n, k), dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
    __pyx_t_6 = 0;
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1435
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 *         outbuf = out             # <<<<<<<<<<<<<<
 * 
 *     if False and _checknan(fill_value):
 */
    if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_v_out);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_v_out);
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1437
 *         outbuf = out
 * 
 *     if False and _checknan(fill_value):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
  if (0) {
    __pyx_t_2 = __pyx_f_6pandas_8_tseries__checknan(__pyx_v_fill_value);
    __pyx_t_12 = __pyx_t_2;
  } else {
    __pyx_t_12 = 0;
  }
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1438
 * 
 *     if False and _checknan(fill_value):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1439
 *     if False and _checknan(fill_value):
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1440
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for j from 0 <= j < k:
 *                     raise ValueError('No NA values allowed')
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1441
 *             idx = indexer[i]
 *             if idx == -1:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     raise ValueError('No NA values allowed')
 *             else:
 */
        __pyx_t_15 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1442
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for j from 0 <= j < k:
 */
          __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1444
 *                     raise ValueError('No NA values allowed')
 *             else:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[idx, j]
 *     else:
 */
        __pyx_t_15 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1445
 *             else:
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = values[idx, j]             # <<<<<<<<<<<<<<
 *     else:
 *         fv = fill_value
 */
          __pyx_t_16 = __pyx_v_idx;
          __pyx_t_17 = __pyx_v_j;
          __pyx_t_3 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides);
          __Pyx_INCREF((PyObject*)__pyx_t_3);
          __pyx_t_18 = __pyx_v_i;
          __pyx_t_19 = __pyx_v_j;
          __pyx_t_20 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_outbuf.diminfo[1].strides);
          __Pyx_GOTREF(*__pyx_t_20);
          __Pyx_DECREF(*__pyx_t_20); __Pyx_INCREF(__pyx_t_3);
          *__pyx_t_20 = __pyx_t_3;
          __Pyx_GIVEREF(*__pyx_t_20);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
      }
      __pyx_L7:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1447
 *                     outbuf[i, j] = values[idx, j]
 *     else:
 *         fv = fill_value             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
    __Pyx_INCREF(__pyx_v_fill_value);
    __pyx_v_fv = __pyx_v_fill_value;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1448
 *     else:
 *         fv = fill_value
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1449
 *         fv = fill_value
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1450
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = fv
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1451
 *             idx = indexer[i]
 *             if idx == -1:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = fv
 *             else:
 */
        __pyx_t_21 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_21; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1452
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = fv             # <<<<<<<<<<<<<<
 *             else:
 *                 for j from 0 <= j < k:
 */
          __pyx_t_22 = __pyx_v_i;
          __pyx_t_23 = __pyx_v_j;
          __pyx_t_20 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_outbuf.diminfo[1].strides);
          __Pyx_GOTREF(*__pyx_t_20);
          __Pyx_DECREF(*__pyx_t_20); __Pyx_INCREF(__pyx_v_fv);
          *__pyx_t_20 = __pyx_v_fv;
          __Pyx_GIVEREF(*__pyx_t_20);
        }
        goto __pyx_L14;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1454
 *                     outbuf[i, j] = fv
 *             else:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[idx, j]
 * 
 */
        __pyx_t_21 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_21; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1455
 *             else:
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = values[idx, j]             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
          __pyx_t_24 = __pyx_v_idx;
          __pyx_t_25 = __pyx_v_j;
          __pyx_t_3 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides);
          __Pyx_INCREF((PyObject*)__pyx_t_3);
          __pyx_t_26 = __pyx_v_i;
          __pyx_t_27 = __pyx_v_j;
          __pyx_t_20 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_outbuf.diminfo[1].strides);
          __Pyx_GOTREF(*__pyx_t_20);
          __Pyx_DECREF(*__pyx_t_20); __Pyx_INCREF(__pyx_t_3);
          *__pyx_t_20 = __pyx_t_3;
          __Pyx_GIVEREF(*__pyx_t_20);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
      }
      __pyx_L14:;
    }
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis0_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XDECREF(__pyx_v_fv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_241take_2d_axis0_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_241take_2d_axis0_int32 = {__Pyx_NAMESTR("take_2d_axis0_int32"), (PyCFunction)__pyx_pw_6pandas_8_tseries_241take_2d_axis0_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_241take_2d_axis0_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_fill_value = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_2d_axis0_int32 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1461
 * def take_2d_axis0_int32(ndarray[int32_t, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_42;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32", 0, 2, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int32") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_indexer = ((PyArrayObject *)values[1]);
      __pyx_v_out = values[2];
      __pyx_v_fill_value = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_indexer = ((PyArrayObject *)values[1]);
    __pyx_v_out = values[2];
    __pyx_v_fill_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int32", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis0_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_240take_2d_axis0_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1459
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis0_int32(ndarray[int32_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_240take_2d_axis0_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf = 0;
  __pyx_t_5numpy_int32_t __pyx_v_fv;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_outbuf;
  __Pyx_Buffer __pyx_pybuffer_outbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  __pyx_t_5numpy_int32_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("take_2d_axis0_int32");
  __pyx_pybuffer_outbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_outbuf.refcount = 0;
  __pyx_pybuffernd_outbuf.data = NULL;
  __pyx_pybuffernd_outbuf.rcbuffer = &__pyx_pybuffer_outbuf;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1467
 *         int32_t fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 *     k = values.shape[1]
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1468
 * 
 *     n = len(indexer)
 *     k = values.shape[1]             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_v_k = (__pyx_v_values->dimensions[1]);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1470
 *     k = values.shape[1]
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_out == Py_None);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1471
 * 
 *     if out is None:
 *         outbuf = np.empty((n, k), dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
    __pyx_t_6 = 0;
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1473
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 *         outbuf = out             # <<<<<<<<<<<<<<
 * 
 *     if True and _checknan(fill_value):
 */
    if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_v_out);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_v_out);
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1475
 *         outbuf = out
 * 
 *     if True and _checknan(fill_value):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
  if (1) {
    __pyx_t_2 = __pyx_f_6pandas_8_tseries__checknan(__pyx_v_fill_value);
    __pyx_t_12 = __pyx_t_2;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1476
 * 
 *     if True and _checknan(fill_value):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1477
 *     if True and _checknan(fill_value):
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1478
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for j from 0 <= j < k:
 *                     raise ValueError('No NA values allowed')
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1479
 *             idx = indexer[i]
 *             if idx == -1:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     raise ValueError('No NA values allowed')
 *             else:
 */
        __pyx_t_15 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1480
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for j from 0 <= j < k:
 */
          __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1482
 *                     raise ValueError('No NA values allowed')
 *             else:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[idx, j]
 *     else:
 */
        __pyx_t_15 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1483
 *             else:
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = values[idx, j]             # <<<<<<<<<<<<<<
 *     else:
 *         fv = fill_value
 */
          __pyx_t_16 = __pyx_v_idx;
          __pyx_t_17 = __pyx_v_j;
          __pyx_t_18 = __pyx_v_i;
          __pyx_t_19 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_outbuf.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides));
        }
      }
      __pyx_L7:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1485
 *                     outbuf[i, j] = values[idx, j]
 *     else:
 *         fv = fill_value             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
    __pyx_t_20 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_20 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_fv = __pyx_t_20;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1486
 *     else:
 *         fv = fill_value
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1487
 *         fv = fill_value
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1488
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = fv
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1489
 *             idx = indexer[i]
 *             if idx == -1:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = fv
 *             else:
 */
        __pyx_t_21 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_21; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1490
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = fv             # <<<<<<<<<<<<<<
 *             else:
 *                 for j from 0 <= j < k:
 */
          __pyx_t_22 = __pyx_v_i;
          __pyx_t_23 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_outbuf.diminfo[1].strides) = __pyx_v_fv;
        }
        goto __pyx_L14;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1492
 *                     outbuf[i, j] = fv
 *             else:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[idx, j]
 * 
 */
        __pyx_t_21 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_21; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1493
 *             else:
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = values[idx, j]             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
          __pyx_t_24 = __pyx_v_idx;
          __pyx_t_25 = __pyx_v_j;
          __pyx_t_26 = __pyx_v_i;
          __pyx_t_27 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_outbuf.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides));
        }
      }
      __pyx_L14:;
    }
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis0_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_243take_2d_axis0_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_243take_2d_axis0_int64 = {__Pyx_NAMESTR("take_2d_axis0_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_243take_2d_axis0_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_243take_2d_axis0_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_fill_value = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_2d_axis0_int64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1499
 * def take_2d_axis0_int64(ndarray[int64_t, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_44;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int64", 0, 2, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1497; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_int64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1497; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_indexer = ((PyArrayObject *)values[1]);
      __pyx_v_out = values[2];
      __pyx_v_fill_value = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_indexer = ((PyArrayObject *)values[1]);
    __pyx_v_out = values[2];
    __pyx_v_fill_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_2d_axis0_int64", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1497; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis0_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_242take_2d_axis0_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1497
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis0_int64(ndarray[int64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_242take_2d_axis0_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf = 0;
  __pyx_t_5numpy_int64_t __pyx_v_fv;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_outbuf;
  __Pyx_Buffer __pyx_pybuffer_outbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  __pyx_t_5numpy_int64_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("take_2d_axis0_int64");
  __pyx_pybuffer_outbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_outbuf.refcount = 0;
  __pyx_pybuffernd_outbuf.data = NULL;
  __pyx_pybuffernd_outbuf.rcbuffer = &__pyx_pybuffer_outbuf;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1505
 *         int64_t fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 *     k = values.shape[1]
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1506
 * 
 *     n = len(indexer)
 *     k = values.shape[1]             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_v_k = (__pyx_v_values->dimensions[1]);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1508
 *     k = values.shape[1]
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_out == Py_None);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1509
 * 
 *     if out is None:
 *         outbuf = np.empty((n, k), dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
    __pyx_t_6 = 0;
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1511
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 *         outbuf = out             # <<<<<<<<<<<<<<
 * 
 *     if True and _checknan(fill_value):
 */
    if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_v_out);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_v_out);
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1513
 *         outbuf = out
 * 
 *     if True and _checknan(fill_value):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
  if (1) {
    __pyx_t_2 = __pyx_f_6pandas_8_tseries__checknan(__pyx_v_fill_value);
    __pyx_t_12 = __pyx_t_2;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1514
 * 
 *     if True and _checknan(fill_value):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1515
 *     if True and _checknan(fill_value):
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1516
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for j from 0 <= j < k:
 *                     raise ValueError('No NA values allowed')
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1517
 *             idx = indexer[i]
 *             if idx == -1:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     raise ValueError('No NA values allowed')
 *             else:
 */
        __pyx_t_15 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1518
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for j from 0 <= j < k:
 */
          __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1520
 *                     raise ValueError('No NA values allowed')
 *             else:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[idx, j]
 *     else:
 */
        __pyx_t_15 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1521
 *             else:
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = values[idx, j]             # <<<<<<<<<<<<<<
 *     else:
 *         fv = fill_value
 */
          __pyx_t_16 = __pyx_v_idx;
          __pyx_t_17 = __pyx_v_j;
          __pyx_t_18 = __pyx_v_i;
          __pyx_t_19 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_outbuf.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides));
        }
      }
      __pyx_L7:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1523
 *                     outbuf[i, j] = values[idx, j]
 *     else:
 *         fv = fill_value             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
    __pyx_t_20 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_20 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_fv = __pyx_t_20;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1524
 *     else:
 *         fv = fill_value
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1525
 *         fv = fill_value
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1526
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = fv
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1527
 *             idx = indexer[i]
 *             if idx == -1:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = fv
 *             else:
 */
        __pyx_t_21 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_21; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1528
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = fv             # <<<<<<<<<<<<<<
 *             else:
 *                 for j from 0 <= j < k:
 */
          __pyx_t_22 = __pyx_v_i;
          __pyx_t_23 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_outbuf.diminfo[1].strides) = __pyx_v_fv;
        }
        goto __pyx_L14;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1530
 *                     outbuf[i, j] = fv
 *             else:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[idx, j]
 * 
 */
        __pyx_t_21 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_21; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1531
 *             else:
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = values[idx, j]             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
          __pyx_t_24 = __pyx_v_idx;
          __pyx_t_25 = __pyx_v_j;
          __pyx_t_26 = __pyx_v_i;
          __pyx_t_27 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_outbuf.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides));
        }
      }
      __pyx_L14:;
    }
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis0_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_245take_2d_axis0_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_245take_2d_axis0_bool = {__Pyx_NAMESTR("take_2d_axis0_bool"), (PyCFunction)__pyx_pw_6pandas_8_tseries_245take_2d_axis0_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_245take_2d_axis0_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_fill_value = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_2d_axis0_bool (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1537
 * def take_2d_axis0_bool(ndarray[uint8_t, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_46;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_2d_axis0_bool", 0, 2, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis0_bool") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_indexer = ((PyArrayObject *)values[1]);
      __pyx_v_out = values[2];
      __pyx_v_fill_value = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_indexer = ((PyArrayObject *)values[1]);
    __pyx_v_out = values[2];
    __pyx_v_fill_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_2d_axis0_bool", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis0_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_244take_2d_axis0_bool(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1535
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis0_bool(ndarray[uint8_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_244take_2d_axis0_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf = 0;
  __pyx_t_5numpy_uint8_t __pyx_v_fv;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_outbuf;
  __Pyx_Buffer __pyx_pybuffer_outbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  __pyx_t_5numpy_uint8_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("take_2d_axis0_bool");
  __pyx_pybuffer_outbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_outbuf.refcount = 0;
  __pyx_pybuffernd_outbuf.data = NULL;
  __pyx_pybuffernd_outbuf.rcbuffer = &__pyx_pybuffer_outbuf;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1543
 *         uint8_t fv
 * 
 *     n = len(indexer)             # <<<<<<<<<<<<<<
 *     k = values.shape[1]
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1544
 * 
 *     n = len(indexer)
 *     k = values.shape[1]             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_v_k = (__pyx_v_values->dimensions[1]);

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1546
 *     k = values.shape[1]
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_out == Py_None);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1547
 * 
 *     if out is None:
 *         outbuf = np.empty((n, k), dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
    __pyx_t_6 = 0;
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1549
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 *         outbuf = out             # <<<<<<<<<<<<<<
 * 
 *     if True and _checknan(fill_value):
 */
    if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_v_out);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_v_out);
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1551
 *         outbuf = out
 * 
 *     if True and _checknan(fill_value):             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
  if (1) {
    __pyx_t_2 = __pyx_f_6pandas_8_tseries__checknan(__pyx_v_fill_value);
    __pyx_t_12 = __pyx_t_2;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1552
 * 
 *     if True and _checknan(fill_value):
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1553
 *     if True and _checknan(fill_value):
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 */
      __pyx_t_14 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1554
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for j from 0 <= j < k:
 *                     raise ValueError('No NA values allowed')
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1555
 *             idx = indexer[i]
 *             if idx == -1:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     raise ValueError('No NA values allowed')
 *             else:
 */
        __pyx_t_15 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1556
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for j from 0 <= j < k:
 */
          __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_47), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1558
 *                     raise ValueError('No NA values allowed')
 *             else:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[idx, j]
 *     else:
 */
        __pyx_t_15 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_15; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1559
 *             else:
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = values[idx, j]             # <<<<<<<<<<<<<<
 *     else:
 *         fv = fill_value
 */
          __pyx_t_16 = __pyx_v_idx;
          __pyx_t_17 = __pyx_v_j;
          __pyx_t_18 = __pyx_v_i;
          __pyx_t_19 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_outbuf.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_values.diminfo[1].strides));
        }
      }
      __pyx_L7:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1561
 *                     outbuf[i, j] = values[idx, j]
 *     else:
 *         fv = fill_value             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             idx = indexer[i]
 */
    __pyx_t_20 = __Pyx_PyInt_from_py_npy_uint8(__pyx_v_fill_value); if (unlikely((__pyx_t_20 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_fv = __pyx_t_20;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1562
 *     else:
 *         fv = fill_value
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             idx = indexer[i]
 *             if idx == -1:
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_i = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1563
 *         fv = fill_value
 *         for i in range(n):
 *             idx = indexer[i]             # <<<<<<<<<<<<<<
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1564
 *         for i in range(n):
 *             idx = indexer[i]
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = fv
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1565
 *             idx = indexer[i]
 *             if idx == -1:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = fv
 *             else:
 */
        __pyx_t_21 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_21; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1566
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = fv             # <<<<<<<<<<<<<<
 *             else:
 *                 for j from 0 <= j < k:
 */
          __pyx_t_22 = __pyx_v_i;
          __pyx_t_23 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_outbuf.diminfo[1].strides) = __pyx_v_fv;
        }
        goto __pyx_L14;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1568
 *                     outbuf[i, j] = fv
 *             else:
 *                 for j from 0 <= j < k:             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[idx, j]
 * 
 */
        __pyx_t_21 = __pyx_v_k;
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_21; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1569
 *             else:
 *                 for j from 0 <= j < k:
 *                     outbuf[i, j] = values[idx, j]             # <<<<<<<<<<<<<<
 * 
 * 
 */
          __pyx_t_24 = __pyx_v_idx;
          __pyx_t_25 = __pyx_v_j;
          __pyx_t_26 = __pyx_v_i;
          __pyx_t_27 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_outbuf.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_25, __pyx_pybuffernd_values.diminfo[1].strides));
        }
      }
      __pyx_L14:;
    }
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis0_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_247take_2d_axis1_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_247take_2d_axis1_float64 = {__Pyx_NAMESTR("take_2d_axis1_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_247take_2d_axis1_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_247take_2d_axis1_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_fill_value = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_2d_axis1_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1576
 * def take_2d_axis1_float64(ndarray[float64_t, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_48;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float64", 0, 2, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1574; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_float64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1574; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_indexer = ((PyArrayObject *)values[1]);
      __pyx_v_out = values[2];
      __pyx_v_fill_value = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_indexer = ((PyArrayObject *)values[1]);
    __pyx_v_out = values[2];
    __pyx_v_fill_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_2d_axis1_float64", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1574; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis1_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_246take_2d_axis1_float64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1574
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis1_float64(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_246take_2d_axis1_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf = 0;
  __pyx_t_5numpy_float64_t __pyx_v_fv;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_outbuf;
  __Pyx_Buffer __pyx_pybuffer_outbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  __pyx_t_5numpy_float64_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("take_2d_axis1_float64");
  __pyx_pybuffer_outbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_outbuf.refcount = 0;
  __pyx_pybuffernd_outbuf.data = NULL;
  __pyx_pybuffernd_outbuf.rcbuffer = &__pyx_pybuffer_outbuf;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1582
 *         float64_t fv
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     k = len(indexer)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1583
 * 
 *     n = len(values)
 *     k = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_k = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1585
 *     k = len(indexer)
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_out == Py_None);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1586
 * 
 *     if out is None:
 *         outbuf = np.empty((n, k), dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
    __pyx_t_6 = 0;
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1588
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 *         outbuf = out             # <<<<<<<<<<<<<<
 * 
 *     if False and _checknan(fill_value):
 */
    if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_v_out);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_v_out);
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1590
 *         outbuf = out
 * 
 *     if False and _checknan(fill_value):             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             idx = indexer[j]
 */
  if (0) {
    __pyx_t_2 = __pyx_f_6pandas_8_tseries__checknan(__pyx_v_fill_value);
    __pyx_t_12 = __pyx_t_2;
  } else {
    __pyx_t_12 = 0;
  }
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1591
 * 
 *     if False and _checknan(fill_value):
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_1 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1592
 *     if False and _checknan(fill_value):
 *         for j in range(k):
 *             idx = indexer[j]             # <<<<<<<<<<<<<<
 * 
 *             if idx == -1:
 */
      __pyx_t_14 = __pyx_v_j;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1594
 *             idx = indexer[j]
 * 
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for i in range(n):
 *                     raise ValueError('No NA values allowed')
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1595
 * 
 *             if idx == -1:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     raise ValueError('No NA values allowed')
 *             else:
 */
        __pyx_t_15 = __pyx_v_n;
        for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
          __pyx_v_i = __pyx_t_16;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1596
 *             if idx == -1:
 *                 for i in range(n):
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(n):
 */
          __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_49), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1598
 *                     raise ValueError('No NA values allowed')
 *             else:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[i, idx]
 *     else:
 */
        __pyx_t_15 = __pyx_v_n;
        for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
          __pyx_v_i = __pyx_t_16;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1599
 *             else:
 *                 for i in range(n):
 *                     outbuf[i, j] = values[i, idx]             # <<<<<<<<<<<<<<
 *     else:
 *         fv = fill_value
 */
          __pyx_t_17 = __pyx_v_i;
          __pyx_t_18 = __pyx_v_idx;
          __pyx_t_19 = __pyx_v_i;
          __pyx_t_20 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_outbuf.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides));
        }
      }
      __pyx_L7:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1601
 *                     outbuf[i, j] = values[i, idx]
 *     else:
 *         fv = fill_value             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             idx = indexer[j]
 */
    __pyx_t_21 = __pyx_PyFloat_AsDouble(__pyx_v_fill_value); if (unlikely((__pyx_t_21 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_fv = __pyx_t_21;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1602
 *     else:
 *         fv = fill_value
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_1 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1603
 *         fv = fill_value
 *         for j in range(k):
 *             idx = indexer[j]             # <<<<<<<<<<<<<<
 * 
 *             if idx == -1:
 */
      __pyx_t_15 = __pyx_v_j;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1605
 *             idx = indexer[j]
 * 
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for i in range(n):
 *                     outbuf[i, j] = fv
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1606
 * 
 *             if idx == -1:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = fv
 *             else:
 */
        __pyx_t_16 = __pyx_v_n;
        for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_16; __pyx_t_22+=1) {
          __pyx_v_i = __pyx_t_22;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1607
 *             if idx == -1:
 *                 for i in range(n):
 *                     outbuf[i, j] = fv             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(n):
 */
          __pyx_t_23 = __pyx_v_i;
          __pyx_t_24 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_outbuf.diminfo[1].strides) = __pyx_v_fv;
        }
        goto __pyx_L14;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1609
 *                     outbuf[i, j] = fv
 *             else:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[i, idx]
 * 
 */
        __pyx_t_16 = __pyx_v_n;
        for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_16; __pyx_t_22+=1) {
          __pyx_v_i = __pyx_t_22;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1610
 *             else:
 *                 for i in range(n):
 *                     outbuf[i, j] = values[i, idx]             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
          __pyx_t_25 = __pyx_v_i;
          __pyx_t_26 = __pyx_v_idx;
          __pyx_t_27 = __pyx_v_i;
          __pyx_t_28 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_outbuf.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_values.diminfo[1].strides));
        }
      }
      __pyx_L14:;
    }
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis1_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_249take_2d_axis1_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_249take_2d_axis1_object = {__Pyx_NAMESTR("take_2d_axis1_object"), (PyCFunction)__pyx_pw_6pandas_8_tseries_249take_2d_axis1_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_249take_2d_axis1_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_fill_value = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_2d_axis1_object (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1616
 * def take_2d_axis1_object(ndarray[object, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_50;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_2d_axis1_object", 0, 2, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_object") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_indexer = ((PyArrayObject *)values[1]);
      __pyx_v_out = values[2];
      __pyx_v_fill_value = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_indexer = ((PyArrayObject *)values[1]);
    __pyx_v_out = values[2];
    __pyx_v_fill_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_2d_axis1_object", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis1_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_248take_2d_axis1_object(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1614
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis1_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_248take_2d_axis1_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf = 0;
  PyObject *__pyx_v_fv = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_outbuf;
  __Pyx_Buffer __pyx_pybuffer_outbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  PyObject **__pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("take_2d_axis1_object");
  __pyx_pybuffer_outbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_outbuf.refcount = 0;
  __pyx_pybuffernd_outbuf.data = NULL;
  __pyx_pybuffernd_outbuf.rcbuffer = &__pyx_pybuffer_outbuf;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1622
 *         object fv
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     k = len(indexer)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1623
 * 
 *     n = len(values)
 *     k = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_k = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1625
 *     k = len(indexer)
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_out == Py_None);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1626
 * 
 *     if out is None:
 *         outbuf = np.empty((n, k), dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
    __pyx_t_6 = 0;
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1628
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 *         outbuf = out             # <<<<<<<<<<<<<<
 * 
 *     if False and _checknan(fill_value):
 */
    if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_v_out);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_v_out);
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1630
 *         outbuf = out
 * 
 *     if False and _checknan(fill_value):             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             idx = indexer[j]
 */
  if (0) {
    __pyx_t_2 = __pyx_f_6pandas_8_tseries__checknan(__pyx_v_fill_value);
    __pyx_t_12 = __pyx_t_2;
  } else {
    __pyx_t_12 = 0;
  }
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1631
 * 
 *     if False and _checknan(fill_value):
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_1 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1632
 *     if False and _checknan(fill_value):
 *         for j in range(k):
 *             idx = indexer[j]             # <<<<<<<<<<<<<<
 * 
 *             if idx == -1:
 */
      __pyx_t_14 = __pyx_v_j;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1634
 *             idx = indexer[j]
 * 
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for i in range(n):
 *                     raise ValueError('No NA values allowed')
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1635
 * 
 *             if idx == -1:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     raise ValueError('No NA values allowed')
 *             else:
 */
        __pyx_t_15 = __pyx_v_n;
        for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
          __pyx_v_i = __pyx_t_16;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1636
 *             if idx == -1:
 *                 for i in range(n):
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(n):
 */
          __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_51), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1638
 *                     raise ValueError('No NA values allowed')
 *             else:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[i, idx]
 *     else:
 */
        __pyx_t_15 = __pyx_v_n;
        for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
          __pyx_v_i = __pyx_t_16;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1639
 *             else:
 *                 for i in range(n):
 *                     outbuf[i, j] = values[i, idx]             # <<<<<<<<<<<<<<
 *     else:
 *         fv = fill_value
 */
          __pyx_t_17 = __pyx_v_i;
          __pyx_t_18 = __pyx_v_idx;
          __pyx_t_3 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides);
          __Pyx_INCREF((PyObject*)__pyx_t_3);
          __pyx_t_19 = __pyx_v_i;
          __pyx_t_20 = __pyx_v_j;
          __pyx_t_21 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_outbuf.diminfo[1].strides);
          __Pyx_GOTREF(*__pyx_t_21);
          __Pyx_DECREF(*__pyx_t_21); __Pyx_INCREF(__pyx_t_3);
          *__pyx_t_21 = __pyx_t_3;
          __Pyx_GIVEREF(*__pyx_t_21);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
      }
      __pyx_L7:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1641
 *                     outbuf[i, j] = values[i, idx]
 *     else:
 *         fv = fill_value             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             idx = indexer[j]
 */
    __Pyx_INCREF(__pyx_v_fill_value);
    __pyx_v_fv = __pyx_v_fill_value;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1642
 *     else:
 *         fv = fill_value
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_1 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1643
 *         fv = fill_value
 *         for j in range(k):
 *             idx = indexer[j]             # <<<<<<<<<<<<<<
 * 
 *             if idx == -1:
 */
      __pyx_t_15 = __pyx_v_j;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1645
 *             idx = indexer[j]
 * 
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for i in range(n):
 *                     outbuf[i, j] = fv
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1646
 * 
 *             if idx == -1:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = fv
 *             else:
 */
        __pyx_t_16 = __pyx_v_n;
        for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_16; __pyx_t_22+=1) {
          __pyx_v_i = __pyx_t_22;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1647
 *             if idx == -1:
 *                 for i in range(n):
 *                     outbuf[i, j] = fv             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(n):
 */
          __pyx_t_23 = __pyx_v_i;
          __pyx_t_24 = __pyx_v_j;
          __pyx_t_21 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_outbuf.diminfo[1].strides);
          __Pyx_GOTREF(*__pyx_t_21);
          __Pyx_DECREF(*__pyx_t_21); __Pyx_INCREF(__pyx_v_fv);
          *__pyx_t_21 = __pyx_v_fv;
          __Pyx_GIVEREF(*__pyx_t_21);
        }
        goto __pyx_L14;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1649
 *                     outbuf[i, j] = fv
 *             else:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[i, idx]
 * 
 */
        __pyx_t_16 = __pyx_v_n;
        for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_16; __pyx_t_22+=1) {
          __pyx_v_i = __pyx_t_22;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1650
 *             else:
 *                 for i in range(n):
 *                     outbuf[i, j] = values[i, idx]             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
          __pyx_t_25 = __pyx_v_i;
          __pyx_t_26 = __pyx_v_idx;
          __pyx_t_3 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_values.diminfo[1].strides);
          __Pyx_INCREF((PyObject*)__pyx_t_3);
          __pyx_t_27 = __pyx_v_i;
          __pyx_t_28 = __pyx_v_j;
          __pyx_t_21 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_outbuf.diminfo[1].strides);
          __Pyx_GOTREF(*__pyx_t_21);
          __Pyx_DECREF(*__pyx_t_21); __Pyx_INCREF(__pyx_t_3);
          *__pyx_t_21 = __pyx_t_3;
          __Pyx_GIVEREF(*__pyx_t_21);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
      }
      __pyx_L14:;
    }
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis1_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XDECREF(__pyx_v_fv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_251take_2d_axis1_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_251take_2d_axis1_int32 = {__Pyx_NAMESTR("take_2d_axis1_int32"), (PyCFunction)__pyx_pw_6pandas_8_tseries_251take_2d_axis1_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_251take_2d_axis1_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_fill_value = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_2d_axis1_int32 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1656
 * def take_2d_axis1_int32(ndarray[int32_t, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_52;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32", 0, 2, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int32") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_indexer = ((PyArrayObject *)values[1]);
      __pyx_v_out = values[2];
      __pyx_v_fill_value = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_indexer = ((PyArrayObject *)values[1]);
    __pyx_v_out = values[2];
    __pyx_v_fill_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int32", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis1_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_250take_2d_axis1_int32(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1654
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis1_int32(ndarray[int32_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_250take_2d_axis1_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf = 0;
  __pyx_t_5numpy_int32_t __pyx_v_fv;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_outbuf;
  __Pyx_Buffer __pyx_pybuffer_outbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  __pyx_t_5numpy_int32_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("take_2d_axis1_int32");
  __pyx_pybuffer_outbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_outbuf.refcount = 0;
  __pyx_pybuffernd_outbuf.data = NULL;
  __pyx_pybuffernd_outbuf.rcbuffer = &__pyx_pybuffer_outbuf;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1662
 *         int32_t fv
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     k = len(indexer)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1663
 * 
 *     n = len(values)
 *     k = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_k = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1665
 *     k = len(indexer)
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_out == Py_None);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1666
 * 
 *     if out is None:
 *         outbuf = np.empty((n, k), dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
    __pyx_t_6 = 0;
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1668
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 *         outbuf = out             # <<<<<<<<<<<<<<
 * 
 *     if True and _checknan(fill_value):
 */
    if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_v_out);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_v_out);
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1670
 *         outbuf = out
 * 
 *     if True and _checknan(fill_value):             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             idx = indexer[j]
 */
  if (1) {
    __pyx_t_2 = __pyx_f_6pandas_8_tseries__checknan(__pyx_v_fill_value);
    __pyx_t_12 = __pyx_t_2;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1671
 * 
 *     if True and _checknan(fill_value):
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_1 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1672
 *     if True and _checknan(fill_value):
 *         for j in range(k):
 *             idx = indexer[j]             # <<<<<<<<<<<<<<
 * 
 *             if idx == -1:
 */
      __pyx_t_14 = __pyx_v_j;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1674
 *             idx = indexer[j]
 * 
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for i in range(n):
 *                     raise ValueError('No NA values allowed')
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1675
 * 
 *             if idx == -1:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     raise ValueError('No NA values allowed')
 *             else:
 */
        __pyx_t_15 = __pyx_v_n;
        for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
          __pyx_v_i = __pyx_t_16;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1676
 *             if idx == -1:
 *                 for i in range(n):
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(n):
 */
          __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_53), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1678
 *                     raise ValueError('No NA values allowed')
 *             else:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[i, idx]
 *     else:
 */
        __pyx_t_15 = __pyx_v_n;
        for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
          __pyx_v_i = __pyx_t_16;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1679
 *             else:
 *                 for i in range(n):
 *                     outbuf[i, j] = values[i, idx]             # <<<<<<<<<<<<<<
 *     else:
 *         fv = fill_value
 */
          __pyx_t_17 = __pyx_v_i;
          __pyx_t_18 = __pyx_v_idx;
          __pyx_t_19 = __pyx_v_i;
          __pyx_t_20 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_outbuf.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides));
        }
      }
      __pyx_L7:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1681
 *                     outbuf[i, j] = values[i, idx]
 *     else:
 *         fv = fill_value             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             idx = indexer[j]
 */
    __pyx_t_21 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_fill_value); if (unlikely((__pyx_t_21 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_fv = __pyx_t_21;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1682
 *     else:
 *         fv = fill_value
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_1 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1683
 *         fv = fill_value
 *         for j in range(k):
 *             idx = indexer[j]             # <<<<<<<<<<<<<<
 * 
 *             if idx == -1:
 */
      __pyx_t_15 = __pyx_v_j;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1685
 *             idx = indexer[j]
 * 
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for i in range(n):
 *                     outbuf[i, j] = fv
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1686
 * 
 *             if idx == -1:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = fv
 *             else:
 */
        __pyx_t_16 = __pyx_v_n;
        for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_16; __pyx_t_22+=1) {
          __pyx_v_i = __pyx_t_22;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1687
 *             if idx == -1:
 *                 for i in range(n):
 *                     outbuf[i, j] = fv             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(n):
 */
          __pyx_t_23 = __pyx_v_i;
          __pyx_t_24 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_outbuf.diminfo[1].strides) = __pyx_v_fv;
        }
        goto __pyx_L14;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1689
 *                     outbuf[i, j] = fv
 *             else:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[i, idx]
 * 
 */
        __pyx_t_16 = __pyx_v_n;
        for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_16; __pyx_t_22+=1) {
          __pyx_v_i = __pyx_t_22;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1690
 *             else:
 *                 for i in range(n):
 *                     outbuf[i, j] = values[i, idx]             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
          __pyx_t_25 = __pyx_v_i;
          __pyx_t_26 = __pyx_v_idx;
          __pyx_t_27 = __pyx_v_i;
          __pyx_t_28 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_outbuf.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_values.diminfo[1].strides));
        }
      }
      __pyx_L14:;
    }
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis1_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_253take_2d_axis1_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_253take_2d_axis1_int64 = {__Pyx_NAMESTR("take_2d_axis1_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_253take_2d_axis1_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_253take_2d_axis1_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_fill_value = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_2d_axis1_int64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1696
 * def take_2d_axis1_int64(ndarray[int64_t, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_54;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int64", 0, 2, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_int64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_indexer = ((PyArrayObject *)values[1]);
      __pyx_v_out = values[2];
      __pyx_v_fill_value = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_indexer = ((PyArrayObject *)values[1]);
    __pyx_v_out = values[2];
    __pyx_v_fill_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_2d_axis1_int64", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis1_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_252take_2d_axis1_int64(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1694
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis1_int64(ndarray[int64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_252take_2d_axis1_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf = 0;
  __pyx_t_5numpy_int64_t __pyx_v_fv;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_outbuf;
  __Pyx_Buffer __pyx_pybuffer_outbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  __pyx_t_5numpy_int64_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("take_2d_axis1_int64");
  __pyx_pybuffer_outbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_outbuf.refcount = 0;
  __pyx_pybuffernd_outbuf.data = NULL;
  __pyx_pybuffernd_outbuf.rcbuffer = &__pyx_pybuffer_outbuf;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1702
 *         int64_t fv
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     k = len(indexer)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1703
 * 
 *     n = len(values)
 *     k = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_k = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1705
 *     k = len(indexer)
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_out == Py_None);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1706
 * 
 *     if out is None:
 *         outbuf = np.empty((n, k), dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
    __pyx_t_6 = 0;
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1708
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 *         outbuf = out             # <<<<<<<<<<<<<<
 * 
 *     if True and _checknan(fill_value):
 */
    if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_v_out);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_v_out);
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1710
 *         outbuf = out
 * 
 *     if True and _checknan(fill_value):             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             idx = indexer[j]
 */
  if (1) {
    __pyx_t_2 = __pyx_f_6pandas_8_tseries__checknan(__pyx_v_fill_value);
    __pyx_t_12 = __pyx_t_2;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1711
 * 
 *     if True and _checknan(fill_value):
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_1 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1712
 *     if True and _checknan(fill_value):
 *         for j in range(k):
 *             idx = indexer[j]             # <<<<<<<<<<<<<<
 * 
 *             if idx == -1:
 */
      __pyx_t_14 = __pyx_v_j;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1714
 *             idx = indexer[j]
 * 
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for i in range(n):
 *                     raise ValueError('No NA values allowed')
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1715
 * 
 *             if idx == -1:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     raise ValueError('No NA values allowed')
 *             else:
 */
        __pyx_t_15 = __pyx_v_n;
        for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
          __pyx_v_i = __pyx_t_16;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1716
 *             if idx == -1:
 *                 for i in range(n):
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(n):
 */
          __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_55), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1718
 *                     raise ValueError('No NA values allowed')
 *             else:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[i, idx]
 *     else:
 */
        __pyx_t_15 = __pyx_v_n;
        for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
          __pyx_v_i = __pyx_t_16;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1719
 *             else:
 *                 for i in range(n):
 *                     outbuf[i, j] = values[i, idx]             # <<<<<<<<<<<<<<
 *     else:
 *         fv = fill_value
 */
          __pyx_t_17 = __pyx_v_i;
          __pyx_t_18 = __pyx_v_idx;
          __pyx_t_19 = __pyx_v_i;
          __pyx_t_20 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_outbuf.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides));
        }
      }
      __pyx_L7:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1721
 *                     outbuf[i, j] = values[i, idx]
 *     else:
 *         fv = fill_value             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             idx = indexer[j]
 */
    __pyx_t_21 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_fill_value); if (unlikely((__pyx_t_21 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_fv = __pyx_t_21;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1722
 *     else:
 *         fv = fill_value
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_1 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1723
 *         fv = fill_value
 *         for j in range(k):
 *             idx = indexer[j]             # <<<<<<<<<<<<<<
 * 
 *             if idx == -1:
 */
      __pyx_t_15 = __pyx_v_j;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1725
 *             idx = indexer[j]
 * 
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for i in range(n):
 *                     outbuf[i, j] = fv
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1726
 * 
 *             if idx == -1:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = fv
 *             else:
 */
        __pyx_t_16 = __pyx_v_n;
        for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_16; __pyx_t_22+=1) {
          __pyx_v_i = __pyx_t_22;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1727
 *             if idx == -1:
 *                 for i in range(n):
 *                     outbuf[i, j] = fv             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(n):
 */
          __pyx_t_23 = __pyx_v_i;
          __pyx_t_24 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_outbuf.diminfo[1].strides) = __pyx_v_fv;
        }
        goto __pyx_L14;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1729
 *                     outbuf[i, j] = fv
 *             else:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[i, idx]
 * 
 */
        __pyx_t_16 = __pyx_v_n;
        for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_16; __pyx_t_22+=1) {
          __pyx_v_i = __pyx_t_22;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1730
 *             else:
 *                 for i in range(n):
 *                     outbuf[i, j] = values[i, idx]             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
          __pyx_t_25 = __pyx_v_i;
          __pyx_t_26 = __pyx_v_idx;
          __pyx_t_27 = __pyx_v_i;
          __pyx_t_28 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_outbuf.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_values.diminfo[1].strides));
        }
      }
      __pyx_L14:;
    }
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis1_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_255take_2d_axis1_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_255take_2d_axis1_bool = {__Pyx_NAMESTR("take_2d_axis1_bool"), (PyCFunction)__pyx_pw_6pandas_8_tseries_255take_2d_axis1_bool, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_255take_2d_axis1_bool(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_v_fill_value = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__indexer,&__pyx_n_s__out,&__pyx_n_s__fill_value,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("take_2d_axis1_bool (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1736
 * def take_2d_axis1_bool(ndarray[uint8_t, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
    values[2] = ((PyObject *)Py_None);
    values[3] = __pyx_k_56;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("take_2d_axis1_bool", 0, 2, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__out);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__fill_value);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "take_2d_axis1_bool") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_indexer = ((PyArrayObject *)values[1]);
      __pyx_v_out = values[2];
      __pyx_v_fill_value = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_indexer = ((PyArrayObject *)values[1]);
    __pyx_v_out = values[2];
    __pyx_v_fill_value = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("take_2d_axis1_bool", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis1_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_254take_2d_axis1_bool(__pyx_self, __pyx_v_values, __pyx_v_indexer, __pyx_v_out, __pyx_v_fill_value);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1734
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis1_bool(ndarray[uint8_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_254take_2d_axis1_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyArrayObject *__pyx_v_indexer, PyObject *__pyx_v_out, PyObject *__pyx_v_fill_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_idx;
  PyArrayObject *__pyx_v_outbuf = 0;
  __pyx_t_5numpy_uint8_t __pyx_v_fv;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_outbuf;
  __Pyx_Buffer __pyx_pybuffer_outbuf;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  __pyx_t_5numpy_uint8_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("take_2d_axis1_bool");
  __pyx_pybuffer_outbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_outbuf.refcount = 0;
  __pyx_pybuffernd_outbuf.data = NULL;
  __pyx_pybuffernd_outbuf.rcbuffer = &__pyx_pybuffer_outbuf;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1742
 *         uint8_t fv
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     k = len(indexer)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1743
 * 
 *     n = len(values)
 *     k = len(indexer)             # <<<<<<<<<<<<<<
 * 
 *     if out is None:
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_k = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1745
 *     k = len(indexer)
 * 
 *     if out is None:             # <<<<<<<<<<<<<<
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 */
  __pyx_t_2 = (__pyx_v_out == Py_None);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1746
 * 
 *     if out is None:
 *         outbuf = np.empty((n, k), dtype=values.dtype)             # <<<<<<<<<<<<<<
 *     else:
 *         outbuf = out
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_6));
    __pyx_t_6 = 0;
    __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_6));
    __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_t_3);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_t_3);
    __pyx_t_3 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1748
 *         outbuf = np.empty((n, k), dtype=values.dtype)
 *     else:
 *         outbuf = out             # <<<<<<<<<<<<<<
 * 
 *     if True and _checknan(fill_value):
 */
    if (!(likely(((__pyx_v_out) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_out, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_7 = ((PyArrayObject *)__pyx_v_out);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
      __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_8 < 0)) {
        PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_outbuf, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_outbuf.diminfo[0].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_outbuf.diminfo[0].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_outbuf.diminfo[1].strides = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_outbuf.diminfo[1].shape = __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_7 = 0;
    __Pyx_INCREF(__pyx_v_out);
    __pyx_v_outbuf = ((PyArrayObject *)__pyx_v_out);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1750
 *         outbuf = out
 * 
 *     if True and _checknan(fill_value):             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             idx = indexer[j]
 */
  if (1) {
    __pyx_t_2 = __pyx_f_6pandas_8_tseries__checknan(__pyx_v_fill_value);
    __pyx_t_12 = __pyx_t_2;
  } else {
    __pyx_t_12 = 1;
  }
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1751
 * 
 *     if True and _checknan(fill_value):
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_1 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1752
 *     if True and _checknan(fill_value):
 *         for j in range(k):
 *             idx = indexer[j]             # <<<<<<<<<<<<<<
 * 
 *             if idx == -1:
 */
      __pyx_t_14 = __pyx_v_j;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1754
 *             idx = indexer[j]
 * 
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for i in range(n):
 *                     raise ValueError('No NA values allowed')
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1755
 * 
 *             if idx == -1:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     raise ValueError('No NA values allowed')
 *             else:
 */
        __pyx_t_15 = __pyx_v_n;
        for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
          __pyx_v_i = __pyx_t_16;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1756
 *             if idx == -1:
 *                 for i in range(n):
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(n):
 */
          __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_57), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_Raise(__pyx_t_3, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        goto __pyx_L7;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1758
 *                     raise ValueError('No NA values allowed')
 *             else:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[i, idx]
 *     else:
 */
        __pyx_t_15 = __pyx_v_n;
        for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) {
          __pyx_v_i = __pyx_t_16;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1759
 *             else:
 *                 for i in range(n):
 *                     outbuf[i, j] = values[i, idx]             # <<<<<<<<<<<<<<
 *     else:
 *         fv = fill_value
 */
          __pyx_t_17 = __pyx_v_i;
          __pyx_t_18 = __pyx_v_idx;
          __pyx_t_19 = __pyx_v_i;
          __pyx_t_20 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_outbuf.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_values.diminfo[1].strides));
        }
      }
      __pyx_L7:;
    }
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1761
 *                     outbuf[i, j] = values[i, idx]
 *     else:
 *         fv = fill_value             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             idx = indexer[j]
 */
    __pyx_t_21 = __Pyx_PyInt_from_py_npy_uint8(__pyx_v_fill_value); if (unlikely((__pyx_t_21 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_fv = __pyx_t_21;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1762
 *     else:
 *         fv = fill_value
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             idx = indexer[j]
 * 
 */
    __pyx_t_1 = __pyx_v_k;
    for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
      __pyx_v_j = __pyx_t_13;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1763
 *         fv = fill_value
 *         for j in range(k):
 *             idx = indexer[j]             # <<<<<<<<<<<<<<
 * 
 *             if idx == -1:
 */
      __pyx_t_15 = __pyx_v_j;
      __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_indexer.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1765
 *             idx = indexer[j]
 * 
 *             if idx == -1:             # <<<<<<<<<<<<<<
 *                 for i in range(n):
 *                     outbuf[i, j] = fv
 */
      __pyx_t_12 = (__pyx_v_idx == -1);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1766
 * 
 *             if idx == -1:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = fv
 *             else:
 */
        __pyx_t_16 = __pyx_v_n;
        for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_16; __pyx_t_22+=1) {
          __pyx_v_i = __pyx_t_22;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1767
 *             if idx == -1:
 *                 for i in range(n):
 *                     outbuf[i, j] = fv             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(n):
 */
          __pyx_t_23 = __pyx_v_i;
          __pyx_t_24 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_outbuf.diminfo[1].strides) = __pyx_v_fv;
        }
        goto __pyx_L14;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1769
 *                     outbuf[i, j] = fv
 *             else:
 *                 for i in range(n):             # <<<<<<<<<<<<<<
 *                     outbuf[i, j] = values[i, idx]
 * 
 */
        __pyx_t_16 = __pyx_v_n;
        for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_16; __pyx_t_22+=1) {
          __pyx_v_i = __pyx_t_22;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1770
 *             else:
 *                 for i in range(n):
 *                     outbuf[i, j] = values[i, idx]             # <<<<<<<<<<<<<<
 * 
 * 
 */
          __pyx_t_25 = __pyx_v_i;
          __pyx_t_26 = __pyx_v_idx;
          __pyx_t_27 = __pyx_v_i;
          __pyx_t_28 = __pyx_v_j;
          *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_outbuf.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_outbuf.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_outbuf.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_values.diminfo[1].strides));
        }
      }
      __pyx_L14:;
    }
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.take_2d_axis1_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_outbuf.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_outbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_257left_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_257left_join_indexer_float64 = {__Pyx_NAMESTR("left_join_indexer_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_257left_join_indexer_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_257left_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("left_join_indexer_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("left_join_indexer_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_float64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("left_join_indexer_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.left_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_256left_join_indexer_float64(__pyx_self, __pyx_v_left, __pyx_v_right);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1775
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_indexer_float64(ndarray[float64_t] left,             # <<<<<<<<<<<<<<
 *                              ndarray[float64_t] right):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_256left_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_nleft;
  Py_ssize_t __pyx_v_nright;
  PyArrayObject *__pyx_v_indexer = 0;
  __pyx_t_5numpy_float64_t __pyx_v_rval;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("left_join_indexer_float64");
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1782
 *         float64_t lval, rval
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     nleft = len(left)
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1783
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     nleft = len(left)
 *     nright = len(right)
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1784
 *     i = 0
 *     j = 0
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nleft = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1785
 *     j = 0
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     indexer = np.empty(nleft, dtype=np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nright = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1787
 *     nright = len(right)
 * 
 *     indexer = np.empty(nleft, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_nleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1788
 * 
 *     indexer = np.empty(nleft, dtype=np.int32)
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft:
 *             break
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1789
 *     indexer = np.empty(nleft, dtype=np.int32)
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             break
 * 
 */
    __pyx_t_12 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_12) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1790
 *     while True:
 *         if i == nleft:
 *             break             # <<<<<<<<<<<<<<
 * 
 *         if j == nright:
 */
      goto __pyx_L4_break;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1792
 *             break
 * 
 *         if j == nright:             # <<<<<<<<<<<<<<
 *             indexer[i] = -1
 *             i += 1
 */
    __pyx_t_12 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_12) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1793
 * 
 *         if j == nright:
 *             indexer[i] = -1             # <<<<<<<<<<<<<<
 *             i += 1
 *             continue
 */
      __pyx_t_1 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1794
 *         if j == nright:
 *             indexer[i] = -1
 *             i += 1             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1795
 *             indexer[i] = -1
 *             i += 1
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         rval = right[j]
 */
      goto __pyx_L3_continue;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1797
 *             continue
 * 
 *         rval = right[j]             # <<<<<<<<<<<<<<
 * 
 *         while i < nleft - 1 and left[i] == rval:
 */
    __pyx_t_13 = __pyx_v_j;
    __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1799
 *         rval = right[j]
 * 
 *         while i < nleft - 1 and left[i] == rval:             # <<<<<<<<<<<<<<
 *             indexer[i] = j
 *             i += 1
 */
    while (1) {
      __pyx_t_12 = (__pyx_v_i < (__pyx_v_nleft - 1));
      if (__pyx_t_12) {
        __pyx_t_14 = __pyx_v_i;
        __pyx_t_15 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval);
        __pyx_t_16 = __pyx_t_15;
      } else {
        __pyx_t_16 = __pyx_t_12;
      }
      if (!__pyx_t_16) break;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1800
 * 
 *         while i < nleft - 1 and left[i] == rval:
 *             indexer[i] = j             # <<<<<<<<<<<<<<
 *             i += 1
 * 
 */
      __pyx_t_17 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1801
 *         while i < nleft - 1 and left[i] == rval:
 *             indexer[i] = j
 *             i += 1             # <<<<<<<<<<<<<<
 * 
 *         if left[i] == right[j]:
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1803
 *             i += 1
 * 
 *         if left[i] == right[j]:             # <<<<<<<<<<<<<<
 *             indexer[i] = j
 *             i += 1
 */
    __pyx_t_18 = __pyx_v_i;
    __pyx_t_19 = __pyx_v_j;
    __pyx_t_16 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides)));
    if (__pyx_t_16) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1804
 * 
 *         if left[i] == right[j]:
 *             indexer[i] = j             # <<<<<<<<<<<<<<
 *             i += 1
 *             while i < nleft - 1 and left[i] == rval:
 */
      __pyx_t_20 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1805
 *         if left[i] == right[j]:
 *             indexer[i] = j
 *             i += 1             # <<<<<<<<<<<<<<
 *             while i < nleft - 1 and left[i] == rval:
 *                 indexer[i] = j
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1806
 *             indexer[i] = j
 *             i += 1
 *             while i < nleft - 1 and left[i] == rval:             # <<<<<<<<<<<<<<
 *                 indexer[i] = j
 *                 i += 1
 */
      while (1) {
        __pyx_t_16 = (__pyx_v_i < (__pyx_v_nleft - 1));
        if (__pyx_t_16) {
          __pyx_t_21 = __pyx_v_i;
          __pyx_t_12 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval);
          __pyx_t_15 = __pyx_t_12;
        } else {
          __pyx_t_15 = __pyx_t_16;
        }
        if (!__pyx_t_15) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1807
 *             i += 1
 *             while i < nleft - 1 and left[i] == rval:
 *                 indexer[i] = j             # <<<<<<<<<<<<<<
 *                 i += 1
 *             j += 1
 */
        __pyx_t_22 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1808
 *             while i < nleft - 1 and left[i] == rval:
 *                 indexer[i] = j
 *                 i += 1             # <<<<<<<<<<<<<<
 *             j += 1
 *         elif left[i] > rval:
 */
        __pyx_v_i = (__pyx_v_i + 1);
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1809
 *                 indexer[i] = j
 *                 i += 1
 *             j += 1             # <<<<<<<<<<<<<<
 *         elif left[i] > rval:
 *             indexer[i] = -1
 */
      __pyx_v_j = (__pyx_v_j + 1);
      goto __pyx_L9;
    }

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1810
 *                 i += 1
 *             j += 1
 *         elif left[i] > rval:             # <<<<<<<<<<<<<<
 *             indexer[i] = -1
 *             j += 1
 */
    __pyx_t_23 = __pyx_v_i;
    __pyx_t_15 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides)) > __pyx_v_rval);
    if (__pyx_t_15) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1811
 *             j += 1
 *         elif left[i] > rval:
 *             indexer[i] = -1             # <<<<<<<<<<<<<<
 *             j += 1
 *         else:
 */
      __pyx_t_24 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1812
 *         elif left[i] > rval:
 *             indexer[i] = -1
 *             j += 1             # <<<<<<<<<<<<<<
 *         else:
 *             indexer[i] = -1
 */
      __pyx_v_j = (__pyx_v_j + 1);
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1814
 *             j += 1
 *         else:
 *             indexer[i] = -1             # <<<<<<<<<<<<<<
 *             i += 1
 *     return indexer
 */
      __pyx_t_25 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1815
 *         else:
 *             indexer[i] = -1
 *             i += 1             # <<<<<<<<<<<<<<
 *     return indexer
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }
    __pyx_L9:;
    __pyx_L3_continue:;
  }
  __pyx_L4_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1816
 *             indexer[i] = -1
 *             i += 1
 *     return indexer             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_indexer));
  __pyx_r = ((PyObject *)__pyx_v_indexer);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.left_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_259left_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_259left_join_indexer_object = {__Pyx_NAMESTR("left_join_indexer_object"), (PyCFunction)__pyx_pw_6pandas_8_tseries_259left_join_indexer_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_259left_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("left_join_indexer_object (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("left_join_indexer_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_object") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("left_join_indexer_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.left_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_258left_join_indexer_object(__pyx_self, __pyx_v_left, __pyx_v_right);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1820
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_indexer_object(ndarray[object] left,             # <<<<<<<<<<<<<<
 *                              ndarray[object] right):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_258left_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_nleft;
  Py_ssize_t __pyx_v_nright;
  PyArrayObject *__pyx_v_indexer = 0;
  PyObject *__pyx_v_rval = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("left_join_indexer_object");
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1827
 *         object lval, rval
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     nleft = len(left)
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1828
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     nleft = len(left)
 *     nright = len(right)
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1829
 *     i = 0
 *     j = 0
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nleft = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1830
 *     j = 0
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     indexer = np.empty(nleft, dtype=np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nright = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1832
 *     nright = len(right)
 * 
 *     indexer = np.empty(nleft, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_nleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1833
 * 
 *     indexer = np.empty(nleft, dtype=np.int32)
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft:
 *             break
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1834
 *     indexer = np.empty(nleft, dtype=np.int32)
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             break
 * 
 */
    __pyx_t_12 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_12) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1835
 *     while True:
 *         if i == nleft:
 *             break             # <<<<<<<<<<<<<<
 * 
 *         if j == nright:
 */
      goto __pyx_L4_break;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1837
 *             break
 * 
 *         if j == nright:             # <<<<<<<<<<<<<<
 *             indexer[i] = -1
 *             i += 1
 */
    __pyx_t_12 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_12) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1838
 * 
 *         if j == nright:
 *             indexer[i] = -1             # <<<<<<<<<<<<<<
 *             i += 1
 *             continue
 */
      __pyx_t_1 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1839
 *         if j == nright:
 *             indexer[i] = -1
 *             i += 1             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1840
 *             indexer[i] = -1
 *             i += 1
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         rval = right[j]
 */
      goto __pyx_L3_continue;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1842
 *             continue
 * 
 *         rval = right[j]             # <<<<<<<<<<<<<<
 * 
 *         while i < nleft - 1 and left[i] == rval:
 */
    __pyx_t_13 = __pyx_v_j;
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_XDECREF(__pyx_v_rval);
    __pyx_v_rval = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1844
 *         rval = right[j]
 * 
 *         while i < nleft - 1 and left[i] == rval:             # <<<<<<<<<<<<<<
 *             indexer[i] = j
 *             i += 1
 */
    while (1) {
      __pyx_t_12 = (__pyx_v_i < (__pyx_v_nleft - 1));
      if (__pyx_t_12) {
        __pyx_t_14 = __pyx_v_i;
        __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_left.diminfo[0].strides);
        __Pyx_INCREF((PyObject*)__pyx_t_6);
        __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_v_rval, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_16 = __pyx_t_15;
      } else {
        __pyx_t_16 = __pyx_t_12;
      }
      if (!__pyx_t_16) break;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1845
 * 
 *         while i < nleft - 1 and left[i] == rval:
 *             indexer[i] = j             # <<<<<<<<<<<<<<
 *             i += 1
 * 
 */
      __pyx_t_17 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1846
 *         while i < nleft - 1 and left[i] == rval:
 *             indexer[i] = j
 *             i += 1             # <<<<<<<<<<<<<<
 * 
 *         if left[i] == right[j]:
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1848
 *             i += 1
 * 
 *         if left[i] == right[j]:             # <<<<<<<<<<<<<<
 *             indexer[i] = j
 *             i += 1
 */
    __pyx_t_18 = __pyx_v_i;
    __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_2);
    __pyx_t_19 = __pyx_v_j;
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_16) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1849
 * 
 *         if left[i] == right[j]:
 *             indexer[i] = j             # <<<<<<<<<<<<<<
 *             i += 1
 *             while i < nleft - 1 and left[i] == rval:
 */
      __pyx_t_20 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1850
 *         if left[i] == right[j]:
 *             indexer[i] = j
 *             i += 1             # <<<<<<<<<<<<<<
 *             while i < nleft - 1 and left[i] == rval:
 *                 indexer[i] = j
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1851
 *             indexer[i] = j
 *             i += 1
 *             while i < nleft - 1 and left[i] == rval:             # <<<<<<<<<<<<<<
 *                 indexer[i] = j
 *                 i += 1
 */
      while (1) {
        __pyx_t_16 = (__pyx_v_i < (__pyx_v_nleft - 1));
        if (__pyx_t_16) {
          __pyx_t_21 = __pyx_v_i;
          __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left.diminfo[0].strides);
          __Pyx_INCREF((PyObject*)__pyx_t_4);
          __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_rval, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_15 = __pyx_t_12;
        } else {
          __pyx_t_15 = __pyx_t_16;
        }
        if (!__pyx_t_15) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1852
 *             i += 1
 *             while i < nleft - 1 and left[i] == rval:
 *                 indexer[i] = j             # <<<<<<<<<<<<<<
 *                 i += 1
 *             j += 1
 */
        __pyx_t_22 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1853
 *             while i < nleft - 1 and left[i] == rval:
 *                 indexer[i] = j
 *                 i += 1             # <<<<<<<<<<<<<<
 *             j += 1
 *         elif left[i] > rval:
 */
        __pyx_v_i = (__pyx_v_i + 1);
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1854
 *                 indexer[i] = j
 *                 i += 1
 *             j += 1             # <<<<<<<<<<<<<<
 *         elif left[i] > rval:
 *             indexer[i] = -1
 */
      __pyx_v_j = (__pyx_v_j + 1);
      goto __pyx_L9;
    }

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1855
 *                 i += 1
 *             j += 1
 *         elif left[i] > rval:             # <<<<<<<<<<<<<<
 *             indexer[i] = -1
 *             j += 1
 */
    __pyx_t_23 = __pyx_v_i;
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_v_rval, Py_GT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_15) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1856
 *             j += 1
 *         elif left[i] > rval:
 *             indexer[i] = -1             # <<<<<<<<<<<<<<
 *             j += 1
 *         else:
 */
      __pyx_t_24 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1857
 *         elif left[i] > rval:
 *             indexer[i] = -1
 *             j += 1             # <<<<<<<<<<<<<<
 *         else:
 *             indexer[i] = -1
 */
      __pyx_v_j = (__pyx_v_j + 1);
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1859
 *             j += 1
 *         else:
 *             indexer[i] = -1             # <<<<<<<<<<<<<<
 *             i += 1
 *     return indexer
 */
      __pyx_t_25 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1860
 *         else:
 *             indexer[i] = -1
 *             i += 1             # <<<<<<<<<<<<<<
 *     return indexer
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }
    __pyx_L9:;
    __pyx_L3_continue:;
  }
  __pyx_L4_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1861
 *             indexer[i] = -1
 *             i += 1
 *     return indexer             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_indexer));
  __pyx_r = ((PyObject *)__pyx_v_indexer);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.left_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XDECREF(__pyx_v_rval);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_261left_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_261left_join_indexer_int32 = {__Pyx_NAMESTR("left_join_indexer_int32"), (PyCFunction)__pyx_pw_6pandas_8_tseries_261left_join_indexer_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_261left_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("left_join_indexer_int32 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("left_join_indexer_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1865; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_int32") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1865; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("left_join_indexer_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1865; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.left_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_260left_join_indexer_int32(__pyx_self, __pyx_v_left, __pyx_v_right);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1865
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_indexer_int32(ndarray[int32_t] left,             # <<<<<<<<<<<<<<
 *                              ndarray[int32_t] right):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_260left_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_nleft;
  Py_ssize_t __pyx_v_nright;
  PyArrayObject *__pyx_v_indexer = 0;
  __pyx_t_5numpy_int32_t __pyx_v_rval;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("left_join_indexer_int32");
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1872
 *         int32_t lval, rval
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     nleft = len(left)
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1873
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     nleft = len(left)
 *     nright = len(right)
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1874
 *     i = 0
 *     j = 0
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1874; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nleft = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1875
 *     j = 0
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     indexer = np.empty(nleft, dtype=np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nright = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1877
 *     nright = len(right)
 * 
 *     indexer = np.empty(nleft, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_nleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1878
 * 
 *     indexer = np.empty(nleft, dtype=np.int32)
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft:
 *             break
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1879
 *     indexer = np.empty(nleft, dtype=np.int32)
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             break
 * 
 */
    __pyx_t_12 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_12) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1880
 *     while True:
 *         if i == nleft:
 *             break             # <<<<<<<<<<<<<<
 * 
 *         if j == nright:
 */
      goto __pyx_L4_break;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1882
 *             break
 * 
 *         if j == nright:             # <<<<<<<<<<<<<<
 *             indexer[i] = -1
 *             i += 1
 */
    __pyx_t_12 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_12) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1883
 * 
 *         if j == nright:
 *             indexer[i] = -1             # <<<<<<<<<<<<<<
 *             i += 1
 *             continue
 */
      __pyx_t_1 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1884
 *         if j == nright:
 *             indexer[i] = -1
 *             i += 1             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1885
 *             indexer[i] = -1
 *             i += 1
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         rval = right[j]
 */
      goto __pyx_L3_continue;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1887
 *             continue
 * 
 *         rval = right[j]             # <<<<<<<<<<<<<<
 * 
 *         while i < nleft - 1 and left[i] == rval:
 */
    __pyx_t_13 = __pyx_v_j;
    __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1889
 *         rval = right[j]
 * 
 *         while i < nleft - 1 and left[i] == rval:             # <<<<<<<<<<<<<<
 *             indexer[i] = j
 *             i += 1
 */
    while (1) {
      __pyx_t_12 = (__pyx_v_i < (__pyx_v_nleft - 1));
      if (__pyx_t_12) {
        __pyx_t_14 = __pyx_v_i;
        __pyx_t_15 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval);
        __pyx_t_16 = __pyx_t_15;
      } else {
        __pyx_t_16 = __pyx_t_12;
      }
      if (!__pyx_t_16) break;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1890
 * 
 *         while i < nleft - 1 and left[i] == rval:
 *             indexer[i] = j             # <<<<<<<<<<<<<<
 *             i += 1
 * 
 */
      __pyx_t_17 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1891
 *         while i < nleft - 1 and left[i] == rval:
 *             indexer[i] = j
 *             i += 1             # <<<<<<<<<<<<<<
 * 
 *         if left[i] == right[j]:
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1893
 *             i += 1
 * 
 *         if left[i] == right[j]:             # <<<<<<<<<<<<<<
 *             indexer[i] = j
 *             i += 1
 */
    __pyx_t_18 = __pyx_v_i;
    __pyx_t_19 = __pyx_v_j;
    __pyx_t_16 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides)));
    if (__pyx_t_16) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1894
 * 
 *         if left[i] == right[j]:
 *             indexer[i] = j             # <<<<<<<<<<<<<<
 *             i += 1
 *             while i < nleft - 1 and left[i] == rval:
 */
      __pyx_t_20 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1895
 *         if left[i] == right[j]:
 *             indexer[i] = j
 *             i += 1             # <<<<<<<<<<<<<<
 *             while i < nleft - 1 and left[i] == rval:
 *                 indexer[i] = j
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1896
 *             indexer[i] = j
 *             i += 1
 *             while i < nleft - 1 and left[i] == rval:             # <<<<<<<<<<<<<<
 *                 indexer[i] = j
 *                 i += 1
 */
      while (1) {
        __pyx_t_16 = (__pyx_v_i < (__pyx_v_nleft - 1));
        if (__pyx_t_16) {
          __pyx_t_21 = __pyx_v_i;
          __pyx_t_12 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval);
          __pyx_t_15 = __pyx_t_12;
        } else {
          __pyx_t_15 = __pyx_t_16;
        }
        if (!__pyx_t_15) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1897
 *             i += 1
 *             while i < nleft - 1 and left[i] == rval:
 *                 indexer[i] = j             # <<<<<<<<<<<<<<
 *                 i += 1
 *             j += 1
 */
        __pyx_t_22 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1898
 *             while i < nleft - 1 and left[i] == rval:
 *                 indexer[i] = j
 *                 i += 1             # <<<<<<<<<<<<<<
 *             j += 1
 *         elif left[i] > rval:
 */
        __pyx_v_i = (__pyx_v_i + 1);
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1899
 *                 indexer[i] = j
 *                 i += 1
 *             j += 1             # <<<<<<<<<<<<<<
 *         elif left[i] > rval:
 *             indexer[i] = -1
 */
      __pyx_v_j = (__pyx_v_j + 1);
      goto __pyx_L9;
    }

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1900
 *                 i += 1
 *             j += 1
 *         elif left[i] > rval:             # <<<<<<<<<<<<<<
 *             indexer[i] = -1
 *             j += 1
 */
    __pyx_t_23 = __pyx_v_i;
    __pyx_t_15 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides)) > __pyx_v_rval);
    if (__pyx_t_15) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1901
 *             j += 1
 *         elif left[i] > rval:
 *             indexer[i] = -1             # <<<<<<<<<<<<<<
 *             j += 1
 *         else:
 */
      __pyx_t_24 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1902
 *         elif left[i] > rval:
 *             indexer[i] = -1
 *             j += 1             # <<<<<<<<<<<<<<
 *         else:
 *             indexer[i] = -1
 */
      __pyx_v_j = (__pyx_v_j + 1);
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1904
 *             j += 1
 *         else:
 *             indexer[i] = -1             # <<<<<<<<<<<<<<
 *             i += 1
 *     return indexer
 */
      __pyx_t_25 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1905
 *         else:
 *             indexer[i] = -1
 *             i += 1             # <<<<<<<<<<<<<<
 *     return indexer
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }
    __pyx_L9:;
    __pyx_L3_continue:;
  }
  __pyx_L4_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1906
 *             indexer[i] = -1
 *             i += 1
 *     return indexer             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_indexer));
  __pyx_r = ((PyObject *)__pyx_v_indexer);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.left_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_263left_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_263left_join_indexer_int64 = {__Pyx_NAMESTR("left_join_indexer_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_263left_join_indexer_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_263left_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("left_join_indexer_int64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("left_join_indexer_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_join_indexer_int64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("left_join_indexer_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.left_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_262left_join_indexer_int64(__pyx_self, __pyx_v_left, __pyx_v_right);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1910
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_indexer_int64(ndarray[int64_t] left,             # <<<<<<<<<<<<<<
 *                              ndarray[int64_t] right):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_262left_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_nleft;
  Py_ssize_t __pyx_v_nright;
  PyArrayObject *__pyx_v_indexer = 0;
  __pyx_t_5numpy_int64_t __pyx_v_rval;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("left_join_indexer_int64");
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1917
 *         int64_t lval, rval
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     nleft = len(left)
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1918
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     nleft = len(left)
 *     nright = len(right)
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1919
 *     i = 0
 *     j = 0
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nleft = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1920
 *     j = 0
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     indexer = np.empty(nleft, dtype=np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nright = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1922
 *     nright = len(right)
 * 
 *     indexer = np.empty(nleft, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_nleft); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1923
 * 
 *     indexer = np.empty(nleft, dtype=np.int32)
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft:
 *             break
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1924
 *     indexer = np.empty(nleft, dtype=np.int32)
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             break
 * 
 */
    __pyx_t_12 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_12) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1925
 *     while True:
 *         if i == nleft:
 *             break             # <<<<<<<<<<<<<<
 * 
 *         if j == nright:
 */
      goto __pyx_L4_break;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1927
 *             break
 * 
 *         if j == nright:             # <<<<<<<<<<<<<<
 *             indexer[i] = -1
 *             i += 1
 */
    __pyx_t_12 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_12) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1928
 * 
 *         if j == nright:
 *             indexer[i] = -1             # <<<<<<<<<<<<<<
 *             i += 1
 *             continue
 */
      __pyx_t_1 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1929
 *         if j == nright:
 *             indexer[i] = -1
 *             i += 1             # <<<<<<<<<<<<<<
 *             continue
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1930
 *             indexer[i] = -1
 *             i += 1
 *             continue             # <<<<<<<<<<<<<<
 * 
 *         rval = right[j]
 */
      goto __pyx_L3_continue;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1932
 *             continue
 * 
 *         rval = right[j]             # <<<<<<<<<<<<<<
 * 
 *         while i < nleft - 1 and left[i] == rval:
 */
    __pyx_t_13 = __pyx_v_j;
    __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1934
 *         rval = right[j]
 * 
 *         while i < nleft - 1 and left[i] == rval:             # <<<<<<<<<<<<<<
 *             indexer[i] = j
 *             i += 1
 */
    while (1) {
      __pyx_t_12 = (__pyx_v_i < (__pyx_v_nleft - 1));
      if (__pyx_t_12) {
        __pyx_t_14 = __pyx_v_i;
        __pyx_t_15 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval);
        __pyx_t_16 = __pyx_t_15;
      } else {
        __pyx_t_16 = __pyx_t_12;
      }
      if (!__pyx_t_16) break;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1935
 * 
 *         while i < nleft - 1 and left[i] == rval:
 *             indexer[i] = j             # <<<<<<<<<<<<<<
 *             i += 1
 * 
 */
      __pyx_t_17 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1936
 *         while i < nleft - 1 and left[i] == rval:
 *             indexer[i] = j
 *             i += 1             # <<<<<<<<<<<<<<
 * 
 *         if left[i] == right[j]:
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1938
 *             i += 1
 * 
 *         if left[i] == right[j]:             # <<<<<<<<<<<<<<
 *             indexer[i] = j
 *             i += 1
 */
    __pyx_t_18 = __pyx_v_i;
    __pyx_t_19 = __pyx_v_j;
    __pyx_t_16 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides)));
    if (__pyx_t_16) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1939
 * 
 *         if left[i] == right[j]:
 *             indexer[i] = j             # <<<<<<<<<<<<<<
 *             i += 1
 *             while i < nleft - 1 and left[i] == rval:
 */
      __pyx_t_20 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1940
 *         if left[i] == right[j]:
 *             indexer[i] = j
 *             i += 1             # <<<<<<<<<<<<<<
 *             while i < nleft - 1 and left[i] == rval:
 *                 indexer[i] = j
 */
      __pyx_v_i = (__pyx_v_i + 1);

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1941
 *             indexer[i] = j
 *             i += 1
 *             while i < nleft - 1 and left[i] == rval:             # <<<<<<<<<<<<<<
 *                 indexer[i] = j
 *                 i += 1
 */
      while (1) {
        __pyx_t_16 = (__pyx_v_i < (__pyx_v_nleft - 1));
        if (__pyx_t_16) {
          __pyx_t_21 = __pyx_v_i;
          __pyx_t_12 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left.diminfo[0].strides)) == __pyx_v_rval);
          __pyx_t_15 = __pyx_t_12;
        } else {
          __pyx_t_15 = __pyx_t_16;
        }
        if (!__pyx_t_15) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1942
 *             i += 1
 *             while i < nleft - 1 and left[i] == rval:
 *                 indexer[i] = j             # <<<<<<<<<<<<<<
 *                 i += 1
 *             j += 1
 */
        __pyx_t_22 = __pyx_v_i;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_indexer.diminfo[0].strides) = __pyx_v_j;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1943
 *             while i < nleft - 1 and left[i] == rval:
 *                 indexer[i] = j
 *                 i += 1             # <<<<<<<<<<<<<<
 *             j += 1
 *         elif left[i] > rval:
 */
        __pyx_v_i = (__pyx_v_i + 1);
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1944
 *                 indexer[i] = j
 *                 i += 1
 *             j += 1             # <<<<<<<<<<<<<<
 *         elif left[i] > rval:
 *             indexer[i] = -1
 */
      __pyx_v_j = (__pyx_v_j + 1);
      goto __pyx_L9;
    }

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1945
 *                 i += 1
 *             j += 1
 *         elif left[i] > rval:             # <<<<<<<<<<<<<<
 *             indexer[i] = -1
 *             j += 1
 */
    __pyx_t_23 = __pyx_v_i;
    __pyx_t_15 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides)) > __pyx_v_rval);
    if (__pyx_t_15) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1946
 *             j += 1
 *         elif left[i] > rval:
 *             indexer[i] = -1             # <<<<<<<<<<<<<<
 *             j += 1
 *         else:
 */
      __pyx_t_24 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1947
 *         elif left[i] > rval:
 *             indexer[i] = -1
 *             j += 1             # <<<<<<<<<<<<<<
 *         else:
 *             indexer[i] = -1
 */
      __pyx_v_j = (__pyx_v_j + 1);
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1949
 *             j += 1
 *         else:
 *             indexer[i] = -1             # <<<<<<<<<<<<<<
 *             i += 1
 *     return indexer
 */
      __pyx_t_25 = __pyx_v_i;
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_indexer.diminfo[0].strides) = -1;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1950
 *         else:
 *             indexer[i] = -1
 *             i += 1             # <<<<<<<<<<<<<<
 *     return indexer
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);
    }
    __pyx_L9:;
    __pyx_L3_continue:;
  }
  __pyx_L4_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1951
 *             indexer[i] = -1
 *             i += 1
 *     return indexer             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_indexer));
  __pyx_r = ((PyObject *)__pyx_v_indexer);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.left_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_265outer_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_265outer_join_indexer_float64 = {__Pyx_NAMESTR("outer_join_indexer_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_265outer_join_indexer_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_265outer_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("outer_join_indexer_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("outer_join_indexer_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_join_indexer_float64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("outer_join_indexer_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.outer_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_264outer_join_indexer_float64(__pyx_self, __pyx_v_left, __pyx_v_right);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":1956
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def outer_join_indexer_float64(ndarray[float64_t] left,             # <<<<<<<<<<<<<<
 *                                 ndarray[float64_t] right):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_264outer_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_nright;
  Py_ssize_t __pyx_v_nleft;
  Py_ssize_t __pyx_v_count;
  __pyx_t_5numpy_float64_t __pyx_v_lval;
  __pyx_t_5numpy_float64_t __pyx_v_rval;
  PyArrayObject *__pyx_v_lindexer = 0;
  PyArrayObject *__pyx_v_rindexer = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer;
  __Pyx_Buffer __pyx_pybuffer_lindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer;
  __Pyx_Buffer __pyx_pybuffer_rindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyArrayObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  Py_ssize_t __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("outer_join_indexer_float64");
  __pyx_pybuffer_lindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_lindexer.refcount = 0;
  __pyx_pybuffernd_lindexer.data = NULL;
  __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer;
  __pyx_pybuffer_rindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_rindexer.refcount = 0;
  __pyx_pybuffernd_rindexer.data = NULL;
  __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer;
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1964
 *         ndarray[float64_t] result
 * 
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nleft = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1965
 * 
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nright = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1967
 *     nright = len(right)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1968
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1969
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1970
 *     j = 0
 *     count = 0
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft:
 *             if j == nright:
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1971
 *     count = 0
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             if j == nright:
 *                 # we are done
 */
    __pyx_t_2 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1972
 *     while True:
 *         if i == nleft:
 *             if j == nright:             # <<<<<<<<<<<<<<
 *                 # we are done
 *                 break
 */
      __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1974
 *             if j == nright:
 *                 # we are done
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 while j < nright:
 */
        goto __pyx_L4_break;
        goto __pyx_L6;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1976
 *                 break
 *             else:
 *                 while j < nright:             # <<<<<<<<<<<<<<
 *                     j += 1
 *                     count += 1
 */
        while (1) {
          __pyx_t_2 = (__pyx_v_j < __pyx_v_nright);
          if (!__pyx_t_2) break;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1977
 *             else:
 *                 while j < nright:
 *                     j += 1             # <<<<<<<<<<<<<<
 *                     count += 1
 *                 break
 */
          __pyx_v_j = (__pyx_v_j + 1);

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1978
 *                 while j < nright:
 *                     j += 1
 *                     count += 1             # <<<<<<<<<<<<<<
 *                 break
 *         elif j == nright:
 */
          __pyx_v_count = (__pyx_v_count + 1);
        }

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1979
 *                     j += 1
 *                     count += 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif j == nright:
 *             while i < nleft:
 */
        goto __pyx_L4_break;
      }
      __pyx_L6:;
      goto __pyx_L5;
    }

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1980
 *                     count += 1
 *                 break
 *         elif j == nright:             # <<<<<<<<<<<<<<
 *             while i < nleft:
 *                 i += 1
 */
    __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1981
 *                 break
 *         elif j == nright:
 *             while i < nleft:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 count += 1
 */
      while (1) {
        __pyx_t_2 = (__pyx_v_i < __pyx_v_nleft);
        if (!__pyx_t_2) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1982
 *         elif j == nright:
 *             while i < nleft:
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 count += 1
 *             break
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1983
 *             while i < nleft:
 *                 i += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_v_count = (__pyx_v_count + 1);
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1984
 *                 i += 1
 *                 count += 1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             if left[i] == right[j]:
 */
      goto __pyx_L4_break;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1986
 *             break
 *         else:
 *             if left[i] == right[j]:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
      __pyx_t_1 = __pyx_v_i;
      __pyx_t_3 = __pyx_v_j;
      __pyx_t_2 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_right.diminfo[0].strides)));
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1987
 *         else:
 *             if left[i] == right[j]:
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *             elif left[i] < right[j]:
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1988
 *             if left[i] == right[j]:
 *                 i += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *             elif left[i] < right[j]:
 *                 i += 1
 */
        __pyx_v_j = (__pyx_v_j + 1);
        goto __pyx_L11;
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1989
 *                 i += 1
 *                 j += 1
 *             elif left[i] < right[j]:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_4 = __pyx_v_i;
      __pyx_t_5 = __pyx_v_j;
      __pyx_t_2 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_left.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)));
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1990
 *                 j += 1
 *             elif left[i] < right[j]:
 *                 i += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 j += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);
        goto __pyx_L11;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1992
 *                 i += 1
 *             else:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *             count += 1
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L11:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1994
 *                 j += 1
 * 
 *             count += 1             # <<<<<<<<<<<<<<
 * 
 *     lindexer = np.empty(count, dtype=np.int32)
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L5:;
  }
  __pyx_L4_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1996
 *             count += 1
 * 
 *     lindexer = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     rindexer = np.empty(count, dtype=np.int32)
 *     result = np.empty(count, dtype=np.float64)
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__int32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_10);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
    }
    __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1997
 * 
 *     lindexer = np.empty(count, dtype=np.int32)
 *     rindexer = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     result = np.empty(count, dtype=np.float64)
 * 
 */
  __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  __pyx_t_10 = 0;
  __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_10));
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__int32); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_9);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1998
 *     lindexer = np.empty(count, dtype=np.int32)
 *     rindexer = np.empty(count, dtype=np.int32)
 *     result = np.empty(count, dtype=np.float64)             # <<<<<<<<<<<<<<
 * 
 *     # do it again, but populate the indexers / result
 */
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_9 = 0;
  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__float64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_7);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_16 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2002
 *     # do it again, but populate the indexers / result
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2003
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2004
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2005
 *     j = 0
 *     count = 0
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft:
 *             if j == nright:
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2006
 *     count = 0
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             if j == nright:
 *                 # we are done
 */
    __pyx_t_2 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2007
 *     while True:
 *         if i == nleft:
 *             if j == nright:             # <<<<<<<<<<<<<<
 *                 # we are done
 *                 break
 */
      __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2009
 *             if j == nright:
 *                 # we are done
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 while j < nright:
 */
        goto __pyx_L13_break;
        goto __pyx_L15;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2011
 *                 break
 *             else:
 *                 while j < nright:             # <<<<<<<<<<<<<<
 *                     lindexer[count] = -1
 *                     rindexer[count] = j
 */
        while (1) {
          __pyx_t_2 = (__pyx_v_j < __pyx_v_nright);
          if (!__pyx_t_2) break;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2012
 *             else:
 *                 while j < nright:
 *                     lindexer[count] = -1             # <<<<<<<<<<<<<<
 *                     rindexer[count] = j
 *                     result[count] = right[j]
 */
          __pyx_t_17 = __pyx_v_count;
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2013
 *                 while j < nright:
 *                     lindexer[count] = -1
 *                     rindexer[count] = j             # <<<<<<<<<<<<<<
 *                     result[count] = right[j]
 *                     j += 1
 */
          __pyx_t_18 = __pyx_v_count;
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2014
 *                     lindexer[count] = -1
 *                     rindexer[count] = j
 *                     result[count] = right[j]             # <<<<<<<<<<<<<<
 *                     j += 1
 *                     count += 1
 */
          __pyx_t_19 = __pyx_v_j;
          __pyx_t_20 = __pyx_v_count;
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides));

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2015
 *                     rindexer[count] = j
 *                     result[count] = right[j]
 *                     j += 1             # <<<<<<<<<<<<<<
 *                     count += 1
 *                 break
 */
          __pyx_v_j = (__pyx_v_j + 1);

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2016
 *                     result[count] = right[j]
 *                     j += 1
 *                     count += 1             # <<<<<<<<<<<<<<
 *                 break
 *         elif j == nright:
 */
          __pyx_v_count = (__pyx_v_count + 1);
        }

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2017
 *                     j += 1
 *                     count += 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif j == nright:
 *             while i < nleft:
 */
        goto __pyx_L13_break;
      }
      __pyx_L15:;
      goto __pyx_L14;
    }

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2018
 *                     count += 1
 *                 break
 *         elif j == nright:             # <<<<<<<<<<<<<<
 *             while i < nleft:
 *                 lindexer[count] = i
 */
    __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2019
 *                 break
 *         elif j == nright:
 *             while i < nleft:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 */
      while (1) {
        __pyx_t_2 = (__pyx_v_i < __pyx_v_nleft);
        if (!__pyx_t_2) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2020
 *         elif j == nright:
 *             while i < nleft:
 *                 lindexer[count] = i             # <<<<<<<<<<<<<<
 *                 rindexer[count] = -1
 *                 result[count] = left[i]
 */
        __pyx_t_21 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2021
 *             while i < nleft:
 *                 lindexer[count] = i
 *                 rindexer[count] = -1             # <<<<<<<<<<<<<<
 *                 result[count] = left[i]
 *                 i += 1
 */
        __pyx_t_22 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2022
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 *                 result[count] = left[i]             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 count += 1
 */
        __pyx_t_23 = __pyx_v_i;
        __pyx_t_24 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides));

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2023
 *                 rindexer[count] = -1
 *                 result[count] = left[i]
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 count += 1
 *             break
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2024
 *                 result[count] = left[i]
 *                 i += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_v_count = (__pyx_v_count + 1);
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2025
 *                 i += 1
 *                 count += 1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L13_break;
      goto __pyx_L14;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2027
 *             break
 *         else:
 *             lval = left[i]             # <<<<<<<<<<<<<<
 *             rval = right[j]
 *             if lval == rval:
 */
      __pyx_t_25 = __pyx_v_i;
      __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_left.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2028
 *         else:
 *             lval = left[i]
 *             rval = right[j]             # <<<<<<<<<<<<<<
 *             if lval == rval:
 *                 lindexer[count] = i
 */
      __pyx_t_26 = __pyx_v_j;
      __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_right.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2029
 *             lval = left[i]
 *             rval = right[j]
 *             if lval == rval:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = j
 */
      __pyx_t_2 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2030
 *             rval = right[j]
 *             if lval == rval:
 *                 lindexer[count] = i             # <<<<<<<<<<<<<<
 *                 rindexer[count] = j
 *                 result[count] = lval
 */
        __pyx_t_27 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2031
 *             if lval == rval:
 *                 lindexer[count] = i
 *                 rindexer[count] = j             # <<<<<<<<<<<<<<
 *                 result[count] = lval
 *                 i += 1
 */
        __pyx_t_28 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2032
 *                 lindexer[count] = i
 *                 rindexer[count] = j
 *                 result[count] = lval             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
        __pyx_t_29 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2033
 *                 rindexer[count] = j
 *                 result[count] = lval
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *             elif lval < rval:
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2034
 *                 result[count] = lval
 *                 i += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *             elif lval < rval:
 *                 lindexer[count] = i
 */
        __pyx_v_j = (__pyx_v_j + 1);
        goto __pyx_L20;
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2035
 *                 i += 1
 *                 j += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 */
      __pyx_t_2 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2036
 *                 j += 1
 *             elif lval < rval:
 *                 lindexer[count] = i             # <<<<<<<<<<<<<<
 *                 rindexer[count] = -1
 *                 result[count] = lval
 */
        __pyx_t_30 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2037
 *             elif lval < rval:
 *                 lindexer[count] = i
 *                 rindexer[count] = -1             # <<<<<<<<<<<<<<
 *                 result[count] = lval
 *                 i += 1
 */
        __pyx_t_31 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2038
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 *                 result[count] = lval             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
        __pyx_t_32 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2039
 *                 rindexer[count] = -1
 *                 result[count] = lval
 *                 i += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 lindexer[count] = -1
 */
        __pyx_v_i = (__pyx_v_i + 1);
        goto __pyx_L20;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2041
 *                 i += 1
 *             else:
 *                 lindexer[count] = -1             # <<<<<<<<<<<<<<
 *                 rindexer[count] = j
 *                 result[count] = rval
 */
        __pyx_t_33 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2042
 *             else:
 *                 lindexer[count] = -1
 *                 rindexer[count] = j             # <<<<<<<<<<<<<<
 *                 result[count] = rval
 *                 j += 1
 */
        __pyx_t_34 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2043
 *                 lindexer[count] = -1
 *                 rindexer[count] = j
 *                 result[count] = rval             # <<<<<<<<<<<<<<
 *                 j += 1
 * 
 */
        __pyx_t_35 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2044
 *                 rindexer[count] = j
 *                 result[count] = rval
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *             count += 1
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L20:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2046
 *                 j += 1
 * 
 *             count += 1             # <<<<<<<<<<<<<<
 * 
 *     return result, lindexer, rindexer
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L14:;
  }
  __pyx_L13_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2048
 *             count += 1
 * 
 *     return result, lindexer, rindexer             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __Pyx_INCREF(((PyObject *)__pyx_v_lindexer));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_v_rindexer));
  PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_v_rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer));
  __pyx_r = ((PyObject *)__pyx_t_7);
  __pyx_t_7 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.outer_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_lindexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_rindexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_267outer_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_267outer_join_indexer_object = {__Pyx_NAMESTR("outer_join_indexer_object"), (PyCFunction)__pyx_pw_6pandas_8_tseries_267outer_join_indexer_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_267outer_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("outer_join_indexer_object (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("outer_join_indexer_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_join_indexer_object") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("outer_join_indexer_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.outer_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_266outer_join_indexer_object(__pyx_self, __pyx_v_left, __pyx_v_right);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":2052
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def outer_join_indexer_object(ndarray[object] left,             # <<<<<<<<<<<<<<
 *                                 ndarray[object] right):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_266outer_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_nright;
  Py_ssize_t __pyx_v_nleft;
  Py_ssize_t __pyx_v_count;
  PyObject *__pyx_v_lval = 0;
  PyObject *__pyx_v_rval = 0;
  PyArrayObject *__pyx_v_lindexer = 0;
  PyArrayObject *__pyx_v_rindexer = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer;
  __Pyx_Buffer __pyx_pybuffer_lindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer;
  __Pyx_Buffer __pyx_pybuffer_rindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyArrayObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  PyObject **__pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  Py_ssize_t __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  Py_ssize_t __pyx_t_36;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("outer_join_indexer_object");
  __pyx_pybuffer_lindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_lindexer.refcount = 0;
  __pyx_pybuffernd_lindexer.data = NULL;
  __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer;
  __pyx_pybuffer_rindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_rindexer.refcount = 0;
  __pyx_pybuffernd_rindexer.data = NULL;
  __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer;
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2060
 *         ndarray[object] result
 * 
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nleft = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2061
 * 
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nright = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2063
 *     nright = len(right)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2064
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2065
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2066
 *     j = 0
 *     count = 0
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft:
 *             if j == nright:
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2067
 *     count = 0
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             if j == nright:
 *                 # we are done
 */
    __pyx_t_2 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2068
 *     while True:
 *         if i == nleft:
 *             if j == nright:             # <<<<<<<<<<<<<<
 *                 # we are done
 *                 break
 */
      __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2070
 *             if j == nright:
 *                 # we are done
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 while j < nright:
 */
        goto __pyx_L4_break;
        goto __pyx_L6;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2072
 *                 break
 *             else:
 *                 while j < nright:             # <<<<<<<<<<<<<<
 *                     j += 1
 *                     count += 1
 */
        while (1) {
          __pyx_t_2 = (__pyx_v_j < __pyx_v_nright);
          if (!__pyx_t_2) break;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2073
 *             else:
 *                 while j < nright:
 *                     j += 1             # <<<<<<<<<<<<<<
 *                     count += 1
 *                 break
 */
          __pyx_v_j = (__pyx_v_j + 1);

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2074
 *                 while j < nright:
 *                     j += 1
 *                     count += 1             # <<<<<<<<<<<<<<
 *                 break
 *         elif j == nright:
 */
          __pyx_v_count = (__pyx_v_count + 1);
        }

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2075
 *                     j += 1
 *                     count += 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif j == nright:
 *             while i < nleft:
 */
        goto __pyx_L4_break;
      }
      __pyx_L6:;
      goto __pyx_L5;
    }

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2076
 *                     count += 1
 *                 break
 *         elif j == nright:             # <<<<<<<<<<<<<<
 *             while i < nleft:
 *                 i += 1
 */
    __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2077
 *                 break
 *         elif j == nright:
 *             while i < nleft:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 count += 1
 */
      while (1) {
        __pyx_t_2 = (__pyx_v_i < __pyx_v_nleft);
        if (!__pyx_t_2) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2078
 *         elif j == nright:
 *             while i < nleft:
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 count += 1
 *             break
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2079
 *             while i < nleft:
 *                 i += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_v_count = (__pyx_v_count + 1);
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2080
 *                 i += 1
 *                 count += 1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             if left[i] == right[j]:
 */
      goto __pyx_L4_break;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2082
 *             break
 *         else:
 *             if left[i] == right[j]:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
      __pyx_t_1 = __pyx_v_i;
      __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __pyx_t_5 = __pyx_v_j;
      __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_4);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2083
 *         else:
 *             if left[i] == right[j]:
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *             elif left[i] < right[j]:
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2084
 *             if left[i] == right[j]:
 *                 i += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *             elif left[i] < right[j]:
 *                 i += 1
 */
        __pyx_v_j = (__pyx_v_j + 1);
        goto __pyx_L11;
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2085
 *                 i += 1
 *                 j += 1
 *             elif left[i] < right[j]:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_7 = __pyx_v_i;
      __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_7, __pyx_pybuffernd_left.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_6);
      __pyx_t_8 = __pyx_v_j;
      __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_right.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_4);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2086
 *                 j += 1
 *             elif left[i] < right[j]:
 *                 i += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 j += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);
        goto __pyx_L11;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2088
 *                 i += 1
 *             else:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *             count += 1
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L11:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2090
 *                 j += 1
 * 
 *             count += 1             # <<<<<<<<<<<<<<
 * 
 *     lindexer = np.empty(count, dtype=np.int32)
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L5:;
  }
  __pyx_L4_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2092
 *             count += 1
 * 
 *     lindexer = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     rindexer = np.empty(count, dtype=np.int32)
 *     result = np.empty(count, dtype=object)
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__int32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_10);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
    }
    __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2093
 * 
 *     lindexer = np.empty(count, dtype=np.int32)
 *     rindexer = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     result = np.empty(count, dtype=object)
 * 
 */
  __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  __pyx_t_10 = 0;
  __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_10));
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__int32); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_9);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2094
 *     lindexer = np.empty(count, dtype=np.int32)
 *     rindexer = np.empty(count, dtype=np.int32)
 *     result = np.empty(count, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     # do it again, but populate the indexers / result
 */
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_9 = 0;
  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_16 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2098
 *     # do it again, but populate the indexers / result
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2099
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2100
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2101
 *     j = 0
 *     count = 0
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft:
 *             if j == nright:
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2102
 *     count = 0
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             if j == nright:
 *                 # we are done
 */
    __pyx_t_2 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2103
 *     while True:
 *         if i == nleft:
 *             if j == nright:             # <<<<<<<<<<<<<<
 *                 # we are done
 *                 break
 */
      __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2105
 *             if j == nright:
 *                 # we are done
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 while j < nright:
 */
        goto __pyx_L13_break;
        goto __pyx_L15;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2107
 *                 break
 *             else:
 *                 while j < nright:             # <<<<<<<<<<<<<<
 *                     lindexer[count] = -1
 *                     rindexer[count] = j
 */
        while (1) {
          __pyx_t_2 = (__pyx_v_j < __pyx_v_nright);
          if (!__pyx_t_2) break;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2108
 *             else:
 *                 while j < nright:
 *                     lindexer[count] = -1             # <<<<<<<<<<<<<<
 *                     rindexer[count] = j
 *                     result[count] = right[j]
 */
          __pyx_t_17 = __pyx_v_count;
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2109
 *                 while j < nright:
 *                     lindexer[count] = -1
 *                     rindexer[count] = j             # <<<<<<<<<<<<<<
 *                     result[count] = right[j]
 *                     j += 1
 */
          __pyx_t_18 = __pyx_v_count;
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2110
 *                     lindexer[count] = -1
 *                     rindexer[count] = j
 *                     result[count] = right[j]             # <<<<<<<<<<<<<<
 *                     j += 1
 *                     count += 1
 */
          __pyx_t_19 = __pyx_v_j;
          __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides);
          __Pyx_INCREF((PyObject*)__pyx_t_3);
          __pyx_t_20 = __pyx_v_count;
          __pyx_t_21 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_result.diminfo[0].strides);
          __Pyx_GOTREF(*__pyx_t_21);
          __Pyx_DECREF(*__pyx_t_21); __Pyx_INCREF(__pyx_t_3);
          *__pyx_t_21 = __pyx_t_3;
          __Pyx_GIVEREF(*__pyx_t_21);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2111
 *                     rindexer[count] = j
 *                     result[count] = right[j]
 *                     j += 1             # <<<<<<<<<<<<<<
 *                     count += 1
 *                 break
 */
          __pyx_v_j = (__pyx_v_j + 1);

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2112
 *                     result[count] = right[j]
 *                     j += 1
 *                     count += 1             # <<<<<<<<<<<<<<
 *                 break
 *         elif j == nright:
 */
          __pyx_v_count = (__pyx_v_count + 1);
        }

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2113
 *                     j += 1
 *                     count += 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif j == nright:
 *             while i < nleft:
 */
        goto __pyx_L13_break;
      }
      __pyx_L15:;
      goto __pyx_L14;
    }

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2114
 *                     count += 1
 *                 break
 *         elif j == nright:             # <<<<<<<<<<<<<<
 *             while i < nleft:
 *                 lindexer[count] = i
 */
    __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2115
 *                 break
 *         elif j == nright:
 *             while i < nleft:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 */
      while (1) {
        __pyx_t_2 = (__pyx_v_i < __pyx_v_nleft);
        if (!__pyx_t_2) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2116
 *         elif j == nright:
 *             while i < nleft:
 *                 lindexer[count] = i             # <<<<<<<<<<<<<<
 *                 rindexer[count] = -1
 *                 result[count] = left[i]
 */
        __pyx_t_22 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2117
 *             while i < nleft:
 *                 lindexer[count] = i
 *                 rindexer[count] = -1             # <<<<<<<<<<<<<<
 *                 result[count] = left[i]
 *                 i += 1
 */
        __pyx_t_23 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2118
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 *                 result[count] = left[i]             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 count += 1
 */
        __pyx_t_24 = __pyx_v_i;
        __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_left.diminfo[0].strides);
        __Pyx_INCREF((PyObject*)__pyx_t_3);
        __pyx_t_25 = __pyx_v_count;
        __pyx_t_21 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_result.diminfo[0].strides);
        __Pyx_GOTREF(*__pyx_t_21);
        __Pyx_DECREF(*__pyx_t_21); __Pyx_INCREF(__pyx_t_3);
        *__pyx_t_21 = __pyx_t_3;
        __Pyx_GIVEREF(*__pyx_t_21);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2119
 *                 rindexer[count] = -1
 *                 result[count] = left[i]
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 count += 1
 *             break
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2120
 *                 result[count] = left[i]
 *                 i += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_v_count = (__pyx_v_count + 1);
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2121
 *                 i += 1
 *                 count += 1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L13_break;
      goto __pyx_L14;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2123
 *             break
 *         else:
 *             lval = left[i]             # <<<<<<<<<<<<<<
 *             rval = right[j]
 *             if lval == rval:
 */
      __pyx_t_26 = __pyx_v_i;
      __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_left.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __Pyx_XDECREF(__pyx_v_lval);
      __pyx_v_lval = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2124
 *         else:
 *             lval = left[i]
 *             rval = right[j]             # <<<<<<<<<<<<<<
 *             if lval == rval:
 *                 lindexer[count] = i
 */
      __pyx_t_27 = __pyx_v_j;
      __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_right.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __Pyx_XDECREF(__pyx_v_rval);
      __pyx_v_rval = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2125
 *             lval = left[i]
 *             rval = right[j]
 *             if lval == rval:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = j
 */
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2126
 *             rval = right[j]
 *             if lval == rval:
 *                 lindexer[count] = i             # <<<<<<<<<<<<<<
 *                 rindexer[count] = j
 *                 result[count] = lval
 */
        __pyx_t_28 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2127
 *             if lval == rval:
 *                 lindexer[count] = i
 *                 rindexer[count] = j             # <<<<<<<<<<<<<<
 *                 result[count] = lval
 *                 i += 1
 */
        __pyx_t_29 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2128
 *                 lindexer[count] = i
 *                 rindexer[count] = j
 *                 result[count] = lval             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
        __pyx_t_30 = __pyx_v_count;
        __pyx_t_21 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_result.diminfo[0].strides);
        __Pyx_GOTREF(*__pyx_t_21);
        __Pyx_DECREF(*__pyx_t_21); __Pyx_INCREF(__pyx_v_lval);
        *__pyx_t_21 = __pyx_v_lval;
        __Pyx_GIVEREF(*__pyx_t_21);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2129
 *                 rindexer[count] = j
 *                 result[count] = lval
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *             elif lval < rval:
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2130
 *                 result[count] = lval
 *                 i += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *             elif lval < rval:
 *                 lindexer[count] = i
 */
        __pyx_v_j = (__pyx_v_j + 1);
        goto __pyx_L20;
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2131
 *                 i += 1
 *                 j += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 */
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2132
 *                 j += 1
 *             elif lval < rval:
 *                 lindexer[count] = i             # <<<<<<<<<<<<<<
 *                 rindexer[count] = -1
 *                 result[count] = lval
 */
        __pyx_t_31 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2133
 *             elif lval < rval:
 *                 lindexer[count] = i
 *                 rindexer[count] = -1             # <<<<<<<<<<<<<<
 *                 result[count] = lval
 *                 i += 1
 */
        __pyx_t_32 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2134
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 *                 result[count] = lval             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
        __pyx_t_33 = __pyx_v_count;
        __pyx_t_21 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_result.diminfo[0].strides);
        __Pyx_GOTREF(*__pyx_t_21);
        __Pyx_DECREF(*__pyx_t_21); __Pyx_INCREF(__pyx_v_lval);
        *__pyx_t_21 = __pyx_v_lval;
        __Pyx_GIVEREF(*__pyx_t_21);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2135
 *                 rindexer[count] = -1
 *                 result[count] = lval
 *                 i += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 lindexer[count] = -1
 */
        __pyx_v_i = (__pyx_v_i + 1);
        goto __pyx_L20;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2137
 *                 i += 1
 *             else:
 *                 lindexer[count] = -1             # <<<<<<<<<<<<<<
 *                 rindexer[count] = j
 *                 result[count] = rval
 */
        __pyx_t_34 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2138
 *             else:
 *                 lindexer[count] = -1
 *                 rindexer[count] = j             # <<<<<<<<<<<<<<
 *                 result[count] = rval
 *                 j += 1
 */
        __pyx_t_35 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2139
 *                 lindexer[count] = -1
 *                 rindexer[count] = j
 *                 result[count] = rval             # <<<<<<<<<<<<<<
 *                 j += 1
 * 
 */
        __pyx_t_36 = __pyx_v_count;
        __pyx_t_21 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_result.diminfo[0].strides);
        __Pyx_GOTREF(*__pyx_t_21);
        __Pyx_DECREF(*__pyx_t_21); __Pyx_INCREF(__pyx_v_rval);
        *__pyx_t_21 = __pyx_v_rval;
        __Pyx_GIVEREF(*__pyx_t_21);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2140
 *                 rindexer[count] = j
 *                 result[count] = rval
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *             count += 1
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L20:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2142
 *                 j += 1
 * 
 *             count += 1             # <<<<<<<<<<<<<<
 * 
 *     return result, lindexer, rindexer
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L14:;
  }
  __pyx_L13_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2144
 *             count += 1
 * 
 *     return result, lindexer, rindexer             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __Pyx_INCREF(((PyObject *)__pyx_v_lindexer));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_v_rindexer));
  PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_v_rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer));
  __pyx_r = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.outer_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_lval);
  __Pyx_XDECREF(__pyx_v_rval);
  __Pyx_XDECREF((PyObject *)__pyx_v_lindexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_rindexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_269outer_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_269outer_join_indexer_int32 = {__Pyx_NAMESTR("outer_join_indexer_int32"), (PyCFunction)__pyx_pw_6pandas_8_tseries_269outer_join_indexer_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_269outer_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("outer_join_indexer_int32 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("outer_join_indexer_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_join_indexer_int32") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("outer_join_indexer_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2148; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.outer_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_268outer_join_indexer_int32(__pyx_self, __pyx_v_left, __pyx_v_right);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":2148
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def outer_join_indexer_int32(ndarray[int32_t] left,             # <<<<<<<<<<<<<<
 *                                 ndarray[int32_t] right):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_268outer_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_nright;
  Py_ssize_t __pyx_v_nleft;
  Py_ssize_t __pyx_v_count;
  __pyx_t_5numpy_int32_t __pyx_v_lval;
  __pyx_t_5numpy_int32_t __pyx_v_rval;
  PyArrayObject *__pyx_v_lindexer = 0;
  PyArrayObject *__pyx_v_rindexer = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer;
  __Pyx_Buffer __pyx_pybuffer_lindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer;
  __Pyx_Buffer __pyx_pybuffer_rindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyArrayObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  Py_ssize_t __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("outer_join_indexer_int32");
  __pyx_pybuffer_lindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_lindexer.refcount = 0;
  __pyx_pybuffernd_lindexer.data = NULL;
  __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer;
  __pyx_pybuffer_rindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_rindexer.refcount = 0;
  __pyx_pybuffernd_rindexer.data = NULL;
  __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer;
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2156
 *         ndarray[int32_t] result
 * 
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nleft = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2157
 * 
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nright = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2159
 *     nright = len(right)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2160
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2161
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2162
 *     j = 0
 *     count = 0
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft:
 *             if j == nright:
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2163
 *     count = 0
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             if j == nright:
 *                 # we are done
 */
    __pyx_t_2 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2164
 *     while True:
 *         if i == nleft:
 *             if j == nright:             # <<<<<<<<<<<<<<
 *                 # we are done
 *                 break
 */
      __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2166
 *             if j == nright:
 *                 # we are done
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 while j < nright:
 */
        goto __pyx_L4_break;
        goto __pyx_L6;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2168
 *                 break
 *             else:
 *                 while j < nright:             # <<<<<<<<<<<<<<
 *                     j += 1
 *                     count += 1
 */
        while (1) {
          __pyx_t_2 = (__pyx_v_j < __pyx_v_nright);
          if (!__pyx_t_2) break;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2169
 *             else:
 *                 while j < nright:
 *                     j += 1             # <<<<<<<<<<<<<<
 *                     count += 1
 *                 break
 */
          __pyx_v_j = (__pyx_v_j + 1);

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2170
 *                 while j < nright:
 *                     j += 1
 *                     count += 1             # <<<<<<<<<<<<<<
 *                 break
 *         elif j == nright:
 */
          __pyx_v_count = (__pyx_v_count + 1);
        }

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2171
 *                     j += 1
 *                     count += 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif j == nright:
 *             while i < nleft:
 */
        goto __pyx_L4_break;
      }
      __pyx_L6:;
      goto __pyx_L5;
    }

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2172
 *                     count += 1
 *                 break
 *         elif j == nright:             # <<<<<<<<<<<<<<
 *             while i < nleft:
 *                 i += 1
 */
    __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2173
 *                 break
 *         elif j == nright:
 *             while i < nleft:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 count += 1
 */
      while (1) {
        __pyx_t_2 = (__pyx_v_i < __pyx_v_nleft);
        if (!__pyx_t_2) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2174
 *         elif j == nright:
 *             while i < nleft:
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 count += 1
 *             break
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2175
 *             while i < nleft:
 *                 i += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_v_count = (__pyx_v_count + 1);
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2176
 *                 i += 1
 *                 count += 1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             if left[i] == right[j]:
 */
      goto __pyx_L4_break;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2178
 *             break
 *         else:
 *             if left[i] == right[j]:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
      __pyx_t_1 = __pyx_v_i;
      __pyx_t_3 = __pyx_v_j;
      __pyx_t_2 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_right.diminfo[0].strides)));
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2179
 *         else:
 *             if left[i] == right[j]:
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *             elif left[i] < right[j]:
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2180
 *             if left[i] == right[j]:
 *                 i += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *             elif left[i] < right[j]:
 *                 i += 1
 */
        __pyx_v_j = (__pyx_v_j + 1);
        goto __pyx_L11;
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2181
 *                 i += 1
 *                 j += 1
 *             elif left[i] < right[j]:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_4 = __pyx_v_i;
      __pyx_t_5 = __pyx_v_j;
      __pyx_t_2 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_left.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)));
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2182
 *                 j += 1
 *             elif left[i] < right[j]:
 *                 i += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 j += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);
        goto __pyx_L11;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2184
 *                 i += 1
 *             else:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *             count += 1
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L11:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2186
 *                 j += 1
 * 
 *             count += 1             # <<<<<<<<<<<<<<
 * 
 *     lindexer = np.empty(count, dtype=np.int32)
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L5:;
  }
  __pyx_L4_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2188
 *             count += 1
 * 
 *     lindexer = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     rindexer = np.empty(count, dtype=np.int32)
 *     result = np.empty(count, dtype=np.int32)
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__int32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_10);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
    }
    __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2189
 * 
 *     lindexer = np.empty(count, dtype=np.int32)
 *     rindexer = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     result = np.empty(count, dtype=np.int32)
 * 
 */
  __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  __pyx_t_10 = 0;
  __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_10));
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__int32); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_9);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2190
 *     lindexer = np.empty(count, dtype=np.int32)
 *     rindexer = np.empty(count, dtype=np.int32)
 *     result = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 * 
 *     # do it again, but populate the indexers / result
 */
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_9 = 0;
  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__int32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_7);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_16 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2194
 *     # do it again, but populate the indexers / result
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2195
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2196
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2197
 *     j = 0
 *     count = 0
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft:
 *             if j == nright:
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2198
 *     count = 0
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             if j == nright:
 *                 # we are done
 */
    __pyx_t_2 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2199
 *     while True:
 *         if i == nleft:
 *             if j == nright:             # <<<<<<<<<<<<<<
 *                 # we are done
 *                 break
 */
      __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2201
 *             if j == nright:
 *                 # we are done
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 while j < nright:
 */
        goto __pyx_L13_break;
        goto __pyx_L15;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2203
 *                 break
 *             else:
 *                 while j < nright:             # <<<<<<<<<<<<<<
 *                     lindexer[count] = -1
 *                     rindexer[count] = j
 */
        while (1) {
          __pyx_t_2 = (__pyx_v_j < __pyx_v_nright);
          if (!__pyx_t_2) break;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2204
 *             else:
 *                 while j < nright:
 *                     lindexer[count] = -1             # <<<<<<<<<<<<<<
 *                     rindexer[count] = j
 *                     result[count] = right[j]
 */
          __pyx_t_17 = __pyx_v_count;
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2205
 *                 while j < nright:
 *                     lindexer[count] = -1
 *                     rindexer[count] = j             # <<<<<<<<<<<<<<
 *                     result[count] = right[j]
 *                     j += 1
 */
          __pyx_t_18 = __pyx_v_count;
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2206
 *                     lindexer[count] = -1
 *                     rindexer[count] = j
 *                     result[count] = right[j]             # <<<<<<<<<<<<<<
 *                     j += 1
 *                     count += 1
 */
          __pyx_t_19 = __pyx_v_j;
          __pyx_t_20 = __pyx_v_count;
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides));

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2207
 *                     rindexer[count] = j
 *                     result[count] = right[j]
 *                     j += 1             # <<<<<<<<<<<<<<
 *                     count += 1
 *                 break
 */
          __pyx_v_j = (__pyx_v_j + 1);

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2208
 *                     result[count] = right[j]
 *                     j += 1
 *                     count += 1             # <<<<<<<<<<<<<<
 *                 break
 *         elif j == nright:
 */
          __pyx_v_count = (__pyx_v_count + 1);
        }

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2209
 *                     j += 1
 *                     count += 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif j == nright:
 *             while i < nleft:
 */
        goto __pyx_L13_break;
      }
      __pyx_L15:;
      goto __pyx_L14;
    }

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2210
 *                     count += 1
 *                 break
 *         elif j == nright:             # <<<<<<<<<<<<<<
 *             while i < nleft:
 *                 lindexer[count] = i
 */
    __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2211
 *                 break
 *         elif j == nright:
 *             while i < nleft:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 */
      while (1) {
        __pyx_t_2 = (__pyx_v_i < __pyx_v_nleft);
        if (!__pyx_t_2) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2212
 *         elif j == nright:
 *             while i < nleft:
 *                 lindexer[count] = i             # <<<<<<<<<<<<<<
 *                 rindexer[count] = -1
 *                 result[count] = left[i]
 */
        __pyx_t_21 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2213
 *             while i < nleft:
 *                 lindexer[count] = i
 *                 rindexer[count] = -1             # <<<<<<<<<<<<<<
 *                 result[count] = left[i]
 *                 i += 1
 */
        __pyx_t_22 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2214
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 *                 result[count] = left[i]             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 count += 1
 */
        __pyx_t_23 = __pyx_v_i;
        __pyx_t_24 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides));

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2215
 *                 rindexer[count] = -1
 *                 result[count] = left[i]
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 count += 1
 *             break
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2216
 *                 result[count] = left[i]
 *                 i += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_v_count = (__pyx_v_count + 1);
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2217
 *                 i += 1
 *                 count += 1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L13_break;
      goto __pyx_L14;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2219
 *             break
 *         else:
 *             lval = left[i]             # <<<<<<<<<<<<<<
 *             rval = right[j]
 *             if lval == rval:
 */
      __pyx_t_25 = __pyx_v_i;
      __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_left.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2220
 *         else:
 *             lval = left[i]
 *             rval = right[j]             # <<<<<<<<<<<<<<
 *             if lval == rval:
 *                 lindexer[count] = i
 */
      __pyx_t_26 = __pyx_v_j;
      __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_right.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2221
 *             lval = left[i]
 *             rval = right[j]
 *             if lval == rval:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = j
 */
      __pyx_t_2 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2222
 *             rval = right[j]
 *             if lval == rval:
 *                 lindexer[count] = i             # <<<<<<<<<<<<<<
 *                 rindexer[count] = j
 *                 result[count] = lval
 */
        __pyx_t_27 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2223
 *             if lval == rval:
 *                 lindexer[count] = i
 *                 rindexer[count] = j             # <<<<<<<<<<<<<<
 *                 result[count] = lval
 *                 i += 1
 */
        __pyx_t_28 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2224
 *                 lindexer[count] = i
 *                 rindexer[count] = j
 *                 result[count] = lval             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
        __pyx_t_29 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2225
 *                 rindexer[count] = j
 *                 result[count] = lval
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *             elif lval < rval:
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2226
 *                 result[count] = lval
 *                 i += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *             elif lval < rval:
 *                 lindexer[count] = i
 */
        __pyx_v_j = (__pyx_v_j + 1);
        goto __pyx_L20;
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2227
 *                 i += 1
 *                 j += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 */
      __pyx_t_2 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2228
 *                 j += 1
 *             elif lval < rval:
 *                 lindexer[count] = i             # <<<<<<<<<<<<<<
 *                 rindexer[count] = -1
 *                 result[count] = lval
 */
        __pyx_t_30 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2229
 *             elif lval < rval:
 *                 lindexer[count] = i
 *                 rindexer[count] = -1             # <<<<<<<<<<<<<<
 *                 result[count] = lval
 *                 i += 1
 */
        __pyx_t_31 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2230
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 *                 result[count] = lval             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
        __pyx_t_32 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2231
 *                 rindexer[count] = -1
 *                 result[count] = lval
 *                 i += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 lindexer[count] = -1
 */
        __pyx_v_i = (__pyx_v_i + 1);
        goto __pyx_L20;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2233
 *                 i += 1
 *             else:
 *                 lindexer[count] = -1             # <<<<<<<<<<<<<<
 *                 rindexer[count] = j
 *                 result[count] = rval
 */
        __pyx_t_33 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2234
 *             else:
 *                 lindexer[count] = -1
 *                 rindexer[count] = j             # <<<<<<<<<<<<<<
 *                 result[count] = rval
 *                 j += 1
 */
        __pyx_t_34 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2235
 *                 lindexer[count] = -1
 *                 rindexer[count] = j
 *                 result[count] = rval             # <<<<<<<<<<<<<<
 *                 j += 1
 * 
 */
        __pyx_t_35 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2236
 *                 rindexer[count] = j
 *                 result[count] = rval
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *             count += 1
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L20:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2238
 *                 j += 1
 * 
 *             count += 1             # <<<<<<<<<<<<<<
 * 
 *     return result, lindexer, rindexer
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L14:;
  }
  __pyx_L13_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2240
 *             count += 1
 * 
 *     return result, lindexer, rindexer             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __Pyx_INCREF(((PyObject *)__pyx_v_lindexer));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_v_rindexer));
  PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_v_rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer));
  __pyx_r = ((PyObject *)__pyx_t_7);
  __pyx_t_7 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.outer_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_lindexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_rindexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_271outer_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_271outer_join_indexer_int64 = {__Pyx_NAMESTR("outer_join_indexer_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_271outer_join_indexer_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_271outer_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("outer_join_indexer_int64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("outer_join_indexer_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_join_indexer_int64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("outer_join_indexer_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.outer_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_270outer_join_indexer_int64(__pyx_self, __pyx_v_left, __pyx_v_right);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":2244
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def outer_join_indexer_int64(ndarray[int64_t] left,             # <<<<<<<<<<<<<<
 *                                 ndarray[int64_t] right):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_270outer_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_nright;
  Py_ssize_t __pyx_v_nleft;
  Py_ssize_t __pyx_v_count;
  __pyx_t_5numpy_int64_t __pyx_v_lval;
  __pyx_t_5numpy_int64_t __pyx_v_rval;
  PyArrayObject *__pyx_v_lindexer = 0;
  PyArrayObject *__pyx_v_rindexer = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer;
  __Pyx_Buffer __pyx_pybuffer_lindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer;
  __Pyx_Buffer __pyx_pybuffer_rindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyArrayObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  Py_ssize_t __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("outer_join_indexer_int64");
  __pyx_pybuffer_lindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_lindexer.refcount = 0;
  __pyx_pybuffernd_lindexer.data = NULL;
  __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer;
  __pyx_pybuffer_rindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_rindexer.refcount = 0;
  __pyx_pybuffernd_rindexer.data = NULL;
  __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer;
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2252
 *         ndarray[int64_t] result
 * 
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nleft = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2253
 * 
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nright = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2255
 *     nright = len(right)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2256
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2257
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2258
 *     j = 0
 *     count = 0
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft:
 *             if j == nright:
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2259
 *     count = 0
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             if j == nright:
 *                 # we are done
 */
    __pyx_t_2 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2260
 *     while True:
 *         if i == nleft:
 *             if j == nright:             # <<<<<<<<<<<<<<
 *                 # we are done
 *                 break
 */
      __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2262
 *             if j == nright:
 *                 # we are done
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 while j < nright:
 */
        goto __pyx_L4_break;
        goto __pyx_L6;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2264
 *                 break
 *             else:
 *                 while j < nright:             # <<<<<<<<<<<<<<
 *                     j += 1
 *                     count += 1
 */
        while (1) {
          __pyx_t_2 = (__pyx_v_j < __pyx_v_nright);
          if (!__pyx_t_2) break;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2265
 *             else:
 *                 while j < nright:
 *                     j += 1             # <<<<<<<<<<<<<<
 *                     count += 1
 *                 break
 */
          __pyx_v_j = (__pyx_v_j + 1);

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2266
 *                 while j < nright:
 *                     j += 1
 *                     count += 1             # <<<<<<<<<<<<<<
 *                 break
 *         elif j == nright:
 */
          __pyx_v_count = (__pyx_v_count + 1);
        }

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2267
 *                     j += 1
 *                     count += 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif j == nright:
 *             while i < nleft:
 */
        goto __pyx_L4_break;
      }
      __pyx_L6:;
      goto __pyx_L5;
    }

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2268
 *                     count += 1
 *                 break
 *         elif j == nright:             # <<<<<<<<<<<<<<
 *             while i < nleft:
 *                 i += 1
 */
    __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2269
 *                 break
 *         elif j == nright:
 *             while i < nleft:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 count += 1
 */
      while (1) {
        __pyx_t_2 = (__pyx_v_i < __pyx_v_nleft);
        if (!__pyx_t_2) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2270
 *         elif j == nright:
 *             while i < nleft:
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 count += 1
 *             break
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2271
 *             while i < nleft:
 *                 i += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_v_count = (__pyx_v_count + 1);
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2272
 *                 i += 1
 *                 count += 1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             if left[i] == right[j]:
 */
      goto __pyx_L4_break;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2274
 *             break
 *         else:
 *             if left[i] == right[j]:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
      __pyx_t_1 = __pyx_v_i;
      __pyx_t_3 = __pyx_v_j;
      __pyx_t_2 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides)) == (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_right.diminfo[0].strides)));
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2275
 *         else:
 *             if left[i] == right[j]:
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *             elif left[i] < right[j]:
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2276
 *             if left[i] == right[j]:
 *                 i += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *             elif left[i] < right[j]:
 *                 i += 1
 */
        __pyx_v_j = (__pyx_v_j + 1);
        goto __pyx_L11;
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2277
 *                 i += 1
 *                 j += 1
 *             elif left[i] < right[j]:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_4 = __pyx_v_i;
      __pyx_t_5 = __pyx_v_j;
      __pyx_t_2 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_left.diminfo[0].strides)) < (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides)));
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2278
 *                 j += 1
 *             elif left[i] < right[j]:
 *                 i += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 j += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);
        goto __pyx_L11;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2280
 *                 i += 1
 *             else:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *             count += 1
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L11:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2282
 *                 j += 1
 * 
 *             count += 1             # <<<<<<<<<<<<<<
 * 
 *     lindexer = np.empty(count, dtype=np.int32)
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L5:;
  }
  __pyx_L4_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2284
 *             count += 1
 * 
 *     lindexer = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     rindexer = np.empty(count, dtype=np.int32)
 *     result = np.empty(count, dtype=np.int64)
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__int32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_10);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
    }
    __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2285
 * 
 *     lindexer = np.empty(count, dtype=np.int32)
 *     rindexer = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     result = np.empty(count, dtype=np.int64)
 * 
 */
  __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  __pyx_t_10 = 0;
  __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_10));
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__int32); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_9);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2286
 *     lindexer = np.empty(count, dtype=np.int32)
 *     rindexer = np.empty(count, dtype=np.int32)
 *     result = np.empty(count, dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *     # do it again, but populate the indexers / result
 */
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_9 = 0;
  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__int64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_7);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_16 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2290
 *     # do it again, but populate the indexers / result
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2291
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2292
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2293
 *     j = 0
 *     count = 0
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft:
 *             if j == nright:
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2294
 *     count = 0
 *     while True:
 *         if i == nleft:             # <<<<<<<<<<<<<<
 *             if j == nright:
 *                 # we are done
 */
    __pyx_t_2 = (__pyx_v_i == __pyx_v_nleft);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2295
 *     while True:
 *         if i == nleft:
 *             if j == nright:             # <<<<<<<<<<<<<<
 *                 # we are done
 *                 break
 */
      __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2297
 *             if j == nright:
 *                 # we are done
 *                 break             # <<<<<<<<<<<<<<
 *             else:
 *                 while j < nright:
 */
        goto __pyx_L13_break;
        goto __pyx_L15;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2299
 *                 break
 *             else:
 *                 while j < nright:             # <<<<<<<<<<<<<<
 *                     lindexer[count] = -1
 *                     rindexer[count] = j
 */
        while (1) {
          __pyx_t_2 = (__pyx_v_j < __pyx_v_nright);
          if (!__pyx_t_2) break;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2300
 *             else:
 *                 while j < nright:
 *                     lindexer[count] = -1             # <<<<<<<<<<<<<<
 *                     rindexer[count] = j
 *                     result[count] = right[j]
 */
          __pyx_t_17 = __pyx_v_count;
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2301
 *                 while j < nright:
 *                     lindexer[count] = -1
 *                     rindexer[count] = j             # <<<<<<<<<<<<<<
 *                     result[count] = right[j]
 *                     j += 1
 */
          __pyx_t_18 = __pyx_v_count;
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j;

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2302
 *                     lindexer[count] = -1
 *                     rindexer[count] = j
 *                     result[count] = right[j]             # <<<<<<<<<<<<<<
 *                     j += 1
 *                     count += 1
 */
          __pyx_t_19 = __pyx_v_j;
          __pyx_t_20 = __pyx_v_count;
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right.diminfo[0].strides));

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2303
 *                     rindexer[count] = j
 *                     result[count] = right[j]
 *                     j += 1             # <<<<<<<<<<<<<<
 *                     count += 1
 *                 break
 */
          __pyx_v_j = (__pyx_v_j + 1);

          /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2304
 *                     result[count] = right[j]
 *                     j += 1
 *                     count += 1             # <<<<<<<<<<<<<<
 *                 break
 *         elif j == nright:
 */
          __pyx_v_count = (__pyx_v_count + 1);
        }

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2305
 *                     j += 1
 *                     count += 1
 *                 break             # <<<<<<<<<<<<<<
 *         elif j == nright:
 *             while i < nleft:
 */
        goto __pyx_L13_break;
      }
      __pyx_L15:;
      goto __pyx_L14;
    }

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2306
 *                     count += 1
 *                 break
 *         elif j == nright:             # <<<<<<<<<<<<<<
 *             while i < nleft:
 *                 lindexer[count] = i
 */
    __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2307
 *                 break
 *         elif j == nright:
 *             while i < nleft:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 */
      while (1) {
        __pyx_t_2 = (__pyx_v_i < __pyx_v_nleft);
        if (!__pyx_t_2) break;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2308
 *         elif j == nright:
 *             while i < nleft:
 *                 lindexer[count] = i             # <<<<<<<<<<<<<<
 *                 rindexer[count] = -1
 *                 result[count] = left[i]
 */
        __pyx_t_21 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2309
 *             while i < nleft:
 *                 lindexer[count] = i
 *                 rindexer[count] = -1             # <<<<<<<<<<<<<<
 *                 result[count] = left[i]
 *                 i += 1
 */
        __pyx_t_22 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2310
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 *                 result[count] = left[i]             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 count += 1
 */
        __pyx_t_23 = __pyx_v_i;
        __pyx_t_24 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_result.diminfo[0].strides) = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_left.diminfo[0].strides));

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2311
 *                 rindexer[count] = -1
 *                 result[count] = left[i]
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 count += 1
 *             break
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2312
 *                 result[count] = left[i]
 *                 i += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             break
 *         else:
 */
        __pyx_v_count = (__pyx_v_count + 1);
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2313
 *                 i += 1
 *                 count += 1
 *             break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L13_break;
      goto __pyx_L14;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2315
 *             break
 *         else:
 *             lval = left[i]             # <<<<<<<<<<<<<<
 *             rval = right[j]
 *             if lval == rval:
 */
      __pyx_t_25 = __pyx_v_i;
      __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_left.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2316
 *         else:
 *             lval = left[i]
 *             rval = right[j]             # <<<<<<<<<<<<<<
 *             if lval == rval:
 *                 lindexer[count] = i
 */
      __pyx_t_26 = __pyx_v_j;
      __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_right.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2317
 *             lval = left[i]
 *             rval = right[j]
 *             if lval == rval:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = j
 */
      __pyx_t_2 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2318
 *             rval = right[j]
 *             if lval == rval:
 *                 lindexer[count] = i             # <<<<<<<<<<<<<<
 *                 rindexer[count] = j
 *                 result[count] = lval
 */
        __pyx_t_27 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2319
 *             if lval == rval:
 *                 lindexer[count] = i
 *                 rindexer[count] = j             # <<<<<<<<<<<<<<
 *                 result[count] = lval
 *                 i += 1
 */
        __pyx_t_28 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2320
 *                 lindexer[count] = i
 *                 rindexer[count] = j
 *                 result[count] = lval             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
        __pyx_t_29 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2321
 *                 rindexer[count] = j
 *                 result[count] = lval
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *             elif lval < rval:
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2322
 *                 result[count] = lval
 *                 i += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *             elif lval < rval:
 *                 lindexer[count] = i
 */
        __pyx_v_j = (__pyx_v_j + 1);
        goto __pyx_L20;
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2323
 *                 i += 1
 *                 j += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 */
      __pyx_t_2 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_2) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2324
 *                 j += 1
 *             elif lval < rval:
 *                 lindexer[count] = i             # <<<<<<<<<<<<<<
 *                 rindexer[count] = -1
 *                 result[count] = lval
 */
        __pyx_t_30 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2325
 *             elif lval < rval:
 *                 lindexer[count] = i
 *                 rindexer[count] = -1             # <<<<<<<<<<<<<<
 *                 result[count] = lval
 *                 i += 1
 */
        __pyx_t_31 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_rindexer.diminfo[0].strides) = -1;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2326
 *                 lindexer[count] = i
 *                 rindexer[count] = -1
 *                 result[count] = lval             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
        __pyx_t_32 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2327
 *                 rindexer[count] = -1
 *                 result[count] = lval
 *                 i += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 lindexer[count] = -1
 */
        __pyx_v_i = (__pyx_v_i + 1);
        goto __pyx_L20;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2329
 *                 i += 1
 *             else:
 *                 lindexer[count] = -1             # <<<<<<<<<<<<<<
 *                 rindexer[count] = j
 *                 result[count] = rval
 */
        __pyx_t_33 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_lindexer.diminfo[0].strides) = -1;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2330
 *             else:
 *                 lindexer[count] = -1
 *                 rindexer[count] = j             # <<<<<<<<<<<<<<
 *                 result[count] = rval
 *                 j += 1
 */
        __pyx_t_34 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2331
 *                 lindexer[count] = -1
 *                 rindexer[count] = j
 *                 result[count] = rval             # <<<<<<<<<<<<<<
 *                 j += 1
 * 
 */
        __pyx_t_35 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_35, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_rval;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2332
 *                 rindexer[count] = j
 *                 result[count] = rval
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *             count += 1
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L20:;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2334
 *                 j += 1
 * 
 *             count += 1             # <<<<<<<<<<<<<<
 * 
 *     return result, lindexer, rindexer
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L14:;
  }
  __pyx_L13_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2336
 *             count += 1
 * 
 *     return result, lindexer, rindexer             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __Pyx_INCREF(((PyObject *)__pyx_v_lindexer));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_v_rindexer));
  PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_v_rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer));
  __pyx_r = ((PyObject *)__pyx_t_7);
  __pyx_t_7 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.outer_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_lindexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_rindexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_273inner_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_272inner_join_indexer_float64[] = "\n    Two-pass algorithm?\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_273inner_join_indexer_float64 = {__Pyx_NAMESTR("inner_join_indexer_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_273inner_join_indexer_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_272inner_join_indexer_float64)};
static PyObject *__pyx_pw_6pandas_8_tseries_273inner_join_indexer_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inner_join_indexer_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inner_join_indexer_float64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2341; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join_indexer_float64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2341; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inner_join_indexer_float64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2341; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.inner_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_272inner_join_indexer_float64(__pyx_self, __pyx_v_left, __pyx_v_right);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":2341
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def inner_join_indexer_float64(ndarray[float64_t] left,             # <<<<<<<<<<<<<<
 *                               ndarray[float64_t] right):
 *     '''
 */

static PyObject *__pyx_pf_6pandas_8_tseries_272inner_join_indexer_float64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_nright;
  Py_ssize_t __pyx_v_nleft;
  Py_ssize_t __pyx_v_count;
  __pyx_t_5numpy_float64_t __pyx_v_lval;
  __pyx_t_5numpy_float64_t __pyx_v_rval;
  PyArrayObject *__pyx_v_lindexer = 0;
  PyArrayObject *__pyx_v_rindexer = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer;
  __Pyx_Buffer __pyx_pybuffer_lindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer;
  __Pyx_Buffer __pyx_pybuffer_rindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyArrayObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("inner_join_indexer_float64");
  __pyx_pybuffer_lindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_lindexer.refcount = 0;
  __pyx_pybuffernd_lindexer.data = NULL;
  __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer;
  __pyx_pybuffer_rindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_rindexer.refcount = 0;
  __pyx_pybuffernd_rindexer.data = NULL;
  __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer;
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2352
 *         ndarray[float64_t] result
 * 
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nleft = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2353
 * 
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nright = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2355
 *     nright = len(right)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2356
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2357
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft or j == nright:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2358
 *     j = 0
 *     count = 0
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft or j == nright:
 *              break
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2359
 *     count = 0
 *     while True:
 *         if i == nleft or j == nright:             # <<<<<<<<<<<<<<
 *              break
 *         else:
 */
    __pyx_t_2 = (__pyx_v_i == __pyx_v_nleft);
    if (!__pyx_t_2) {
      __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
      __pyx_t_4 = __pyx_t_3;
    } else {
      __pyx_t_4 = __pyx_t_2;
    }
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2360
 *     while True:
 *         if i == nleft or j == nright:
 *              break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L4_break;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2362
 *              break
 *         else:
 *             lval = left[i]             # <<<<<<<<<<<<<<
 *             rval = right[j]
 *             if lval == rval:
 */
      __pyx_t_1 = __pyx_v_i;
      __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2363
 *         else:
 *             lval = left[i]
 *             rval = right[j]             # <<<<<<<<<<<<<<
 *             if lval == rval:
 *                 i += 1
 */
      __pyx_t_5 = __pyx_v_j;
      __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2364
 *             lval = left[i]
 *             rval = right[j]
 *             if lval == rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
      __pyx_t_4 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_4) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2365
 *             rval = right[j]
 *             if lval == rval:
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *                 count += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2366
 *             if lval == rval:
 *                 i += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *                 count += 1
 *             elif lval < rval:
 */
        __pyx_v_j = (__pyx_v_j + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2367
 *                 i += 1
 *                 j += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             elif lval < rval:
 *                 i += 1
 */
        __pyx_v_count = (__pyx_v_count + 1);
        goto __pyx_L6;
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2368
 *                 j += 1
 *                 count += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_4 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_4) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2369
 *                 count += 1
 *             elif lval < rval:
 *                 i += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 j += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);
        goto __pyx_L6;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2371
 *                 i += 1
 *             else:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *     # do it again now that result size is known
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L6:;
    }
    __pyx_L5:;
  }
  __pyx_L4_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2375
 *     # do it again now that result size is known
 * 
 *     lindexer = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     rindexer = np.empty(count, dtype=np.int32)
 *     result = np.empty(count, dtype=np.float64)
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__int32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_10);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
    }
    __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2376
 * 
 *     lindexer = np.empty(count, dtype=np.int32)
 *     rindexer = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     result = np.empty(count, dtype=np.float64)
 * 
 */
  __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  __pyx_t_10 = 0;
  __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_10));
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__int32); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_9);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2377
 *     lindexer = np.empty(count, dtype=np.int32)
 *     rindexer = np.empty(count, dtype=np.int32)
 *     result = np.empty(count, dtype=np.float64)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_9 = 0;
  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__float64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_7);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_16 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2379
 *     result = np.empty(count, dtype=np.float64)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2380
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2381
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft or j == nright:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2382
 *     j = 0
 *     count = 0
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft or j == nright:
 *              break
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2383
 *     count = 0
 *     while True:
 *         if i == nleft or j == nright:             # <<<<<<<<<<<<<<
 *              break
 *         else:
 */
    __pyx_t_4 = (__pyx_v_i == __pyx_v_nleft);
    if (!__pyx_t_4) {
      __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
      __pyx_t_3 = __pyx_t_2;
    } else {
      __pyx_t_3 = __pyx_t_4;
    }
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2384
 *     while True:
 *         if i == nleft or j == nright:
 *              break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L8_break;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2386
 *              break
 *         else:
 *             lval = left[i]             # <<<<<<<<<<<<<<
 *             rval = right[j]
 *             if lval == rval:
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_left.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2387
 *         else:
 *             lval = left[i]
 *             rval = right[j]             # <<<<<<<<<<<<<<
 *             if lval == rval:
 *                 lindexer[count] = i
 */
      __pyx_t_18 = __pyx_v_j;
      __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_right.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2388
 *             lval = left[i]
 *             rval = right[j]
 *             if lval == rval:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = j
 */
      __pyx_t_3 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_3) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2389
 *             rval = right[j]
 *             if lval == rval:
 *                 lindexer[count] = i             # <<<<<<<<<<<<<<
 *                 rindexer[count] = j
 *                 result[count] = lval
 */
        __pyx_t_19 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2390
 *             if lval == rval:
 *                 lindexer[count] = i
 *                 rindexer[count] = j             # <<<<<<<<<<<<<<
 *                 result[count] = lval
 *                 i += 1
 */
        __pyx_t_20 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2391
 *                 lindexer[count] = i
 *                 rindexer[count] = j
 *                 result[count] = lval             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
        __pyx_t_21 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2392
 *                 rindexer[count] = j
 *                 result[count] = lval
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *                 count += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2393
 *                 result[count] = lval
 *                 i += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *                 count += 1
 *             elif lval < rval:
 */
        __pyx_v_j = (__pyx_v_j + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2394
 *                 i += 1
 *                 j += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             elif lval < rval:
 *                 i += 1
 */
        __pyx_v_count = (__pyx_v_count + 1);
        goto __pyx_L10;
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2395
 *                 j += 1
 *                 count += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_3 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_3) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2396
 *                 count += 1
 *             elif lval < rval:
 *                 i += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 j += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2398
 *                 i += 1
 *             else:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *     return result, lindexer, rindexer
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L10:;
    }
    __pyx_L9:;
  }
  __pyx_L8_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2400
 *                 j += 1
 * 
 *     return result, lindexer, rindexer             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __Pyx_INCREF(((PyObject *)__pyx_v_lindexer));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_v_rindexer));
  PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_v_rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer));
  __pyx_r = ((PyObject *)__pyx_t_7);
  __pyx_t_7 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.inner_join_indexer_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_lindexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_rindexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_275inner_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_274inner_join_indexer_object[] = "\n    Two-pass algorithm?\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_275inner_join_indexer_object = {__Pyx_NAMESTR("inner_join_indexer_object"), (PyCFunction)__pyx_pw_6pandas_8_tseries_275inner_join_indexer_object, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_274inner_join_indexer_object)};
static PyObject *__pyx_pw_6pandas_8_tseries_275inner_join_indexer_object(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inner_join_indexer_object (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inner_join_indexer_object", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2404; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join_indexer_object") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2404; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inner_join_indexer_object", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2404; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.inner_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_274inner_join_indexer_object(__pyx_self, __pyx_v_left, __pyx_v_right);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":2404
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def inner_join_indexer_object(ndarray[object] left,             # <<<<<<<<<<<<<<
 *                               ndarray[object] right):
 *     '''
 */

static PyObject *__pyx_pf_6pandas_8_tseries_274inner_join_indexer_object(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_nright;
  Py_ssize_t __pyx_v_nleft;
  Py_ssize_t __pyx_v_count;
  PyObject *__pyx_v_lval = 0;
  PyObject *__pyx_v_rval = 0;
  PyArrayObject *__pyx_v_lindexer = 0;
  PyArrayObject *__pyx_v_rindexer = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer;
  __Pyx_Buffer __pyx_pybuffer_lindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer;
  __Pyx_Buffer __pyx_pybuffer_rindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyArrayObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  PyObject **__pyx_t_22;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("inner_join_indexer_object");
  __pyx_pybuffer_lindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_lindexer.refcount = 0;
  __pyx_pybuffernd_lindexer.data = NULL;
  __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer;
  __pyx_pybuffer_rindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_rindexer.refcount = 0;
  __pyx_pybuffernd_rindexer.data = NULL;
  __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer;
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2415
 *         ndarray[object] result
 * 
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nleft = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2416
 * 
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nright = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2418
 *     nright = len(right)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2419
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2420
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft or j == nright:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2421
 *     j = 0
 *     count = 0
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft or j == nright:
 *              break
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2422
 *     count = 0
 *     while True:
 *         if i == nleft or j == nright:             # <<<<<<<<<<<<<<
 *              break
 *         else:
 */
    __pyx_t_2 = (__pyx_v_i == __pyx_v_nleft);
    if (!__pyx_t_2) {
      __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
      __pyx_t_4 = __pyx_t_3;
    } else {
      __pyx_t_4 = __pyx_t_2;
    }
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2423
 *     while True:
 *         if i == nleft or j == nright:
 *              break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L4_break;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2425
 *              break
 *         else:
 *             lval = left[i]             # <<<<<<<<<<<<<<
 *             rval = right[j]
 *             if lval == rval:
 */
      __pyx_t_1 = __pyx_v_i;
      __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_5);
      __Pyx_XDECREF(__pyx_v_lval);
      __pyx_v_lval = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2426
 *         else:
 *             lval = left[i]
 *             rval = right[j]             # <<<<<<<<<<<<<<
 *             if lval == rval:
 *                 i += 1
 */
      __pyx_t_6 = __pyx_v_j;
      __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_right.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_5);
      __Pyx_XDECREF(__pyx_v_rval);
      __pyx_v_rval = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2427
 *             lval = left[i]
 *             rval = right[j]
 *             if lval == rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_4) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2428
 *             rval = right[j]
 *             if lval == rval:
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *                 count += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2429
 *             if lval == rval:
 *                 i += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *                 count += 1
 *             elif lval < rval:
 */
        __pyx_v_j = (__pyx_v_j + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2430
 *                 i += 1
 *                 j += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             elif lval < rval:
 *                 i += 1
 */
        __pyx_v_count = (__pyx_v_count + 1);
        goto __pyx_L6;
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2431
 *                 j += 1
 *                 count += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_4) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2432
 *                 count += 1
 *             elif lval < rval:
 *                 i += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 j += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);
        goto __pyx_L6;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2434
 *                 i += 1
 *             else:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *     # do it again now that result size is known
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L6:;
    }
    __pyx_L5:;
  }
  __pyx_L4_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2438
 *     # do it again now that result size is known
 * 
 *     lindexer = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     rindexer = np.empty(count, dtype=np.int32)
 *     result = np.empty(count, dtype=object)
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__int32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_10);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
    }
    __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2439
 * 
 *     lindexer = np.empty(count, dtype=np.int32)
 *     rindexer = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     result = np.empty(count, dtype=object)
 * 
 */
  __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  __pyx_t_10 = 0;
  __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_10));
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__int32); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_9);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2440
 *     lindexer = np.empty(count, dtype=np.int32)
 *     rindexer = np.empty(count, dtype=np.int32)
 *     result = np.empty(count, dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_9 = 0;
  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_16 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2442
 *     result = np.empty(count, dtype=object)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2443
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2444
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft or j == nright:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2445
 *     j = 0
 *     count = 0
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft or j == nright:
 *              break
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2446
 *     count = 0
 *     while True:
 *         if i == nleft or j == nright:             # <<<<<<<<<<<<<<
 *              break
 *         else:
 */
    __pyx_t_4 = (__pyx_v_i == __pyx_v_nleft);
    if (!__pyx_t_4) {
      __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
      __pyx_t_3 = __pyx_t_2;
    } else {
      __pyx_t_3 = __pyx_t_4;
    }
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2447
 *     while True:
 *         if i == nleft or j == nright:
 *              break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L8_break;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2449
 *              break
 *         else:
 *             lval = left[i]             # <<<<<<<<<<<<<<
 *             rval = right[j]
 *             if lval == rval:
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_left.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_5);
      __Pyx_XDECREF(__pyx_v_lval);
      __pyx_v_lval = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2450
 *         else:
 *             lval = left[i]
 *             rval = right[j]             # <<<<<<<<<<<<<<
 *             if lval == rval:
 *                 lindexer[count] = i
 */
      __pyx_t_18 = __pyx_v_j;
      __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_right.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_5);
      __Pyx_XDECREF(__pyx_v_rval);
      __pyx_v_rval = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2451
 *             lval = left[i]
 *             rval = right[j]
 *             if lval == rval:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = j
 */
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_3) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2452
 *             rval = right[j]
 *             if lval == rval:
 *                 lindexer[count] = i             # <<<<<<<<<<<<<<
 *                 rindexer[count] = j
 *                 result[count] = lval
 */
        __pyx_t_19 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2453
 *             if lval == rval:
 *                 lindexer[count] = i
 *                 rindexer[count] = j             # <<<<<<<<<<<<<<
 *                 result[count] = lval
 *                 i += 1
 */
        __pyx_t_20 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2454
 *                 lindexer[count] = i
 *                 rindexer[count] = j
 *                 result[count] = lval             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
        __pyx_t_21 = __pyx_v_count;
        __pyx_t_22 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_result.diminfo[0].strides);
        __Pyx_GOTREF(*__pyx_t_22);
        __Pyx_DECREF(*__pyx_t_22); __Pyx_INCREF(__pyx_v_lval);
        *__pyx_t_22 = __pyx_v_lval;
        __Pyx_GIVEREF(*__pyx_t_22);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2455
 *                 rindexer[count] = j
 *                 result[count] = lval
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *                 count += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2456
 *                 result[count] = lval
 *                 i += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *                 count += 1
 *             elif lval < rval:
 */
        __pyx_v_j = (__pyx_v_j + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2457
 *                 i += 1
 *                 j += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             elif lval < rval:
 *                 i += 1
 */
        __pyx_v_count = (__pyx_v_count + 1);
        goto __pyx_L10;
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2458
 *                 j += 1
 *                 count += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_lval, __pyx_v_rval, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_3) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2459
 *                 count += 1
 *             elif lval < rval:
 *                 i += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 j += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2461
 *                 i += 1
 *             else:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *     return result, lindexer, rindexer
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L10:;
    }
    __pyx_L9:;
  }
  __pyx_L8_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2463
 *                 j += 1
 * 
 *     return result, lindexer, rindexer             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __Pyx_INCREF(((PyObject *)__pyx_v_lindexer));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_v_rindexer));
  PyTuple_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_v_rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer));
  __pyx_r = ((PyObject *)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.inner_join_indexer_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_lval);
  __Pyx_XDECREF(__pyx_v_rval);
  __Pyx_XDECREF((PyObject *)__pyx_v_lindexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_rindexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_277inner_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_276inner_join_indexer_int32[] = "\n    Two-pass algorithm?\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_277inner_join_indexer_int32 = {__Pyx_NAMESTR("inner_join_indexer_int32"), (PyCFunction)__pyx_pw_6pandas_8_tseries_277inner_join_indexer_int32, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_276inner_join_indexer_int32)};
static PyObject *__pyx_pw_6pandas_8_tseries_277inner_join_indexer_int32(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inner_join_indexer_int32 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inner_join_indexer_int32", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join_indexer_int32") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inner_join_indexer_int32", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.inner_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_276inner_join_indexer_int32(__pyx_self, __pyx_v_left, __pyx_v_right);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":2467
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def inner_join_indexer_int32(ndarray[int32_t] left,             # <<<<<<<<<<<<<<
 *                               ndarray[int32_t] right):
 *     '''
 */

static PyObject *__pyx_pf_6pandas_8_tseries_276inner_join_indexer_int32(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_nright;
  Py_ssize_t __pyx_v_nleft;
  Py_ssize_t __pyx_v_count;
  __pyx_t_5numpy_int32_t __pyx_v_lval;
  __pyx_t_5numpy_int32_t __pyx_v_rval;
  PyArrayObject *__pyx_v_lindexer = 0;
  PyArrayObject *__pyx_v_rindexer = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer;
  __Pyx_Buffer __pyx_pybuffer_lindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer;
  __Pyx_Buffer __pyx_pybuffer_rindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyArrayObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("inner_join_indexer_int32");
  __pyx_pybuffer_lindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_lindexer.refcount = 0;
  __pyx_pybuffernd_lindexer.data = NULL;
  __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer;
  __pyx_pybuffer_rindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_rindexer.refcount = 0;
  __pyx_pybuffernd_rindexer.data = NULL;
  __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer;
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2478
 *         ndarray[int32_t] result
 * 
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nleft = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2479
 * 
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nright = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2481
 *     nright = len(right)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2482
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2483
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft or j == nright:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2484
 *     j = 0
 *     count = 0
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft or j == nright:
 *              break
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2485
 *     count = 0
 *     while True:
 *         if i == nleft or j == nright:             # <<<<<<<<<<<<<<
 *              break
 *         else:
 */
    __pyx_t_2 = (__pyx_v_i == __pyx_v_nleft);
    if (!__pyx_t_2) {
      __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
      __pyx_t_4 = __pyx_t_3;
    } else {
      __pyx_t_4 = __pyx_t_2;
    }
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2486
 *     while True:
 *         if i == nleft or j == nright:
 *              break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L4_break;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2488
 *              break
 *         else:
 *             lval = left[i]             # <<<<<<<<<<<<<<
 *             rval = right[j]
 *             if lval == rval:
 */
      __pyx_t_1 = __pyx_v_i;
      __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2489
 *         else:
 *             lval = left[i]
 *             rval = right[j]             # <<<<<<<<<<<<<<
 *             if lval == rval:
 *                 i += 1
 */
      __pyx_t_5 = __pyx_v_j;
      __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2490
 *             lval = left[i]
 *             rval = right[j]
 *             if lval == rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
      __pyx_t_4 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_4) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2491
 *             rval = right[j]
 *             if lval == rval:
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *                 count += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2492
 *             if lval == rval:
 *                 i += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *                 count += 1
 *             elif lval < rval:
 */
        __pyx_v_j = (__pyx_v_j + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2493
 *                 i += 1
 *                 j += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             elif lval < rval:
 *                 i += 1
 */
        __pyx_v_count = (__pyx_v_count + 1);
        goto __pyx_L6;
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2494
 *                 j += 1
 *                 count += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_4 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_4) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2495
 *                 count += 1
 *             elif lval < rval:
 *                 i += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 j += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);
        goto __pyx_L6;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2497
 *                 i += 1
 *             else:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *     # do it again now that result size is known
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L6:;
    }
    __pyx_L5:;
  }
  __pyx_L4_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2501
 *     # do it again now that result size is known
 * 
 *     lindexer = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     rindexer = np.empty(count, dtype=np.int32)
 *     result = np.empty(count, dtype=np.int32)
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__int32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_10);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
    }
    __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2502
 * 
 *     lindexer = np.empty(count, dtype=np.int32)
 *     rindexer = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     result = np.empty(count, dtype=np.int32)
 * 
 */
  __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  __pyx_t_10 = 0;
  __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_10));
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__int32); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_9);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2503
 *     lindexer = np.empty(count, dtype=np.int32)
 *     rindexer = np.empty(count, dtype=np.int32)
 *     result = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_9 = 0;
  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__int32); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_7);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_16 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2505
 *     result = np.empty(count, dtype=np.int32)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2506
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2507
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft or j == nright:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2508
 *     j = 0
 *     count = 0
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft or j == nright:
 *              break
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2509
 *     count = 0
 *     while True:
 *         if i == nleft or j == nright:             # <<<<<<<<<<<<<<
 *              break
 *         else:
 */
    __pyx_t_4 = (__pyx_v_i == __pyx_v_nleft);
    if (!__pyx_t_4) {
      __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
      __pyx_t_3 = __pyx_t_2;
    } else {
      __pyx_t_3 = __pyx_t_4;
    }
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2510
 *     while True:
 *         if i == nleft or j == nright:
 *              break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L8_break;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2512
 *              break
 *         else:
 *             lval = left[i]             # <<<<<<<<<<<<<<
 *             rval = right[j]
 *             if lval == rval:
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_left.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2513
 *         else:
 *             lval = left[i]
 *             rval = right[j]             # <<<<<<<<<<<<<<
 *             if lval == rval:
 *                 lindexer[count] = i
 */
      __pyx_t_18 = __pyx_v_j;
      __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_right.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2514
 *             lval = left[i]
 *             rval = right[j]
 *             if lval == rval:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = j
 */
      __pyx_t_3 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_3) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2515
 *             rval = right[j]
 *             if lval == rval:
 *                 lindexer[count] = i             # <<<<<<<<<<<<<<
 *                 rindexer[count] = j
 *                 result[count] = lval
 */
        __pyx_t_19 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2516
 *             if lval == rval:
 *                 lindexer[count] = i
 *                 rindexer[count] = j             # <<<<<<<<<<<<<<
 *                 result[count] = lval
 *                 i += 1
 */
        __pyx_t_20 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2517
 *                 lindexer[count] = i
 *                 rindexer[count] = j
 *                 result[count] = lval             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
        __pyx_t_21 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2518
 *                 rindexer[count] = j
 *                 result[count] = lval
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *                 count += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2519
 *                 result[count] = lval
 *                 i += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *                 count += 1
 *             elif lval < rval:
 */
        __pyx_v_j = (__pyx_v_j + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2520
 *                 i += 1
 *                 j += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             elif lval < rval:
 *                 i += 1
 */
        __pyx_v_count = (__pyx_v_count + 1);
        goto __pyx_L10;
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2521
 *                 j += 1
 *                 count += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_3 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_3) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2522
 *                 count += 1
 *             elif lval < rval:
 *                 i += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 j += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2524
 *                 i += 1
 *             else:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *     return result, lindexer, rindexer
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L10:;
    }
    __pyx_L9:;
  }
  __pyx_L8_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2526
 *                 j += 1
 * 
 *     return result, lindexer, rindexer             # <<<<<<<<<<<<<<
 * 
 * @cython.wraparound(False)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __Pyx_INCREF(((PyObject *)__pyx_v_lindexer));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_v_rindexer));
  PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_v_rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer));
  __pyx_r = ((PyObject *)__pyx_t_7);
  __pyx_t_7 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.inner_join_indexer_int32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_lindexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_rindexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_279inner_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_278inner_join_indexer_int64[] = "\n    Two-pass algorithm?\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_279inner_join_indexer_int64 = {__Pyx_NAMESTR("inner_join_indexer_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_279inner_join_indexer_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_278inner_join_indexer_int64)};
static PyObject *__pyx_pw_6pandas_8_tseries_279inner_join_indexer_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inner_join_indexer_int64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inner_join_indexer_int64", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2530; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join_indexer_int64") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2530; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inner_join_indexer_int64", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2530; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.inner_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_278inner_join_indexer_int64(__pyx_self, __pyx_v_left, __pyx_v_right);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/generated.pyx":2530
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def inner_join_indexer_int64(ndarray[int64_t] left,             # <<<<<<<<<<<<<<
 *                               ndarray[int64_t] right):
 *     '''
 */

static PyObject *__pyx_pf_6pandas_8_tseries_278inner_join_indexer_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_nright;
  Py_ssize_t __pyx_v_nleft;
  Py_ssize_t __pyx_v_count;
  __pyx_t_5numpy_int64_t __pyx_v_lval;
  __pyx_t_5numpy_int64_t __pyx_v_rval;
  PyArrayObject *__pyx_v_lindexer = 0;
  PyArrayObject *__pyx_v_rindexer = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_lindexer;
  __Pyx_Buffer __pyx_pybuffer_lindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_rindexer;
  __Pyx_Buffer __pyx_pybuffer_rindexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyArrayObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("inner_join_indexer_int64");
  __pyx_pybuffer_lindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_lindexer.refcount = 0;
  __pyx_pybuffernd_lindexer.data = NULL;
  __pyx_pybuffernd_lindexer.rcbuffer = &__pyx_pybuffer_lindexer;
  __pyx_pybuffer_rindexer.pybuffer.buf = NULL;
  __pyx_pybuffer_rindexer.refcount = 0;
  __pyx_pybuffernd_rindexer.data = NULL;
  __pyx_pybuffernd_rindexer.rcbuffer = &__pyx_pybuffer_rindexer;
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2541
 *         ndarray[int64_t] result
 * 
 *     nleft = len(left)             # <<<<<<<<<<<<<<
 *     nright = len(right)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nleft = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2542
 * 
 *     nleft = len(left)
 *     nright = len(right)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_right)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_nright = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2544
 *     nright = len(right)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2545
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2546
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft or j == nright:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2547
 *     j = 0
 *     count = 0
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft or j == nright:
 *              break
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2548
 *     count = 0
 *     while True:
 *         if i == nleft or j == nright:             # <<<<<<<<<<<<<<
 *              break
 *         else:
 */
    __pyx_t_2 = (__pyx_v_i == __pyx_v_nleft);
    if (!__pyx_t_2) {
      __pyx_t_3 = (__pyx_v_j == __pyx_v_nright);
      __pyx_t_4 = __pyx_t_3;
    } else {
      __pyx_t_4 = __pyx_t_2;
    }
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2549
 *     while True:
 *         if i == nleft or j == nright:
 *              break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L4_break;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2551
 *              break
 *         else:
 *             lval = left[i]             # <<<<<<<<<<<<<<
 *             rval = right[j]
 *             if lval == rval:
 */
      __pyx_t_1 = __pyx_v_i;
      __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_1, __pyx_pybuffernd_left.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2552
 *         else:
 *             lval = left[i]
 *             rval = right[j]             # <<<<<<<<<<<<<<
 *             if lval == rval:
 *                 i += 1
 */
      __pyx_t_5 = __pyx_v_j;
      __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_right.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2553
 *             lval = left[i]
 *             rval = right[j]
 *             if lval == rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
      __pyx_t_4 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_4) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2554
 *             rval = right[j]
 *             if lval == rval:
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *                 count += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2555
 *             if lval == rval:
 *                 i += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *                 count += 1
 *             elif lval < rval:
 */
        __pyx_v_j = (__pyx_v_j + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2556
 *                 i += 1
 *                 j += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             elif lval < rval:
 *                 i += 1
 */
        __pyx_v_count = (__pyx_v_count + 1);
        goto __pyx_L6;
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2557
 *                 j += 1
 *                 count += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_4 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_4) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2558
 *                 count += 1
 *             elif lval < rval:
 *                 i += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 j += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);
        goto __pyx_L6;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2560
 *                 i += 1
 *             else:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *     # do it again now that result size is known
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L6:;
    }
    __pyx_L5:;
  }
  __pyx_L4_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2564
 *     # do it again now that result size is known
 * 
 *     lindexer = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     rindexer = np.empty(count, dtype=np.int32)
 *     result = np.empty(count, dtype=np.int64)
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__int32); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_10);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_lindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
    }
    __pyx_pybuffernd_lindexer.diminfo[0].strides = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lindexer.diminfo[0].shape = __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_lindexer = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2565
 * 
 *     lindexer = np.empty(count, dtype=np.int32)
 *     rindexer = np.empty(count, dtype=np.int32)             # <<<<<<<<<<<<<<
 *     result = np.empty(count, dtype=np.int64)
 * 
 */
  __pyx_t_10 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_10, __pyx_n_s__empty); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  __pyx_t_10 = 0;
  __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_10));
  __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_9 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__int32); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_9);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rindexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_15, __pyx_t_14, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_rindexer.diminfo[0].strides = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rindexer.diminfo[0].shape = __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_rindexer = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2566
 *     lindexer = np.empty(count, dtype=np.int32)
 *     rindexer = np.empty(count, dtype=np.int32)
 *     result = np.empty(count, dtype=np.int64)             # <<<<<<<<<<<<<<
 * 
 *     i = 0
 */
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_9);
  __pyx_t_9 = 0;
  __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_9));
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__int64); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__dtype), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_7);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_12 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_12 < 0)) {
      PyErr_Fetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); Py_XDECREF(__pyx_t_15);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_13, __pyx_t_14, __pyx_t_15);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_16 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2568
 *     result = np.empty(count, dtype=np.int64)
 * 
 *     i = 0             # <<<<<<<<<<<<<<
 *     j = 0
 *     count = 0
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2569
 * 
 *     i = 0
 *     j = 0             # <<<<<<<<<<<<<<
 *     count = 0
 *     while True:
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2570
 *     i = 0
 *     j = 0
 *     count = 0             # <<<<<<<<<<<<<<
 *     while True:
 *         if i == nleft or j == nright:
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2571
 *     j = 0
 *     count = 0
 *     while True:             # <<<<<<<<<<<<<<
 *         if i == nleft or j == nright:
 *              break
 */
  while (1) {
    if (!1) break;

    /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2572
 *     count = 0
 *     while True:
 *         if i == nleft or j == nright:             # <<<<<<<<<<<<<<
 *              break
 *         else:
 */
    __pyx_t_4 = (__pyx_v_i == __pyx_v_nleft);
    if (!__pyx_t_4) {
      __pyx_t_2 = (__pyx_v_j == __pyx_v_nright);
      __pyx_t_3 = __pyx_t_2;
    } else {
      __pyx_t_3 = __pyx_t_4;
    }
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2573
 *     while True:
 *         if i == nleft or j == nright:
 *              break             # <<<<<<<<<<<<<<
 *         else:
 *             lval = left[i]
 */
      goto __pyx_L8_break;
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2575
 *              break
 *         else:
 *             lval = left[i]             # <<<<<<<<<<<<<<
 *             rval = right[j]
 *             if lval == rval:
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_v_lval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_left.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_left.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2576
 *         else:
 *             lval = left[i]
 *             rval = right[j]             # <<<<<<<<<<<<<<
 *             if lval == rval:
 *                 lindexer[count] = i
 */
      __pyx_t_18 = __pyx_v_j;
      __pyx_v_rval = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_right.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_right.diminfo[0].strides));

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2577
 *             lval = left[i]
 *             rval = right[j]
 *             if lval == rval:             # <<<<<<<<<<<<<<
 *                 lindexer[count] = i
 *                 rindexer[count] = j
 */
      __pyx_t_3 = (__pyx_v_lval == __pyx_v_rval);
      if (__pyx_t_3) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2578
 *             rval = right[j]
 *             if lval == rval:
 *                 lindexer[count] = i             # <<<<<<<<<<<<<<
 *                 rindexer[count] = j
 *                 result[count] = lval
 */
        __pyx_t_19 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_lindexer.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_lindexer.diminfo[0].strides) = __pyx_v_i;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2579
 *             if lval == rval:
 *                 lindexer[count] = i
 *                 rindexer[count] = j             # <<<<<<<<<<<<<<
 *                 result[count] = lval
 *                 i += 1
 */
        __pyx_t_20 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rindexer.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_rindexer.diminfo[0].strides) = __pyx_v_j;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2580
 *                 lindexer[count] = i
 *                 rindexer[count] = j
 *                 result[count] = lval             # <<<<<<<<<<<<<<
 *                 i += 1
 *                 j += 1
 */
        __pyx_t_21 = __pyx_v_count;
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_lval;

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2581
 *                 rindexer[count] = j
 *                 result[count] = lval
 *                 i += 1             # <<<<<<<<<<<<<<
 *                 j += 1
 *                 count += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2582
 *                 result[count] = lval
 *                 i += 1
 *                 j += 1             # <<<<<<<<<<<<<<
 *                 count += 1
 *             elif lval < rval:
 */
        __pyx_v_j = (__pyx_v_j + 1);

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2583
 *                 i += 1
 *                 j += 1
 *                 count += 1             # <<<<<<<<<<<<<<
 *             elif lval < rval:
 *                 i += 1
 */
        __pyx_v_count = (__pyx_v_count + 1);
        goto __pyx_L10;
      }

      /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2584
 *                 j += 1
 *                 count += 1
 *             elif lval < rval:             # <<<<<<<<<<<<<<
 *                 i += 1
 *             else:
 */
      __pyx_t_3 = (__pyx_v_lval < __pyx_v_rval);
      if (__pyx_t_3) {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2585
 *                 count += 1
 *             elif lval < rval:
 *                 i += 1             # <<<<<<<<<<<<<<
 *             else:
 *                 j += 1
 */
        __pyx_v_i = (__pyx_v_i + 1);
        goto __pyx_L10;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2587
 *                 i += 1
 *             else:
 *                 j += 1             # <<<<<<<<<<<<<<
 * 
 *     return result, lindexer, rindexer
 */
        __pyx_v_j = (__pyx_v_j + 1);
      }
      __pyx_L10:;
    }
    __pyx_L9:;
  }
  __pyx_L8_break:;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2589
 *                 j += 1
 * 
 *     return result, lindexer, rindexer             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __Pyx_INCREF(((PyObject *)__pyx_v_lindexer));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_v_rindexer));
  PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_v_rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_rindexer));
  __pyx_r = ((PyObject *)__pyx_t_7);
  __pyx_t_7 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.inner_join_indexer_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rindexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_lindexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_rindexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_7Reducer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_7Reducer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_f = 0;
  PyObject *__pyx_v_axis = 0;
  PyObject *__pyx_v_dummy = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__f,&__pyx_n_s__axis,&__pyx_n_s__dummy,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  {
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)__pyx_int_1);

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":13
 *         object arr, dummy, f
 * 
 *     def __init__(self, object arr, object f, axis=1, dummy=None):             # <<<<<<<<<<<<<<
 *         n, k = arr.shape
 * 
 */
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_arr = values[0];
      __pyx_v_f = values[1];
      __pyx_v_axis = values[2];
      __pyx_v_dummy = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_arr = values[0];
    __pyx_v_f = values[1];
    __pyx_v_axis = values[2];
    __pyx_v_dummy = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Reducer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_7Reducer___init__(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self), __pyx_v_arr, __pyx_v_f, __pyx_v_axis, __pyx_v_dummy);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_7Reducer___init__(struct __pyx_obj_6pandas_8_tseries_Reducer *__pyx_v_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_f, PyObject *__pyx_v_axis, PyObject *__pyx_v_dummy) {
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_k = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");
  __Pyx_INCREF(__pyx_v_arr);

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":14
 * 
 *     def __init__(self, object arr, object f, axis=1, dummy=None):
 *         n, k = arr.shape             # <<<<<<<<<<<<<<
 * 
 *         if axis == 0:
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_arr, __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[9]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[9]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[9]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_n = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_k = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":16
 *         n, k = arr.shape
 * 
 *         if axis == 0:             # <<<<<<<<<<<<<<
 *             if not arr.flags.f_contiguous:
 *                 arr = arr.copy('F')
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":17
 * 
 *         if axis == 0:
 *             if not arr.flags.f_contiguous:             # <<<<<<<<<<<<<<
 *                 arr = arr.copy('F')
 * 
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_arr, __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__f_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = (!__pyx_t_6);
    if (__pyx_t_7) {

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":18
 *         if axis == 0:
 *             if not arr.flags.f_contiguous:
 *                 arr = arr.copy('F')             # <<<<<<<<<<<<<<
 * 
 *             self.nresults = k
 */
      __pyx_t_3 = PyObject_GetAttr(__pyx_v_arr, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_58), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_v_arr);
      __pyx_v_arr = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":20
 *                 arr = arr.copy('F')
 * 
 *             self.nresults = k             # <<<<<<<<<<<<<<
 *             self.chunksize = n
 *             self.increment = n * arr.dtype.itemsize
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_k); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->nresults = __pyx_t_8;

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":21
 * 
 *             self.nresults = k
 *             self.chunksize = n             # <<<<<<<<<<<<<<
 *             self.increment = n * arr.dtype.itemsize
 *         else:
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->chunksize = __pyx_t_8;

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":22
 *             self.nresults = k
 *             self.chunksize = n
 *             self.increment = n * arr.dtype.itemsize             # <<<<<<<<<<<<<<
 *         else:
 *             if not arr.flags.c_contiguous:
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__itemsize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Multiply(__pyx_v_n, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_self->increment = __pyx_t_8;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":24
 *             self.increment = n * arr.dtype.itemsize
 *         else:
 *             if not arr.flags.c_contiguous:             # <<<<<<<<<<<<<<
 *                 arr = arr.copy('C')
 * 
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_arr, __pyx_n_s__flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__c_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = (!__pyx_t_7);
    if (__pyx_t_6) {

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":25
 *         else:
 *             if not arr.flags.c_contiguous:
 *                 arr = arr.copy('C')             # <<<<<<<<<<<<<<
 * 
 *             self.nresults = n
 */
      __pyx_t_3 = PyObject_GetAttr(__pyx_v_arr, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_59), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_v_arr);
      __pyx_v_arr = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L7;
    }
    __pyx_L7:;

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":27
 *                 arr = arr.copy('C')
 * 
 *             self.nresults = n             # <<<<<<<<<<<<<<
 *             self.chunksize = k
 *             self.increment = k * arr.dtype.itemsize
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->nresults = __pyx_t_8;

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":28
 * 
 *             self.nresults = n
 *             self.chunksize = k             # <<<<<<<<<<<<<<
 *             self.increment = k * arr.dtype.itemsize
 * 
 */
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_k); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->chunksize = __pyx_t_8;

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":29
 *             self.nresults = n
 *             self.chunksize = k
 *             self.increment = k * arr.dtype.itemsize             # <<<<<<<<<<<<<<
 * 
 *         self.f = f
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__itemsize); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyNumber_Multiply(__pyx_v_k, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_self->increment = __pyx_t_8;
  }
  __pyx_L5:;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":31
 *             self.increment = k * arr.dtype.itemsize
 * 
 *         self.f = f             # <<<<<<<<<<<<<<
 *         self.arr = arr
 *         self.dummy = self._check_dummy(dummy)
 */
  __Pyx_INCREF(__pyx_v_f);
  __Pyx_GIVEREF(__pyx_v_f);
  __Pyx_GOTREF(__pyx_v_self->f);
  __Pyx_DECREF(__pyx_v_self->f);
  __pyx_v_self->f = __pyx_v_f;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":32
 * 
 *         self.f = f
 *         self.arr = arr             # <<<<<<<<<<<<<<
 *         self.dummy = self._check_dummy(dummy)
 * 
 */
  __Pyx_INCREF(__pyx_v_arr);
  __Pyx_GIVEREF(__pyx_v_arr);
  __Pyx_GOTREF(__pyx_v_self->arr);
  __Pyx_DECREF(__pyx_v_self->arr);
  __pyx_v_self->arr = __pyx_v_arr;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":33
 *         self.f = f
 *         self.arr = arr
 *         self.dummy = self._check_dummy(dummy)             # <<<<<<<<<<<<<<
 * 
 *     def _check_dummy(self, dummy=None):
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___check_dummy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_dummy);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dummy);
  __Pyx_GIVEREF(__pyx_v_dummy);
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->dummy);
  __Pyx_DECREF(__pyx_v_self->dummy);
  __pyx_v_self->dummy = __pyx_t_2;
  __pyx_t_2 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._tseries.Reducer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_arr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_7Reducer_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_7Reducer_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dummy = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dummy,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_check_dummy (wrapper)");
  {
    PyObject* values[1] = {0};

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":35
 *         self.dummy = self._check_dummy(dummy)
 * 
 *     def _check_dummy(self, dummy=None):             # <<<<<<<<<<<<<<
 *         if dummy is None:
 *             dummy = np.empty(self.chunksize, dtype=self.arr.dtype)
 */
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_dummy") < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_dummy = values[0];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dummy = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_check_dummy", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Reducer._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_7Reducer_2_check_dummy(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self), __pyx_v_dummy);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_8_tseries_7Reducer_2_check_dummy(struct __pyx_obj_6pandas_8_tseries_Reducer *__pyx_v_self, PyObject *__pyx_v_dummy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_check_dummy");
  __Pyx_INCREF(__pyx_v_dummy);

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":36
 * 
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:             # <<<<<<<<<<<<<<
 *             dummy = np.empty(self.chunksize, dtype=self.arr.dtype)
 *         else:
 */
  __pyx_t_1 = (__pyx_v_dummy == Py_None);
  if (__pyx_t_1) {

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":37
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:
 *             dummy = np.empty(self.chunksize, dtype=self.arr.dtype)             # <<<<<<<<<<<<<<
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->chunksize); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_t_5 = PyObject_GetAttr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_dummy);
    __pyx_v_dummy = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":39
 *             dummy = np.empty(self.chunksize, dtype=self.arr.dtype)
 *         else:
 *             if dummy.dtype != self.arr.dtype:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Dummy array must be same dtype')
 *             if len(dummy) != self.chunksize:
 */
    __pyx_t_5 = PyObject_GetAttr(__pyx_v_dummy, __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_NE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":40
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')             # <<<<<<<<<<<<<<
 *             if len(dummy) != self.chunksize:
 *                 raise ValueError('Dummy array must be length %d' %
 */
      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_61), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[9]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":41
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')
 *             if len(dummy) != self.chunksize:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Dummy array must be length %d' %
 *                                  self.chunksize)
 */
    __pyx_t_6 = PyObject_Length(__pyx_v_dummy); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = (__pyx_t_6 != __pyx_v_self->chunksize);
    if (__pyx_t_1) {

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":43
 *             if len(dummy) != self.chunksize:
 *                 raise ValueError('Dummy array must be length %d' %
 *                                  self.chunksize)             # <<<<<<<<<<<<<<
 * 
 *         return dummy
 */
      __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_self->chunksize); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_62), __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_2));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_2, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {__pyx_filename = __pyx_f[9]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":45
 *                                  self.chunksize)
 * 
 *         return dummy             # <<<<<<<<<<<<<<
 * 
 *     def get_result(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dummy);
  __pyx_r = __pyx_v_dummy;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._tseries.Reducer._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dummy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_7Reducer_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_7Reducer_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_result (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_7Reducer_4get_result(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reduce.pyx":47
 *         return dummy
 * 
 *     def get_result(self):             # <<<<<<<<<<<<<<
 *         cdef:
 *             char* dummy_buf
 */

static PyObject *__pyx_pf_6pandas_8_tseries_7Reducer_4get_result(struct __pyx_obj_6pandas_8_tseries_Reducer *__pyx_v_self) {
  char *__pyx_v_dummy_buf;
  PyArrayObject *__pyx_v_arr = 0;
  PyArrayObject *__pyx_v_result = 0;
  PyArrayObject *__pyx_v_chunk = 0;
  Py_ssize_t __pyx_v_i;
  PyArrayIterObject *__pyx_v_it = 0;
  PyObject *__pyx_v_res = 0;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_result");

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":55
 *             object res
 * 
 *         arr = self.arr             # <<<<<<<<<<<<<<
 *         chunk = self.dummy
 * 
 */
  if (!(likely(((__pyx_v_self->arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_self->arr);
  __pyx_v_arr = ((PyArrayObject *)__pyx_v_self->arr);

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":56
 * 
 *         arr = self.arr
 *         chunk = self.dummy             # <<<<<<<<<<<<<<
 * 
 *         dummy_buf = chunk.data
 */
  if (!(likely(((__pyx_v_self->dummy) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->dummy, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_self->dummy);
  __pyx_v_chunk = ((PyArrayObject *)__pyx_v_self->dummy);

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":58
 *         chunk = self.dummy
 * 
 *         dummy_buf = chunk.data             # <<<<<<<<<<<<<<
 *         chunk.data = arr.data
 *         try:
 */
  __pyx_v_dummy_buf = __pyx_v_chunk->data;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":59
 * 
 *         dummy_buf = chunk.data
 *         chunk.data = arr.data             # <<<<<<<<<<<<<<
 *         try:
 *             for i in range(self.nresults):
 */
  __pyx_v_chunk->data = __pyx_v_arr->data;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":60
 *         dummy_buf = chunk.data
 *         chunk.data = arr.data
 *         try:             # <<<<<<<<<<<<<<
 *             for i in range(self.nresults):
 *                 res = self.f(chunk)
 */
  /*try:*/ {
    {
      __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      /*try:*/ {

        /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":61
 *         chunk.data = arr.data
 *         try:
 *             for i in range(self.nresults):             # <<<<<<<<<<<<<<
 *                 res = self.f(chunk)
 *                 if i == 0:
 */
        __pyx_t_4 = __pyx_v_self->nresults;
        for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
          __pyx_v_i = __pyx_t_5;

          /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":62
 *         try:
 *             for i in range(self.nresults):
 *                 res = self.f(chunk)             # <<<<<<<<<<<<<<
 *                 if i == 0:
 *                     result = self._get_result_array(res)
 */
          __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_INCREF(((PyObject *)__pyx_v_chunk));
          PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_chunk));
          __Pyx_GIVEREF(((PyObject *)__pyx_v_chunk));
          __pyx_t_7 = PyObject_Call(__pyx_v_self->f, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_v_res);
          __pyx_v_res = __pyx_t_7;
          __pyx_t_7 = 0;

          /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":63
 *             for i in range(self.nresults):
 *                 res = self.f(chunk)
 *                 if i == 0:             # <<<<<<<<<<<<<<
 *                     result = self._get_result_array(res)
 *                     it = <flatiter> PyArray_IterNew(result)
 */
          __pyx_t_8 = (__pyx_v_i == 0);
          if (__pyx_t_8) {

            /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":64
 *                 res = self.f(chunk)
 *                 if i == 0:
 *                     result = self._get_result_array(res)             # <<<<<<<<<<<<<<
 *                     it = <flatiter> PyArray_IterNew(result)
 * 
 */
            __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___get_result_array); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_INCREF(__pyx_v_res);
            PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_res);
            __Pyx_GIVEREF(__pyx_v_res);
            __pyx_t_9 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
            if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_XDECREF(((PyObject *)__pyx_v_result));
            __pyx_v_result = ((PyArrayObject *)__pyx_t_9);
            __pyx_t_9 = 0;

            /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":65
 *                 if i == 0:
 *                     result = self._get_result_array(res)
 *                     it = <flatiter> PyArray_IterNew(result)             # <<<<<<<<<<<<<<
 * 
 *                 PyArray_SETITEM(result, PyArray_ITER_DATA(it), res)
 */
            __pyx_t_9 = PyArray_IterNew(((PyObject *)__pyx_v_result)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_INCREF(((PyObject *)((PyArrayIterObject *)__pyx_t_9)));
            __Pyx_XDECREF(((PyObject *)__pyx_v_it));
            __pyx_v_it = ((PyArrayIterObject *)__pyx_t_9);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L16;
          }
          __pyx_L16:;

          /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":67
 *                     it = <flatiter> PyArray_IterNew(result)
 * 
 *                 PyArray_SETITEM(result, PyArray_ITER_DATA(it), res)             # <<<<<<<<<<<<<<
 *                 chunk.data = chunk.data + self.increment
 *                 PyArray_ITER_NEXT(it)
 */
          if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L6_error;} }
          if (unlikely(!__pyx_v_it)) { __Pyx_RaiseUnboundLocalError("it"); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L6_error;} }
          PyArray_SETITEM(__pyx_v_result, PyArray_ITER_DATA(__pyx_v_it), __pyx_v_res);

          /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":68
 * 
 *                 PyArray_SETITEM(result, PyArray_ITER_DATA(it), res)
 *                 chunk.data = chunk.data + self.increment             # <<<<<<<<<<<<<<
 *                 PyArray_ITER_NEXT(it)
 *         except Exception, e:
 */
          __pyx_v_chunk->data = (__pyx_v_chunk->data + __pyx_v_self->increment);

          /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":69
 *                 PyArray_SETITEM(result, PyArray_ITER_DATA(it), res)
 *                 chunk.data = chunk.data + self.increment
 *                 PyArray_ITER_NEXT(it)             # <<<<<<<<<<<<<<
 *         except Exception, e:
 *             if hasattr(e, 'args'):
 */
          PyArray_ITER_NEXT(__pyx_v_it);
        }
      }
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L13_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":70
 *                 chunk.data = chunk.data + self.increment
 *                 PyArray_ITER_NEXT(it)
 *         except Exception, e:             # <<<<<<<<<<<<<<
 *             if hasattr(e, 'args'):
 *                 e.args = e.args + (i,)
 */
      __pyx_t_10 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
      if (__pyx_t_10) {
        __Pyx_AddTraceback("pandas._tseries.Reducer.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_v_e = __pyx_t_6;

        /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":71
 *                 PyArray_ITER_NEXT(it)
 *         except Exception, e:
 *             if hasattr(e, 'args'):             # <<<<<<<<<<<<<<
 *                 e.args = e.args + (i,)
 *         finally:
 */
        __pyx_t_11 = ((PyObject *)__pyx_n_s__args);
        __Pyx_INCREF(__pyx_t_11);
        __pyx_t_8 = PyObject_HasAttr(__pyx_v_e, __pyx_t_11); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (__pyx_t_8) {

          /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":72
 *         except Exception, e:
 *             if hasattr(e, 'args'):
 *                 e.args = e.args + (i,)             # <<<<<<<<<<<<<<
 *         finally:
 *             # so we don't free the wrong memory
 */
          __pyx_t_11 = PyObject_GetAttr(__pyx_v_e, __pyx_n_s__args); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          __Pyx_GOTREF(__pyx_t_13);
          PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12);
          __Pyx_GIVEREF(__pyx_t_12);
          __pyx_t_12 = 0;
          __pyx_t_12 = PyNumber_Add(__pyx_t_11, ((PyObject *)__pyx_t_13)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
          if (PyObject_SetAttr(__pyx_v_e, __pyx_n_s__args, __pyx_t_12) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          goto __pyx_L19;
        }
        __pyx_L19:;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L7_exception_handled;
      }
      __pyx_L8_except_error:;
      __Pyx_XGIVEREF(__pyx_t_1);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
      goto __pyx_L4;
      __pyx_L7_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_1);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
      __pyx_L13_try_end:;
    }
  }

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":75
 *         finally:
 *             # so we don't free the wrong memory
 *             chunk.data = dummy_buf             # <<<<<<<<<<<<<<
 *         if result.dtype == np.object_:
 *             result = maybe_convert_objects(result)
 */
  /*finally:*/ {
    int __pyx_why;
    PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
    int __pyx_exc_lineno;
    __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
    __pyx_why = 0; goto __pyx_L5;
    __pyx_L4: {
      __pyx_why = 4;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
      __pyx_exc_lineno = __pyx_lineno;
      goto __pyx_L5;
    }
    __pyx_L5:;
    __pyx_v_chunk->data = __pyx_v_dummy_buf;
    switch (__pyx_why) {
      case 4: {
        __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
        __pyx_lineno = __pyx_exc_lineno;
        __pyx_exc_type = 0;
        __pyx_exc_value = 0;
        __pyx_exc_tb = 0;
        goto __pyx_L1_error;
      }
    }
  }

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":76
 *             # so we don't free the wrong memory
 *             chunk.data = dummy_buf
 *         if result.dtype == np.object_:             # <<<<<<<<<<<<<<
 *             result = maybe_convert_objects(result)
 *         return result
 */
  if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_7 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__dtype); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__object_); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_9, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_8) {

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":77
 *             chunk.data = dummy_buf
 *         if result.dtype == np.object_:
 *             result = maybe_convert_objects(result)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(((PyObject *)__pyx_v_result));
    PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_result));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
    __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
    if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_result));
    __pyx_v_result = ((PyArrayObject *)__pyx_t_7);
    __pyx_t_7 = 0;
    goto __pyx_L21;
  }
  __pyx_L21:;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":78
 *         if result.dtype == np.object_:
 *             result = maybe_convert_objects(result)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def _get_result_array(self, object res):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("pandas._tseries.Reducer.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_chunk);
  __Pyx_XDECREF((PyObject *)__pyx_v_it);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_7Reducer_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_7Reducer_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_result_array (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_7Reducer_6_get_result_array(((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_v_self), ((PyObject *)__pyx_v_res));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reduce.pyx":80
 *         return result
 * 
 *     def _get_result_array(self, object res):             # <<<<<<<<<<<<<<
 *         try:
 *             assert(not isinstance(res, np.ndarray))
 */

static PyObject *__pyx_pf_6pandas_8_tseries_7Reducer_6_get_result_array(struct __pyx_obj_6pandas_8_tseries_Reducer *__pyx_v_self, PyObject *__pyx_v_res) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_result_array");

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":81
 * 
 *     def _get_result_array(self, object res):
 *         try:             # <<<<<<<<<<<<<<
 *             assert(not isinstance(res, np.ndarray))
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy)))
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":82
 *     def _get_result_array(self, object res):
 *         try:
 *             assert(not isinstance(res, np.ndarray))             # <<<<<<<<<<<<<<
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy)))
 * 
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      __pyx_t_4 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_res, __pyx_t_4); 
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!(!__pyx_t_5))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[9]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      #endif

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":83
 *         try:
 *             assert(not isinstance(res, np.ndarray))
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy)))             # <<<<<<<<<<<<<<
 * 
 *             result = np.empty(self.nresults, dtype='O')
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      __pyx_t_4 = ((PyObject *)((PyObject*)(&PyList_Type)));
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_res, __pyx_t_4); 
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_5) {
        __pyx_t_6 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_t_4 = __pyx_v_self->dummy;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_7 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_8 = (__pyx_t_6 == __pyx_t_7);
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = __pyx_t_5;
      }
      if (unlikely(!(!__pyx_t_9))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[9]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      #endif

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":85
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy)))
 * 
 *             result = np.empty(self.nresults, dtype='O')             # <<<<<<<<<<<<<<
 *             result[0] = res
 *         except Exception:
 */
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_self->nresults); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_v_result = __pyx_t_12;
      __pyx_t_12 = 0;

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":86
 * 
 *             result = np.empty(self.nresults, dtype='O')
 *             result[0] = res             # <<<<<<<<<<<<<<
 *         except Exception:
 *             raise ValueError('function does not reduce')
 */
      if (__Pyx_SetItemInt(__pyx_v_result, 0, __pyx_v_res, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":87
 *             result = np.empty(self.nresults, dtype='O')
 *             result[0] = res
 *         except Exception:             # <<<<<<<<<<<<<<
 *             raise ValueError('function does not reduce')
 *         return result
 */
    __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_13) {
      __Pyx_AddTraceback("pandas._tseries.Reducer._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_4, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_11);

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":88
 *             result[0] = res
 *         except Exception:
 *             raise ValueError('function does not reduce')             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
      __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_64), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      {__pyx_filename = __pyx_f[9]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":89
 *         except Exception:
 *             raise ValueError('function does not reduce')
 *         return result             # <<<<<<<<<<<<<<
 * 
 * cdef class SeriesGrouper:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pandas._tseries.Reducer._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_series = 0;
  PyObject *__pyx_v_f = 0;
  PyObject *__pyx_v_labels = 0;
  Py_ssize_t __pyx_v_ngroups;
  PyObject *__pyx_v_dummy = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__series,&__pyx_n_s__f,&__pyx_n_s__labels,&__pyx_n_s__ngroups,&__pyx_n_s__dummy,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  {
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__series);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__labels);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ngroups);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  4:
        values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy);
        if (likely(values[4])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_series = values[0];
      __pyx_v_f = values[1];
      __pyx_v_labels = values[2];
      __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[3]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_dummy = values[4];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_series = values[0];
    __pyx_v_f = values[1];
    __pyx_v_labels = values[2];
    __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[3]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_dummy = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.SeriesGrouper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper___init__(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self), __pyx_v_series, __pyx_v_f, __pyx_v_labels, __pyx_v_ngroups, __pyx_v_dummy);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reduce.pyx":103
 *         object arr, index, dummy, f, labels
 * 
 *     def __init__(self, object series, object f, object labels,             # <<<<<<<<<<<<<<
 *                  Py_ssize_t ngroups, object dummy):
 *         n = len(series)
 */

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper___init__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_series, PyObject *__pyx_v_f, PyObject *__pyx_v_labels, Py_ssize_t __pyx_v_ngroups, PyObject *__pyx_v_dummy) {
  CYTHON_UNUSED PyObject *__pyx_v_n = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");
  __Pyx_INCREF(__pyx_v_series);

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":105
 *     def __init__(self, object series, object f, object labels,
 *                  Py_ssize_t ngroups, object dummy):
 *         n = len(series)             # <<<<<<<<<<<<<<
 * 
 *         self.labels = labels
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_series); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_n = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":107
 *         n = len(series)
 * 
 *         self.labels = labels             # <<<<<<<<<<<<<<
 *         self.f = f
 *         if not series.flags.c_contiguous:
 */
  __Pyx_INCREF(__pyx_v_labels);
  __Pyx_GIVEREF(__pyx_v_labels);
  __Pyx_GOTREF(__pyx_v_self->labels);
  __Pyx_DECREF(__pyx_v_self->labels);
  __pyx_v_self->labels = __pyx_v_labels;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":108
 * 
 *         self.labels = labels
 *         self.f = f             # <<<<<<<<<<<<<<
 *         if not series.flags.c_contiguous:
 *             series = series.copy('C')
 */
  __Pyx_INCREF(__pyx_v_f);
  __Pyx_GIVEREF(__pyx_v_f);
  __Pyx_GOTREF(__pyx_v_self->f);
  __Pyx_DECREF(__pyx_v_self->f);
  __pyx_v_self->f = __pyx_v_f;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":109
 *         self.labels = labels
 *         self.f = f
 *         if not series.flags.c_contiguous:             # <<<<<<<<<<<<<<
 *             series = series.copy('C')
 *         self.arr = series
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_series, __pyx_n_s__flags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__c_contiguous); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = (!__pyx_t_4);
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":110
 *         self.f = f
 *         if not series.flags.c_contiguous:
 *             series = series.copy('C')             # <<<<<<<<<<<<<<
 *         self.arr = series
 *         self.index = series.index
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_series, __pyx_n_s__copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_65), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_v_series);
    __pyx_v_series = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":111
 *         if not series.flags.c_contiguous:
 *             series = series.copy('C')
 *         self.arr = series             # <<<<<<<<<<<<<<
 *         self.index = series.index
 * 
 */
  __Pyx_INCREF(__pyx_v_series);
  __Pyx_GIVEREF(__pyx_v_series);
  __Pyx_GOTREF(__pyx_v_self->arr);
  __Pyx_DECREF(__pyx_v_self->arr);
  __pyx_v_self->arr = __pyx_v_series;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":112
 *             series = series.copy('C')
 *         self.arr = series
 *         self.index = series.index             # <<<<<<<<<<<<<<
 * 
 *         self.dummy = self._check_dummy(dummy)
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_series, __pyx_n_s__index); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->index);
  __Pyx_DECREF(__pyx_v_self->index);
  __pyx_v_self->index = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":114
 *         self.index = series.index
 * 
 *         self.dummy = self._check_dummy(dummy)             # <<<<<<<<<<<<<<
 *         self.passed_dummy = dummy is not None
 *         self.ngroups = ngroups
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___check_dummy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_dummy);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_dummy);
  __Pyx_GIVEREF(__pyx_v_dummy);
  __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_GOTREF(__pyx_v_self->dummy);
  __Pyx_DECREF(__pyx_v_self->dummy);
  __pyx_v_self->dummy = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":115
 * 
 *         self.dummy = self._check_dummy(dummy)
 *         self.passed_dummy = dummy is not None             # <<<<<<<<<<<<<<
 *         self.ngroups = ngroups
 * 
 */
  __pyx_t_5 = (__pyx_v_dummy != Py_None);
  __pyx_v_self->passed_dummy = __pyx_t_5;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":116
 *         self.dummy = self._check_dummy(dummy)
 *         self.passed_dummy = dummy is not None
 *         self.ngroups = ngroups             # <<<<<<<<<<<<<<
 * 
 *     def _check_dummy(self, dummy=None):
 */
  __pyx_v_self->ngroups = __pyx_v_ngroups;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._tseries.SeriesGrouper.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_series);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_13SeriesGrouper_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_13SeriesGrouper_3_check_dummy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_dummy = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__dummy,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_check_dummy (wrapper)");
  {
    PyObject* values[1] = {0};

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":118
 *         self.ngroups = ngroups
 * 
 *     def _check_dummy(self, dummy=None):             # <<<<<<<<<<<<<<
 *         if dummy is None:
 *             dummy = np.empty(0, dtype=self.arr.dtype)
 */
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_check_dummy") < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_dummy = values[0];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_dummy = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_check_dummy", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.SeriesGrouper._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_2_check_dummy(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self), __pyx_v_dummy);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_2_check_dummy(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_dummy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_check_dummy");
  __Pyx_INCREF(__pyx_v_dummy);

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":119
 * 
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:             # <<<<<<<<<<<<<<
 *             dummy = np.empty(0, dtype=self.arr.dtype)
 *         else:
 */
  __pyx_t_1 = (__pyx_v_dummy == Py_None);
  if (__pyx_t_1) {

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":120
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:
 *             dummy = np.empty(0, dtype=self.arr.dtype)             # <<<<<<<<<<<<<<
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_66), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_dummy);
    __pyx_v_dummy = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":122
 *             dummy = np.empty(0, dtype=self.arr.dtype)
 *         else:
 *             if dummy.dtype != self.arr.dtype:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Dummy array must be same dtype')
 *             if not dummy.flags.contiguous:
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_dummy, __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_self->arr, __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":123
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')             # <<<<<<<<<<<<<<
 *             if not dummy.flags.contiguous:
 *                 dummy = dummy.copy()
 */
      __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_67), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      {__pyx_filename = __pyx_f[9]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":124
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')
 *             if not dummy.flags.contiguous:             # <<<<<<<<<<<<<<
 *                 dummy = dummy.copy()
 * 
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_dummy, __pyx_n_s__flags); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__contiguous); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = (!__pyx_t_1);
    if (__pyx_t_5) {

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":125
 *                 raise ValueError('Dummy array must be same dtype')
 *             if not dummy.flags.contiguous:
 *                 dummy = dummy.copy()             # <<<<<<<<<<<<<<
 * 
 *         return dummy
 */
      __pyx_t_2 = PyObject_GetAttr(__pyx_v_dummy, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_v_dummy);
      __pyx_v_dummy = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":127
 *                 dummy = dummy.copy()
 * 
 *         return dummy             # <<<<<<<<<<<<<<
 * 
 *     def get_result(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_dummy);
  __pyx_r = __pyx_v_dummy;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._tseries.SeriesGrouper._check_dummy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dummy);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_13SeriesGrouper_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_13SeriesGrouper_5get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_result (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_4get_result(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reduce.pyx":129
 *         return dummy
 * 
 *     def get_result(self):             # <<<<<<<<<<<<<<
 *         cdef:
 *             ndarray arr, result
 */

static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_4get_result(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self) {
  PyArrayObject *__pyx_v_result = 0;
  PyArrayObject *__pyx_v_labels = 0;
  PyArrayObject *__pyx_v_counts = 0;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_group_size;
  Py_ssize_t __pyx_v_lab;
  PyObject *__pyx_v_res = 0;
  PyObject *__pyx_v_chunk = 0;
  int __pyx_v_initialized;
  struct __pyx_obj_6pandas_8_tseries_Slider *__pyx_v_vslider = 0;
  struct __pyx_obj_6pandas_8_tseries_Slider *__pyx_v_islider = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyArrayObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_result");
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":135
 *             Py_ssize_t i, n, group_size, lab
 *             object res, chunk
 *             bint initialized = 0             # <<<<<<<<<<<<<<
 *             Slider vslider, islider
 * 
 */
  __pyx_v_initialized = 0;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":138
 *             Slider vslider, islider
 * 
 *         labels = self.labels             # <<<<<<<<<<<<<<
 *         counts = np.zeros(self.ngroups, dtype='i4')
 *         chunk = self.dummy
 */
  if (!(likely(((__pyx_v_self->labels) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->labels, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyArrayObject *)__pyx_v_self->labels);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_2 < 0)) {
      PyErr_Fetch(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_3); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_5);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      }
    }
    __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = 0;
  __Pyx_INCREF(__pyx_v_self->labels);
  __pyx_v_labels = ((PyArrayObject *)__pyx_v_self->labels);

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":139
 * 
 *         labels = self.labels
 *         counts = np.zeros(self.ngroups, dtype='i4')             # <<<<<<<<<<<<<<
 *         chunk = self.dummy
 *         group_size = 0
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__zeros); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_self->ngroups); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_9 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyArrayObject *)__pyx_t_9);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_2 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_1, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_2 < 0)) {
      PyErr_Fetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_5); Py_XDECREF(__pyx_t_4); Py_XDECREF(__pyx_t_3);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_5, __pyx_t_4, __pyx_t_3);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_9);
  __pyx_t_9 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":140
 *         labels = self.labels
 *         counts = np.zeros(self.ngroups, dtype='i4')
 *         chunk = self.dummy             # <<<<<<<<<<<<<<
 *         group_size = 0
 *         n = len(self.arr)
 */
  __Pyx_INCREF(__pyx_v_self->dummy);
  __pyx_v_chunk = __pyx_v_self->dummy;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":141
 *         counts = np.zeros(self.ngroups, dtype='i4')
 *         chunk = self.dummy
 *         group_size = 0             # <<<<<<<<<<<<<<
 *         n = len(self.arr)
 * 
 */
  __pyx_v_group_size = 0;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":142
 *         chunk = self.dummy
 *         group_size = 0
 *         n = len(self.arr)             # <<<<<<<<<<<<<<
 * 
 *         vslider = Slider(self.arr, self.dummy)
 */
  __pyx_t_9 = __pyx_v_self->arr;
  __Pyx_INCREF(__pyx_t_9);
  __pyx_t_10 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_n = __pyx_t_10;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":144
 *         n = len(self.arr)
 * 
 *         vslider = Slider(self.arr, self.dummy)             # <<<<<<<<<<<<<<
 *         islider = Slider(self.index, self.dummy.index)
 * 
 */
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_v_self->arr);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_self->arr);
  __Pyx_GIVEREF(__pyx_v_self->arr);
  __Pyx_INCREF(__pyx_v_self->dummy);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_self->dummy);
  __Pyx_GIVEREF(__pyx_v_self->dummy);
  __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_8_tseries_Slider)), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  __pyx_v_vslider = ((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":145
 * 
 *         vslider = Slider(self.arr, self.dummy)
 *         islider = Slider(self.index, self.dummy.index)             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __pyx_t_6 = PyObject_GetAttr(__pyx_v_self->dummy, __pyx_n_s__index); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_v_self->index);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_self->index);
  __Pyx_GIVEREF(__pyx_v_self->index);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_8_tseries_Slider)), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
  __pyx_v_islider = ((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":147
 *         islider = Slider(self.index, self.dummy.index)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for i in range(n):
 *                 group_size += 1
 */
  /*try:*/ {
    {
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":148
 * 
 *         try:
 *             for i in range(n):             # <<<<<<<<<<<<<<
 *                 group_size += 1
 * 
 */
        __pyx_t_10 = __pyx_v_n;
        for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {
          __pyx_v_i = __pyx_t_11;

          /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":149
 *         try:
 *             for i in range(n):
 *                 group_size += 1             # <<<<<<<<<<<<<<
 * 
 *                 lab = labels[i]
 */
          __pyx_v_group_size = (__pyx_v_group_size + 1);

          /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":151
 *                 group_size += 1
 * 
 *                 lab = labels[i]             # <<<<<<<<<<<<<<
 * 
 *                 if i == n - 1 or lab != labels[i + 1]:
 */
          __pyx_t_12 = __pyx_v_i;
          __pyx_t_2 = -1;
          if (__pyx_t_12 < 0) {
            __pyx_t_12 += __pyx_pybuffernd_labels.diminfo[0].shape;
            if (unlikely(__pyx_t_12 < 0)) __pyx_t_2 = 0;
          } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_2 = 0;
          if (unlikely(__pyx_t_2 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_2);
            {__pyx_filename = __pyx_f[9]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
          }
          __pyx_v_lab = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_labels.diminfo[0].strides));

          /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":153
 *                 lab = labels[i]
 * 
 *                 if i == n - 1 or lab != labels[i + 1]:             # <<<<<<<<<<<<<<
 *                     if lab == -1:
 *                         islider.advance(group_size)
 */
          __pyx_t_13 = (__pyx_v_i == (__pyx_v_n - 1));
          if (!__pyx_t_13) {
            __pyx_t_14 = (__pyx_v_i + 1);
            __pyx_t_2 = -1;
            if (__pyx_t_14 < 0) {
              __pyx_t_14 += __pyx_pybuffernd_labels.diminfo[0].shape;
              if (unlikely(__pyx_t_14 < 0)) __pyx_t_2 = 0;
            } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_2 = 0;
            if (unlikely(__pyx_t_2 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_2);
              {__pyx_filename = __pyx_f[9]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            }
            __pyx_t_15 = (__pyx_v_lab != (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_labels.diminfo[0].strides)));
            __pyx_t_16 = __pyx_t_15;
          } else {
            __pyx_t_16 = __pyx_t_13;
          }
          if (__pyx_t_16) {

            /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":154
 * 
 *                 if i == n - 1 or lab != labels[i + 1]:
 *                     if lab == -1:             # <<<<<<<<<<<<<<
 *                         islider.advance(group_size)
 *                         vslider.advance(group_size)
 */
            __pyx_t_16 = (__pyx_v_lab == -1);
            if (__pyx_t_16) {

              /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":155
 *                 if i == n - 1 or lab != labels[i + 1]:
 *                     if lab == -1:
 *                         islider.advance(group_size)             # <<<<<<<<<<<<<<
 *                         vslider.advance(group_size)
 *                         group_size = 0
 */
              __pyx_t_6 = __pyx_f_6pandas_8_tseries_6Slider_advance(__pyx_v_islider, __pyx_v_group_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

              /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":156
 *                     if lab == -1:
 *                         islider.advance(group_size)
 *                         vslider.advance(group_size)             # <<<<<<<<<<<<<<
 *                         group_size = 0
 *                         continue
 */
              __pyx_t_6 = __pyx_f_6pandas_8_tseries_6Slider_advance(__pyx_v_vslider, __pyx_v_group_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

              /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":157
 *                         islider.advance(group_size)
 *                         vslider.advance(group_size)
 *                         group_size = 0             # <<<<<<<<<<<<<<
 *                         continue
 * 
 */
              __pyx_v_group_size = 0;

              /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":158
 *                         vslider.advance(group_size)
 *                         group_size = 0
 *                         continue             # <<<<<<<<<<<<<<
 * 
 *                     islider.set_length(group_size)
 */
              goto __pyx_L14_continue;
              goto __pyx_L17;
            }
            __pyx_L17:;

            /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":160
 *                         continue
 * 
 *                     islider.set_length(group_size)             # <<<<<<<<<<<<<<
 *                     vslider.set_length(group_size)
 * 
 */
            __pyx_t_6 = __pyx_f_6pandas_8_tseries_6Slider_set_length(__pyx_v_islider, __pyx_v_group_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

            /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":161
 * 
 *                     islider.set_length(group_size)
 *                     vslider.set_length(group_size)             # <<<<<<<<<<<<<<
 * 
 *                     res = self.f(chunk)
 */
            __pyx_t_6 = __pyx_f_6pandas_8_tseries_6Slider_set_length(__pyx_v_vslider, __pyx_v_group_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

            /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":163
 *                     vslider.set_length(group_size)
 * 
 *                     res = self.f(chunk)             # <<<<<<<<<<<<<<
 * 
 *                     if not initialized:
 */
            __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_INCREF(__pyx_v_chunk);
            PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_chunk);
            __Pyx_GIVEREF(__pyx_v_chunk);
            __pyx_t_9 = PyObject_Call(__pyx_v_self->f, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
            __Pyx_XDECREF(__pyx_v_res);
            __pyx_v_res = __pyx_t_9;
            __pyx_t_9 = 0;

            /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":165
 *                     res = self.f(chunk)
 * 
 *                     if not initialized:             # <<<<<<<<<<<<<<
 *                         result = self._get_result_array(res)
 *                         initialized = 1
 */
            __pyx_t_16 = (!__pyx_v_initialized);
            if (__pyx_t_16) {

              /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":166
 * 
 *                     if not initialized:
 *                         result = self._get_result_array(res)             # <<<<<<<<<<<<<<
 *                         initialized = 1
 * 
 */
              __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s___get_result_array); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_INCREF(__pyx_v_res);
              PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_res);
              __Pyx_GIVEREF(__pyx_v_res);
              __pyx_t_8 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
              if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
              __Pyx_XDECREF(((PyObject *)__pyx_v_result));
              __pyx_v_result = ((PyArrayObject *)__pyx_t_8);
              __pyx_t_8 = 0;

              /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":167
 *                     if not initialized:
 *                         result = self._get_result_array(res)
 *                         initialized = 1             # <<<<<<<<<<<<<<
 * 
 *                     util.assign_value_1d(result, lab, res)
 */
              __pyx_v_initialized = 1;
              goto __pyx_L18;
            }
            __pyx_L18:;

            /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":169
 *                         initialized = 1
 * 
 *                     util.assign_value_1d(result, lab, res)             # <<<<<<<<<<<<<<
 *                     counts[lab] = group_size
 *                     islider.advance(group_size)
 */
            if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L6_error;} }
            __pyx_t_2 = assign_value_1d(__pyx_v_result, __pyx_v_lab, __pyx_v_res); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L6_error;}

            /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":170
 * 
 *                     util.assign_value_1d(result, lab, res)
 *                     counts[lab] = group_size             # <<<<<<<<<<<<<<
 *                     islider.advance(group_size)
 *                     vslider.advance(group_size)
 */
            __pyx_t_17 = __pyx_v_lab;
            __pyx_t_2 = -1;
            if (__pyx_t_17 < 0) {
              __pyx_t_17 += __pyx_pybuffernd_counts.diminfo[0].shape;
              if (unlikely(__pyx_t_17 < 0)) __pyx_t_2 = 0;
            } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_2 = 0;
            if (unlikely(__pyx_t_2 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_2);
              {__pyx_filename = __pyx_f[9]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            }
            *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) = __pyx_v_group_size;

            /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":171
 *                     util.assign_value_1d(result, lab, res)
 *                     counts[lab] = group_size
 *                     islider.advance(group_size)             # <<<<<<<<<<<<<<
 *                     vslider.advance(group_size)
 * 
 */
            __pyx_t_8 = __pyx_f_6pandas_8_tseries_6Slider_advance(__pyx_v_islider, __pyx_v_group_size); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":172
 *                     counts[lab] = group_size
 *                     islider.advance(group_size)
 *                     vslider.advance(group_size)             # <<<<<<<<<<<<<<
 * 
 *                     group_size = 0
 */
            __pyx_t_8 = __pyx_f_6pandas_8_tseries_6Slider_advance(__pyx_v_vslider, __pyx_v_group_size); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":174
 *                     vslider.advance(group_size)
 * 
 *                     group_size = 0             # <<<<<<<<<<<<<<
 *         except:
 *             raise
 */
            __pyx_v_group_size = 0;
            goto __pyx_L16;
          }
          __pyx_L16:;
          __pyx_L14_continue:;
        }
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L13_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":175
 * 
 *                     group_size = 0
 *         except:             # <<<<<<<<<<<<<<
 *             raise
 *         finally:
 */
      /*except:*/ {
        __Pyx_AddTraceback("pandas._tseries.SeriesGrouper.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_6, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_t_9);

        /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":176
 *                     group_size = 0
 *         except:
 *             raise             # <<<<<<<<<<<<<<
 *         finally:
 *             # so we don't free the wrong memory
 */
        __Pyx_GIVEREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_9);
        __Pyx_ErrRestore(__pyx_t_8, __pyx_t_6, __pyx_t_9);
        __pyx_t_8 = 0; __pyx_t_6 = 0; __pyx_t_9 = 0; 
        {__pyx_filename = __pyx_f[9]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L7_exception_handled;
      }
      __pyx_L8_except_error:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L4;
      __pyx_L7_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      __pyx_L13_try_end:;
    }
  }

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":179
 *         finally:
 *             # so we don't free the wrong memory
 *             islider.cleanup()             # <<<<<<<<<<<<<<
 *             vslider.cleanup()
 * 
 */
  /*finally:*/ {
    int __pyx_why;
    PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb;
    int __pyx_exc_lineno;
    __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0;
    __pyx_why = 0; goto __pyx_L5;
    __pyx_L4: {
      __pyx_why = 4;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb);
      __pyx_exc_lineno = __pyx_lineno;
      goto __pyx_L5;
    }
    __pyx_L5:;
    __pyx_t_9 = __pyx_f_6pandas_8_tseries_6Slider_cleanup(__pyx_v_islider); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":180
 *             # so we don't free the wrong memory
 *             islider.cleanup()
 *             vslider.cleanup()             # <<<<<<<<<<<<<<
 * 
 *         if result.dtype == np.object_:
 */
    __pyx_t_9 = __pyx_f_6pandas_8_tseries_6Slider_cleanup(__pyx_v_vslider); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L22;
    __pyx_L21_error:;
    if (__pyx_why == 4) {
      Py_XDECREF(__pyx_exc_type);
      Py_XDECREF(__pyx_exc_value);
      Py_XDECREF(__pyx_exc_tb);
    }
    goto __pyx_L1_error;
    __pyx_L22:;
    switch (__pyx_why) {
      case 4: {
        __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb);
        __pyx_lineno = __pyx_exc_lineno;
        __pyx_exc_type = 0;
        __pyx_exc_value = 0;
        __pyx_exc_tb = 0;
        goto __pyx_L1_error;
      }
    }
  }

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":182
 *             vslider.cleanup()
 * 
 *         if result.dtype == np.object_:             # <<<<<<<<<<<<<<
 *             result = maybe_convert_objects(result)
 * 
 */
  if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
  __pyx_t_9 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__dtype); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__object_); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_9, __pyx_t_8, Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_16) {

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":183
 * 
 *         if result.dtype == np.object_:
 *             result = maybe_convert_objects(result)             # <<<<<<<<<<<<<<
 * 
 *         return result, counts
 */
    __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(((PyObject *)__pyx_v_result));
    PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_result));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
    __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_result));
    __pyx_v_result = ((PyArrayObject *)__pyx_t_9);
    __pyx_t_9 = 0;
    goto __pyx_L23;
  }
  __pyx_L23:;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":185
 *             result = maybe_convert_objects(result)
 * 
 *         return result, counts             # <<<<<<<<<<<<<<
 * 
 *     def _get_result_array(self, object res):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __Pyx_INCREF(((PyObject *)__pyx_v_counts));
  PyTuple_SET_ITEM(__pyx_t_9, 1, ((PyObject *)__pyx_v_counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_counts));
  __pyx_r = ((PyObject *)__pyx_t_9);
  __pyx_t_9 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.SeriesGrouper.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_labels);
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_chunk);
  __Pyx_XDECREF((PyObject *)__pyx_v_vslider);
  __Pyx_XDECREF((PyObject *)__pyx_v_islider);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_13SeriesGrouper_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_13SeriesGrouper_7_get_result_array(PyObject *__pyx_v_self, PyObject *__pyx_v_res) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_result_array (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_6_get_result_array(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_res));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reduce.pyx":187
 *         return result, counts
 * 
 *     def _get_result_array(self, object res):             # <<<<<<<<<<<<<<
 *         try:
 *             assert(not isinstance(res, np.ndarray))
 */

static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_6_get_result_array(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_res) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_result_array");

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":188
 * 
 *     def _get_result_array(self, object res):
 *         try:             # <<<<<<<<<<<<<<
 *             assert(not isinstance(res, np.ndarray))
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy)))
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":189
 *     def _get_result_array(self, object res):
 *         try:
 *             assert(not isinstance(res, np.ndarray))             # <<<<<<<<<<<<<<
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy)))
 * 
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      __pyx_t_4 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_res, __pyx_t_4); 
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!(!__pyx_t_5))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[9]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      #endif

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":190
 *         try:
 *             assert(not isinstance(res, np.ndarray))
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy)))             # <<<<<<<<<<<<<<
 * 
 *             result = np.empty(self.ngroups, dtype='O')
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      __pyx_t_4 = ((PyObject *)((PyObject*)(&PyList_Type)));
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_res, __pyx_t_4); 
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_5) {
        __pyx_t_6 = PyObject_Length(__pyx_v_res); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __pyx_t_4 = __pyx_v_self->dummy;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_7 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_8 = (__pyx_t_6 == __pyx_t_7);
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = __pyx_t_5;
      }
      if (unlikely(!(!__pyx_t_9))) {
        PyErr_SetNone(PyExc_AssertionError);
        {__pyx_filename = __pyx_f[9]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      #endif

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":192
 *             assert(not (isinstance(res, list) and len(res) == len(self.dummy)))
 * 
 *             result = np.empty(self.ngroups, dtype='O')             # <<<<<<<<<<<<<<
 *         except Exception:
 *             raise ValueError('function does not reduce')
 */
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_self->ngroups); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_11);
      PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_t_12 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_t_11), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_v_result = __pyx_t_12;
      __pyx_t_12 = 0;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":193
 * 
 *             result = np.empty(self.ngroups, dtype='O')
 *         except Exception:             # <<<<<<<<<<<<<<
 *             raise ValueError('function does not reduce')
 *         return result
 */
    __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_13) {
      __Pyx_AddTraceback("pandas._tseries.SeriesGrouper._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_4, &__pyx_t_11) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_11);

      /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":194
 *             result = np.empty(self.ngroups, dtype='O')
 *         except Exception:
 *             raise ValueError('function does not reduce')             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
      __pyx_t_10 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_68), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      {__pyx_filename = __pyx_f[9]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":195
 *         except Exception:
 *             raise ValueError('function does not reduce')
 *         return result             # <<<<<<<<<<<<<<
 * 
 * cdef class Slider:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pandas._tseries.SeriesGrouper._get_result_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_13SeriesGrouper_3arr_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_13SeriesGrouper_3arr_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_3arr___get__(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reduce.pyx":101
 * 
 *     cdef public:
 *         object arr, index, dummy, f, labels             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, object series, object f, object labels,
 */

static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_3arr___get__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->arr);
  __pyx_r = __pyx_v_self->arr;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_3arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_3arr_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_3arr_2__set__(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_3arr_2__set__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__");
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->arr);
  __Pyx_DECREF(__pyx_v_self->arr);
  __pyx_v_self->arr = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_3arr_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_3arr_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_3arr_4__del__(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_3arr_4__del__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->arr);
  __Pyx_DECREF(__pyx_v_self->arr);
  __pyx_v_self->arr = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_13SeriesGrouper_5index_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_13SeriesGrouper_5index_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index___get__(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index___get__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->index);
  __pyx_r = __pyx_v_self->index;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_5index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_5index_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index_2__set__(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index_2__set__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__");
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->index);
  __Pyx_DECREF(__pyx_v_self->index);
  __pyx_v_self->index = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_5index_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_5index_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index_4__del__(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5index_4__del__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->index);
  __Pyx_DECREF(__pyx_v_self->index);
  __pyx_v_self->index = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_13SeriesGrouper_5dummy_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_13SeriesGrouper_5dummy_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy___get__(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy___get__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->dummy);
  __pyx_r = __pyx_v_self->dummy;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_5dummy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_5dummy_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy_2__set__(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy_2__set__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__");
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->dummy);
  __Pyx_DECREF(__pyx_v_self->dummy);
  __pyx_v_self->dummy = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_5dummy_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_5dummy_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy_4__del__(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_5dummy_4__del__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->dummy);
  __Pyx_DECREF(__pyx_v_self->dummy);
  __pyx_v_self->dummy = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_13SeriesGrouper_1f_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_13SeriesGrouper_1f_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f___get__(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f___get__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->f);
  __pyx_r = __pyx_v_self->f;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f_2__set__(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f_2__set__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__");
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->f);
  __Pyx_DECREF(__pyx_v_self->f);
  __pyx_v_self->f = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_1f_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_1f_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f_4__del__(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_1f_4__del__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->f);
  __Pyx_DECREF(__pyx_v_self->f);
  __pyx_v_self->f = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_13SeriesGrouper_6labels_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_13SeriesGrouper_6labels_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels___get__(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels___get__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->labels);
  __pyx_r = __pyx_v_self->labels;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_6labels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_6labels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels_2__set__(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels_2__set__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__");
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->labels);
  __Pyx_DECREF(__pyx_v_self->labels);
  __pyx_v_self->labels = __pyx_v_value;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_6labels_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_8_tseries_13SeriesGrouper_6labels_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels_4__del__(((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_13SeriesGrouper_6labels_4__del__(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->labels);
  __Pyx_DECREF(__pyx_v_self->labels);
  __pyx_v_self->labels = Py_None;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_6Slider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_6Slider_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_values = 0;
  PyObject *__pyx_v_buf = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__buf,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__buf);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = values[0];
      __pyx_v_buf = values[1];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = values[0];
    __pyx_v_buf = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Slider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_6Slider___init__(((struct __pyx_obj_6pandas_8_tseries_Slider *)__pyx_v_self), __pyx_v_values, __pyx_v_buf);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reduce.pyx":206
 *         char *orig_data
 * 
 *     def __init__(self, object values, object buf):             # <<<<<<<<<<<<<<
 *         assert(values.ndim == 1)
 *         if not values.flags.contiguous:
 */

static int __pyx_pf_6pandas_8_tseries_6Slider___init__(struct __pyx_obj_6pandas_8_tseries_Slider *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_buf) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");
  __Pyx_INCREF(__pyx_v_values);

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":207
 * 
 *     def __init__(self, object values, object buf):
 *         assert(values.ndim == 1)             # <<<<<<<<<<<<<<
 *         if not values.flags.contiguous:
 *             values = values.copy()
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__ndim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_1, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_3)) {
    PyErr_SetNone(PyExc_AssertionError);
    {__pyx_filename = __pyx_f[9]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":208
 *     def __init__(self, object values, object buf):
 *         assert(values.ndim == 1)
 *         if not values.flags.contiguous:             # <<<<<<<<<<<<<<
 *             values = values.copy()
 * 
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__flags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__contiguous); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = (!__pyx_t_3);
  if (__pyx_t_4) {

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":209
 *         assert(values.ndim == 1)
 *         if not values.flags.contiguous:
 *             values = values.copy()             # <<<<<<<<<<<<<<
 * 
 *         assert(values.dtype == buf.dtype)
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__copy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_values);
    __pyx_v_values = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":211
 *             values = values.copy()
 * 
 *         assert(values.dtype == buf.dtype)             # <<<<<<<<<<<<<<
 *         self.values = values
 *         self.buf = buf
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  __pyx_t_2 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_buf, __pyx_n_s__dtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) {
    PyErr_SetNone(PyExc_AssertionError);
    {__pyx_filename = __pyx_f[9]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #endif

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":212
 * 
 *         assert(values.dtype == buf.dtype)
 *         self.values = values             # <<<<<<<<<<<<<<
 *         self.buf = buf
 *         self.stride = values.dtype.itemsize
 */
  if (!(likely(((__pyx_v_values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_values);
  __Pyx_GIVEREF(__pyx_v_values);
  __Pyx_GOTREF(__pyx_v_self->values);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->values));
  __pyx_v_self->values = ((PyArrayObject *)__pyx_v_values);

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":213
 *         assert(values.dtype == buf.dtype)
 *         self.values = values
 *         self.buf = buf             # <<<<<<<<<<<<<<
 *         self.stride = values.dtype.itemsize
 * 
 */
  if (!(likely(((__pyx_v_buf) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_buf, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_buf);
  __Pyx_GIVEREF(__pyx_v_buf);
  __Pyx_GOTREF(__pyx_v_self->buf);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->buf));
  __pyx_v_self->buf = ((PyArrayObject *)__pyx_v_buf);

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":214
 *         self.values = values
 *         self.buf = buf
 *         self.stride = values.dtype.itemsize             # <<<<<<<<<<<<<<
 * 
 *         self.orig_data = self.buf.data
 */
  __pyx_t_5 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__itemsize); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->stride = __pyx_t_6;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":216
 *         self.stride = values.dtype.itemsize
 * 
 *         self.orig_data = self.buf.data             # <<<<<<<<<<<<<<
 *         self.orig_len = self.buf.shape[0]
 * 
 */
  __pyx_v_self->orig_data = __pyx_v_self->buf->data;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":217
 * 
 *         self.orig_data = self.buf.data
 *         self.orig_len = self.buf.shape[0]             # <<<<<<<<<<<<<<
 * 
 *         self.buf.data = self.values.data
 */
  __pyx_v_self->orig_len = (__pyx_v_self->buf->dimensions[0]);

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":219
 *         self.orig_len = self.buf.shape[0]
 * 
 *         self.buf.data = self.values.data             # <<<<<<<<<<<<<<
 * 
 *     cdef inline advance(self, Py_ssize_t k):
 */
  __pyx_v_self->buf->data = __pyx_v_self->values->data;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._tseries.Slider.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reduce.pyx":221
 *         self.buf.data = self.values.data
 * 
 *     cdef inline advance(self, Py_ssize_t k):             # <<<<<<<<<<<<<<
 *         self.buf.data = <char*> self.buf.data + self.stride * k
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_6pandas_8_tseries_6Slider_advance(struct __pyx_obj_6pandas_8_tseries_Slider *__pyx_v_self, Py_ssize_t __pyx_v_k) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("advance");

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":222
 * 
 *     cdef inline advance(self, Py_ssize_t k):
 *         self.buf.data = <char*> self.buf.data + self.stride * k             # <<<<<<<<<<<<<<
 * 
 *     cdef inline set_length(self, Py_ssize_t length):
 */
  __pyx_v_self->buf->data = (((char *)__pyx_v_self->buf->data) + (__pyx_v_self->stride * __pyx_v_k));

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reduce.pyx":224
 *         self.buf.data = <char*> self.buf.data + self.stride * k
 * 
 *     cdef inline set_length(self, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *         self.buf.shape[0] = length
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_6pandas_8_tseries_6Slider_set_length(struct __pyx_obj_6pandas_8_tseries_Slider *__pyx_v_self, Py_ssize_t __pyx_v_length) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_length");

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":225
 * 
 *     cdef inline set_length(self, Py_ssize_t length):
 *         self.buf.shape[0] = length             # <<<<<<<<<<<<<<
 * 
 *     cdef inline cleanup(self):
 */
  (__pyx_v_self->buf->dimensions[0]) = __pyx_v_length;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/reduce.pyx":227
 *         self.buf.shape[0] = length
 * 
 *     cdef inline cleanup(self):             # <<<<<<<<<<<<<<
 *         self.buf.shape[0] = self.orig_len
 *         self.buf.data = self.orig_data
 */

static CYTHON_INLINE PyObject *__pyx_f_6pandas_8_tseries_6Slider_cleanup(struct __pyx_obj_6pandas_8_tseries_Slider *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cleanup");

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":228
 * 
 *     cdef inline cleanup(self):
 *         self.buf.shape[0] = self.orig_len             # <<<<<<<<<<<<<<
 *         self.buf.data = self.orig_data
 * 
 */
  (__pyx_v_self->buf->dimensions[0]) = __pyx_v_self->orig_len;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":229
 *     cdef inline cleanup(self):
 *         self.buf.shape[0] = self.orig_len
 *         self.buf.data = self.orig_data             # <<<<<<<<<<<<<<
 * 
 * def reduce(arr, f, axis=0, dummy=None):
 */
  __pyx_v_self->buf->data = __pyx_v_self->orig_data;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_281reduce(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_281reduce = {__Pyx_NAMESTR("reduce"), (PyCFunction)__pyx_pw_6pandas_8_tseries_281reduce, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_281reduce(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_f = 0;
  PyObject *__pyx_v_axis = 0;
  PyObject *__pyx_v_dummy = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__f,&__pyx_n_s__axis,&__pyx_n_s__dummy,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reduce (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)__pyx_int_0);

    /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":231
 *         self.buf.data = self.orig_data
 * 
 * def reduce(arr, f, axis=0, dummy=None):             # <<<<<<<<<<<<<<
 *     reducer = Reducer(arr, f, axis=axis, dummy=dummy)
 *     return reducer.get_result()
 */
    values[3] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("reduce", 0, 2, 4, 1); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__dummy);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reduce") < 0)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_arr = values[0];
      __pyx_v_f = values[1];
      __pyx_v_axis = values[2];
      __pyx_v_dummy = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_arr = values[0];
    __pyx_v_f = values[1];
    __pyx_v_axis = values[2];
    __pyx_v_dummy = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("reduce", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.reduce", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_280reduce(__pyx_self, __pyx_v_arr, __pyx_v_f, __pyx_v_axis, __pyx_v_dummy);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_8_tseries_280reduce(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arr, PyObject *__pyx_v_f, PyObject *__pyx_v_axis, PyObject *__pyx_v_dummy) {
  struct __pyx_obj_6pandas_8_tseries_Reducer *__pyx_v_reducer = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reduce");

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":232
 * 
 * def reduce(arr, f, axis=0, dummy=None):
 *     reducer = Reducer(arr, f, axis=axis, dummy=dummy)             # <<<<<<<<<<<<<<
 *     return reducer.get_result()
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_arr);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_arr);
  __Pyx_GIVEREF(__pyx_v_arr);
  __Pyx_INCREF(__pyx_v_f);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_f);
  __Pyx_GIVEREF(__pyx_v_f);
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__axis), __pyx_v_axis) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dummy), __pyx_v_dummy) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_8_tseries_Reducer)), ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_reducer = ((struct __pyx_obj_6pandas_8_tseries_Reducer *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":233
 * def reduce(arr, f, axis=0, dummy=None):
 *     reducer = Reducer(arr, f, axis=axis, dummy=dummy)
 *     return reducer.get_result()             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_reducer), __pyx_n_s__get_result); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._tseries.reduce", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_reducer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/stats.pyx":27
 * # from cython cimport floating, integral
 * 
 * cdef _take_2d_float64(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                       object idx):
 *     cdef:
 */

static PyObject *__pyx_f_6pandas_8_tseries__take_2d_float64(PyArrayObject *__pyx_v_values, PyObject *__pyx_v_idx) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  Py_ssize_t __pyx_v_K;
  PyArrayObject *__pyx_v_indexer = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyArrayObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyArrayObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_take_2d_float64");
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":31
 *     cdef:
 *         Py_ssize_t i, j, N, K
 *         ndarray[Py_ssize_t, ndim=2, cast=True] indexer = idx             # <<<<<<<<<<<<<<
 *         ndarray[float64_t, ndim=2] result
 *         object val
 */
  if (!(likely(((__pyx_v_idx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_idx, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyArrayObject *)__pyx_v_idx);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_1, &__Pyx_TypeInfo_Py_ssize_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack) == -1)) {
      __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_indexer.diminfo[1].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_indexer.diminfo[1].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[1];
    }
  }
  __pyx_t_1 = 0;
  __Pyx_INCREF(__pyx_v_idx);
  __pyx_v_indexer = ((PyArrayObject *)__pyx_v_idx);

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":35
 *         object val
 * 
 *     N, K = (<object> values).shape             # <<<<<<<<<<<<<<
 *     result = np.empty_like(values)
 *     for i in range(N):
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_N = __pyx_t_7;
  __pyx_v_K = __pyx_t_8;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":36
 * 
 *     N, K = (<object> values).shape
 *     result = np.empty_like(values)             # <<<<<<<<<<<<<<
 *     for i in range(N):
 *         for j in range(K):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_9 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":37
 *     N, K = (<object> values).shape
 *     result = np.empty_like(values)
 *     for i in range(N):             # <<<<<<<<<<<<<<
 *         for j in range(K):
 *             result[i, j] = values[i, indexer[i, j]]
 */
  __pyx_t_8 = __pyx_v_N;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_8; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":38
 *     result = np.empty_like(values)
 *     for i in range(N):
 *         for j in range(K):             # <<<<<<<<<<<<<<
 *             result[i, j] = values[i, indexer[i, j]]
 *     return result
 */
    __pyx_t_14 = __pyx_v_K;
    for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
      __pyx_v_j = __pyx_t_15;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":39
 *     for i in range(N):
 *         for j in range(K):
 *             result[i, j] = values[i, indexer[i, j]]             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_17 = __pyx_v_j;
      __pyx_t_10 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_indexer.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_10 = 0;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_indexer.diminfo[1].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_indexer.diminfo[1].shape)) __pyx_t_10 = 1;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_18 = __pyx_v_i;
      __pyx_t_19 = (*__Pyx_BufPtrStrided2d(Py_ssize_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_indexer.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[1].strides));
      __pyx_t_10 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_values.diminfo[1].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 1;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_10 = 1;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_20 = __pyx_v_i;
      __pyx_t_21 = __pyx_v_j;
      __pyx_t_10 = -1;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0;
      if (__pyx_t_21 < 0) {
        __pyx_t_21 += __pyx_pybuffernd_result.diminfo[1].shape;
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 1;
      } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_10 = 1;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_result.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides));
    }
  }

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":40
 *         for j in range(K):
 *             result[i, j] = values[i, indexer[i, j]]
 *     return result             # <<<<<<<<<<<<<<
 * 
 * cdef _take_2d_int64(ndarray[int64_t, ndim=2] values,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries._take_2d_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/stats.pyx":42
 *     return result
 * 
 * cdef _take_2d_int64(ndarray[int64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                       object idx):
 *     cdef:
 */

static PyObject *__pyx_f_6pandas_8_tseries__take_2d_int64(PyArrayObject *__pyx_v_values, PyObject *__pyx_v_idx) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  Py_ssize_t __pyx_v_K;
  PyArrayObject *__pyx_v_indexer = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyArrayObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyArrayObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_take_2d_int64");
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":46
 *     cdef:
 *         Py_ssize_t i, j, N, K
 *         ndarray[Py_ssize_t, ndim=2, cast=True] indexer = idx             # <<<<<<<<<<<<<<
 *         ndarray[int64_t, ndim=2] result
 *         object val
 */
  if (!(likely(((__pyx_v_idx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_idx, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyArrayObject *)__pyx_v_idx);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_1, &__Pyx_TypeInfo_Py_ssize_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack) == -1)) {
      __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_indexer.diminfo[1].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_indexer.diminfo[1].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[1];
    }
  }
  __pyx_t_1 = 0;
  __Pyx_INCREF(__pyx_v_idx);
  __pyx_v_indexer = ((PyArrayObject *)__pyx_v_idx);

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":50
 *         object val
 * 
 *     N, K = (<object> values).shape             # <<<<<<<<<<<<<<
 *     result = np.empty_like(values)
 *     for i in range(N):
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_N = __pyx_t_7;
  __pyx_v_K = __pyx_t_8;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":51
 * 
 *     N, K = (<object> values).shape
 *     result = np.empty_like(values)             # <<<<<<<<<<<<<<
 *     for i in range(N):
 *         for j in range(K):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty_like); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_9 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":52
 *     N, K = (<object> values).shape
 *     result = np.empty_like(values)
 *     for i in range(N):             # <<<<<<<<<<<<<<
 *         for j in range(K):
 *             result[i, j] = values[i, indexer[i, j]]
 */
  __pyx_t_8 = __pyx_v_N;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_8; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":53
 *     result = np.empty_like(values)
 *     for i in range(N):
 *         for j in range(K):             # <<<<<<<<<<<<<<
 *             result[i, j] = values[i, indexer[i, j]]
 *     return result
 */
    __pyx_t_14 = __pyx_v_K;
    for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
      __pyx_v_j = __pyx_t_15;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":54
 *     for i in range(N):
 *         for j in range(K):
 *             result[i, j] = values[i, indexer[i, j]]             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_17 = __pyx_v_j;
      __pyx_t_10 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_indexer.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_10 = 0;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_indexer.diminfo[1].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_indexer.diminfo[1].shape)) __pyx_t_10 = 1;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_18 = __pyx_v_i;
      __pyx_t_19 = (*__Pyx_BufPtrStrided2d(Py_ssize_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_indexer.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[1].strides));
      __pyx_t_10 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_values.diminfo[1].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 1;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_10 = 1;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_20 = __pyx_v_i;
      __pyx_t_21 = __pyx_v_j;
      __pyx_t_10 = -1;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0;
      if (__pyx_t_21 < 0) {
        __pyx_t_21 += __pyx_pybuffernd_result.diminfo[1].shape;
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 1;
      } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_10 = 1;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_result.diminfo[1].strides) = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides));
    }
  }

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":55
 *         for j in range(K):
 *             result[i, j] = values[i, indexer[i, j]]
 *     return result             # <<<<<<<<<<<<<<
 * 
 * cdef _take_2d_object(ndarray[object, ndim=2] values,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries._take_2d_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/stats.pyx":57
 *     return result
 * 
 * cdef _take_2d_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
 *                      object idx):
 *     cdef:
 */

static PyObject *__pyx_f_6pandas_8_tseries__take_2d_object(PyArrayObject *__pyx_v_values, PyObject *__pyx_v_idx) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_N;
  Py_ssize_t __pyx_v_K;
  PyArrayObject *__pyx_v_indexer = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyArrayObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyArrayObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  PyObject **__pyx_t_22;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_take_2d_object");
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":61
 *     cdef:
 *         Py_ssize_t i, j, N, K
 *         ndarray[Py_ssize_t, ndim=2, cast=True] indexer = idx             # <<<<<<<<<<<<<<
 *         ndarray[object, ndim=2] result
 *         object val
 */
  if (!(likely(((__pyx_v_idx) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_idx, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = ((PyArrayObject *)__pyx_v_idx);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_1, &__Pyx_TypeInfo_Py_ssize_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack) == -1)) {
      __pyx_v_indexer = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_indexer.diminfo[1].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_indexer.diminfo[1].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[1];
    }
  }
  __pyx_t_1 = 0;
  __Pyx_INCREF(__pyx_v_idx);
  __pyx_v_indexer = ((PyArrayObject *)__pyx_v_idx);

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":65
 *         object val
 * 
 *     N, K = (<object> values).shape             # <<<<<<<<<<<<<<
 *     result = values.copy()
 *     for i in range(N):
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_N = __pyx_t_7;
  __pyx_v_K = __pyx_t_8;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":66
 * 
 *     N, K = (<object> values).shape
 *     result = values.copy()             # <<<<<<<<<<<<<<
 *     for i in range(N):
 *         for j in range(K):
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_9 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_10 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_9 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":67
 *     N, K = (<object> values).shape
 *     result = values.copy()
 *     for i in range(N):             # <<<<<<<<<<<<<<
 *         for j in range(K):
 *             result[i, j] = values[i, indexer[i, j]]
 */
  __pyx_t_8 = __pyx_v_N;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_8; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":68
 *     result = values.copy()
 *     for i in range(N):
 *         for j in range(K):             # <<<<<<<<<<<<<<
 *             result[i, j] = values[i, indexer[i, j]]
 *     return result
 */
    __pyx_t_14 = __pyx_v_K;
    for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
      __pyx_v_j = __pyx_t_15;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":69
 *     for i in range(N):
 *         for j in range(K):
 *             result[i, j] = values[i, indexer[i, j]]             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_17 = __pyx_v_j;
      __pyx_t_10 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_indexer.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_10 = 0;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_indexer.diminfo[1].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 1;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_indexer.diminfo[1].shape)) __pyx_t_10 = 1;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_18 = __pyx_v_i;
      __pyx_t_19 = (*__Pyx_BufPtrStrided2d(Py_ssize_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_indexer.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_indexer.diminfo[1].strides));
      __pyx_t_10 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_values.diminfo[1].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_10 = 1;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_10 = 1;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_4 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_values.diminfo[1].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_4);
      __pyx_t_20 = __pyx_v_i;
      __pyx_t_21 = __pyx_v_j;
      __pyx_t_10 = -1;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_10 = 0;
      if (__pyx_t_21 < 0) {
        __pyx_t_21 += __pyx_pybuffernd_result.diminfo[1].shape;
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_10 = 1;
      } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_10 = 1;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_22 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_result.diminfo[1].strides);
      __Pyx_GOTREF(*__pyx_t_22);
      __Pyx_DECREF(*__pyx_t_22); __Pyx_INCREF(__pyx_t_4);
      *__pyx_t_22 = __pyx_t_4;
      __Pyx_GIVEREF(*__pyx_t_22);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":70
 *         for j in range(K):
 *             result[i, j] = values[i, indexer[i, j]]
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries._take_2d_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_283rank_1d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_282rank_1d_float64[] = "\n    Fast NaN-friendly version of scipy.stats.rankdata\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_283rank_1d_float64 = {__Pyx_NAMESTR("rank_1d_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_283rank_1d_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_282rank_1d_float64)};
static PyObject *__pyx_pw_6pandas_8_tseries_283rank_1d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_in_arr = 0;
  PyObject *__pyx_v_ties_method = 0;
  PyObject *__pyx_v_ascending = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__in_arr,&__pyx_n_s__ties_method,&__pyx_n_s__ascending,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rank_1d_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)__pyx_n_s__average);
    values[2] = __pyx_k_69;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_arr);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ties_method);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ascending);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_1d_float64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_in_arr = values[0];
      __pyx_v_ties_method = values[1];
      __pyx_v_ascending = values[2];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_in_arr = values[0];
    __pyx_v_ties_method = values[1];
    __pyx_v_ascending = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rank_1d_float64", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.rank_1d_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_282rank_1d_float64(__pyx_self, __pyx_v_in_arr, __pyx_v_ties_method, __pyx_v_ascending);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/stats.pyx":73
 * 
 * 
 * def rank_1d_float64(object in_arr, ties_method='average', ascending=True):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */

static PyObject *__pyx_pf_6pandas_8_tseries_282rank_1d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_dups;
  PyArrayObject *__pyx_v_sorted_data = 0;
  PyArrayObject *__pyx_v_ranks = 0;
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_argsorted = 0;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  __pyx_t_5numpy_float64_t __pyx_v_nan_value;
  __pyx_t_5numpy_float64_t __pyx_v_sum_ranks;
  int __pyx_v_tiebreak;
  PyObject *__pyx_v_mask = NULL;
  PyObject *__pyx_v__as = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sorted_data;
  __Pyx_Buffer __pyx_pybuffer_sorted_data;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks;
  __Pyx_Buffer __pyx_pybuffer_ranks;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted;
  __Pyx_Buffer __pyx_pybuffer_argsorted;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  __pyx_t_5numpy_float64_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  PyArrayObject *__pyx_t_14 = NULL;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  __pyx_t_5numpy_int64_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  __pyx_t_5numpy_int64_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  __pyx_t_5numpy_int64_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  __pyx_t_5numpy_int64_t __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  __pyx_t_5numpy_int64_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  __pyx_t_5numpy_int64_t __pyx_t_32;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rank_1d_float64");
  __pyx_pybuffer_sorted_data.pybuffer.buf = NULL;
  __pyx_pybuffer_sorted_data.refcount = 0;
  __pyx_pybuffernd_sorted_data.data = NULL;
  __pyx_pybuffernd_sorted_data.rcbuffer = &__pyx_pybuffer_sorted_data;
  __pyx_pybuffer_ranks.pybuffer.buf = NULL;
  __pyx_pybuffer_ranks.refcount = 0;
  __pyx_pybuffernd_ranks.data = NULL;
  __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_argsorted.pybuffer.buf = NULL;
  __pyx_pybuffer_argsorted.refcount = 0;
  __pyx_pybuffernd_argsorted.data = NULL;
  __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":79
 * 
 *     cdef:
 *         Py_ssize_t i, j, n, dups = 0             # <<<<<<<<<<<<<<
 *         ndarray[float64_t] sorted_data, ranks, values
 *         ndarray[int64_t] argsorted
 */
  __pyx_v_dups = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":83
 *         ndarray[int64_t] argsorted
 *         float64_t val, nan_value
 *         float64_t sum_ranks = 0             # <<<<<<<<<<<<<<
 *         int tiebreak = 0
 *     tiebreak = tiebreakers[ties_method]
 */
  __pyx_v_sum_ranks = 0.0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":84
 *         float64_t val, nan_value
 *         float64_t sum_ranks = 0
 *         int tiebreak = 0             # <<<<<<<<<<<<<<
 *     tiebreak = tiebreakers[ties_method]
 * 
 */
  __pyx_v_tiebreak = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":85
 *         float64_t sum_ranks = 0
 *         int tiebreak = 0
 *     tiebreak = tiebreakers[ties_method]             # <<<<<<<<<<<<<<
 * 
 *     values = np.asarray(in_arr).copy()
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_tiebreak = __pyx_t_3;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":87
 *     tiebreak = tiebreakers[ties_method]
 * 
 *     values = np.asarray(in_arr).copy()             # <<<<<<<<<<<<<<
 * 
 *     if ascending:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_in_arr);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr);
  __Pyx_GIVEREF(__pyx_v_in_arr);
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_values = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":89
 *     values = np.asarray(in_arr).copy()
 * 
 *     if ascending:             # <<<<<<<<<<<<<<
 *         nan_value = np.inf
 *     else:
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_9) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":90
 * 
 *     if ascending:
 *         nan_value = np.inf             # <<<<<<<<<<<<<<
 *     else:
 *         nan_value = -np.inf
 */
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_nan_value = __pyx_t_10;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":92
 *         nan_value = np.inf
 *     else:
 *         nan_value = -np.inf             # <<<<<<<<<<<<<<
 *     mask = np.isnan(values)
 *     np.putmask(values, mask, nan_value)
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__inf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Negative(__pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_nan_value = __pyx_t_10;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":93
 *     else:
 *         nan_value = -np.inf
 *     mask = np.isnan(values)             # <<<<<<<<<<<<<<
 *     np.putmask(values, mask, nan_value)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__isnan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_mask = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":94
 *         nan_value = -np.inf
 *     mask = np.isnan(values)
 *     np.putmask(values, mask, nan_value)             # <<<<<<<<<<<<<<
 * 
 *     n = len(values)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__putmask); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_nan_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  __Pyx_INCREF(__pyx_v_mask);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_mask);
  __Pyx_GIVEREF(__pyx_v_mask);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":96
 *     np.putmask(values, mask, nan_value)
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     ranks = np.empty(n, dtype='f8')
 * 
 */
  __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_11;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":97
 * 
 *     n = len(values)
 *     ranks = np.empty(n, dtype='f8')             # <<<<<<<<<<<<<<
 * 
 *     # py2.5/win32 hack, can't pass i8
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_12);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_6);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
      }
    }
    __pyx_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_ranks = ((PyArrayObject *)__pyx_t_12);
  __pyx_t_12 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":100
 * 
 *     # py2.5/win32 hack, can't pass i8
 *     if tiebreak == TIEBREAK_FIRST:             # <<<<<<<<<<<<<<
 *         # need to use a stable sort here
 *         _as = values.argsort(kind='mergesort')
 */
  __pyx_t_9 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST);
  if (__pyx_t_9) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":102
 *     if tiebreak == TIEBREAK_FIRST:
 *         # need to use a stable sort here
 *         _as = values.argsort(kind='mergesort')             # <<<<<<<<<<<<<<
 *         if not ascending:
 *             tiebreak = TIEBREAK_FIRST_DESCENDING
 */
    __pyx_t_12 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__kind), ((PyObject *)__pyx_n_s__mergesort)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_v__as = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":103
 *         # need to use a stable sort here
 *         _as = values.argsort(kind='mergesort')
 *         if not ascending:             # <<<<<<<<<<<<<<
 *             tiebreak = TIEBREAK_FIRST_DESCENDING
 *     else:
 */
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_13 = (!__pyx_t_9);
    if (__pyx_t_13) {

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":104
 *         _as = values.argsort(kind='mergesort')
 *         if not ascending:
 *             tiebreak = TIEBREAK_FIRST_DESCENDING             # <<<<<<<<<<<<<<
 *     else:
 *         _as = values.argsort()
 */
      __pyx_v_tiebreak = __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST_DESCENDING;
      goto __pyx_L5;
    }
    __pyx_L5:;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":106
 *             tiebreak = TIEBREAK_FIRST_DESCENDING
 *     else:
 *         _as = values.argsort()             # <<<<<<<<<<<<<<
 * 
 *     if not ascending:
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v__as = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L4:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":108
 *         _as = values.argsort()
 * 
 *     if not ascending:             # <<<<<<<<<<<<<<
 *         _as = _as[::-1]
 * 
 */
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_9 = (!__pyx_t_13);
  if (__pyx_t_9) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":109
 * 
 *     if not ascending:
 *         _as = _as[::-1]             # <<<<<<<<<<<<<<
 * 
 *     sorted_data = values.take(_as)
 */
    __pyx_t_1 = PyObject_GetItem(__pyx_v__as, __pyx_k_slice_70); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_v__as);
    __pyx_v__as = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":111
 *         _as = _as[::-1]
 * 
 *     sorted_data = values.take(_as)             # <<<<<<<<<<<<<<
 *     argsorted = _as.astype('i8')
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__take); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v__as);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__as);
  __Pyx_GIVEREF(__pyx_v__as);
  __pyx_t_12 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_12);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer, (PyObject*)__pyx_v_sorted_data, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_sorted_data.diminfo[0].strides = __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sorted_data.diminfo[0].shape = __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_sorted_data = ((PyArrayObject *)__pyx_t_12);
  __pyx_t_12 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":112
 * 
 *     sorted_data = values.take(_as)
 *     argsorted = _as.astype('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_12 = PyObject_GetAttr(__pyx_v__as, __pyx_n_s__astype); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_k_tuple_71), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_14 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_6);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
      }
    }
    __pyx_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_14 = 0;
  __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":114
 *     argsorted = _as.astype('i8')
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         sum_ranks += i + 1
 *         dups += 1
 */
  __pyx_t_11 = __pyx_v_n;
  for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_11; __pyx_t_15+=1) {
    __pyx_v_i = __pyx_t_15;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":115
 * 
 *     for i in range(n):
 *         sum_ranks += i + 1             # <<<<<<<<<<<<<<
 *         dups += 1
 *         val = sorted_data[i]
 */
    __pyx_v_sum_ranks = (__pyx_v_sum_ranks + (__pyx_v_i + 1));

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":116
 *     for i in range(n):
 *         sum_ranks += i + 1
 *         dups += 1             # <<<<<<<<<<<<<<
 *         val = sorted_data[i]
 *         if val == nan_value:
 */
    __pyx_v_dups = (__pyx_v_dups + 1);

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":117
 *         sum_ranks += i + 1
 *         dups += 1
 *         val = sorted_data[i]             # <<<<<<<<<<<<<<
 *         if val == nan_value:
 *             ranks[argsorted[i]] = nan
 */
    __pyx_t_16 = __pyx_v_i;
    __pyx_t_3 = -1;
    if (__pyx_t_16 < 0) {
      __pyx_t_16 += __pyx_pybuffernd_sorted_data.diminfo[0].shape;
      if (unlikely(__pyx_t_16 < 0)) __pyx_t_3 = 0;
    } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_sorted_data.diminfo[0].shape)) __pyx_t_3 = 0;
    if (unlikely(__pyx_t_3 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_3);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_sorted_data.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":118
 *         dups += 1
 *         val = sorted_data[i]
 *         if val == nan_value:             # <<<<<<<<<<<<<<
 *             ranks[argsorted[i]] = nan
 *             continue
 */
    __pyx_t_9 = (__pyx_v_val == __pyx_v_nan_value);
    if (__pyx_t_9) {

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":119
 *         val = sorted_data[i]
 *         if val == nan_value:
 *             ranks[argsorted[i]] = nan             # <<<<<<<<<<<<<<
 *             continue
 *         if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR:
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_3 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_18 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_argsorted.diminfo[0].strides));
      __pyx_t_3 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_ranks.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_ranks.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_nan;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":120
 *         if val == nan_value:
 *             ranks[argsorted[i]] = nan
 *             continue             # <<<<<<<<<<<<<<
 *         if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR:
 *             if tiebreak == TIEBREAK_AVERAGE:
 */
      goto __pyx_L7_continue;
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":121
 *             ranks[argsorted[i]] = nan
 *             continue
 *         if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR:             # <<<<<<<<<<<<<<
 *             if tiebreak == TIEBREAK_AVERAGE:
 *                 for j in range(i - dups + 1, i + 1):
 */
    __pyx_t_9 = (__pyx_v_i == (__pyx_v_n - 1));
    if (!__pyx_t_9) {
      __pyx_t_19 = (__pyx_v_i + 1);
      __pyx_t_3 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_sorted_data.diminfo[0].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_sorted_data.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_13 = (fabs(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_sorted_data.diminfo[0].strides)) - __pyx_v_val)) > __pyx_v_6pandas_8_tseries_FP_ERR);
      __pyx_t_20 = __pyx_t_13;
    } else {
      __pyx_t_20 = __pyx_t_9;
    }
    if (__pyx_t_20) {

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":122
 *             continue
 *         if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR:
 *             if tiebreak == TIEBREAK_AVERAGE:             # <<<<<<<<<<<<<<
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = sum_ranks / dups
 */
      __pyx_t_20 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_AVERAGE);
      if (__pyx_t_20) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":123
 *         if i == n - 1 or fabs(sorted_data[i + 1] - val) > FP_ERR:
 *             if tiebreak == TIEBREAK_AVERAGE:
 *                 for j in range(i - dups + 1, i + 1):             # <<<<<<<<<<<<<<
 *                     ranks[argsorted[j]] = sum_ranks / dups
 *             elif tiebreak == TIEBREAK_MIN:
 */
        __pyx_t_21 = (__pyx_v_i + 1);
        for (__pyx_t_22 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) {
          __pyx_v_j = __pyx_t_22;

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":124
 *             if tiebreak == TIEBREAK_AVERAGE:
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = sum_ranks / dups             # <<<<<<<<<<<<<<
 *             elif tiebreak == TIEBREAK_MIN:
 *                 for j in range(i - dups + 1, i + 1):
 */
          if (unlikely(__pyx_v_dups == 0)) {
            PyErr_Format(PyExc_ZeroDivisionError, "float division");
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_23 = __pyx_v_j;
          __pyx_t_3 = -1;
          if (__pyx_t_23 < 0) {
            __pyx_t_23 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
            if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_24 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_argsorted.diminfo[0].strides));
          __pyx_t_3 = -1;
          if (__pyx_t_24 < 0) {
            __pyx_t_24 += __pyx_pybuffernd_ranks.diminfo[0].shape;
            if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_sum_ranks / __pyx_v_dups);
        }
        goto __pyx_L11;
      }

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":125
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = sum_ranks / dups
 *             elif tiebreak == TIEBREAK_MIN:             # <<<<<<<<<<<<<<
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i - dups + 2
 */
      __pyx_t_20 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_MIN);
      if (__pyx_t_20) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":126
 *                     ranks[argsorted[j]] = sum_ranks / dups
 *             elif tiebreak == TIEBREAK_MIN:
 *                 for j in range(i - dups + 1, i + 1):             # <<<<<<<<<<<<<<
 *                     ranks[argsorted[j]] = i - dups + 2
 *             elif tiebreak == TIEBREAK_MAX:
 */
        __pyx_t_21 = (__pyx_v_i + 1);
        for (__pyx_t_22 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) {
          __pyx_v_j = __pyx_t_22;

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":127
 *             elif tiebreak == TIEBREAK_MIN:
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i - dups + 2             # <<<<<<<<<<<<<<
 *             elif tiebreak == TIEBREAK_MAX:
 *                 for j in range(i - dups + 1, i + 1):
 */
          __pyx_t_25 = __pyx_v_j;
          __pyx_t_3 = -1;
          if (__pyx_t_25 < 0) {
            __pyx_t_25 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
            if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_26 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_argsorted.diminfo[0].strides));
          __pyx_t_3 = -1;
          if (__pyx_t_26 < 0) {
            __pyx_t_26 += __pyx_pybuffernd_ranks.diminfo[0].shape;
            if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_ranks.diminfo[0].strides) = ((__pyx_v_i - __pyx_v_dups) + 2);
        }
        goto __pyx_L11;
      }

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":128
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i - dups + 2
 *             elif tiebreak == TIEBREAK_MAX:             # <<<<<<<<<<<<<<
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i + 1
 */
      __pyx_t_20 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_MAX);
      if (__pyx_t_20) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":129
 *                     ranks[argsorted[j]] = i - dups + 2
 *             elif tiebreak == TIEBREAK_MAX:
 *                 for j in range(i - dups + 1, i + 1):             # <<<<<<<<<<<<<<
 *                     ranks[argsorted[j]] = i + 1
 *             elif tiebreak == TIEBREAK_FIRST:
 */
        __pyx_t_21 = (__pyx_v_i + 1);
        for (__pyx_t_22 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) {
          __pyx_v_j = __pyx_t_22;

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":130
 *             elif tiebreak == TIEBREAK_MAX:
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i + 1             # <<<<<<<<<<<<<<
 *             elif tiebreak == TIEBREAK_FIRST:
 *                 for j in range(i - dups + 1, i + 1):
 */
          __pyx_t_27 = __pyx_v_j;
          __pyx_t_3 = -1;
          if (__pyx_t_27 < 0) {
            __pyx_t_27 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
            if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_28 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_argsorted.diminfo[0].strides));
          __pyx_t_3 = -1;
          if (__pyx_t_28 < 0) {
            __pyx_t_28 += __pyx_pybuffernd_ranks.diminfo[0].shape;
            if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_i + 1);
        }
        goto __pyx_L11;
      }

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":131
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i + 1
 *             elif tiebreak == TIEBREAK_FIRST:             # <<<<<<<<<<<<<<
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = j + 1
 */
      __pyx_t_20 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST);
      if (__pyx_t_20) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":132
 *                     ranks[argsorted[j]] = i + 1
 *             elif tiebreak == TIEBREAK_FIRST:
 *                 for j in range(i - dups + 1, i + 1):             # <<<<<<<<<<<<<<
 *                     ranks[argsorted[j]] = j + 1
 *             elif tiebreak == TIEBREAK_FIRST_DESCENDING:
 */
        __pyx_t_21 = (__pyx_v_i + 1);
        for (__pyx_t_22 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) {
          __pyx_v_j = __pyx_t_22;

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":133
 *             elif tiebreak == TIEBREAK_FIRST:
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = j + 1             # <<<<<<<<<<<<<<
 *             elif tiebreak == TIEBREAK_FIRST_DESCENDING:
 *                 for j in range(i - dups + 1, i + 1):
 */
          __pyx_t_29 = __pyx_v_j;
          __pyx_t_3 = -1;
          if (__pyx_t_29 < 0) {
            __pyx_t_29 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
            if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_30 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_argsorted.diminfo[0].strides));
          __pyx_t_3 = -1;
          if (__pyx_t_30 < 0) {
            __pyx_t_30 += __pyx_pybuffernd_ranks.diminfo[0].shape;
            if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_j + 1);
        }
        goto __pyx_L11;
      }

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":134
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = j + 1
 *             elif tiebreak == TIEBREAK_FIRST_DESCENDING:             # <<<<<<<<<<<<<<
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = 2 * i - j - dups + 2
 */
      __pyx_t_20 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST_DESCENDING);
      if (__pyx_t_20) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":135
 *                     ranks[argsorted[j]] = j + 1
 *             elif tiebreak == TIEBREAK_FIRST_DESCENDING:
 *                 for j in range(i - dups + 1, i + 1):             # <<<<<<<<<<<<<<
 *                     ranks[argsorted[j]] = 2 * i - j - dups + 2
 *             sum_ranks = dups = 0
 */
        __pyx_t_21 = (__pyx_v_i + 1);
        for (__pyx_t_22 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) {
          __pyx_v_j = __pyx_t_22;

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":136
 *             elif tiebreak == TIEBREAK_FIRST_DESCENDING:
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = 2 * i - j - dups + 2             # <<<<<<<<<<<<<<
 *             sum_ranks = dups = 0
 *     return ranks
 */
          __pyx_t_31 = __pyx_v_j;
          __pyx_t_3 = -1;
          if (__pyx_t_31 < 0) {
            __pyx_t_31 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
            if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_32 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_argsorted.diminfo[0].strides));
          __pyx_t_3 = -1;
          if (__pyx_t_32 < 0) {
            __pyx_t_32 += __pyx_pybuffernd_ranks.diminfo[0].shape;
            if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_ranks.diminfo[0].strides) = ((((2 * __pyx_v_i) - __pyx_v_j) - __pyx_v_dups) + 2);
        }
        goto __pyx_L11;
      }
      __pyx_L11:;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":137
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = 2 * i - j - dups + 2
 *             sum_ranks = dups = 0             # <<<<<<<<<<<<<<
 *     return ranks
 * 
 */
      __pyx_v_sum_ranks = 0;
      __pyx_v_dups = 0;
      goto __pyx_L10;
    }
    __pyx_L10:;
    __pyx_L7_continue:;
  }

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":138
 *                     ranks[argsorted[j]] = 2 * i - j - dups + 2
 *             sum_ranks = dups = 0
 *     return ranks             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_ranks));
  __pyx_r = ((PyObject *)__pyx_v_ranks);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_12);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.rank_1d_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_sorted_data);
  __Pyx_XDECREF((PyObject *)__pyx_v_ranks);
  __Pyx_XDECREF((PyObject *)__pyx_v_values);
  __Pyx_XDECREF((PyObject *)__pyx_v_argsorted);
  __Pyx_XDECREF(__pyx_v_mask);
  __Pyx_XDECREF(__pyx_v__as);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_285rank_1d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_284rank_1d_int64[] = "\n    Fast NaN-friendly version of scipy.stats.rankdata\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_285rank_1d_int64 = {__Pyx_NAMESTR("rank_1d_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_285rank_1d_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_284rank_1d_int64)};
static PyObject *__pyx_pw_6pandas_8_tseries_285rank_1d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_in_arr = 0;
  PyObject *__pyx_v_ties_method = 0;
  PyObject *__pyx_v_ascending = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__in_arr,&__pyx_n_s__ties_method,&__pyx_n_s__ascending,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rank_1d_int64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)__pyx_n_s__average);
    values[2] = __pyx_k_72;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_arr);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ties_method);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ascending);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_1d_int64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_in_arr = values[0];
      __pyx_v_ties_method = values[1];
      __pyx_v_ascending = values[2];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_in_arr = values[0];
    __pyx_v_ties_method = values[1];
    __pyx_v_ascending = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rank_1d_int64", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.rank_1d_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_284rank_1d_int64(__pyx_self, __pyx_v_in_arr, __pyx_v_ties_method, __pyx_v_ascending);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/stats.pyx":141
 * 
 * 
 * def rank_1d_int64(object in_arr, ties_method='average', ascending=True):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */

static PyObject *__pyx_pf_6pandas_8_tseries_284rank_1d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_dups;
  PyArrayObject *__pyx_v_sorted_data = 0;
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_ranks = 0;
  PyArrayObject *__pyx_v_argsorted = 0;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  __pyx_t_5numpy_float64_t __pyx_v_sum_ranks;
  int __pyx_v_tiebreak;
  PyObject *__pyx_v__as = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_sorted_data;
  __Pyx_Buffer __pyx_pybuffer_sorted_data;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks;
  __Pyx_Buffer __pyx_pybuffer_ranks;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted;
  __Pyx_Buffer __pyx_pybuffer_argsorted;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  PyArrayObject *__pyx_t_14 = NULL;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  __pyx_t_5numpy_int64_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  __pyx_t_5numpy_int64_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  __pyx_t_5numpy_int64_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  __pyx_t_5numpy_int64_t __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  __pyx_t_5numpy_int64_t __pyx_t_30;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rank_1d_int64");
  __pyx_pybuffer_sorted_data.pybuffer.buf = NULL;
  __pyx_pybuffer_sorted_data.refcount = 0;
  __pyx_pybuffernd_sorted_data.data = NULL;
  __pyx_pybuffernd_sorted_data.rcbuffer = &__pyx_pybuffer_sorted_data;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_ranks.pybuffer.buf = NULL;
  __pyx_pybuffer_ranks.refcount = 0;
  __pyx_pybuffernd_ranks.data = NULL;
  __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks;
  __pyx_pybuffer_argsorted.pybuffer.buf = NULL;
  __pyx_pybuffer_argsorted.refcount = 0;
  __pyx_pybuffernd_argsorted.data = NULL;
  __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":147
 * 
 *     cdef:
 *         Py_ssize_t i, j, n, dups = 0             # <<<<<<<<<<<<<<
 *         ndarray[int64_t] sorted_data, values
 *         ndarray[float64_t] ranks
 */
  __pyx_v_dups = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":152
 *         ndarray[int64_t] argsorted
 *         int64_t val
 *         float64_t sum_ranks = 0             # <<<<<<<<<<<<<<
 *         int tiebreak = 0
 *     tiebreak = tiebreakers[ties_method]
 */
  __pyx_v_sum_ranks = 0.0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":153
 *         int64_t val
 *         float64_t sum_ranks = 0
 *         int tiebreak = 0             # <<<<<<<<<<<<<<
 *     tiebreak = tiebreakers[ties_method]
 * 
 */
  __pyx_v_tiebreak = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":154
 *         float64_t sum_ranks = 0
 *         int tiebreak = 0
 *     tiebreak = tiebreakers[ties_method]             # <<<<<<<<<<<<<<
 * 
 *     values = np.asarray(in_arr)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_tiebreak = __pyx_t_3;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":156
 *     tiebreak = tiebreakers[ties_method]
 * 
 *     values = np.asarray(in_arr)             # <<<<<<<<<<<<<<
 * 
 *     n = len(values)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_in_arr);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr);
  __Pyx_GIVEREF(__pyx_v_in_arr);
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_values = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":158
 *     values = np.asarray(in_arr)
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     ranks = np.empty(n, dtype='f8')
 * 
 */
  __pyx_t_9 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_9;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":159
 * 
 *     n = len(values)
 *     ranks = np.empty(n, dtype='f8')             # <<<<<<<<<<<<<<
 * 
 *     # py2.5/win32 hack, can't pass i8
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_10);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_6);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
      }
    }
    __pyx_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_ranks = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":162
 * 
 *     # py2.5/win32 hack, can't pass i8
 *     if tiebreak == TIEBREAK_FIRST:             # <<<<<<<<<<<<<<
 *         # need to use a stable sort here
 *         _as = values.argsort(kind='mergesort')
 */
  __pyx_t_12 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST);
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":164
 *     if tiebreak == TIEBREAK_FIRST:
 *         # need to use a stable sort here
 *         _as = values.argsort(kind='mergesort')             # <<<<<<<<<<<<<<
 *         if not ascending:
 *             tiebreak = TIEBREAK_FIRST_DESCENDING
 */
    __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__kind), ((PyObject *)__pyx_n_s__mergesort)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_v__as = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":165
 *         # need to use a stable sort here
 *         _as = values.argsort(kind='mergesort')
 *         if not ascending:             # <<<<<<<<<<<<<<
 *             tiebreak = TIEBREAK_FIRST_DESCENDING
 *     else:
 */
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_13 = (!__pyx_t_12);
    if (__pyx_t_13) {

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":166
 *         _as = values.argsort(kind='mergesort')
 *         if not ascending:
 *             tiebreak = TIEBREAK_FIRST_DESCENDING             # <<<<<<<<<<<<<<
 *     else:
 *         _as = values.argsort()
 */
      __pyx_v_tiebreak = __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST_DESCENDING;
      goto __pyx_L4;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":168
 *             tiebreak = TIEBREAK_FIRST_DESCENDING
 *     else:
 *         _as = values.argsort()             # <<<<<<<<<<<<<<
 * 
 *     if not ascending:
 */
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v__as = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":170
 *         _as = values.argsort()
 * 
 *     if not ascending:             # <<<<<<<<<<<<<<
 *         _as = _as[::-1]
 * 
 */
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = (!__pyx_t_13);
  if (__pyx_t_12) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":171
 * 
 *     if not ascending:
 *         _as = _as[::-1]             # <<<<<<<<<<<<<<
 * 
 *     sorted_data = values.take(_as)
 */
    __pyx_t_4 = PyObject_GetItem(__pyx_v__as, __pyx_k_slice_73); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_v__as);
    __pyx_v__as = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":173
 *         _as = _as[::-1]
 * 
 *     sorted_data = values.take(_as)             # <<<<<<<<<<<<<<
 *     argsorted = _as.astype('i8')
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__take); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v__as);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__as);
  __Pyx_GIVEREF(__pyx_v__as);
  __pyx_t_10 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_10);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer, (PyObject*)__pyx_v_sorted_data, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_6); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_sorted_data.diminfo[0].strides = __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_sorted_data.diminfo[0].shape = __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_sorted_data = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":174
 * 
 *     sorted_data = values.take(_as)
 *     argsorted = _as.astype('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_10 = PyObject_GetAttr(__pyx_v__as, __pyx_n_s__astype); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_1 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_74), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_14 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_6);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
      }
    }
    __pyx_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_14 = 0;
  __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":176
 *     argsorted = _as.astype('i8')
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         sum_ranks += i + 1
 *         dups += 1
 */
  __pyx_t_9 = __pyx_v_n;
  for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_9; __pyx_t_15+=1) {
    __pyx_v_i = __pyx_t_15;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":177
 * 
 *     for i in range(n):
 *         sum_ranks += i + 1             # <<<<<<<<<<<<<<
 *         dups += 1
 *         val = sorted_data[i]
 */
    __pyx_v_sum_ranks = (__pyx_v_sum_ranks + (__pyx_v_i + 1));

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":178
 *     for i in range(n):
 *         sum_ranks += i + 1
 *         dups += 1             # <<<<<<<<<<<<<<
 *         val = sorted_data[i]
 *         if i == n - 1 or fabs(sorted_data[i + 1] - val) > 0:
 */
    __pyx_v_dups = (__pyx_v_dups + 1);

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":179
 *         sum_ranks += i + 1
 *         dups += 1
 *         val = sorted_data[i]             # <<<<<<<<<<<<<<
 *         if i == n - 1 or fabs(sorted_data[i + 1] - val) > 0:
 *             if tiebreak == TIEBREAK_AVERAGE:
 */
    __pyx_t_16 = __pyx_v_i;
    __pyx_t_3 = -1;
    if (__pyx_t_16 < 0) {
      __pyx_t_16 += __pyx_pybuffernd_sorted_data.diminfo[0].shape;
      if (unlikely(__pyx_t_16 < 0)) __pyx_t_3 = 0;
    } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_sorted_data.diminfo[0].shape)) __pyx_t_3 = 0;
    if (unlikely(__pyx_t_3 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_3);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_sorted_data.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":180
 *         dups += 1
 *         val = sorted_data[i]
 *         if i == n - 1 or fabs(sorted_data[i + 1] - val) > 0:             # <<<<<<<<<<<<<<
 *             if tiebreak == TIEBREAK_AVERAGE:
 *                 for j in range(i - dups + 1, i + 1):
 */
    __pyx_t_12 = (__pyx_v_i == (__pyx_v_n - 1));
    if (!__pyx_t_12) {
      __pyx_t_17 = (__pyx_v_i + 1);
      __pyx_t_3 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_sorted_data.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_sorted_data.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_13 = (fabs(((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_sorted_data.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_sorted_data.diminfo[0].strides)) - __pyx_v_val)) > 0.0);
      __pyx_t_18 = __pyx_t_13;
    } else {
      __pyx_t_18 = __pyx_t_12;
    }
    if (__pyx_t_18) {

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":181
 *         val = sorted_data[i]
 *         if i == n - 1 or fabs(sorted_data[i + 1] - val) > 0:
 *             if tiebreak == TIEBREAK_AVERAGE:             # <<<<<<<<<<<<<<
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = sum_ranks / dups
 */
      __pyx_t_18 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_AVERAGE);
      if (__pyx_t_18) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":182
 *         if i == n - 1 or fabs(sorted_data[i + 1] - val) > 0:
 *             if tiebreak == TIEBREAK_AVERAGE:
 *                 for j in range(i - dups + 1, i + 1):             # <<<<<<<<<<<<<<
 *                     ranks[argsorted[j]] = sum_ranks / dups
 *             elif tiebreak == TIEBREAK_MIN:
 */
        __pyx_t_19 = (__pyx_v_i + 1);
        for (__pyx_t_20 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) {
          __pyx_v_j = __pyx_t_20;

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":183
 *             if tiebreak == TIEBREAK_AVERAGE:
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = sum_ranks / dups             # <<<<<<<<<<<<<<
 *             elif tiebreak == TIEBREAK_MIN:
 *                 for j in range(i - dups + 1, i + 1):
 */
          if (unlikely(__pyx_v_dups == 0)) {
            PyErr_Format(PyExc_ZeroDivisionError, "float division");
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_21 = __pyx_v_j;
          __pyx_t_3 = -1;
          if (__pyx_t_21 < 0) {
            __pyx_t_21 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
            if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_22 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_argsorted.diminfo[0].strides));
          __pyx_t_3 = -1;
          if (__pyx_t_22 < 0) {
            __pyx_t_22 += __pyx_pybuffernd_ranks.diminfo[0].shape;
            if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_sum_ranks / __pyx_v_dups);
        }
        goto __pyx_L9;
      }

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":184
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = sum_ranks / dups
 *             elif tiebreak == TIEBREAK_MIN:             # <<<<<<<<<<<<<<
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i - dups + 2
 */
      __pyx_t_18 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_MIN);
      if (__pyx_t_18) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":185
 *                     ranks[argsorted[j]] = sum_ranks / dups
 *             elif tiebreak == TIEBREAK_MIN:
 *                 for j in range(i - dups + 1, i + 1):             # <<<<<<<<<<<<<<
 *                     ranks[argsorted[j]] = i - dups + 2
 *             elif tiebreak == TIEBREAK_MAX:
 */
        __pyx_t_19 = (__pyx_v_i + 1);
        for (__pyx_t_20 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) {
          __pyx_v_j = __pyx_t_20;

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":186
 *             elif tiebreak == TIEBREAK_MIN:
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i - dups + 2             # <<<<<<<<<<<<<<
 *             elif tiebreak == TIEBREAK_MAX:
 *                 for j in range(i - dups + 1, i + 1):
 */
          __pyx_t_23 = __pyx_v_j;
          __pyx_t_3 = -1;
          if (__pyx_t_23 < 0) {
            __pyx_t_23 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
            if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_24 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_argsorted.diminfo[0].strides));
          __pyx_t_3 = -1;
          if (__pyx_t_24 < 0) {
            __pyx_t_24 += __pyx_pybuffernd_ranks.diminfo[0].shape;
            if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_ranks.diminfo[0].strides) = ((__pyx_v_i - __pyx_v_dups) + 2);
        }
        goto __pyx_L9;
      }

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":187
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i - dups + 2
 *             elif tiebreak == TIEBREAK_MAX:             # <<<<<<<<<<<<<<
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i + 1
 */
      __pyx_t_18 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_MAX);
      if (__pyx_t_18) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":188
 *                     ranks[argsorted[j]] = i - dups + 2
 *             elif tiebreak == TIEBREAK_MAX:
 *                 for j in range(i - dups + 1, i + 1):             # <<<<<<<<<<<<<<
 *                     ranks[argsorted[j]] = i + 1
 *             elif tiebreak == TIEBREAK_FIRST:
 */
        __pyx_t_19 = (__pyx_v_i + 1);
        for (__pyx_t_20 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) {
          __pyx_v_j = __pyx_t_20;

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":189
 *             elif tiebreak == TIEBREAK_MAX:
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i + 1             # <<<<<<<<<<<<<<
 *             elif tiebreak == TIEBREAK_FIRST:
 *                 for j in range(i - dups + 1, i + 1):
 */
          __pyx_t_25 = __pyx_v_j;
          __pyx_t_3 = -1;
          if (__pyx_t_25 < 0) {
            __pyx_t_25 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
            if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_26 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_argsorted.diminfo[0].strides));
          __pyx_t_3 = -1;
          if (__pyx_t_26 < 0) {
            __pyx_t_26 += __pyx_pybuffernd_ranks.diminfo[0].shape;
            if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_i + 1);
        }
        goto __pyx_L9;
      }

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":190
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i + 1
 *             elif tiebreak == TIEBREAK_FIRST:             # <<<<<<<<<<<<<<
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = j + 1
 */
      __pyx_t_18 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST);
      if (__pyx_t_18) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":191
 *                     ranks[argsorted[j]] = i + 1
 *             elif tiebreak == TIEBREAK_FIRST:
 *                 for j in range(i - dups + 1, i + 1):             # <<<<<<<<<<<<<<
 *                     ranks[argsorted[j]] = j + 1
 *             elif tiebreak == TIEBREAK_FIRST_DESCENDING:
 */
        __pyx_t_19 = (__pyx_v_i + 1);
        for (__pyx_t_20 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) {
          __pyx_v_j = __pyx_t_20;

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":192
 *             elif tiebreak == TIEBREAK_FIRST:
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = j + 1             # <<<<<<<<<<<<<<
 *             elif tiebreak == TIEBREAK_FIRST_DESCENDING:
 *                 for j in range(i - dups + 1, i + 1):
 */
          __pyx_t_27 = __pyx_v_j;
          __pyx_t_3 = -1;
          if (__pyx_t_27 < 0) {
            __pyx_t_27 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
            if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_28 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_argsorted.diminfo[0].strides));
          __pyx_t_3 = -1;
          if (__pyx_t_28 < 0) {
            __pyx_t_28 += __pyx_pybuffernd_ranks.diminfo[0].shape;
            if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_j + 1);
        }
        goto __pyx_L9;
      }

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":193
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = j + 1
 *             elif tiebreak == TIEBREAK_FIRST_DESCENDING:             # <<<<<<<<<<<<<<
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = 2 * i - j - dups + 2
 */
      __pyx_t_18 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST_DESCENDING);
      if (__pyx_t_18) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":194
 *                     ranks[argsorted[j]] = j + 1
 *             elif tiebreak == TIEBREAK_FIRST_DESCENDING:
 *                 for j in range(i - dups + 1, i + 1):             # <<<<<<<<<<<<<<
 *                     ranks[argsorted[j]] = 2 * i - j - dups + 2
 *             sum_ranks = dups = 0
 */
        __pyx_t_19 = (__pyx_v_i + 1);
        for (__pyx_t_20 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) {
          __pyx_v_j = __pyx_t_20;

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":195
 *             elif tiebreak == TIEBREAK_FIRST_DESCENDING:
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = 2 * i - j - dups + 2             # <<<<<<<<<<<<<<
 *             sum_ranks = dups = 0
 *     return ranks
 */
          __pyx_t_29 = __pyx_v_j;
          __pyx_t_3 = -1;
          if (__pyx_t_29 < 0) {
            __pyx_t_29 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
            if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_30 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_argsorted.diminfo[0].strides));
          __pyx_t_3 = -1;
          if (__pyx_t_30 < 0) {
            __pyx_t_30 += __pyx_pybuffernd_ranks.diminfo[0].shape;
            if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_ranks.diminfo[0].strides) = ((((2 * __pyx_v_i) - __pyx_v_j) - __pyx_v_dups) + 2);
        }
        goto __pyx_L9;
      }
      __pyx_L9:;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":196
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = 2 * i - j - dups + 2
 *             sum_ranks = dups = 0             # <<<<<<<<<<<<<<
 *     return ranks
 * 
 */
      __pyx_v_sum_ranks = 0;
      __pyx_v_dups = 0;
      goto __pyx_L8;
    }
    __pyx_L8:;
  }

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":197
 *                     ranks[argsorted[j]] = 2 * i - j - dups + 2
 *             sum_ranks = dups = 0
 *     return ranks             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_ranks));
  __pyx_r = ((PyObject *)__pyx_v_ranks);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.rank_1d_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_sorted_data.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_sorted_data);
  __Pyx_XDECREF((PyObject *)__pyx_v_values);
  __Pyx_XDECREF((PyObject *)__pyx_v_ranks);
  __Pyx_XDECREF((PyObject *)__pyx_v_argsorted);
  __Pyx_XDECREF(__pyx_v__as);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_287rank_2d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_286rank_2d_float64[] = "\n    Fast NaN-friendly version of scipy.stats.rankdata\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_287rank_2d_float64 = {__Pyx_NAMESTR("rank_2d_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_287rank_2d_float64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_286rank_2d_float64)};
static PyObject *__pyx_pw_6pandas_8_tseries_287rank_2d_float64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_in_arr = 0;
  PyObject *__pyx_v_axis = 0;
  PyObject *__pyx_v_ties_method = 0;
  PyObject *__pyx_v_ascending = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__in_arr,&__pyx_n_s__axis,&__pyx_n_s__ties_method,&__pyx_n_s__ascending,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rank_2d_float64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)__pyx_int_0);
    values[2] = ((PyObject *)__pyx_n_s__average);
    values[3] = __pyx_k_75;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_arr);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ties_method);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ascending);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_2d_float64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_in_arr = values[0];
      __pyx_v_axis = values[1];
      __pyx_v_ties_method = values[2];
      __pyx_v_ascending = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_in_arr = values[0];
    __pyx_v_axis = values[1];
    __pyx_v_ties_method = values[2];
    __pyx_v_ascending = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rank_2d_float64", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.rank_2d_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_286rank_2d_float64(__pyx_self, __pyx_v_in_arr, __pyx_v_axis, __pyx_v_ties_method, __pyx_v_ascending);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/stats.pyx":200
 * 
 * 
 * def rank_2d_float64(object in_arr, axis=0, ties_method='average',             # <<<<<<<<<<<<<<
 *                     ascending=True):
 *     """
 */

static PyObject *__pyx_pf_6pandas_8_tseries_286rank_2d_float64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_z;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_dups;
  PyArrayObject *__pyx_v_ranks = 0;
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_argsorted = 0;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  __pyx_t_5numpy_float64_t __pyx_v_nan_value;
  __pyx_t_5numpy_float64_t __pyx_v_sum_ranks;
  int __pyx_v_tiebreak;
  PyObject *__pyx_v__as = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks;
  __Pyx_Buffer __pyx_pybuffer_ranks;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted;
  __Pyx_Buffer __pyx_pybuffer_argsorted;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyArrayObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __pyx_t_5numpy_float64_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  PyArrayObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  __pyx_t_5numpy_int64_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  int __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  __pyx_t_5numpy_int64_t __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  Py_ssize_t __pyx_t_36;
  __pyx_t_5numpy_int64_t __pyx_t_37;
  Py_ssize_t __pyx_t_38;
  Py_ssize_t __pyx_t_39;
  Py_ssize_t __pyx_t_40;
  __pyx_t_5numpy_int64_t __pyx_t_41;
  Py_ssize_t __pyx_t_42;
  Py_ssize_t __pyx_t_43;
  Py_ssize_t __pyx_t_44;
  __pyx_t_5numpy_int64_t __pyx_t_45;
  Py_ssize_t __pyx_t_46;
  Py_ssize_t __pyx_t_47;
  Py_ssize_t __pyx_t_48;
  __pyx_t_5numpy_int64_t __pyx_t_49;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rank_2d_float64");
  __Pyx_INCREF(__pyx_v_in_arr);
  __pyx_pybuffer_ranks.pybuffer.buf = NULL;
  __pyx_pybuffer_ranks.refcount = 0;
  __pyx_pybuffernd_ranks.data = NULL;
  __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_argsorted.pybuffer.buf = NULL;
  __pyx_pybuffer_argsorted.refcount = 0;
  __pyx_pybuffernd_argsorted.data = NULL;
  __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":207
 * 
 *     cdef:
 *         Py_ssize_t i, j, z, k, n, dups = 0             # <<<<<<<<<<<<<<
 *         ndarray[float64_t, ndim=2] ranks, values
 *         ndarray[int64_t, ndim=2] argsorted
 */
  __pyx_v_dups = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":211
 *         ndarray[int64_t, ndim=2] argsorted
 *         float64_t val, nan_value
 *         float64_t sum_ranks = 0             # <<<<<<<<<<<<<<
 *         int tiebreak = 0
 *     tiebreak = tiebreakers[ties_method]
 */
  __pyx_v_sum_ranks = 0.0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":212
 *         float64_t val, nan_value
 *         float64_t sum_ranks = 0
 *         int tiebreak = 0             # <<<<<<<<<<<<<<
 *     tiebreak = tiebreakers[ties_method]
 * 
 */
  __pyx_v_tiebreak = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":213
 *         float64_t sum_ranks = 0
 *         int tiebreak = 0
 *     tiebreak = tiebreakers[ties_method]             # <<<<<<<<<<<<<<
 * 
 *     in_arr = np.asarray(in_arr)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_tiebreak = __pyx_t_3;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":215
 *     tiebreak = tiebreakers[ties_method]
 * 
 *     in_arr = np.asarray(in_arr)             # <<<<<<<<<<<<<<
 * 
 *     if axis == 0:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_in_arr);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr);
  __Pyx_GIVEREF(__pyx_v_in_arr);
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_v_in_arr);
  __pyx_v_in_arr = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":217
 *     in_arr = np.asarray(in_arr)
 * 
 *     if axis == 0:             # <<<<<<<<<<<<<<
 *         values = in_arr.T.copy()
 *     else:
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":218
 * 
 *     if axis == 0:
 *         values = in_arr.T.copy()             # <<<<<<<<<<<<<<
 *     else:
 *         values = in_arr.copy()
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_in_arr, __pyx_n_s__T); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = ((PyArrayObject *)__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = 0;
    __pyx_v_values = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":220
 *         values = in_arr.T.copy()
 *     else:
 *         values = in_arr.copy()             # <<<<<<<<<<<<<<
 * 
 *     if ascending:
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_in_arr, __pyx_n_s__copy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
        }
      }
      __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = 0;
    __pyx_v_values = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":222
 *         values = in_arr.copy()
 * 
 *     if ascending:             # <<<<<<<<<<<<<<
 *         nan_value = np.inf
 *     else:
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":223
 * 
 *     if ascending:
 *         nan_value = np.inf             # <<<<<<<<<<<<<<
 *     else:
 *         nan_value = -np.inf
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__inf); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_nan_value = __pyx_t_10;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":225
 *         nan_value = np.inf
 *     else:
 *         nan_value = -np.inf             # <<<<<<<<<<<<<<
 * 
 *     np.putmask(values, np.isnan(values), nan_value)
 */
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_10 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_10 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_nan_value = __pyx_t_10;
  }
  __pyx_L4:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":227
 *         nan_value = -np.inf
 * 
 *     np.putmask(values, np.isnan(values), nan_value)             # <<<<<<<<<<<<<<
 * 
 *     n, k = (<object> values).shape
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__putmask); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__isnan); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_nan_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_11 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":229
 *     np.putmask(values, np.isnan(values), nan_value)
 * 
 *     n, k = (<object> values).shape             # <<<<<<<<<<<<<<
 *     ranks = np.empty((n, k), dtype='f8')
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext;
    index = 0; __pyx_t_1 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_2 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    goto __pyx_L6_unpacking_done;
    __pyx_L5_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L6_unpacking_done:;
  }
  __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_n = __pyx_t_13;
  __pyx_v_k = __pyx_t_14;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":230
 * 
 *     n, k = (<object> values).shape
 *     ranks = np.empty((n, k), dtype='f8')             # <<<<<<<<<<<<<<
 * 
 *     if tiebreak == TIEBREAK_FIRST:
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_4 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_11));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_11));
  __pyx_t_11 = 0;
  __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_11));
  if (PyDict_SetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ranks.diminfo[1].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ranks.diminfo[1].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_ranks = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":232
 *     ranks = np.empty((n, k), dtype='f8')
 * 
 *     if tiebreak == TIEBREAK_FIRST:             # <<<<<<<<<<<<<<
 *         # need to use a stable sort here
 *         _as = values.argsort(axis=1, kind='mergesort')
 */
  __pyx_t_5 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST);
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":234
 *     if tiebreak == TIEBREAK_FIRST:
 *         # need to use a stable sort here
 *         _as = values.argsort(axis=1, kind='mergesort')             # <<<<<<<<<<<<<<
 *         if not ascending:
 *             tiebreak = TIEBREAK_FIRST_DESCENDING
 */
    __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_11));
    if (PyDict_SetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__axis), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_11, ((PyObject *)__pyx_n_s__kind), ((PyObject *)__pyx_n_s__mergesort)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_11)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0;
    __pyx_v__as = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":235
 *         # need to use a stable sort here
 *         _as = values.argsort(axis=1, kind='mergesort')
 *         if not ascending:             # <<<<<<<<<<<<<<
 *             tiebreak = TIEBREAK_FIRST_DESCENDING
 *     else:
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_15 = (!__pyx_t_5);
    if (__pyx_t_15) {

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":236
 *         _as = values.argsort(axis=1, kind='mergesort')
 *         if not ascending:
 *             tiebreak = TIEBREAK_FIRST_DESCENDING             # <<<<<<<<<<<<<<
 *     else:
 *         _as = values.argsort(1)
 */
      __pyx_v_tiebreak = __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST_DESCENDING;
      goto __pyx_L8;
    }
    __pyx_L8:;
    goto __pyx_L7;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":238
 *             tiebreak = TIEBREAK_FIRST_DESCENDING
 *     else:
 *         _as = values.argsort(1)             # <<<<<<<<<<<<<<
 * 
 *     if not ascending:
 */
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_76), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v__as = __pyx_t_11;
    __pyx_t_11 = 0;
  }
  __pyx_L7:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":240
 *         _as = values.argsort(1)
 * 
 *     if not ascending:             # <<<<<<<<<<<<<<
 *         _as = _as[:, ::-1]
 * 
 */
  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = (!__pyx_t_15);
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":241
 * 
 *     if not ascending:
 *         _as = _as[:, ::-1]             # <<<<<<<<<<<<<<
 * 
 *     values = _take_2d_float64(values, _as)
 */
    __pyx_t_11 = PyObject_GetItem(__pyx_v__as, ((PyObject *)__pyx_k_tuple_79)); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_v__as);
    __pyx_v__as = __pyx_t_11;
    __pyx_t_11 = 0;
    goto __pyx_L9;
  }
  __pyx_L9:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":243
 *         _as = _as[:, ::-1]
 * 
 *     values = _take_2d_float64(values, _as)             # <<<<<<<<<<<<<<
 *     argsorted = _as.astype('i8')
 * 
 */
  __pyx_t_11 = __pyx_f_6pandas_8_tseries__take_2d_float64(((PyArrayObject *)__pyx_v_values), __pyx_v__as); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_11);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      }
    }
    __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_values));
  __pyx_v_values = ((PyArrayObject *)__pyx_t_11);
  __pyx_t_11 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":244
 * 
 *     values = _take_2d_float64(values, _as)
 *     argsorted = _as.astype('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_11 = PyObject_GetAttr(__pyx_v__as, __pyx_n_s__astype); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_k_tuple_80), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_argsorted.diminfo[1].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_argsorted.diminfo[1].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_16 = 0;
  __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":246
 *     argsorted = _as.astype('i8')
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         dups = sum_ranks = 0
 *         for j in range(k):
 */
  __pyx_t_14 = __pyx_v_n;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":247
 * 
 *     for i in range(n):
 *         dups = sum_ranks = 0             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             sum_ranks += j + 1
 */
    __pyx_v_dups = 0;
    __pyx_v_sum_ranks = 0;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":248
 *     for i in range(n):
 *         dups = sum_ranks = 0
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             sum_ranks += j + 1
 *             dups += 1
 */
    __pyx_t_17 = __pyx_v_k;
    for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
      __pyx_v_j = __pyx_t_18;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":249
 *         dups = sum_ranks = 0
 *         for j in range(k):
 *             sum_ranks += j + 1             # <<<<<<<<<<<<<<
 *             dups += 1
 *             val = values[i, j]
 */
      __pyx_v_sum_ranks = (__pyx_v_sum_ranks + (__pyx_v_j + 1));

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":250
 *         for j in range(k):
 *             sum_ranks += j + 1
 *             dups += 1             # <<<<<<<<<<<<<<
 *             val = values[i, j]
 *             if val == nan_value:
 */
      __pyx_v_dups = (__pyx_v_dups + 1);

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":251
 *             sum_ranks += j + 1
 *             dups += 1
 *             val = values[i, j]             # <<<<<<<<<<<<<<
 *             if val == nan_value:
 *                 ranks[i, argsorted[i, j]] = nan
 */
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_20 = __pyx_v_j;
      __pyx_t_3 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_pybuffernd_values.diminfo[1].shape;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 1;
      } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides));

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":252
 *             dups += 1
 *             val = values[i, j]
 *             if val == nan_value:             # <<<<<<<<<<<<<<
 *                 ranks[i, argsorted[i, j]] = nan
 *                 continue
 */
      __pyx_t_5 = (__pyx_v_val == __pyx_v_nan_value);
      if (__pyx_t_5) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":253
 *             val = values[i, j]
 *             if val == nan_value:
 *                 ranks[i, argsorted[i, j]] = nan             # <<<<<<<<<<<<<<
 *                 continue
 *             if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR:
 */
        __pyx_t_21 = __pyx_v_i;
        __pyx_t_22 = __pyx_v_j;
        __pyx_t_3 = -1;
        if (__pyx_t_21 < 0) {
          __pyx_t_21 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
          if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
        if (__pyx_t_22 < 0) {
          __pyx_t_22 += __pyx_pybuffernd_argsorted.diminfo[1].shape;
          if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 1;
        } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_23 = __pyx_v_i;
        __pyx_t_24 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_argsorted.diminfo[1].strides));
        __pyx_t_3 = -1;
        if (__pyx_t_23 < 0) {
          __pyx_t_23 += __pyx_pybuffernd_ranks.diminfo[0].shape;
          if (unlikely(__pyx_t_23 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
        if (__pyx_t_24 < 0) {
          __pyx_t_24 += __pyx_pybuffernd_ranks.diminfo[1].shape;
          if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 1;
        } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_24, __pyx_pybuffernd_ranks.diminfo[1].strides) = __pyx_v_6pandas_8_tseries_nan;

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":254
 *             if val == nan_value:
 *                 ranks[i, argsorted[i, j]] = nan
 *                 continue             # <<<<<<<<<<<<<<
 *             if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR:
 *                 if tiebreak == TIEBREAK_AVERAGE:
 */
        goto __pyx_L12_continue;
        goto __pyx_L14;
      }
      __pyx_L14:;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":255
 *                 ranks[i, argsorted[i, j]] = nan
 *                 continue
 *             if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR:             # <<<<<<<<<<<<<<
 *                 if tiebreak == TIEBREAK_AVERAGE:
 *                     for z in range(j - dups + 1, j + 1):
 */
      __pyx_t_5 = (__pyx_v_j == (__pyx_v_k - 1));
      if (!__pyx_t_5) {
        __pyx_t_25 = __pyx_v_i;
        __pyx_t_26 = (__pyx_v_j + 1);
        __pyx_t_3 = -1;
        if (__pyx_t_25 < 0) {
          __pyx_t_25 += __pyx_pybuffernd_values.diminfo[0].shape;
          if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0;
        if (__pyx_t_26 < 0) {
          __pyx_t_26 += __pyx_pybuffernd_values.diminfo[1].shape;
          if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 1;
        } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_15 = (fabs(((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_values.diminfo[1].strides)) - __pyx_v_val)) > __pyx_v_6pandas_8_tseries_FP_ERR);
        __pyx_t_27 = __pyx_t_15;
      } else {
        __pyx_t_27 = __pyx_t_5;
      }
      if (__pyx_t_27) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":256
 *                 continue
 *             if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR:
 *                 if tiebreak == TIEBREAK_AVERAGE:             # <<<<<<<<<<<<<<
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = sum_ranks / dups
 */
        __pyx_t_27 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_AVERAGE);
        if (__pyx_t_27) {

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":257
 *             if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR:
 *                 if tiebreak == TIEBREAK_AVERAGE:
 *                     for z in range(j - dups + 1, j + 1):             # <<<<<<<<<<<<<<
 *                         ranks[i, argsorted[i, z]] = sum_ranks / dups
 *                 elif tiebreak == TIEBREAK_MIN:
 */
          __pyx_t_28 = (__pyx_v_j + 1);
          for (__pyx_t_29 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) {
            __pyx_v_z = __pyx_t_29;

            /* "/home/wesm/code/pandas/pandas/src/stats.pyx":258
 *                 if tiebreak == TIEBREAK_AVERAGE:
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = sum_ranks / dups             # <<<<<<<<<<<<<<
 *                 elif tiebreak == TIEBREAK_MIN:
 *                     for z in range(j - dups + 1, j + 1):
 */
            if (unlikely(__pyx_v_dups == 0)) {
              PyErr_Format(PyExc_ZeroDivisionError, "float division");
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_30 = __pyx_v_i;
            __pyx_t_31 = __pyx_v_z;
            __pyx_t_3 = -1;
            if (__pyx_t_30 < 0) {
              __pyx_t_30 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
              if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_31 < 0) {
              __pyx_t_31 += __pyx_pybuffernd_argsorted.diminfo[1].shape;
              if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_32 = __pyx_v_i;
            __pyx_t_33 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_argsorted.diminfo[1].strides));
            __pyx_t_3 = -1;
            if (__pyx_t_32 < 0) {
              __pyx_t_32 += __pyx_pybuffernd_ranks.diminfo[0].shape;
              if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_33 < 0) {
              __pyx_t_33 += __pyx_pybuffernd_ranks.diminfo[1].shape;
              if (unlikely(__pyx_t_33 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_sum_ranks / __pyx_v_dups);
          }
          goto __pyx_L16;
        }

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":259
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = sum_ranks / dups
 *                 elif tiebreak == TIEBREAK_MIN:             # <<<<<<<<<<<<<<
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j - dups + 2
 */
        __pyx_t_27 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_MIN);
        if (__pyx_t_27) {

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":260
 *                         ranks[i, argsorted[i, z]] = sum_ranks / dups
 *                 elif tiebreak == TIEBREAK_MIN:
 *                     for z in range(j - dups + 1, j + 1):             # <<<<<<<<<<<<<<
 *                         ranks[i, argsorted[i, z]] = j - dups + 2
 *                 elif tiebreak == TIEBREAK_MAX:
 */
          __pyx_t_28 = (__pyx_v_j + 1);
          for (__pyx_t_29 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) {
            __pyx_v_z = __pyx_t_29;

            /* "/home/wesm/code/pandas/pandas/src/stats.pyx":261
 *                 elif tiebreak == TIEBREAK_MIN:
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j - dups + 2             # <<<<<<<<<<<<<<
 *                 elif tiebreak == TIEBREAK_MAX:
 *                     for z in range(j - dups + 1, j + 1):
 */
            __pyx_t_34 = __pyx_v_i;
            __pyx_t_35 = __pyx_v_z;
            __pyx_t_3 = -1;
            if (__pyx_t_34 < 0) {
              __pyx_t_34 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
              if (unlikely(__pyx_t_34 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_35 < 0) {
              __pyx_t_35 += __pyx_pybuffernd_argsorted.diminfo[1].shape;
              if (unlikely(__pyx_t_35 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_36 = __pyx_v_i;
            __pyx_t_37 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_argsorted.diminfo[1].strides));
            __pyx_t_3 = -1;
            if (__pyx_t_36 < 0) {
              __pyx_t_36 += __pyx_pybuffernd_ranks.diminfo[0].shape;
              if (unlikely(__pyx_t_36 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_37 < 0) {
              __pyx_t_37 += __pyx_pybuffernd_ranks.diminfo[1].shape;
              if (unlikely(__pyx_t_37 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_ranks.diminfo[1].strides) = ((__pyx_v_j - __pyx_v_dups) + 2);
          }
          goto __pyx_L16;
        }

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":262
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j - dups + 2
 *                 elif tiebreak == TIEBREAK_MAX:             # <<<<<<<<<<<<<<
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j + 1
 */
        __pyx_t_27 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_MAX);
        if (__pyx_t_27) {

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":263
 *                         ranks[i, argsorted[i, z]] = j - dups + 2
 *                 elif tiebreak == TIEBREAK_MAX:
 *                     for z in range(j - dups + 1, j + 1):             # <<<<<<<<<<<<<<
 *                         ranks[i, argsorted[i, z]] = j + 1
 *                 elif tiebreak == TIEBREAK_FIRST:
 */
          __pyx_t_28 = (__pyx_v_j + 1);
          for (__pyx_t_29 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) {
            __pyx_v_z = __pyx_t_29;

            /* "/home/wesm/code/pandas/pandas/src/stats.pyx":264
 *                 elif tiebreak == TIEBREAK_MAX:
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j + 1             # <<<<<<<<<<<<<<
 *                 elif tiebreak == TIEBREAK_FIRST:
 *                     for z in range(j - dups + 1, j + 1):
 */
            __pyx_t_38 = __pyx_v_i;
            __pyx_t_39 = __pyx_v_z;
            __pyx_t_3 = -1;
            if (__pyx_t_38 < 0) {
              __pyx_t_38 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
              if (unlikely(__pyx_t_38 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_39 < 0) {
              __pyx_t_39 += __pyx_pybuffernd_argsorted.diminfo[1].shape;
              if (unlikely(__pyx_t_39 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_40 = __pyx_v_i;
            __pyx_t_41 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_argsorted.diminfo[1].strides));
            __pyx_t_3 = -1;
            if (__pyx_t_40 < 0) {
              __pyx_t_40 += __pyx_pybuffernd_ranks.diminfo[0].shape;
              if (unlikely(__pyx_t_40 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_41 < 0) {
              __pyx_t_41 += __pyx_pybuffernd_ranks.diminfo[1].shape;
              if (unlikely(__pyx_t_41 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_j + 1);
          }
          goto __pyx_L16;
        }

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":265
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j + 1
 *                 elif tiebreak == TIEBREAK_FIRST:             # <<<<<<<<<<<<<<
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = z + 1
 */
        __pyx_t_27 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST);
        if (__pyx_t_27) {

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":266
 *                         ranks[i, argsorted[i, z]] = j + 1
 *                 elif tiebreak == TIEBREAK_FIRST:
 *                     for z in range(j - dups + 1, j + 1):             # <<<<<<<<<<<<<<
 *                         ranks[i, argsorted[i, z]] = z + 1
 *                 elif tiebreak == TIEBREAK_FIRST_DESCENDING:
 */
          __pyx_t_28 = (__pyx_v_j + 1);
          for (__pyx_t_29 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) {
            __pyx_v_z = __pyx_t_29;

            /* "/home/wesm/code/pandas/pandas/src/stats.pyx":267
 *                 elif tiebreak == TIEBREAK_FIRST:
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = z + 1             # <<<<<<<<<<<<<<
 *                 elif tiebreak == TIEBREAK_FIRST_DESCENDING:
 *                     for z in range(j - dups + 1, j + 1):
 */
            __pyx_t_42 = __pyx_v_i;
            __pyx_t_43 = __pyx_v_z;
            __pyx_t_3 = -1;
            if (__pyx_t_42 < 0) {
              __pyx_t_42 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
              if (unlikely(__pyx_t_42 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_42 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_43 < 0) {
              __pyx_t_43 += __pyx_pybuffernd_argsorted.diminfo[1].shape;
              if (unlikely(__pyx_t_43 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_43 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_44 = __pyx_v_i;
            __pyx_t_45 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_argsorted.diminfo[1].strides));
            __pyx_t_3 = -1;
            if (__pyx_t_44 < 0) {
              __pyx_t_44 += __pyx_pybuffernd_ranks.diminfo[0].shape;
              if (unlikely(__pyx_t_44 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_45 < 0) {
              __pyx_t_45 += __pyx_pybuffernd_ranks.diminfo[1].shape;
              if (unlikely(__pyx_t_45 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_z + 1);
          }
          goto __pyx_L16;
        }

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":268
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = z + 1
 *                 elif tiebreak == TIEBREAK_FIRST_DESCENDING:             # <<<<<<<<<<<<<<
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2
 */
        __pyx_t_27 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST_DESCENDING);
        if (__pyx_t_27) {

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":269
 *                         ranks[i, argsorted[i, z]] = z + 1
 *                 elif tiebreak == TIEBREAK_FIRST_DESCENDING:
 *                     for z in range(j - dups + 1, j + 1):             # <<<<<<<<<<<<<<
 *                         ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2
 *                 sum_ranks = dups = 0
 */
          __pyx_t_28 = (__pyx_v_j + 1);
          for (__pyx_t_29 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_29 < __pyx_t_28; __pyx_t_29+=1) {
            __pyx_v_z = __pyx_t_29;

            /* "/home/wesm/code/pandas/pandas/src/stats.pyx":270
 *                 elif tiebreak == TIEBREAK_FIRST_DESCENDING:
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2             # <<<<<<<<<<<<<<
 *                 sum_ranks = dups = 0
 * 
 */
            __pyx_t_46 = __pyx_v_i;
            __pyx_t_47 = __pyx_v_z;
            __pyx_t_3 = -1;
            if (__pyx_t_46 < 0) {
              __pyx_t_46 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
              if (unlikely(__pyx_t_46 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_46 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_47 < 0) {
              __pyx_t_47 += __pyx_pybuffernd_argsorted.diminfo[1].shape;
              if (unlikely(__pyx_t_47 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_47 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_48 = __pyx_v_i;
            __pyx_t_49 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_47, __pyx_pybuffernd_argsorted.diminfo[1].strides));
            __pyx_t_3 = -1;
            if (__pyx_t_48 < 0) {
              __pyx_t_48 += __pyx_pybuffernd_ranks.diminfo[0].shape;
              if (unlikely(__pyx_t_48 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_48 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_49 < 0) {
              __pyx_t_49 += __pyx_pybuffernd_ranks.diminfo[1].shape;
              if (unlikely(__pyx_t_49 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_49 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_48, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_49, __pyx_pybuffernd_ranks.diminfo[1].strides) = ((((2 * __pyx_v_j) - __pyx_v_z) - __pyx_v_dups) + 2);
          }
          goto __pyx_L16;
        }
        __pyx_L16:;

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":271
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2
 *                 sum_ranks = dups = 0             # <<<<<<<<<<<<<<
 * 
 *     if axis == 0:
 */
        __pyx_v_sum_ranks = 0;
        __pyx_v_dups = 0;
        goto __pyx_L15;
      }
      __pyx_L15:;
      __pyx_L12_continue:;
    }
  }

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":273
 *                 sum_ranks = dups = 0
 * 
 *     if axis == 0:             # <<<<<<<<<<<<<<
 *         return ranks.T
 *     else:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_27) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":274
 * 
 *     if axis == 0:
 *         return ranks.T             # <<<<<<<<<<<<<<
 *     else:
 *         return ranks
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_ranks), __pyx_n_s__T); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L27;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":276
 *         return ranks.T
 *     else:
 *         return ranks             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_ranks));
    __pyx_r = ((PyObject *)__pyx_v_ranks);
    goto __pyx_L0;
  }
  __pyx_L27:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_11);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.rank_2d_float64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ranks);
  __Pyx_XDECREF((PyObject *)__pyx_v_values);
  __Pyx_XDECREF((PyObject *)__pyx_v_argsorted);
  __Pyx_XDECREF(__pyx_v__as);
  __Pyx_XDECREF(__pyx_v_in_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_289rank_2d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_288rank_2d_int64[] = "\n    Fast NaN-friendly version of scipy.stats.rankdata\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_289rank_2d_int64 = {__Pyx_NAMESTR("rank_2d_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_289rank_2d_int64, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_288rank_2d_int64)};
static PyObject *__pyx_pw_6pandas_8_tseries_289rank_2d_int64(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_in_arr = 0;
  PyObject *__pyx_v_axis = 0;
  PyObject *__pyx_v_ties_method = 0;
  PyObject *__pyx_v_ascending = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__in_arr,&__pyx_n_s__axis,&__pyx_n_s__ties_method,&__pyx_n_s__ascending,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rank_2d_int64 (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)__pyx_int_0);
    values[2] = ((PyObject *)__pyx_n_s__average);
    values[3] = __pyx_k_81;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_arr);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ties_method);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ascending);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_2d_int64") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_in_arr = values[0];
      __pyx_v_axis = values[1];
      __pyx_v_ties_method = values[2];
      __pyx_v_ascending = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_in_arr = values[0];
    __pyx_v_axis = values[1];
    __pyx_v_ties_method = values[2];
    __pyx_v_ascending = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rank_2d_int64", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.rank_2d_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_288rank_2d_int64(__pyx_self, __pyx_v_in_arr, __pyx_v_axis, __pyx_v_ties_method, __pyx_v_ascending);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/stats.pyx":279
 * 
 * 
 * def rank_2d_int64(object in_arr, axis=0, ties_method='average',             # <<<<<<<<<<<<<<
 *                     ascending=True):
 *     """
 */

static PyObject *__pyx_pf_6pandas_8_tseries_288rank_2d_int64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_z;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_dups;
  PyArrayObject *__pyx_v_ranks = 0;
  PyArrayObject *__pyx_v_argsorted = 0;
  PyArrayObject *__pyx_v_values = 0;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  __pyx_t_5numpy_float64_t __pyx_v_sum_ranks;
  int __pyx_v_tiebreak;
  PyObject *__pyx_v__as = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks;
  __Pyx_Buffer __pyx_pybuffer_ranks;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted;
  __Pyx_Buffer __pyx_pybuffer_argsorted;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  PyArrayObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyArrayObject *__pyx_t_16 = NULL;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  int __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  __pyx_t_5numpy_int64_t __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  __pyx_t_5numpy_int64_t __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  Py_ssize_t __pyx_t_36;
  __pyx_t_5numpy_int64_t __pyx_t_37;
  Py_ssize_t __pyx_t_38;
  Py_ssize_t __pyx_t_39;
  Py_ssize_t __pyx_t_40;
  __pyx_t_5numpy_int64_t __pyx_t_41;
  Py_ssize_t __pyx_t_42;
  Py_ssize_t __pyx_t_43;
  Py_ssize_t __pyx_t_44;
  __pyx_t_5numpy_int64_t __pyx_t_45;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rank_2d_int64");
  __pyx_pybuffer_ranks.pybuffer.buf = NULL;
  __pyx_pybuffer_ranks.refcount = 0;
  __pyx_pybuffernd_ranks.data = NULL;
  __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks;
  __pyx_pybuffer_argsorted.pybuffer.buf = NULL;
  __pyx_pybuffer_argsorted.refcount = 0;
  __pyx_pybuffernd_argsorted.data = NULL;
  __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":286
 * 
 *     cdef:
 *         Py_ssize_t i, j, z, k, n, dups = 0             # <<<<<<<<<<<<<<
 *         ndarray[float64_t, ndim=2] ranks
 *         ndarray[int64_t, ndim=2] argsorted
 */
  __pyx_v_dups = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":291
 *         ndarray[int64_t, ndim=2, cast=True] values
 *         int64_t val
 *         float64_t sum_ranks = 0             # <<<<<<<<<<<<<<
 *         int tiebreak = 0
 *     tiebreak = tiebreakers[ties_method]
 */
  __pyx_v_sum_ranks = 0.0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":292
 *         int64_t val
 *         float64_t sum_ranks = 0
 *         int tiebreak = 0             # <<<<<<<<<<<<<<
 *     tiebreak = tiebreakers[ties_method]
 * 
 */
  __pyx_v_tiebreak = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":293
 *         float64_t sum_ranks = 0
 *         int tiebreak = 0
 *     tiebreak = tiebreakers[ties_method]             # <<<<<<<<<<<<<<
 * 
 *     if axis == 0:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_tiebreak = __pyx_t_3;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":295
 *     tiebreak = tiebreakers[ties_method]
 * 
 *     if axis == 0:             # <<<<<<<<<<<<<<
 *         values = np.asarray(in_arr).T
 *     else:
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":296
 * 
 *     if axis == 0:
 *         values = np.asarray(in_arr).T             # <<<<<<<<<<<<<<
 *     else:
 *         values = np.asarray(in_arr)
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_in_arr);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr);
    __Pyx_GIVEREF(__pyx_v_in_arr);
    __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__T); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = 0;
    __pyx_v_values = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":298
 *         values = np.asarray(in_arr).T
 *     else:
 *         values = np.asarray(in_arr)             # <<<<<<<<<<<<<<
 * 
 *     n, k = (<object> values).shape
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__asarray); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_in_arr);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr);
    __Pyx_GIVEREF(__pyx_v_in_arr);
    __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
        }
      }
      __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = 0;
    __pyx_v_values = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":300
 *         values = np.asarray(in_arr)
 * 
 *     n, k = (<object> values).shape             # <<<<<<<<<<<<<<
 *     ranks = np.empty((n, k), dtype='f8')
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_5 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L5_unpacking_done:;
  }
  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_n = __pyx_t_12;
  __pyx_v_k = __pyx_t_13;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":301
 * 
 *     n, k = (<object> values).shape
 *     ranks = np.empty((n, k), dtype='f8')             # <<<<<<<<<<<<<<
 * 
 *     if tiebreak == TIEBREAK_FIRST:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_10));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
  __pyx_t_10 = 0;
  __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_10));
  if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_14 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ranks.diminfo[1].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ranks.diminfo[1].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_14 = 0;
  __pyx_v_ranks = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":303
 *     ranks = np.empty((n, k), dtype='f8')
 * 
 *     if tiebreak == TIEBREAK_FIRST:             # <<<<<<<<<<<<<<
 *         # need to use a stable sort here
 *         _as = values.argsort(axis=1, kind='mergesort')
 */
  __pyx_t_4 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST);
  if (__pyx_t_4) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":305
 *     if tiebreak == TIEBREAK_FIRST:
 *         # need to use a stable sort here
 *         _as = values.argsort(axis=1, kind='mergesort')             # <<<<<<<<<<<<<<
 *         if not ascending:
 *             tiebreak = TIEBREAK_FIRST_DESCENDING
 */
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_10));
    if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__axis), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__kind), ((PyObject *)__pyx_n_s__mergesort)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
    __pyx_v__as = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":306
 *         # need to use a stable sort here
 *         _as = values.argsort(axis=1, kind='mergesort')
 *         if not ascending:             # <<<<<<<<<<<<<<
 *             tiebreak = TIEBREAK_FIRST_DESCENDING
 *     else:
 */
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_15 = (!__pyx_t_4);
    if (__pyx_t_15) {

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":307
 *         _as = values.argsort(axis=1, kind='mergesort')
 *         if not ascending:
 *             tiebreak = TIEBREAK_FIRST_DESCENDING             # <<<<<<<<<<<<<<
 *     else:
 *         _as = values.argsort(1)
 */
      __pyx_v_tiebreak = __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST_DESCENDING;
      goto __pyx_L7;
    }
    __pyx_L7:;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":309
 *             tiebreak = TIEBREAK_FIRST_DESCENDING
 *     else:
 *         _as = values.argsort(1)             # <<<<<<<<<<<<<<
 * 
 *     if not ascending:
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_82), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v__as = __pyx_t_10;
    __pyx_t_10 = 0;
  }
  __pyx_L6:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":311
 *         _as = values.argsort(1)
 * 
 *     if not ascending:             # <<<<<<<<<<<<<<
 *         _as = _as[:, ::-1]
 * 
 */
  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = (!__pyx_t_15);
  if (__pyx_t_4) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":312
 * 
 *     if not ascending:
 *         _as = _as[:, ::-1]             # <<<<<<<<<<<<<<
 * 
 *     values = _take_2d_int64(values, _as)
 */
    __pyx_t_10 = PyObject_GetItem(__pyx_v__as, ((PyObject *)__pyx_k_tuple_85)); if (!__pyx_t_10) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_v__as);
    __pyx_v__as = __pyx_t_10;
    __pyx_t_10 = 0;
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":314
 *         _as = _as[:, ::-1]
 * 
 *     values = _take_2d_int64(values, _as)             # <<<<<<<<<<<<<<
 *     argsorted = _as.astype('i8')
 * 
 */
  __pyx_t_10 = __pyx_f_6pandas_8_tseries__take_2d_int64(((PyArrayObject *)__pyx_v_values), __pyx_v__as); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_10);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 1, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      }
    }
    __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_values));
  __pyx_v_values = ((PyArrayObject *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":315
 * 
 *     values = _take_2d_int64(values, _as)
 *     argsorted = _as.astype('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_10 = PyObject_GetAttr(__pyx_v__as, __pyx_n_s__astype); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_2 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_86), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_16 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_16, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_argsorted.diminfo[1].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_argsorted.diminfo[1].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_16 = 0;
  __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":317
 *     argsorted = _as.astype('i8')
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         dups = sum_ranks = 0
 *         for j in range(k):
 */
  __pyx_t_13 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":318
 * 
 *     for i in range(n):
 *         dups = sum_ranks = 0             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             sum_ranks += j + 1
 */
    __pyx_v_dups = 0;
    __pyx_v_sum_ranks = 0;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":319
 *     for i in range(n):
 *         dups = sum_ranks = 0
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             sum_ranks += j + 1
 *             dups += 1
 */
    __pyx_t_17 = __pyx_v_k;
    for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_17; __pyx_t_18+=1) {
      __pyx_v_j = __pyx_t_18;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":320
 *         dups = sum_ranks = 0
 *         for j in range(k):
 *             sum_ranks += j + 1             # <<<<<<<<<<<<<<
 *             dups += 1
 *             val = values[i, j]
 */
      __pyx_v_sum_ranks = (__pyx_v_sum_ranks + (__pyx_v_j + 1));

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":321
 *         for j in range(k):
 *             sum_ranks += j + 1
 *             dups += 1             # <<<<<<<<<<<<<<
 *             val = values[i, j]
 *             if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR:
 */
      __pyx_v_dups = (__pyx_v_dups + 1);

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":322
 *             sum_ranks += j + 1
 *             dups += 1
 *             val = values[i, j]             # <<<<<<<<<<<<<<
 *             if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR:
 *                 if tiebreak == TIEBREAK_AVERAGE:
 */
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_20 = __pyx_v_j;
      __pyx_t_3 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_pybuffernd_values.diminfo[1].shape;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 1;
      } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_val = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_values.diminfo[1].strides));

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":323
 *             dups += 1
 *             val = values[i, j]
 *             if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR:             # <<<<<<<<<<<<<<
 *                 if tiebreak == TIEBREAK_AVERAGE:
 *                     for z in range(j - dups + 1, j + 1):
 */
      __pyx_t_4 = (__pyx_v_j == (__pyx_v_k - 1));
      if (!__pyx_t_4) {
        __pyx_t_21 = __pyx_v_i;
        __pyx_t_22 = (__pyx_v_j + 1);
        __pyx_t_3 = -1;
        if (__pyx_t_21 < 0) {
          __pyx_t_21 += __pyx_pybuffernd_values.diminfo[0].shape;
          if (unlikely(__pyx_t_21 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0;
        if (__pyx_t_22 < 0) {
          __pyx_t_22 += __pyx_pybuffernd_values.diminfo[1].shape;
          if (unlikely(__pyx_t_22 < 0)) __pyx_t_3 = 1;
        } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_15 = (fabs(((*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_values.diminfo[1].strides)) - __pyx_v_val)) > __pyx_v_6pandas_8_tseries_FP_ERR);
        __pyx_t_23 = __pyx_t_15;
      } else {
        __pyx_t_23 = __pyx_t_4;
      }
      if (__pyx_t_23) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":324
 *             val = values[i, j]
 *             if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR:
 *                 if tiebreak == TIEBREAK_AVERAGE:             # <<<<<<<<<<<<<<
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = sum_ranks / dups
 */
        __pyx_t_23 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_AVERAGE);
        if (__pyx_t_23) {

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":325
 *             if j == k - 1 or fabs(values[i, j + 1] - val) > FP_ERR:
 *                 if tiebreak == TIEBREAK_AVERAGE:
 *                     for z in range(j - dups + 1, j + 1):             # <<<<<<<<<<<<<<
 *                         ranks[i, argsorted[i, z]] = sum_ranks / dups
 *                 elif tiebreak == TIEBREAK_MIN:
 */
          __pyx_t_24 = (__pyx_v_j + 1);
          for (__pyx_t_25 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) {
            __pyx_v_z = __pyx_t_25;

            /* "/home/wesm/code/pandas/pandas/src/stats.pyx":326
 *                 if tiebreak == TIEBREAK_AVERAGE:
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = sum_ranks / dups             # <<<<<<<<<<<<<<
 *                 elif tiebreak == TIEBREAK_MIN:
 *                     for z in range(j - dups + 1, j + 1):
 */
            if (unlikely(__pyx_v_dups == 0)) {
              PyErr_Format(PyExc_ZeroDivisionError, "float division");
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_26 = __pyx_v_i;
            __pyx_t_27 = __pyx_v_z;
            __pyx_t_3 = -1;
            if (__pyx_t_26 < 0) {
              __pyx_t_26 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
              if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_27 < 0) {
              __pyx_t_27 += __pyx_pybuffernd_argsorted.diminfo[1].shape;
              if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_28 = __pyx_v_i;
            __pyx_t_29 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_argsorted.diminfo[1].strides));
            __pyx_t_3 = -1;
            if (__pyx_t_28 < 0) {
              __pyx_t_28 += __pyx_pybuffernd_ranks.diminfo[0].shape;
              if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_29 < 0) {
              __pyx_t_29 += __pyx_pybuffernd_ranks.diminfo[1].shape;
              if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_29, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_sum_ranks / __pyx_v_dups);
          }
          goto __pyx_L14;
        }

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":327
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = sum_ranks / dups
 *                 elif tiebreak == TIEBREAK_MIN:             # <<<<<<<<<<<<<<
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j - dups + 2
 */
        __pyx_t_23 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_MIN);
        if (__pyx_t_23) {

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":328
 *                         ranks[i, argsorted[i, z]] = sum_ranks / dups
 *                 elif tiebreak == TIEBREAK_MIN:
 *                     for z in range(j - dups + 1, j + 1):             # <<<<<<<<<<<<<<
 *                         ranks[i, argsorted[i, z]] = j - dups + 2
 *                 elif tiebreak == TIEBREAK_MAX:
 */
          __pyx_t_24 = (__pyx_v_j + 1);
          for (__pyx_t_25 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) {
            __pyx_v_z = __pyx_t_25;

            /* "/home/wesm/code/pandas/pandas/src/stats.pyx":329
 *                 elif tiebreak == TIEBREAK_MIN:
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j - dups + 2             # <<<<<<<<<<<<<<
 *                 elif tiebreak == TIEBREAK_MAX:
 *                     for z in range(j - dups + 1, j + 1):
 */
            __pyx_t_30 = __pyx_v_i;
            __pyx_t_31 = __pyx_v_z;
            __pyx_t_3 = -1;
            if (__pyx_t_30 < 0) {
              __pyx_t_30 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
              if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_31 < 0) {
              __pyx_t_31 += __pyx_pybuffernd_argsorted.diminfo[1].shape;
              if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_32 = __pyx_v_i;
            __pyx_t_33 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_31, __pyx_pybuffernd_argsorted.diminfo[1].strides));
            __pyx_t_3 = -1;
            if (__pyx_t_32 < 0) {
              __pyx_t_32 += __pyx_pybuffernd_ranks.diminfo[0].shape;
              if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_33 < 0) {
              __pyx_t_33 += __pyx_pybuffernd_ranks.diminfo[1].shape;
              if (unlikely(__pyx_t_33 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_33 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_33, __pyx_pybuffernd_ranks.diminfo[1].strides) = ((__pyx_v_j - __pyx_v_dups) + 2);
          }
          goto __pyx_L14;
        }

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":330
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j - dups + 2
 *                 elif tiebreak == TIEBREAK_MAX:             # <<<<<<<<<<<<<<
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j + 1
 */
        __pyx_t_23 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_MAX);
        if (__pyx_t_23) {

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":331
 *                         ranks[i, argsorted[i, z]] = j - dups + 2
 *                 elif tiebreak == TIEBREAK_MAX:
 *                     for z in range(j - dups + 1, j + 1):             # <<<<<<<<<<<<<<
 *                         ranks[i, argsorted[i, z]] = j + 1
 *                 elif tiebreak == TIEBREAK_FIRST:
 */
          __pyx_t_24 = (__pyx_v_j + 1);
          for (__pyx_t_25 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) {
            __pyx_v_z = __pyx_t_25;

            /* "/home/wesm/code/pandas/pandas/src/stats.pyx":332
 *                 elif tiebreak == TIEBREAK_MAX:
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j + 1             # <<<<<<<<<<<<<<
 *                 elif tiebreak == TIEBREAK_FIRST:
 *                     for z in range(j - dups + 1, j + 1):
 */
            __pyx_t_34 = __pyx_v_i;
            __pyx_t_35 = __pyx_v_z;
            __pyx_t_3 = -1;
            if (__pyx_t_34 < 0) {
              __pyx_t_34 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
              if (unlikely(__pyx_t_34 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_34 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_35 < 0) {
              __pyx_t_35 += __pyx_pybuffernd_argsorted.diminfo[1].shape;
              if (unlikely(__pyx_t_35 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_35 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_36 = __pyx_v_i;
            __pyx_t_37 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_35, __pyx_pybuffernd_argsorted.diminfo[1].strides));
            __pyx_t_3 = -1;
            if (__pyx_t_36 < 0) {
              __pyx_t_36 += __pyx_pybuffernd_ranks.diminfo[0].shape;
              if (unlikely(__pyx_t_36 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_37 < 0) {
              __pyx_t_37 += __pyx_pybuffernd_ranks.diminfo[1].shape;
              if (unlikely(__pyx_t_37 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_j + 1);
          }
          goto __pyx_L14;
        }

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":333
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j + 1
 *                 elif tiebreak == TIEBREAK_FIRST:             # <<<<<<<<<<<<<<
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = z + 1
 */
        __pyx_t_23 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST);
        if (__pyx_t_23) {

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":334
 *                         ranks[i, argsorted[i, z]] = j + 1
 *                 elif tiebreak == TIEBREAK_FIRST:
 *                     for z in range(j - dups + 1, j + 1):             # <<<<<<<<<<<<<<
 *                         ranks[i, argsorted[i, z]] = z + 1
 *                 elif tiebreak == TIEBREAK_FIRST_DESCENDING:
 */
          __pyx_t_24 = (__pyx_v_j + 1);
          for (__pyx_t_25 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) {
            __pyx_v_z = __pyx_t_25;

            /* "/home/wesm/code/pandas/pandas/src/stats.pyx":335
 *                 elif tiebreak == TIEBREAK_FIRST:
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = z + 1             # <<<<<<<<<<<<<<
 *                 elif tiebreak == TIEBREAK_FIRST_DESCENDING:
 *                     for z in range(j - dups + 1, j + 1):
 */
            __pyx_t_38 = __pyx_v_i;
            __pyx_t_39 = __pyx_v_z;
            __pyx_t_3 = -1;
            if (__pyx_t_38 < 0) {
              __pyx_t_38 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
              if (unlikely(__pyx_t_38 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_39 < 0) {
              __pyx_t_39 += __pyx_pybuffernd_argsorted.diminfo[1].shape;
              if (unlikely(__pyx_t_39 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_40 = __pyx_v_i;
            __pyx_t_41 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_argsorted.diminfo[1].strides));
            __pyx_t_3 = -1;
            if (__pyx_t_40 < 0) {
              __pyx_t_40 += __pyx_pybuffernd_ranks.diminfo[0].shape;
              if (unlikely(__pyx_t_40 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_41 < 0) {
              __pyx_t_41 += __pyx_pybuffernd_ranks.diminfo[1].shape;
              if (unlikely(__pyx_t_41 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_z + 1);
          }
          goto __pyx_L14;
        }

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":336
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = z + 1
 *                 elif tiebreak == TIEBREAK_FIRST_DESCENDING:             # <<<<<<<<<<<<<<
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2
 */
        __pyx_t_23 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST_DESCENDING);
        if (__pyx_t_23) {

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":337
 *                         ranks[i, argsorted[i, z]] = z + 1
 *                 elif tiebreak == TIEBREAK_FIRST_DESCENDING:
 *                     for z in range(j - dups + 1, j + 1):             # <<<<<<<<<<<<<<
 *                         ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2
 *                 sum_ranks = dups = 0
 */
          __pyx_t_24 = (__pyx_v_j + 1);
          for (__pyx_t_25 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_25 < __pyx_t_24; __pyx_t_25+=1) {
            __pyx_v_z = __pyx_t_25;

            /* "/home/wesm/code/pandas/pandas/src/stats.pyx":338
 *                 elif tiebreak == TIEBREAK_FIRST_DESCENDING:
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2             # <<<<<<<<<<<<<<
 *                 sum_ranks = dups = 0
 * 
 */
            __pyx_t_42 = __pyx_v_i;
            __pyx_t_43 = __pyx_v_z;
            __pyx_t_3 = -1;
            if (__pyx_t_42 < 0) {
              __pyx_t_42 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
              if (unlikely(__pyx_t_42 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_42 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_43 < 0) {
              __pyx_t_43 += __pyx_pybuffernd_argsorted.diminfo[1].shape;
              if (unlikely(__pyx_t_43 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_43 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_44 = __pyx_v_i;
            __pyx_t_45 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_argsorted.diminfo[1].strides));
            __pyx_t_3 = -1;
            if (__pyx_t_44 < 0) {
              __pyx_t_44 += __pyx_pybuffernd_ranks.diminfo[0].shape;
              if (unlikely(__pyx_t_44 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_45 < 0) {
              __pyx_t_45 += __pyx_pybuffernd_ranks.diminfo[1].shape;
              if (unlikely(__pyx_t_45 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_ranks.diminfo[1].strides) = ((((2 * __pyx_v_j) - __pyx_v_z) - __pyx_v_dups) + 2);
          }
          goto __pyx_L14;
        }
        __pyx_L14:;

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":339
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = 2 * j - z - dups + 2
 *                 sum_ranks = dups = 0             # <<<<<<<<<<<<<<
 * 
 *     if axis == 0:
 */
        __pyx_v_sum_ranks = 0;
        __pyx_v_dups = 0;
        goto __pyx_L13;
      }
      __pyx_L13:;
    }
  }

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":341
 *                 sum_ranks = dups = 0
 * 
 *     if axis == 0:             # <<<<<<<<<<<<<<
 *         return ranks.T
 *     else:
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_23 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_23) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":342
 * 
 *     if axis == 0:
 *         return ranks.T             # <<<<<<<<<<<<<<
 *     else:
 *         return ranks
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_ranks), __pyx_n_s__T); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L25;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":344
 *         return ranks.T
 *     else:
 *         return ranks             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_ranks));
    __pyx_r = ((PyObject *)__pyx_v_ranks);
    goto __pyx_L0;
  }
  __pyx_L25:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_10);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.rank_2d_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ranks);
  __Pyx_XDECREF((PyObject *)__pyx_v_argsorted);
  __Pyx_XDECREF((PyObject *)__pyx_v_values);
  __Pyx_XDECREF(__pyx_v__as);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_291rank_1d_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_290rank_1d_generic[] = "\n    Fast NaN-friendly version of scipy.stats.rankdata\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_291rank_1d_generic = {__Pyx_NAMESTR("rank_1d_generic"), (PyCFunction)__pyx_pw_6pandas_8_tseries_291rank_1d_generic, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_290rank_1d_generic)};
static PyObject *__pyx_pw_6pandas_8_tseries_291rank_1d_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_in_arr = 0;
  int __pyx_v_retry;
  PyObject *__pyx_v_ties_method = 0;
  PyObject *__pyx_v_ascending = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__in_arr,&__pyx_n_s__retry,&__pyx_n_s__ties_method,&__pyx_n_s__ascending,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rank_1d_generic (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject *)__pyx_n_s__average);
    values[3] = __pyx_k_87;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_arr);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__retry);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ties_method);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ascending);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_1d_generic") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_in_arr = values[0];
      if (values[1]) {
        __pyx_v_retry = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_retry == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      } else {
        __pyx_v_retry = ((int)1);
      }
      __pyx_v_ties_method = values[2];
      __pyx_v_ascending = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_in_arr = values[0];
    if (values[1]) {
      __pyx_v_retry = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_retry == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_retry = ((int)1);
    }
    __pyx_v_ties_method = values[2];
    __pyx_v_ascending = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rank_1d_generic", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.rank_1d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_290rank_1d_generic(__pyx_self, __pyx_v_in_arr, __pyx_v_retry, __pyx_v_ties_method, __pyx_v_ascending);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/stats.pyx":347
 * 
 * 
 * def rank_1d_generic(object in_arr, bint retry=1, ties_method='average',             # <<<<<<<<<<<<<<
 *                     ascending=True):
 *     """
 */

static PyObject *__pyx_pf_6pandas_8_tseries_290rank_1d_generic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, int __pyx_v_retry, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_dups;
  PyArrayObject *__pyx_v_ranks = 0;
  PyArrayObject *__pyx_v_sorted_data = 0;
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_argsorted = 0;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_nan_value = 0;
  __pyx_t_5numpy_float64_t __pyx_v_sum_ranks;
  int __pyx_v_tiebreak;
  PyObject *__pyx_v_mask = NULL;
  PyObject *__pyx_v__as = NULL;
  PyObject *__pyx_v_valid_locs = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks;
  __Pyx_Buffer __pyx_pybuffer_ranks;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted;
  __Pyx_Buffer __pyx_pybuffer_argsorted;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyArrayObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  PyArrayObject *__pyx_t_17 = NULL;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  __pyx_t_5numpy_int64_t __pyx_t_20;
  int __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  __pyx_t_5numpy_int64_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  __pyx_t_5numpy_int64_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  __pyx_t_5numpy_int64_t __pyx_t_29;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rank_1d_generic");
  __pyx_pybuffer_ranks.pybuffer.buf = NULL;
  __pyx_pybuffer_ranks.refcount = 0;
  __pyx_pybuffernd_ranks.data = NULL;
  __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks;
  __pyx_pybuffer_argsorted.pybuffer.buf = NULL;
  __pyx_pybuffer_argsorted.refcount = 0;
  __pyx_pybuffernd_argsorted.data = NULL;
  __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":354
 * 
 *     cdef:
 *         Py_ssize_t i, j, n, dups = 0             # <<<<<<<<<<<<<<
 *         ndarray[float64_t] ranks
 *         ndarray sorted_data, values
 */
  __pyx_v_dups = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":359
 *         ndarray[int64_t] argsorted
 *         object val, nan_value
 *         float64_t sum_ranks = 0             # <<<<<<<<<<<<<<
 *         int tiebreak = 0
 *     tiebreak = tiebreakers[ties_method]
 */
  __pyx_v_sum_ranks = 0.0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":360
 *         object val, nan_value
 *         float64_t sum_ranks = 0
 *         int tiebreak = 0             # <<<<<<<<<<<<<<
 *     tiebreak = tiebreakers[ties_method]
 * 
 */
  __pyx_v_tiebreak = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":361
 *         float64_t sum_ranks = 0
 *         int tiebreak = 0
 *     tiebreak = tiebreakers[ties_method]             # <<<<<<<<<<<<<<
 * 
 *     values = np.array(in_arr, copy=True)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_tiebreak = __pyx_t_3;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":363
 *     tiebreak = tiebreakers[ties_method]
 * 
 *     values = np.array(in_arr, copy=True)             # <<<<<<<<<<<<<<
 * 
 *     if values.dtype != np.object_:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__array); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_in_arr);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr);
  __Pyx_GIVEREF(__pyx_v_in_arr);
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __pyx_t_5 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__copy), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_values = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":365
 *     values = np.array(in_arr, copy=True)
 * 
 *     if values.dtype != np.object_:             # <<<<<<<<<<<<<<
 *         values = values.astype('O')
 * 
 */
  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_NE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_6) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":366
 * 
 *     if values.dtype != np.object_:
 *         values = values.astype('O')             # <<<<<<<<<<<<<<
 * 
 *     if ascending:
 */
    __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__astype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_88), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_values));
    __pyx_v_values = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":368
 *         values = values.astype('O')
 * 
 *     if ascending:             # <<<<<<<<<<<<<<
 *         # always greater than everything
 *         nan_value = Infinity()
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_6) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":370
 *     if ascending:
 *         # always greater than everything
 *         nan_value = Infinity()             # <<<<<<<<<<<<<<
 *     else:
 *         nan_value = NegInfinity()
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Infinity); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_nan_value = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":372
 *         nan_value = Infinity()
 *     else:
 *         nan_value = NegInfinity()             # <<<<<<<<<<<<<<
 * 
 *     mask = isnullobj(values)
 */
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__NegInfinity); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_nan_value = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":374
 *         nan_value = NegInfinity()
 * 
 *     mask = isnullobj(values)             # <<<<<<<<<<<<<<
 *     np.putmask(values, mask, nan_value)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__isnullobj); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_v_mask = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":375
 * 
 *     mask = isnullobj(values)
 *     np.putmask(values, mask, nan_value)             # <<<<<<<<<<<<<<
 * 
 *     n = len(values)
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__putmask); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  __Pyx_INCREF(__pyx_v_mask);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_mask);
  __Pyx_GIVEREF(__pyx_v_mask);
  __Pyx_INCREF(__pyx_v_nan_value);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_nan_value);
  __Pyx_GIVEREF(__pyx_v_nan_value);
  __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":377
 *     np.putmask(values, mask, nan_value)
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     ranks = np.empty(n, dtype='f8')
 * 
 */
  __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":378
 * 
 *     n = len(values)
 *     ranks = np.empty(n, dtype='f8')             # <<<<<<<<<<<<<<
 * 
 *     # py2.5/win32 hack, can't pass i8
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __pyx_v_ranks = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":381
 * 
 *     # py2.5/win32 hack, can't pass i8
 *     try:             # <<<<<<<<<<<<<<
 *         _as = values.argsort()
 *     except TypeError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":382
 *     # py2.5/win32 hack, can't pass i8
 *     try:
 *         _as = values.argsort()             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         if not retry:
 */
      __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v__as = __pyx_t_2;
      __pyx_t_2 = 0;
    }
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L12_try_end;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":383
 *     try:
 *         _as = values.argsort()
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         if not retry:
 *             raise
 */
    __pyx_t_3 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    if (__pyx_t_3) {
      __Pyx_AddTraceback("pandas._tseries.rank_1d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_4);

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":384
 *         _as = values.argsort()
 *     except TypeError:
 *         if not retry:             # <<<<<<<<<<<<<<
 *             raise
 * 
 */
      __pyx_t_6 = (!__pyx_v_retry);
      if (__pyx_t_6) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":385
 *     except TypeError:
 *         if not retry:
 *             raise             # <<<<<<<<<<<<<<
 * 
 *         valid_locs = (-mask).nonzero()[0]
 */
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_ErrRestore(__pyx_t_2, __pyx_t_1, __pyx_t_4);
        __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_4 = 0; 
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
        goto __pyx_L15;
      }
      __pyx_L15:;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":387
 *             raise
 * 
 *         valid_locs = (-mask).nonzero()[0]             # <<<<<<<<<<<<<<
 *         ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0,
 *                                               ties_method=ties_method,
 */
      __pyx_t_5 = PyNumber_Negative(__pyx_v_mask); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_12 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__nonzero); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_12) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_valid_locs = __pyx_t_12;
      __pyx_t_12 = 0;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":388
 * 
 *         valid_locs = (-mask).nonzero()[0]
 *         ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0,             # <<<<<<<<<<<<<<
 *                                               ties_method=ties_method,
 *                                               ascending=ascending))
 */
      __pyx_t_12 = PyObject_GetAttr(((PyObject *)__pyx_v_ranks), __pyx_n_s__put); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__rank_1d_generic); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_13 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__take); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_INCREF(__pyx_v_valid_locs);
      PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_valid_locs);
      __Pyx_GIVEREF(__pyx_v_valid_locs);
      __pyx_t_15 = PyObject_Call(__pyx_t_13, ((PyObject *)__pyx_t_14), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
      __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_14);
      PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_15);
      __Pyx_GIVEREF(__pyx_t_15);
      __Pyx_INCREF(__pyx_int_0);
      PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      __pyx_t_15 = 0;
      __pyx_t_15 = PyDict_New(); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_15));

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":389
 *         valid_locs = (-mask).nonzero()[0]
 *         ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0,
 *                                               ties_method=ties_method,             # <<<<<<<<<<<<<<
 *                                               ascending=ascending))
 *         np.putmask(ranks, mask, np.nan)
 */
      if (PyDict_SetItem(__pyx_t_15, ((PyObject *)__pyx_n_s__ties_method), __pyx_v_ties_method) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":390
 *         ranks.put(valid_locs, rank_1d_generic(values.take(valid_locs), 0,
 *                                               ties_method=ties_method,
 *                                               ascending=ascending))             # <<<<<<<<<<<<<<
 *         np.putmask(ranks, mask, np.nan)
 *         return ranks
 */
      if (PyDict_SetItem(__pyx_t_15, ((PyObject *)__pyx_n_s__ascending), __pyx_v_ascending) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __pyx_t_13 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_14), ((PyObject *)__pyx_t_15)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_14)); __pyx_t_14 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
      __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_INCREF(__pyx_v_valid_locs);
      PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_valid_locs);
      __Pyx_GIVEREF(__pyx_v_valid_locs);
      PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_13);
      __Pyx_GIVEREF(__pyx_t_13);
      __pyx_t_13 = 0;
      __pyx_t_13 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_15), NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_15)); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":391
 *                                               ties_method=ties_method,
 *                                               ascending=ascending))
 *         np.putmask(ranks, mask, np.nan)             # <<<<<<<<<<<<<<
 *         return ranks
 * 
 */
      __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_15 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__putmask); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_12 = PyObject_GetAttr(__pyx_t_13, __pyx_n_s__nan); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_INCREF(((PyObject *)__pyx_v_ranks));
      PyTuple_SET_ITEM(__pyx_t_13, 0, ((PyObject *)__pyx_v_ranks));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_ranks));
      __Pyx_INCREF(__pyx_v_mask);
      PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_v_mask);
      __Pyx_GIVEREF(__pyx_v_mask);
      PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_12);
      __pyx_t_12 = 0;
      __pyx_t_12 = PyObject_Call(__pyx_t_15, ((PyObject *)__pyx_t_13), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":392
 *                                               ascending=ascending))
 *         np.putmask(ranks, mask, np.nan)
 *         return ranks             # <<<<<<<<<<<<<<
 * 
 *     if not ascending:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_ranks));
      __pyx_r = ((PyObject *)__pyx_v_ranks);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L8_except_return;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L6_exception_handled;
    }
    __pyx_L7_except_error:;
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L8_except_return:;
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
    goto __pyx_L0;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
    __pyx_L12_try_end:;
  }

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":394
 *         return ranks
 * 
 *     if not ascending:             # <<<<<<<<<<<<<<
 *         _as = _as[::-1]
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_16 = (!__pyx_t_6);
  if (__pyx_t_16) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":395
 * 
 *     if not ascending:
 *         _as = _as[::-1]             # <<<<<<<<<<<<<<
 * 
 *     sorted_data = values.take(_as)
 */
    __pyx_t_4 = PyObject_GetItem(__pyx_v__as, __pyx_k_slice_89); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_v__as);
    __pyx_v__as = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L16;
  }
  __pyx_L16:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":397
 *         _as = _as[::-1]
 * 
 *     sorted_data = values.take(_as)             # <<<<<<<<<<<<<<
 *     argsorted = _as.astype('i8')
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__take); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v__as);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__as);
  __Pyx_GIVEREF(__pyx_v__as);
  __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_sorted_data = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":398
 * 
 *     sorted_data = values.take(_as)
 *     argsorted = _as.astype('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v__as, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_90), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_17 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_17, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_17 = 0;
  __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":400
 *     argsorted = _as.astype('i8')
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         sum_ranks += i + 1
 *         dups += 1
 */
  __pyx_t_7 = __pyx_v_n;
  for (__pyx_t_18 = 0; __pyx_t_18 < __pyx_t_7; __pyx_t_18+=1) {
    __pyx_v_i = __pyx_t_18;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":401
 * 
 *     for i in range(n):
 *         sum_ranks += i + 1             # <<<<<<<<<<<<<<
 *         dups += 1
 *         val = util.get_value_at(sorted_data, i)
 */
    __pyx_v_sum_ranks = (__pyx_v_sum_ranks + (__pyx_v_i + 1));

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":402
 *     for i in range(n):
 *         sum_ranks += i + 1
 *         dups += 1             # <<<<<<<<<<<<<<
 *         val = util.get_value_at(sorted_data, i)
 *         if val is nan_value:
 */
    __pyx_v_dups = (__pyx_v_dups + 1);

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":403
 *         sum_ranks += i + 1
 *         dups += 1
 *         val = util.get_value_at(sorted_data, i)             # <<<<<<<<<<<<<<
 *         if val is nan_value:
 *             ranks[argsorted[i]] = nan
 */
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_f_4util_get_value_at(__pyx_v_sorted_data, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":404
 *         dups += 1
 *         val = util.get_value_at(sorted_data, i)
 *         if val is nan_value:             # <<<<<<<<<<<<<<
 *             ranks[argsorted[i]] = nan
 *             continue
 */
    __pyx_t_16 = (__pyx_v_val == __pyx_v_nan_value);
    if (__pyx_t_16) {

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":405
 *         val = util.get_value_at(sorted_data, i)
 *         if val is nan_value:
 *             ranks[argsorted[i]] = nan             # <<<<<<<<<<<<<<
 *             continue
 *         if (i == n - 1 or
 */
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_3 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_20 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_argsorted.diminfo[0].strides));
      __pyx_t_3 = -1;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_pybuffernd_ranks.diminfo[0].shape;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_ranks.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_nan;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":406
 *         if val is nan_value:
 *             ranks[argsorted[i]] = nan
 *             continue             # <<<<<<<<<<<<<<
 *         if (i == n - 1 or
 *             are_diff(util.get_value_at(sorted_data, i + 1), val)):
 */
      goto __pyx_L17_continue;
      goto __pyx_L19;
    }
    __pyx_L19:;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":407
 *             ranks[argsorted[i]] = nan
 *             continue
 *         if (i == n - 1 or             # <<<<<<<<<<<<<<
 *             are_diff(util.get_value_at(sorted_data, i + 1), val)):
 *             if tiebreak == TIEBREAK_AVERAGE:
 */
    __pyx_t_16 = (__pyx_v_i == (__pyx_v_n - 1));
    if (!__pyx_t_16) {

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":408
 *             continue
 *         if (i == n - 1 or
 *             are_diff(util.get_value_at(sorted_data, i + 1), val)):             # <<<<<<<<<<<<<<
 *             if tiebreak == TIEBREAK_AVERAGE:
 *                 for j in range(i - dups + 1, i + 1):
 */
      __pyx_t_2 = PyInt_FromSsize_t((__pyx_v_i + 1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __pyx_f_4util_get_value_at(__pyx_v_sorted_data, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __pyx_f_6pandas_8_tseries_are_diff(__pyx_t_1, __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_21 = __pyx_t_6;
    } else {
      __pyx_t_21 = __pyx_t_16;
    }
    if (__pyx_t_21) {

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":409
 *         if (i == n - 1 or
 *             are_diff(util.get_value_at(sorted_data, i + 1), val)):
 *             if tiebreak == TIEBREAK_AVERAGE:             # <<<<<<<<<<<<<<
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = sum_ranks / dups
 */
      __pyx_t_21 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_AVERAGE);
      if (__pyx_t_21) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":410
 *             are_diff(util.get_value_at(sorted_data, i + 1), val)):
 *             if tiebreak == TIEBREAK_AVERAGE:
 *                 for j in range(i - dups + 1, i + 1):             # <<<<<<<<<<<<<<
 *                     ranks[argsorted[j]] = sum_ranks / dups
 *             elif tiebreak == TIEBREAK_MIN:
 */
        __pyx_t_22 = (__pyx_v_i + 1);
        for (__pyx_t_23 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) {
          __pyx_v_j = __pyx_t_23;

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":411
 *             if tiebreak == TIEBREAK_AVERAGE:
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = sum_ranks / dups             # <<<<<<<<<<<<<<
 *             elif tiebreak == TIEBREAK_MIN:
 *                 for j in range(i - dups + 1, i + 1):
 */
          if (unlikely(__pyx_v_dups == 0)) {
            PyErr_Format(PyExc_ZeroDivisionError, "float division");
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_24 = __pyx_v_j;
          __pyx_t_3 = -1;
          if (__pyx_t_24 < 0) {
            __pyx_t_24 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
            if (unlikely(__pyx_t_24 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_25 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_argsorted.diminfo[0].strides));
          __pyx_t_3 = -1;
          if (__pyx_t_25 < 0) {
            __pyx_t_25 += __pyx_pybuffernd_ranks.diminfo[0].shape;
            if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_sum_ranks / __pyx_v_dups);
        }
        goto __pyx_L21;
      }

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":412
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = sum_ranks / dups
 *             elif tiebreak == TIEBREAK_MIN:             # <<<<<<<<<<<<<<
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i - dups + 2
 */
      __pyx_t_21 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_MIN);
      if (__pyx_t_21) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":413
 *                     ranks[argsorted[j]] = sum_ranks / dups
 *             elif tiebreak == TIEBREAK_MIN:
 *                 for j in range(i - dups + 1, i + 1):             # <<<<<<<<<<<<<<
 *                     ranks[argsorted[j]] = i - dups + 2
 *             elif tiebreak == TIEBREAK_MAX:
 */
        __pyx_t_22 = (__pyx_v_i + 1);
        for (__pyx_t_23 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) {
          __pyx_v_j = __pyx_t_23;

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":414
 *             elif tiebreak == TIEBREAK_MIN:
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i - dups + 2             # <<<<<<<<<<<<<<
 *             elif tiebreak == TIEBREAK_MAX:
 *                 for j in range(i - dups + 1, i + 1):
 */
          __pyx_t_26 = __pyx_v_j;
          __pyx_t_3 = -1;
          if (__pyx_t_26 < 0) {
            __pyx_t_26 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
            if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_27 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_argsorted.diminfo[0].strides));
          __pyx_t_3 = -1;
          if (__pyx_t_27 < 0) {
            __pyx_t_27 += __pyx_pybuffernd_ranks.diminfo[0].shape;
            if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_ranks.diminfo[0].strides) = ((__pyx_v_i - __pyx_v_dups) + 2);
        }
        goto __pyx_L21;
      }

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":415
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i - dups + 2
 *             elif tiebreak == TIEBREAK_MAX:             # <<<<<<<<<<<<<<
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i + 1
 */
      __pyx_t_21 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_MAX);
      if (__pyx_t_21) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":416
 *                     ranks[argsorted[j]] = i - dups + 2
 *             elif tiebreak == TIEBREAK_MAX:
 *                 for j in range(i - dups + 1, i + 1):             # <<<<<<<<<<<<<<
 *                     ranks[argsorted[j]] = i + 1
 *             elif tiebreak == TIEBREAK_FIRST:
 */
        __pyx_t_22 = (__pyx_v_i + 1);
        for (__pyx_t_23 = ((__pyx_v_i - __pyx_v_dups) + 1); __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) {
          __pyx_v_j = __pyx_t_23;

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":417
 *             elif tiebreak == TIEBREAK_MAX:
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i + 1             # <<<<<<<<<<<<<<
 *             elif tiebreak == TIEBREAK_FIRST:
 *                 raise ValueError('first not supported for non-numeric data')
 */
          __pyx_t_28 = __pyx_v_j;
          __pyx_t_3 = -1;
          if (__pyx_t_28 < 0) {
            __pyx_t_28 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
            if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_29 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_argsorted.diminfo[0].strides));
          __pyx_t_3 = -1;
          if (__pyx_t_29 < 0) {
            __pyx_t_29 += __pyx_pybuffernd_ranks.diminfo[0].shape;
            if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0;
          } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
          if (unlikely(__pyx_t_3 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_3);
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_ranks.diminfo[0].strides) = (__pyx_v_i + 1);
        }
        goto __pyx_L21;
      }

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":418
 *                 for j in range(i - dups + 1, i + 1):
 *                     ranks[argsorted[j]] = i + 1
 *             elif tiebreak == TIEBREAK_FIRST:             # <<<<<<<<<<<<<<
 *                 raise ValueError('first not supported for non-numeric data')
 *             sum_ranks = dups = 0
 */
      __pyx_t_21 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST);
      if (__pyx_t_21) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":419
 *                     ranks[argsorted[j]] = i + 1
 *             elif tiebreak == TIEBREAK_FIRST:
 *                 raise ValueError('first not supported for non-numeric data')             # <<<<<<<<<<<<<<
 *             sum_ranks = dups = 0
 *     return ranks
 */
        __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_92), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L21;
      }
      __pyx_L21:;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":420
 *             elif tiebreak == TIEBREAK_FIRST:
 *                 raise ValueError('first not supported for non-numeric data')
 *             sum_ranks = dups = 0             # <<<<<<<<<<<<<<
 *     return ranks
 * 
 */
      __pyx_v_sum_ranks = 0;
      __pyx_v_dups = 0;
      goto __pyx_L20;
    }
    __pyx_L20:;
    __pyx_L17_continue:;
  }

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":421
 *                 raise ValueError('first not supported for non-numeric data')
 *             sum_ranks = dups = 0
 *     return ranks             # <<<<<<<<<<<<<<
 * 
 * cdef inline are_diff(object left, object right):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_ranks));
  __pyx_r = ((PyObject *)__pyx_v_ranks);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.rank_1d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ranks);
  __Pyx_XDECREF((PyObject *)__pyx_v_sorted_data);
  __Pyx_XDECREF((PyObject *)__pyx_v_values);
  __Pyx_XDECREF((PyObject *)__pyx_v_argsorted);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_nan_value);
  __Pyx_XDECREF(__pyx_v_mask);
  __Pyx_XDECREF(__pyx_v__as);
  __Pyx_XDECREF(__pyx_v_valid_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/stats.pyx":423
 *     return ranks
 * 
 * cdef inline are_diff(object left, object right):             # <<<<<<<<<<<<<<
 *     try:
 *         return fabs(left - right) > FP_ERR
 */

static CYTHON_INLINE PyObject *__pyx_f_6pandas_8_tseries_are_diff(PyObject *__pyx_v_left, PyObject *__pyx_v_right) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  double __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("are_diff");

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":424
 * 
 * cdef inline are_diff(object left, object right):
 *     try:             # <<<<<<<<<<<<<<
 *         return fabs(left - right) > FP_ERR
 *     except TypeError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":425
 * cdef inline are_diff(object left, object right):
 *     try:
 *         return fabs(left - right) > FP_ERR             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         return left != right
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = PyNumber_Subtract(__pyx_v_left, __pyx_v_right); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyBool_FromLong((fabs(__pyx_t_5) > __pyx_v_6pandas_8_tseries_FP_ERR)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":426
 *     try:
 *         return fabs(left - right) > FP_ERR
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         return left != right
 * 
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("pandas._tseries.are_diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":427
 *         return fabs(left - right) > FP_ERR
 *     except TypeError:
 *         return left != right             # <<<<<<<<<<<<<<
 * 
 * _return_false = lambda self, other: False
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_9 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, Py_NE); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_r = __pyx_t_9;
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pandas._tseries.are_diff", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_293rank_2d_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_292rank_2d_generic[] = "\n    Fast NaN-friendly version of scipy.stats.rankdata\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_293rank_2d_generic = {__Pyx_NAMESTR("rank_2d_generic"), (PyCFunction)__pyx_pw_6pandas_8_tseries_293rank_2d_generic, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_292rank_2d_generic)};
static PyObject *__pyx_pw_6pandas_8_tseries_293rank_2d_generic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_in_arr = 0;
  PyObject *__pyx_v_axis = 0;
  PyObject *__pyx_v_ties_method = 0;
  PyObject *__pyx_v_ascending = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__in_arr,&__pyx_n_s__axis,&__pyx_n_s__ties_method,&__pyx_n_s__ascending,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rank_2d_generic (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    values[1] = ((PyObject *)__pyx_int_0);
    values[2] = ((PyObject *)__pyx_n_s__average);
    values[3] = __pyx_k_93;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__in_arr);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ties_method);
          if (value) { values[2] = value; kw_args--; }
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ascending);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rank_2d_generic") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_in_arr = values[0];
      __pyx_v_axis = values[1];
      __pyx_v_ties_method = values[2];
      __pyx_v_ascending = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_in_arr = values[0];
    __pyx_v_axis = values[1];
    __pyx_v_ties_method = values[2];
    __pyx_v_ascending = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("rank_2d_generic", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.rank_2d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_292rank_2d_generic(__pyx_self, __pyx_v_in_arr, __pyx_v_axis, __pyx_v_ties_method, __pyx_v_ascending);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/stats.pyx":452
 *     __cmp__ = _return_true
 * 
 * def rank_2d_generic(object in_arr, axis=0, ties_method='average',             # <<<<<<<<<<<<<<
 *                     ascending=True):
 *     """
 */

static PyObject *__pyx_pf_6pandas_8_tseries_292rank_2d_generic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_in_arr, PyObject *__pyx_v_axis, PyObject *__pyx_v_ties_method, PyObject *__pyx_v_ascending) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_z;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_infs;
  Py_ssize_t __pyx_v_dups;
  PyArrayObject *__pyx_v_ranks = 0;
  PyArrayObject *__pyx_v_values = 0;
  PyArrayObject *__pyx_v_argsorted = 0;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_nan_value = 0;
  __pyx_t_5numpy_float64_t __pyx_v_sum_ranks;
  int __pyx_v_tiebreak;
  PyObject *__pyx_v_mask = NULL;
  PyObject *__pyx_v__as = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ranks;
  __Pyx_Buffer __pyx_pybuffer_ranks;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_argsorted;
  __Pyx_Buffer __pyx_pybuffer_argsorted;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyArrayObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  PyArrayObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_t_21;
  PyArrayObject *__pyx_t_22 = NULL;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  __pyx_t_5numpy_int64_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  int __pyx_t_33;
  Py_ssize_t __pyx_t_34;
  Py_ssize_t __pyx_t_35;
  Py_ssize_t __pyx_t_36;
  Py_ssize_t __pyx_t_37;
  Py_ssize_t __pyx_t_38;
  __pyx_t_5numpy_int64_t __pyx_t_39;
  Py_ssize_t __pyx_t_40;
  Py_ssize_t __pyx_t_41;
  Py_ssize_t __pyx_t_42;
  __pyx_t_5numpy_int64_t __pyx_t_43;
  Py_ssize_t __pyx_t_44;
  Py_ssize_t __pyx_t_45;
  Py_ssize_t __pyx_t_46;
  __pyx_t_5numpy_int64_t __pyx_t_47;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rank_2d_generic");
  __Pyx_INCREF(__pyx_v_in_arr);
  __pyx_pybuffer_ranks.pybuffer.buf = NULL;
  __pyx_pybuffer_ranks.refcount = 0;
  __pyx_pybuffernd_ranks.data = NULL;
  __pyx_pybuffernd_ranks.rcbuffer = &__pyx_pybuffer_ranks;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  __pyx_pybuffer_argsorted.pybuffer.buf = NULL;
  __pyx_pybuffer_argsorted.refcount = 0;
  __pyx_pybuffernd_argsorted.data = NULL;
  __pyx_pybuffernd_argsorted.rcbuffer = &__pyx_pybuffer_argsorted;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":459
 * 
 *     cdef:
 *         Py_ssize_t i, j, z, k, n, infs, dups = 0             # <<<<<<<<<<<<<<
 *         ndarray[float64_t, ndim=2] ranks
 *         ndarray[object, ndim=2] values
 */
  __pyx_v_dups = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":464
 *         ndarray[int64_t, ndim=2] argsorted
 *         object val, nan_value
 *         float64_t sum_ranks = 0             # <<<<<<<<<<<<<<
 *         int tiebreak = 0
 *     tiebreak = tiebreakers[ties_method]
 */
  __pyx_v_sum_ranks = 0.0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":465
 *         object val, nan_value
 *         float64_t sum_ranks = 0
 *         int tiebreak = 0             # <<<<<<<<<<<<<<
 *     tiebreak = tiebreakers[ties_method]
 * 
 */
  __pyx_v_tiebreak = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":466
 *         float64_t sum_ranks = 0
 *         int tiebreak = 0
 *     tiebreak = tiebreakers[ties_method]             # <<<<<<<<<<<<<<
 * 
 *     in_arr = np.asarray(in_arr)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__tiebreakers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_ties_method); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_tiebreak = __pyx_t_3;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":468
 *     tiebreak = tiebreakers[ties_method]
 * 
 *     in_arr = np.asarray(in_arr)             # <<<<<<<<<<<<<<
 * 
 *     if axis == 0:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__asarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_in_arr);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_in_arr);
  __Pyx_GIVEREF(__pyx_v_in_arr);
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_v_in_arr);
  __pyx_v_in_arr = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":470
 *     in_arr = np.asarray(in_arr)
 * 
 *     if axis == 0:             # <<<<<<<<<<<<<<
 *         values = in_arr.T.copy()
 *     else:
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":471
 * 
 *     if axis == 0:
 *         values = in_arr.T.copy()             # <<<<<<<<<<<<<<
 *     else:
 *         values = in_arr.copy()
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_in_arr, __pyx_n_s__T); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = ((PyArrayObject *)__pyx_t_4);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = 0;
    __pyx_v_values = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":473
 *         values = in_arr.T.copy()
 *     else:
 *         values = in_arr.copy()             # <<<<<<<<<<<<<<
 * 
 *     if values.dtype != np.object_:
 */
    __pyx_t_4 = PyObject_GetAttr(__pyx_v_in_arr, __pyx_n_s__copy); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
        }
      }
      __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = 0;
    __pyx_v_values = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":475
 *         values = in_arr.copy()
 * 
 *     if values.dtype != np.object_:             # <<<<<<<<<<<<<<
 *         values = values.astype('O')
 * 
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__object_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":476
 * 
 *     if values.dtype != np.object_:
 *         values = values.astype('O')             # <<<<<<<<<<<<<<
 * 
 *     if ascending:
 */
    __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__astype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_94), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
      __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
      if (unlikely(__pyx_t_3 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
      if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_values));
    __pyx_v_values = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":478
 *         values = values.astype('O')
 * 
 *     if ascending:             # <<<<<<<<<<<<<<
 *         # always greater than everything
 *         nan_value = Infinity()
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":480
 *     if ascending:
 *         # always greater than everything
 *         nan_value = Infinity()             # <<<<<<<<<<<<<<
 *     else:
 *         nan_value = NegInfinity()
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Infinity); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_nan_value = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":482
 *         nan_value = Infinity()
 *     else:
 *         nan_value = NegInfinity()             # <<<<<<<<<<<<<<
 * 
 *     mask = isnullobj2d(values)
 */
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__NegInfinity); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_nan_value = __pyx_t_1;
    __pyx_t_1 = 0;
  }
  __pyx_L5:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":484
 *         nan_value = NegInfinity()
 * 
 *     mask = isnullobj2d(values)             # <<<<<<<<<<<<<<
 *     np.putmask(values, mask, nan_value)
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__isnullobj2d); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_v_mask = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":485
 * 
 *     mask = isnullobj2d(values)
 *     np.putmask(values, mask, nan_value)             # <<<<<<<<<<<<<<
 * 
 *     n, k = (<object> values).shape
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__putmask); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  __Pyx_INCREF(__pyx_v_mask);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_mask);
  __Pyx_GIVEREF(__pyx_v_mask);
  __Pyx_INCREF(__pyx_v_nan_value);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_nan_value);
  __Pyx_GIVEREF(__pyx_v_nan_value);
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":487
 *     np.putmask(values, mask, nan_value)
 * 
 *     n, k = (<object> values).shape             # <<<<<<<<<<<<<<
 *     ranks = np.empty((n, k), dtype='f8')
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__shape); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_4 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L7_unpacking_done;
    __pyx_L6_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L7_unpacking_done:;
  }
  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_n = __pyx_t_12;
  __pyx_v_k = __pyx_t_13;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":488
 * 
 *     n, k = (<object> values).shape
 *     ranks = np.empty((n, k), dtype='f8')             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_10));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
  __pyx_t_10 = 0;
  __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_10));
  if (PyDict_SetItem(__pyx_t_10, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_14 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer, (PyObject*)__pyx_v_ranks, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      }
    }
    __pyx_pybuffernd_ranks.diminfo[0].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ranks.diminfo[0].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_ranks.diminfo[1].strides = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_ranks.diminfo[1].shape = __pyx_pybuffernd_ranks.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_14 = 0;
  __pyx_v_ranks = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":490
 *     ranks = np.empty((n, k), dtype='f8')
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         _as = values.argsort(1)
 *     except TypeError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    /*try:*/ {

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":491
 * 
 *     try:
 *         _as = values.argsort(1)             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         values = in_arr
 */
      __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_95), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v__as = __pyx_t_10;
      __pyx_t_10 = 0;
    }
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L15_try_end;
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":492
 *     try:
 *         _as = values.argsort(1)
 *     except TypeError:             # <<<<<<<<<<<<<<
 *         values = in_arr
 *         for i in range(len(values)):
 */
    __pyx_t_3 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    if (__pyx_t_3) {
      __Pyx_AddTraceback("pandas._tseries.rank_2d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_1, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":493
 *         _as = values.argsort(1)
 *     except TypeError:
 *         values = in_arr             # <<<<<<<<<<<<<<
 *         for i in range(len(values)):
 *             ranks[i] = rank_1d_generic(in_arr[i],
 */
      if (!(likely(((__pyx_v_in_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_in_arr, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
      __pyx_t_6 = ((PyArrayObject *)__pyx_v_in_arr);
      {
        __Pyx_BufFmt_StackElem __pyx_stack[1];
        __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
        __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
        if (unlikely(__pyx_t_3 < 0)) {
          PyErr_Fetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
            Py_XDECREF(__pyx_t_15); Py_XDECREF(__pyx_t_16); Py_XDECREF(__pyx_t_17);
            __Pyx_RaiseBufferFallbackError();
          } else {
            PyErr_Restore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          }
        }
        __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
        if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
      }
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_v_in_arr);
      __Pyx_DECREF(((PyObject *)__pyx_v_values));
      __pyx_v_values = ((PyArrayObject *)__pyx_v_in_arr);

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":494
 *     except TypeError:
 *         values = in_arr
 *         for i in range(len(values)):             # <<<<<<<<<<<<<<
 *             ranks[i] = rank_1d_generic(in_arr[i],
 *                                        ties_method=ties_method,
 */
      __pyx_t_13 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
      for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) {
        __pyx_v_i = __pyx_t_12;

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":495
 *         values = in_arr
 *         for i in range(len(values)):
 *             ranks[i] = rank_1d_generic(in_arr[i],             # <<<<<<<<<<<<<<
 *                                        ties_method=ties_method,
 *                                        ascending=ascending)
 */
        __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__rank_1d_generic); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_18 = __Pyx_GetItemInt(__pyx_v_in_arr, __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_18) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(__pyx_t_19);
        PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_18);
        __pyx_t_18 = 0;
        __pyx_t_18 = PyDict_New(); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_18));

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":496
 *         for i in range(len(values)):
 *             ranks[i] = rank_1d_generic(in_arr[i],
 *                                        ties_method=ties_method,             # <<<<<<<<<<<<<<
 *                                        ascending=ascending)
 *         if axis == 0:
 */
        if (PyDict_SetItem(__pyx_t_18, ((PyObject *)__pyx_n_s__ties_method), __pyx_v_ties_method) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":497
 *             ranks[i] = rank_1d_generic(in_arr[i],
 *                                        ties_method=ties_method,
 *                                        ascending=ascending)             # <<<<<<<<<<<<<<
 *         if axis == 0:
 *             return ranks.T
 */
        if (PyDict_SetItem(__pyx_t_18, ((PyObject *)__pyx_n_s__ascending), __pyx_v_ascending) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __pyx_t_20 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_19), ((PyObject *)__pyx_t_18)); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(__pyx_t_20);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_19)); __pyx_t_19 = 0;
        __Pyx_DECREF(((PyObject *)__pyx_t_18)); __pyx_t_18 = 0;

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":495
 *         values = in_arr
 *         for i in range(len(values)):
 *             ranks[i] = rank_1d_generic(in_arr[i],             # <<<<<<<<<<<<<<
 *                                        ties_method=ties_method,
 *                                        ascending=ascending)
 */
        if (__Pyx_SetItemInt(((PyObject *)__pyx_v_ranks), __pyx_v_i, __pyx_t_20, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      }

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":498
 *                                        ties_method=ties_method,
 *                                        ascending=ascending)
 *         if axis == 0:             # <<<<<<<<<<<<<<
 *             return ranks.T
 *         else:
 */
      __pyx_t_20 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
      __Pyx_GOTREF(__pyx_t_20);
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_20); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
      __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
      if (__pyx_t_5) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":499
 *                                        ascending=ascending)
 *         if axis == 0:
 *             return ranks.T             # <<<<<<<<<<<<<<
 *         else:
 *             return ranks
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_20 = PyObject_GetAttr(((PyObject *)__pyx_v_ranks), __pyx_n_s__T); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L10_except_error;}
        __Pyx_GOTREF(__pyx_t_20);
        __pyx_r = __pyx_t_20;
        __pyx_t_20 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L11_except_return;
        goto __pyx_L20;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":501
 *             return ranks.T
 *         else:
 *             return ranks             # <<<<<<<<<<<<<<
 * 
 *     if not ascending:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(((PyObject *)__pyx_v_ranks));
        __pyx_r = ((PyObject *)__pyx_v_ranks);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L11_except_return;
      }
      __pyx_L20:;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L9_exception_handled;
    }
    __pyx_L10_except_error:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L1_error;
    __pyx_L11_except_return:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    goto __pyx_L0;
    __pyx_L9_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    __pyx_L15_try_end:;
  }

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":503
 *             return ranks
 * 
 *     if not ascending:             # <<<<<<<<<<<<<<
 *         _as = _as[:, ::-1]
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_ascending); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_21 = (!__pyx_t_5);
  if (__pyx_t_21) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":504
 * 
 *     if not ascending:
 *         _as = _as[:, ::-1]             # <<<<<<<<<<<<<<
 * 
 *     values = _take_2d_object(values, _as)
 */
    __pyx_t_2 = PyObject_GetItem(__pyx_v__as, ((PyObject *)__pyx_k_tuple_98)); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_v__as);
    __pyx_v__as = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L21;
  }
  __pyx_L21:;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":506
 *         _as = _as[:, ::-1]
 * 
 *     values = _take_2d_object(values, _as)             # <<<<<<<<<<<<<<
 *     argsorted = _as.astype('i8')
 * 
 */
  __pyx_t_2 = __pyx_f_6pandas_8_tseries__take_2d_object(((PyArrayObject *)__pyx_v_values), __pyx_v__as); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      }
    }
    __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_values.diminfo[1].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_values.diminfo[1].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_values));
  __pyx_v_values = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":507
 * 
 *     values = _take_2d_object(values, _as)
 *     argsorted = _as.astype('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_2 = PyObject_GetAttr(__pyx_v__as, __pyx_n_s__astype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_99), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_22 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
    __pyx_t_3 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_3 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer, (PyObject*)__pyx_v_argsorted, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_argsorted.diminfo[0].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_argsorted.diminfo[0].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_argsorted.diminfo[1].strides = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_argsorted.diminfo[1].shape = __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_22 = 0;
  __pyx_v_argsorted = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":509
 *     argsorted = _as.astype('i8')
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         dups = sum_ranks = infs = 0
 *         for j in range(k):
 */
  __pyx_t_13 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_13; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":510
 * 
 *     for i in range(n):
 *         dups = sum_ranks = infs = 0             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             val = values[i, j]
 */
    __pyx_v_dups = 0;
    __pyx_v_sum_ranks = 0;
    __pyx_v_infs = 0;

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":511
 *     for i in range(n):
 *         dups = sum_ranks = infs = 0
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             val = values[i, j]
 *             if val is nan_value:
 */
    __pyx_t_23 = __pyx_v_k;
    for (__pyx_t_24 = 0; __pyx_t_24 < __pyx_t_23; __pyx_t_24+=1) {
      __pyx_v_j = __pyx_t_24;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":512
 *         dups = sum_ranks = infs = 0
 *         for j in range(k):
 *             val = values[i, j]             # <<<<<<<<<<<<<<
 *             if val is nan_value:
 *                 ranks[i, argsorted[i, j]] = nan
 */
      __pyx_t_25 = __pyx_v_i;
      __pyx_t_26 = __pyx_v_j;
      __pyx_t_3 = -1;
      if (__pyx_t_25 < 0) {
        __pyx_t_25 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_25 < 0)) __pyx_t_3 = 0;
      } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0;
      if (__pyx_t_26 < 0) {
        __pyx_t_26 += __pyx_pybuffernd_values.diminfo[1].shape;
        if (unlikely(__pyx_t_26 < 0)) __pyx_t_3 = 1;
      } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1;
      if (unlikely(__pyx_t_3 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_3);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_1 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_values.diminfo[1].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_1);
      __Pyx_XDECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":513
 *         for j in range(k):
 *             val = values[i, j]
 *             if val is nan_value:             # <<<<<<<<<<<<<<
 *                 ranks[i, argsorted[i, j]] = nan
 *                 infs += 1
 */
      __pyx_t_21 = (__pyx_v_val == __pyx_v_nan_value);
      if (__pyx_t_21) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":514
 *             val = values[i, j]
 *             if val is nan_value:
 *                 ranks[i, argsorted[i, j]] = nan             # <<<<<<<<<<<<<<
 *                 infs += 1
 *                 continue
 */
        __pyx_t_27 = __pyx_v_i;
        __pyx_t_28 = __pyx_v_j;
        __pyx_t_3 = -1;
        if (__pyx_t_27 < 0) {
          __pyx_t_27 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
          if (unlikely(__pyx_t_27 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
        if (__pyx_t_28 < 0) {
          __pyx_t_28 += __pyx_pybuffernd_argsorted.diminfo[1].shape;
          if (unlikely(__pyx_t_28 < 0)) __pyx_t_3 = 1;
        } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_29 = __pyx_v_i;
        __pyx_t_30 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_argsorted.diminfo[1].strides));
        __pyx_t_3 = -1;
        if (__pyx_t_29 < 0) {
          __pyx_t_29 += __pyx_pybuffernd_ranks.diminfo[0].shape;
          if (unlikely(__pyx_t_29 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
        if (__pyx_t_30 < 0) {
          __pyx_t_30 += __pyx_pybuffernd_ranks.diminfo[1].shape;
          if (unlikely(__pyx_t_30 < 0)) __pyx_t_3 = 1;
        } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_30, __pyx_pybuffernd_ranks.diminfo[1].strides) = __pyx_v_6pandas_8_tseries_nan;

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":515
 *             if val is nan_value:
 *                 ranks[i, argsorted[i, j]] = nan
 *                 infs += 1             # <<<<<<<<<<<<<<
 *                 continue
 *             sum_ranks += (j - infs) + 1
 */
        __pyx_v_infs = (__pyx_v_infs + 1);

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":516
 *                 ranks[i, argsorted[i, j]] = nan
 *                 infs += 1
 *                 continue             # <<<<<<<<<<<<<<
 *             sum_ranks += (j - infs) + 1
 *             dups += 1
 */
        goto __pyx_L24_continue;
        goto __pyx_L26;
      }
      __pyx_L26:;

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":517
 *                 infs += 1
 *                 continue
 *             sum_ranks += (j - infs) + 1             # <<<<<<<<<<<<<<
 *             dups += 1
 *             if j == k - 1 or are_diff(values[i, j + 1], val):
 */
      __pyx_v_sum_ranks = (__pyx_v_sum_ranks + ((__pyx_v_j - __pyx_v_infs) + 1));

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":518
 *                 continue
 *             sum_ranks += (j - infs) + 1
 *             dups += 1             # <<<<<<<<<<<<<<
 *             if j == k - 1 or are_diff(values[i, j + 1], val):
 *                 if tiebreak == TIEBREAK_AVERAGE:
 */
      __pyx_v_dups = (__pyx_v_dups + 1);

      /* "/home/wesm/code/pandas/pandas/src/stats.pyx":519
 *             sum_ranks += (j - infs) + 1
 *             dups += 1
 *             if j == k - 1 or are_diff(values[i, j + 1], val):             # <<<<<<<<<<<<<<
 *                 if tiebreak == TIEBREAK_AVERAGE:
 *                     for z in range(j - dups + 1, j + 1):
 */
      __pyx_t_21 = (__pyx_v_j == (__pyx_v_k - 1));
      if (!__pyx_t_21) {
        __pyx_t_31 = __pyx_v_i;
        __pyx_t_32 = (__pyx_v_j + 1);
        __pyx_t_3 = -1;
        if (__pyx_t_31 < 0) {
          __pyx_t_31 += __pyx_pybuffernd_values.diminfo[0].shape;
          if (unlikely(__pyx_t_31 < 0)) __pyx_t_3 = 0;
        } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_3 = 0;
        if (__pyx_t_32 < 0) {
          __pyx_t_32 += __pyx_pybuffernd_values.diminfo[1].shape;
          if (unlikely(__pyx_t_32 < 0)) __pyx_t_3 = 1;
        } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_values.diminfo[1].shape)) __pyx_t_3 = 1;
        if (unlikely(__pyx_t_3 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_3);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_1 = *__Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_values.diminfo[0].strides, __pyx_t_32, __pyx_pybuffernd_values.diminfo[1].strides);
        __Pyx_INCREF((PyObject*)__pyx_t_1);
        __pyx_t_2 = __pyx_f_6pandas_8_tseries_are_diff(__pyx_t_1, __pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_33 = __pyx_t_5;
      } else {
        __pyx_t_33 = __pyx_t_21;
      }
      if (__pyx_t_33) {

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":520
 *             dups += 1
 *             if j == k - 1 or are_diff(values[i, j + 1], val):
 *                 if tiebreak == TIEBREAK_AVERAGE:             # <<<<<<<<<<<<<<
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = sum_ranks / dups
 */
        __pyx_t_33 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_AVERAGE);
        if (__pyx_t_33) {

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":521
 *             if j == k - 1 or are_diff(values[i, j + 1], val):
 *                 if tiebreak == TIEBREAK_AVERAGE:
 *                     for z in range(j - dups + 1, j + 1):             # <<<<<<<<<<<<<<
 *                         ranks[i, argsorted[i, z]] = sum_ranks / dups
 *                 elif tiebreak == TIEBREAK_MIN:
 */
          __pyx_t_34 = (__pyx_v_j + 1);
          for (__pyx_t_35 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) {
            __pyx_v_z = __pyx_t_35;

            /* "/home/wesm/code/pandas/pandas/src/stats.pyx":522
 *                 if tiebreak == TIEBREAK_AVERAGE:
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = sum_ranks / dups             # <<<<<<<<<<<<<<
 *                 elif tiebreak == TIEBREAK_MIN:
 *                     for z in range(j - dups + 1, j + 1):
 */
            if (unlikely(__pyx_v_dups == 0)) {
              PyErr_Format(PyExc_ZeroDivisionError, "float division");
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_36 = __pyx_v_i;
            __pyx_t_37 = __pyx_v_z;
            __pyx_t_3 = -1;
            if (__pyx_t_36 < 0) {
              __pyx_t_36 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
              if (unlikely(__pyx_t_36 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_36 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_37 < 0) {
              __pyx_t_37 += __pyx_pybuffernd_argsorted.diminfo[1].shape;
              if (unlikely(__pyx_t_37 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_37 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_38 = __pyx_v_i;
            __pyx_t_39 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_argsorted.diminfo[1].strides));
            __pyx_t_3 = -1;
            if (__pyx_t_38 < 0) {
              __pyx_t_38 += __pyx_pybuffernd_ranks.diminfo[0].shape;
              if (unlikely(__pyx_t_38 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_38 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_39 < 0) {
              __pyx_t_39 += __pyx_pybuffernd_ranks.diminfo[1].shape;
              if (unlikely(__pyx_t_39 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_39 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_sum_ranks / __pyx_v_dups);
          }
          goto __pyx_L28;
        }

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":523
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = sum_ranks / dups
 *                 elif tiebreak == TIEBREAK_MIN:             # <<<<<<<<<<<<<<
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j - dups + 2
 */
        __pyx_t_33 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_MIN);
        if (__pyx_t_33) {

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":524
 *                         ranks[i, argsorted[i, z]] = sum_ranks / dups
 *                 elif tiebreak == TIEBREAK_MIN:
 *                     for z in range(j - dups + 1, j + 1):             # <<<<<<<<<<<<<<
 *                         ranks[i, argsorted[i, z]] = j - dups + 2
 *                 elif tiebreak == TIEBREAK_MAX:
 */
          __pyx_t_34 = (__pyx_v_j + 1);
          for (__pyx_t_35 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) {
            __pyx_v_z = __pyx_t_35;

            /* "/home/wesm/code/pandas/pandas/src/stats.pyx":525
 *                 elif tiebreak == TIEBREAK_MIN:
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j - dups + 2             # <<<<<<<<<<<<<<
 *                 elif tiebreak == TIEBREAK_MAX:
 *                     for z in range(j - dups + 1, j + 1):
 */
            __pyx_t_40 = __pyx_v_i;
            __pyx_t_41 = __pyx_v_z;
            __pyx_t_3 = -1;
            if (__pyx_t_40 < 0) {
              __pyx_t_40 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
              if (unlikely(__pyx_t_40 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_40 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_41 < 0) {
              __pyx_t_41 += __pyx_pybuffernd_argsorted.diminfo[1].shape;
              if (unlikely(__pyx_t_41 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_41 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_42 = __pyx_v_i;
            __pyx_t_43 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_40, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_41, __pyx_pybuffernd_argsorted.diminfo[1].strides));
            __pyx_t_3 = -1;
            if (__pyx_t_42 < 0) {
              __pyx_t_42 += __pyx_pybuffernd_ranks.diminfo[0].shape;
              if (unlikely(__pyx_t_42 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_42 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_43 < 0) {
              __pyx_t_43 += __pyx_pybuffernd_ranks.diminfo[1].shape;
              if (unlikely(__pyx_t_43 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_43 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_42, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_43, __pyx_pybuffernd_ranks.diminfo[1].strides) = ((__pyx_v_j - __pyx_v_dups) + 2);
          }
          goto __pyx_L28;
        }

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":526
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j - dups + 2
 *                 elif tiebreak == TIEBREAK_MAX:             # <<<<<<<<<<<<<<
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j + 1
 */
        __pyx_t_33 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_MAX);
        if (__pyx_t_33) {

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":527
 *                         ranks[i, argsorted[i, z]] = j - dups + 2
 *                 elif tiebreak == TIEBREAK_MAX:
 *                     for z in range(j - dups + 1, j + 1):             # <<<<<<<<<<<<<<
 *                         ranks[i, argsorted[i, z]] = j + 1
 *                 elif tiebreak == TIEBREAK_FIRST:
 */
          __pyx_t_34 = (__pyx_v_j + 1);
          for (__pyx_t_35 = ((__pyx_v_j - __pyx_v_dups) + 1); __pyx_t_35 < __pyx_t_34; __pyx_t_35+=1) {
            __pyx_v_z = __pyx_t_35;

            /* "/home/wesm/code/pandas/pandas/src/stats.pyx":528
 *                 elif tiebreak == TIEBREAK_MAX:
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j + 1             # <<<<<<<<<<<<<<
 *                 elif tiebreak == TIEBREAK_FIRST:
 *                     raise ValueError('first not supported for '
 */
            __pyx_t_44 = __pyx_v_i;
            __pyx_t_45 = __pyx_v_z;
            __pyx_t_3 = -1;
            if (__pyx_t_44 < 0) {
              __pyx_t_44 += __pyx_pybuffernd_argsorted.diminfo[0].shape;
              if (unlikely(__pyx_t_44 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_44 >= __pyx_pybuffernd_argsorted.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_45 < 0) {
              __pyx_t_45 += __pyx_pybuffernd_argsorted.diminfo[1].shape;
              if (unlikely(__pyx_t_45 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_45 >= __pyx_pybuffernd_argsorted.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            __pyx_t_46 = __pyx_v_i;
            __pyx_t_47 = (*__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_argsorted.rcbuffer->pybuffer.buf, __pyx_t_44, __pyx_pybuffernd_argsorted.diminfo[0].strides, __pyx_t_45, __pyx_pybuffernd_argsorted.diminfo[1].strides));
            __pyx_t_3 = -1;
            if (__pyx_t_46 < 0) {
              __pyx_t_46 += __pyx_pybuffernd_ranks.diminfo[0].shape;
              if (unlikely(__pyx_t_46 < 0)) __pyx_t_3 = 0;
            } else if (unlikely(__pyx_t_46 >= __pyx_pybuffernd_ranks.diminfo[0].shape)) __pyx_t_3 = 0;
            if (__pyx_t_47 < 0) {
              __pyx_t_47 += __pyx_pybuffernd_ranks.diminfo[1].shape;
              if (unlikely(__pyx_t_47 < 0)) __pyx_t_3 = 1;
            } else if (unlikely(__pyx_t_47 >= __pyx_pybuffernd_ranks.diminfo[1].shape)) __pyx_t_3 = 1;
            if (unlikely(__pyx_t_3 != -1)) {
              __Pyx_RaiseBufferIndexError(__pyx_t_3);
              {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            }
            *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_ranks.rcbuffer->pybuffer.buf, __pyx_t_46, __pyx_pybuffernd_ranks.diminfo[0].strides, __pyx_t_47, __pyx_pybuffernd_ranks.diminfo[1].strides) = (__pyx_v_j + 1);
          }
          goto __pyx_L28;
        }

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":529
 *                     for z in range(j - dups + 1, j + 1):
 *                         ranks[i, argsorted[i, z]] = j + 1
 *                 elif tiebreak == TIEBREAK_FIRST:             # <<<<<<<<<<<<<<
 *                     raise ValueError('first not supported for '
 *                                      'non-numeric data')
 */
        __pyx_t_33 = (__pyx_v_tiebreak == __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST);
        if (__pyx_t_33) {

          /* "/home/wesm/code/pandas/pandas/src/stats.pyx":530
 *                         ranks[i, argsorted[i, z]] = j + 1
 *                 elif tiebreak == TIEBREAK_FIRST:
 *                     raise ValueError('first not supported for '             # <<<<<<<<<<<<<<
 *                                      'non-numeric data')
 *                 sum_ranks = dups = 0
 */
          __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_100), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          goto __pyx_L28;
        }
        __pyx_L28:;

        /* "/home/wesm/code/pandas/pandas/src/stats.pyx":532
 *                     raise ValueError('first not supported for '
 *                                      'non-numeric data')
 *                 sum_ranks = dups = 0             # <<<<<<<<<<<<<<
 * 
 *     if axis == 0:
 */
        __pyx_v_sum_ranks = 0;
        __pyx_v_dups = 0;
        goto __pyx_L27;
      }
      __pyx_L27:;
      __pyx_L24_continue:;
    }
  }

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":534
 *                 sum_ranks = dups = 0
 * 
 *     if axis == 0:             # <<<<<<<<<<<<<<
 *         return ranks.T
 *     else:
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_axis, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_33 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_33 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_33) {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":535
 * 
 *     if axis == 0:
 *         return ranks.T             # <<<<<<<<<<<<<<
 *     else:
 *         return ranks
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_ranks), __pyx_n_s__T); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L35;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/stats.pyx":537
 *         return ranks.T
 *     else:
 *         return ranks             # <<<<<<<<<<<<<<
 * 
 * # def _take_indexer_2d(ndarray[float64_t, ndim=2] values,
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_ranks));
    __pyx_r = ((PyObject *)__pyx_v_ranks);
    goto __pyx_L0;
  }
  __pyx_L35:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.rank_2d_generic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ranks.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_argsorted.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_ranks);
  __Pyx_XDECREF((PyObject *)__pyx_v_values);
  __Pyx_XDECREF((PyObject *)__pyx_v_argsorted);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_nan_value);
  __Pyx_XDECREF(__pyx_v_mask);
  __Pyx_XDECREF(__pyx_v__as);
  __Pyx_XDECREF(__pyx_v_in_arr);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_14cache_readonly_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_14cache_readonly_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_func = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__func,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  {
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__func);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_func = values[0];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_func = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.cache_readonly.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_14cache_readonly___init__(((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self), __pyx_v_func);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/properties.pyx":8
 *         object fget, name
 * 
 *     def __init__(self, func):             # <<<<<<<<<<<<<<
 *         self.fget = func
 *         self.name = func.__name__
 */

static int __pyx_pf_6pandas_8_tseries_14cache_readonly___init__(struct __pyx_obj_6pandas_8_tseries_cache_readonly *__pyx_v_self, PyObject *__pyx_v_func) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":9
 * 
 *     def __init__(self, func):
 *         self.fget = func             # <<<<<<<<<<<<<<
 *         self.name = func.__name__
 * 
 */
  __Pyx_INCREF(__pyx_v_func);
  __Pyx_GIVEREF(__pyx_v_func);
  __Pyx_GOTREF(__pyx_v_self->fget);
  __Pyx_DECREF(__pyx_v_self->fget);
  __pyx_v_self->fget = __pyx_v_func;

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":10
 *     def __init__(self, func):
 *         self.fget = func
 *         self.name = func.__name__             # <<<<<<<<<<<<<<
 * 
 *     def __get__(self, obj, type):
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_func, __pyx_n_s____name__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_t_1;
  __pyx_t_1 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.cache_readonly.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14cache_readonly_3__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14cache_readonly_3__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_14cache_readonly_2__get__(((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_type));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/properties.pyx":12
 *         self.name = func.__name__
 * 
 *     def __get__(self, obj, type):             # <<<<<<<<<<<<<<
 *         if obj is None:
 *             return self.fget
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14cache_readonly_2__get__(struct __pyx_obj_6pandas_8_tseries_cache_readonly *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type) {
  PyObject *__pyx_v_cache = NULL;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__");

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":13
 * 
 *     def __get__(self, obj, type):
 *         if obj is None:             # <<<<<<<<<<<<<<
 *             return self.fget
 * 
 */
  __pyx_t_1 = (__pyx_v_obj == Py_None);
  if (__pyx_t_1) {

    /* "/home/wesm/code/pandas/pandas/src/properties.pyx":14
 *     def __get__(self, obj, type):
 *         if obj is None:
 *             return self.fget             # <<<<<<<<<<<<<<
 * 
 *         # Get the cache or set a default one if needed
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_self->fget);
    __pyx_r = __pyx_v_self->fget;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":18
 *         # Get the cache or set a default one if needed
 * 
 *         cache = getattr(obj, '_cache', None)             # <<<<<<<<<<<<<<
 *         if cache is None:
 *             cache = obj._cache = {}
 */
  __pyx_t_2 = ((PyObject *)__pyx_n_s___cache);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_3 = Py_None;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_GetAttr3(__pyx_v_obj, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_cache = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":19
 * 
 *         cache = getattr(obj, '_cache', None)
 *         if cache is None:             # <<<<<<<<<<<<<<
 *             cache = obj._cache = {}
 * 
 */
  __pyx_t_1 = (__pyx_v_cache == Py_None);
  if (__pyx_t_1) {

    /* "/home/wesm/code/pandas/pandas/src/properties.pyx":20
 *         cache = getattr(obj, '_cache', None)
 *         if cache is None:
 *             cache = obj._cache = {}             # <<<<<<<<<<<<<<
 * 
 *         if PyDict_Contains(cache, self.name):
 */
    __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    __Pyx_INCREF(((PyObject *)__pyx_t_4));
    __Pyx_DECREF(__pyx_v_cache);
    __pyx_v_cache = ((PyObject *)__pyx_t_4);
    if (PyObject_SetAttr(__pyx_v_obj, __pyx_n_s___cache, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":22
 *             cache = obj._cache = {}
 * 
 *         if PyDict_Contains(cache, self.name):             # <<<<<<<<<<<<<<
 *             # not necessary to Py_INCREF
 *             val = <object> PyDict_GetItem(cache, self.name)
 */
  __pyx_t_4 = __pyx_v_self->name;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_t_5 = PyDict_Contains(__pyx_v_cache, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/properties.pyx":24
 *         if PyDict_Contains(cache, self.name):
 *             # not necessary to Py_INCREF
 *             val = <object> PyDict_GetItem(cache, self.name)             # <<<<<<<<<<<<<<
 *             return val
 *         else:
 */
    __pyx_t_4 = __pyx_v_self->name;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_6 = PyDict_GetItem(__pyx_v_cache, __pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_INCREF(((PyObject *)__pyx_t_6));
    __pyx_v_val = ((PyObject *)__pyx_t_6);

    /* "/home/wesm/code/pandas/pandas/src/properties.pyx":25
 *             # not necessary to Py_INCREF
 *             val = <object> PyDict_GetItem(cache, self.name)
 *             return val             # <<<<<<<<<<<<<<
 *         else:
 *             val = self.fget(obj)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_val);
    __pyx_r = __pyx_v_val;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/properties.pyx":27
 *             return val
 *         else:
 *             val = self.fget(obj)             # <<<<<<<<<<<<<<
 *             PyDict_SetItem(cache, self.name, val)
 *             return val
 */
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_obj);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_obj);
    __Pyx_GIVEREF(__pyx_v_obj);
    __pyx_t_3 = PyObject_Call(__pyx_v_self->fget, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_v_val = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "/home/wesm/code/pandas/pandas/src/properties.pyx":28
 *         else:
 *             val = self.fget(obj)
 *             PyDict_SetItem(cache, self.name, val)             # <<<<<<<<<<<<<<
 *             return val
 * 
 */
    __pyx_t_3 = __pyx_v_self->name;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_5 = PyDict_SetItem(__pyx_v_cache, __pyx_t_3, __pyx_v_val); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "/home/wesm/code/pandas/pandas/src/properties.pyx":29
 *             val = self.fget(obj)
 *             PyDict_SetItem(cache, self.name, val)
 *             return val             # <<<<<<<<<<<<<<
 * 
 * cdef class AxisProperty(object):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_val);
    __pyx_r = __pyx_v_val;
    goto __pyx_L0;
  }
  __pyx_L5:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._tseries.cache_readonly.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cache);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14cache_readonly_4fget_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14cache_readonly_4fget_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_14cache_readonly_4fget___get__(((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/properties.pyx":6
 * 
 *     cdef readonly:
 *         object fget, name             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, func):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14cache_readonly_4fget___get__(struct __pyx_obj_6pandas_8_tseries_cache_readonly *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->fget);
  __pyx_r = __pyx_v_self->fget;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14cache_readonly_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14cache_readonly_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_14cache_readonly_4name___get__(((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6pandas_8_tseries_14cache_readonly_4name___get__(struct __pyx_obj_6pandas_8_tseries_cache_readonly *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_12AxisProperty_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_12AxisProperty_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_axis = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__axis,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_0);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__axis);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_axis = values[0];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_axis = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.AxisProperty.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_12AxisProperty___init__(((struct __pyx_obj_6pandas_8_tseries_AxisProperty *)__pyx_v_self), __pyx_v_axis);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/properties.pyx":35
 *         Py_ssize_t axis
 * 
 *     def __init__(self, axis=0):             # <<<<<<<<<<<<<<
 *         self.axis = axis
 * 
 */

static int __pyx_pf_6pandas_8_tseries_12AxisProperty___init__(struct __pyx_obj_6pandas_8_tseries_AxisProperty *__pyx_v_self, PyObject *__pyx_v_axis) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":36
 * 
 *     def __init__(self, axis=0):
 *         self.axis = axis             # <<<<<<<<<<<<<<
 * 
 *     def __get__(self, obj, type):
 */
  __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_axis); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->axis = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.AxisProperty.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_12AxisProperty_3__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_12AxisProperty_3__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_12AxisProperty_2__get__(((struct __pyx_obj_6pandas_8_tseries_AxisProperty *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_type));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/properties.pyx":38
 *         self.axis = axis
 * 
 *     def __get__(self, obj, type):             # <<<<<<<<<<<<<<
 *         cdef list axes = obj._data.axes
 *         return axes[self.axis]
 */

static PyObject *__pyx_pf_6pandas_8_tseries_12AxisProperty_2__get__(struct __pyx_obj_6pandas_8_tseries_AxisProperty *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type) {
  PyObject *__pyx_v_axes = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__");

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":39
 * 
 *     def __get__(self, obj, type):
 *         cdef list axes = obj._data.axes             # <<<<<<<<<<<<<<
 *         return axes[self.axis]
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s___data); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__axes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_axes = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":40
 *     def __get__(self, obj, type):
 *         cdef list axes = obj._data.axes
 *         return axes[self.axis]             # <<<<<<<<<<<<<<
 * 
 *     def __set__(self, obj, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_axes), __pyx_v_self->axis, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._tseries.AxisProperty.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_axes);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_12AxisProperty_5__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_12AxisProperty_5__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_12AxisProperty_4__set__(((struct __pyx_obj_6pandas_8_tseries_AxisProperty *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/properties.pyx":42
 *         return axes[self.axis]
 * 
 *     def __set__(self, obj, value):             # <<<<<<<<<<<<<<
 *         obj._set_axis(self.axis, value)
 * 
 */

static int __pyx_pf_6pandas_8_tseries_12AxisProperty_4__set__(struct __pyx_obj_6pandas_8_tseries_AxisProperty *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":43
 * 
 *     def __set__(self, obj, value):
 *         obj._set_axis(self.axis, value)             # <<<<<<<<<<<<<<
 * 
 * cdef class SeriesIndex(object):
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s___set_axis); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->axis); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._tseries.AxisProperty.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_11SeriesIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_11SeriesIndex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_6pandas_8_tseries_11SeriesIndex___init__(((struct __pyx_obj_6pandas_8_tseries_SeriesIndex *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/properties.pyx":49
 *         object _check_type
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         from pandas.core.index import _ensure_index
 *         self._check_type = _ensure_index
 */

static int __pyx_pf_6pandas_8_tseries_11SeriesIndex___init__(struct __pyx_obj_6pandas_8_tseries_SeriesIndex *__pyx_v_self) {
  PyObject *__pyx_v__ensure_index = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":50
 * 
 *     def __init__(self):
 *         from pandas.core.index import _ensure_index             # <<<<<<<<<<<<<<
 *         self._check_type = _ensure_index
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s___ensure_index));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s___ensure_index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___ensure_index));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s_101), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s___ensure_index);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s___ensure_index);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v__ensure_index = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":51
 *     def __init__(self):
 *         from pandas.core.index import _ensure_index
 *         self._check_type = _ensure_index             # <<<<<<<<<<<<<<
 * 
 *     def __get__(self, obj, type):
 */
  __Pyx_INCREF(__pyx_v__ensure_index);
  __Pyx_GIVEREF(__pyx_v__ensure_index);
  __Pyx_GOTREF(__pyx_v_self->_check_type);
  __Pyx_DECREF(__pyx_v_self->_check_type);
  __pyx_v_self->_check_type = __pyx_v__ensure_index;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._tseries.SeriesIndex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__ensure_index);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_11SeriesIndex_3__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_11SeriesIndex_3__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_11SeriesIndex_2__get__(((struct __pyx_obj_6pandas_8_tseries_SeriesIndex *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_type));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/properties.pyx":53
 *         self._check_type = _ensure_index
 * 
 *     def __get__(self, obj, type):             # <<<<<<<<<<<<<<
 *         return obj._index
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_11SeriesIndex_2__get__(CYTHON_UNUSED struct __pyx_obj_6pandas_8_tseries_SeriesIndex *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__");

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":54
 * 
 *     def __get__(self, obj, type):
 *         return obj._index             # <<<<<<<<<<<<<<
 * 
 *     def __set__(self, obj, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_s___index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.SeriesIndex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_11SeriesIndex_5__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_11SeriesIndex_5__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_11SeriesIndex_4__set__(((struct __pyx_obj_6pandas_8_tseries_SeriesIndex *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/properties.pyx":56
 *         return obj._index
 * 
 *     def __set__(self, obj, value):             # <<<<<<<<<<<<<<
 *         if len(obj) != len(value):
 *             raise AssertionError('Index length did not match values')
 */

static int __pyx_pf_6pandas_8_tseries_11SeriesIndex_4__set__(struct __pyx_obj_6pandas_8_tseries_SeriesIndex *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":57
 * 
 *     def __set__(self, obj, value):
 *         if len(obj) != len(value):             # <<<<<<<<<<<<<<
 *             raise AssertionError('Index length did not match values')
 *         obj._index = self._check_type(value)
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = (__pyx_t_1 != __pyx_t_2);
  if (__pyx_t_3) {

    /* "/home/wesm/code/pandas/pandas/src/properties.pyx":58
 *     def __set__(self, obj, value):
 *         if len(obj) != len(value):
 *             raise AssertionError('Index length did not match values')             # <<<<<<<<<<<<<<
 *         obj._index = self._check_type(value)
 * 
 */
    __pyx_t_4 = PyObject_Call(__pyx_builtin_AssertionError, ((PyObject *)__pyx_k_tuple_103), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":59
 *         if len(obj) != len(value):
 *             raise AssertionError('Index length did not match values')
 *         obj._index = self._check_type(value)             # <<<<<<<<<<<<<<
 * 
 * cdef class ValuesProperty(object):
 */
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_value);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __pyx_t_5 = PyObject_Call(__pyx_v_self->_check_type, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (PyObject_SetAttr(__pyx_v_obj, __pyx_n_s___index, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._tseries.SeriesIndex.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14ValuesProperty_1__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14ValuesProperty_1__get__(PyObject *__pyx_v_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_type) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_14ValuesProperty___get__(((struct __pyx_obj_6pandas_8_tseries_ValuesProperty *)__pyx_v_self), ((PyObject *)__pyx_v_obj), ((PyObject *)__pyx_v_type));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/properties.pyx":63
 * cdef class ValuesProperty(object):
 * 
 *     def __get__(self, obj, type):             # <<<<<<<<<<<<<<
 *         cdef:
 *             ndarray arr = obj
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14ValuesProperty___get__(CYTHON_UNUSED struct __pyx_obj_6pandas_8_tseries_ValuesProperty *__pyx_v_self, PyObject *__pyx_v_obj, CYTHON_UNUSED PyObject *__pyx_v_type) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_base = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__");

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":65
 *     def __get__(self, obj, type):
 *         cdef:
 *             ndarray arr = obj             # <<<<<<<<<<<<<<
 *             object base
 * 
 */
  if (!(likely(((__pyx_v_obj) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_obj, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_obj);
  __pyx_v_arr = ((PyArrayObject *)__pyx_v_obj);

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":68
 *             object base
 * 
 *         base = np.get_array_base(arr)             # <<<<<<<<<<<<<<
 *         if base is None or not np.PyArray_CheckExact(base):
 *             arr = arr.view(np.ndarray)
 */
  __pyx_t_1 = __pyx_f_5numpy_get_array_base(__pyx_v_arr); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_base = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":69
 * 
 *         base = np.get_array_base(arr)
 *         if base is None or not np.PyArray_CheckExact(base):             # <<<<<<<<<<<<<<
 *             arr = arr.view(np.ndarray)
 *         else:
 */
  __pyx_t_2 = (__pyx_v_base == Py_None);
  if (!__pyx_t_2) {
    __pyx_t_3 = (!PyArray_CheckExact(__pyx_v_base));
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  if (__pyx_t_4) {

    /* "/home/wesm/code/pandas/pandas/src/properties.pyx":70
 *         base = np.get_array_base(arr)
 *         if base is None or not np.PyArray_CheckExact(base):
 *             arr = arr.view(np.ndarray)             # <<<<<<<<<<<<<<
 *         else:
 *             arr = base
 */
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_arr), __pyx_n_s__view); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray)));
    PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray)));
    __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray)));
    __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_arr));
    __pyx_v_arr = ((PyArrayObject *)__pyx_t_6);
    __pyx_t_6 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/properties.pyx":72
 *             arr = arr.view(np.ndarray)
 *         else:
 *             arr = base             # <<<<<<<<<<<<<<
 *         return arr
 */
    if (!(likely(((__pyx_v_base) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_base, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_INCREF(__pyx_v_base);
    __Pyx_DECREF(((PyObject *)__pyx_v_arr));
    __pyx_v_arr = ((PyArrayObject *)__pyx_v_base);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":73
 *         else:
 *             arr = base
 *         return arr             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_arr));
  __pyx_r = ((PyObject *)__pyx_v_arr);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._tseries.ValuesProperty.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_base);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_295infer_dtype(PyObject *__pyx_self, PyObject *__pyx_v__values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_295infer_dtype = {__Pyx_NAMESTR("infer_dtype"), (PyCFunction)__pyx_pw_6pandas_8_tseries_295infer_dtype, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_295infer_dtype(PyObject *__pyx_self, PyObject *__pyx_v__values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("infer_dtype (wrapper)");
  __pyx_self = __pyx_self;
  __pyx_r = __pyx_pf_6pandas_8_tseries_294infer_dtype(__pyx_self, ((PyObject *)__pyx_v__values));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":29
 *     pass
 * 
 * def infer_dtype(object _values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */

static PyObject *__pyx_pf_6pandas_8_tseries_294infer_dtype(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v__values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_val = 0;
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_val_kind = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("infer_dtype");
  __Pyx_INCREF(__pyx_v__values);

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":35
 *         ndarray values
 * 
 *     if isinstance(_values, np.ndarray):             # <<<<<<<<<<<<<<
 *         values = _values
 *     else:
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_5numpy_ndarray));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v__values, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":36
 * 
 *     if isinstance(_values, np.ndarray):
 *         values = _values             # <<<<<<<<<<<<<<
 *     else:
 *         if not isinstance(_values, list):
 */
    if (!(likely(((__pyx_v__values) == Py_None) || likely(__Pyx_TypeTest(__pyx_v__values, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_INCREF(__pyx_v__values);
    __pyx_v_values = ((PyArrayObject *)__pyx_v__values);
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":38
 *         values = _values
 *     else:
 *         if not isinstance(_values, list):             # <<<<<<<<<<<<<<
 *             _values = list(_values)
 *         values = list_to_object_array(_values)
 */
    __pyx_t_1 = ((PyObject *)((PyObject*)(&PyList_Type)));
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_TypeCheck(__pyx_v__values, __pyx_t_1); 
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = (!__pyx_t_2);
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":39
 *     else:
 *         if not isinstance(_values, list):
 *             _values = list(_values)             # <<<<<<<<<<<<<<
 *         values = list_to_object_array(_values)
 * 
 */
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_v__values);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__values);
      __Pyx_GIVEREF(__pyx_v__values);
      __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_v__values);
      __pyx_v__values = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":40
 *         if not isinstance(_values, list):
 *             _values = list(_values)
 *         values = list_to_object_array(_values)             # <<<<<<<<<<<<<<
 * 
 *     n = len(values)
 */
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s_104); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__values);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__values);
    __Pyx_GIVEREF(__pyx_v__values);
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_values = ((PyArrayObject *)__pyx_t_5);
    __pyx_t_5 = 0;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":42
 *         values = list_to_object_array(_values)
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     if n == 0:
 *         return 'empty'
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_6;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":43
 * 
 *     n = len(values)
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return 'empty'
 * 
 */
  __pyx_t_3 = (__pyx_v_n == 0);
  if (__pyx_t_3) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":44
 *     n = len(values)
 *     if n == 0:
 *         return 'empty'             # <<<<<<<<<<<<<<
 * 
 *     val_kind = values.dtype.type
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_n_s__empty));
    __pyx_r = ((PyObject *)__pyx_n_s__empty);
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":46
 *         return 'empty'
 * 
 *     val_kind = values.dtype.type             # <<<<<<<<<<<<<<
 *     if val_kind in _TYPE_MAP:
 *         return _TYPE_MAP[val_kind]
 */
  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_val_kind = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":47
 * 
 *     val_kind = values.dtype.type
 *     if val_kind in _TYPE_MAP:             # <<<<<<<<<<<<<<
 *         return _TYPE_MAP[val_kind]
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = ((PySequence_Contains(__pyx_t_1, __pyx_v_val_kind))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":48
 *     val_kind = values.dtype.type
 *     if val_kind in _TYPE_MAP:
 *         return _TYPE_MAP[val_kind]             # <<<<<<<<<<<<<<
 * 
 *     if values.dtype != np.object_:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PyObject_GetItem(__pyx_t_1, __pyx_v_val_kind); if (!__pyx_t_5) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":50
 *         return _TYPE_MAP[val_kind]
 * 
 *     if values.dtype != np.object_:             # <<<<<<<<<<<<<<
 *         values = values.astype('O')
 * 
 */
  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__object_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_NE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":51
 * 
 *     if values.dtype != np.object_:
 *         values = values.astype('O')             # <<<<<<<<<<<<<<
 * 
 *     val = util.get_value_1d(values, 0)
 */
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__astype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_105), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_v_values));
    __pyx_v_values = ((PyArrayObject *)__pyx_t_4);
    __pyx_t_4 = 0;
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":53
 *         values = values.astype('O')
 * 
 *     val = util.get_value_1d(values, 0)             # <<<<<<<<<<<<<<
 * 
 *     if util.is_integer_object(val):
 */
  __pyx_t_4 = get_value_1d(__pyx_v_values, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_val = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":55
 *     val = util.get_value_1d(values, 0)
 * 
 *     if util.is_integer_object(val):             # <<<<<<<<<<<<<<
 *         if is_integer_array(values):
 *             return 'integer'
 */
  __pyx_t_3 = is_integer_object(__pyx_v_val);
  if (__pyx_t_3) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":56
 * 
 *     if util.is_integer_object(val):
 *         if is_integer_array(values):             # <<<<<<<<<<<<<<
 *             return 'integer'
 *         return 'mixed-integer'
 */
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_integer_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":57
 *     if util.is_integer_object(val):
 *         if is_integer_array(values):
 *             return 'integer'             # <<<<<<<<<<<<<<
 *         return 'mixed-integer'
 *     elif is_datetime(val):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__integer));
      __pyx_r = ((PyObject *)__pyx_n_s__integer);
      goto __pyx_L0;
      goto __pyx_L9;
    }
    __pyx_L9:;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":58
 *         if is_integer_array(values):
 *             return 'integer'
 *         return 'mixed-integer'             # <<<<<<<<<<<<<<
 *     elif is_datetime(val):
 *         if is_datetime_array(values):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_kp_s_106));
    __pyx_r = ((PyObject *)__pyx_kp_s_106);
    goto __pyx_L0;
    goto __pyx_L8;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":59
 *             return 'integer'
 *         return 'mixed-integer'
 *     elif is_datetime(val):             # <<<<<<<<<<<<<<
 *         if is_datetime_array(values):
 *             return 'datetime'
 */
  __pyx_t_3 = __pyx_f_6pandas_8_tseries_is_datetime(__pyx_v_val);
  if (__pyx_t_3) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":60
 *         return 'mixed-integer'
 *     elif is_datetime(val):
 *         if is_datetime_array(values):             # <<<<<<<<<<<<<<
 *             return 'datetime'
 * 
 */
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_datetime_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":61
 *     elif is_datetime(val):
 *         if is_datetime_array(values):
 *             return 'datetime'             # <<<<<<<<<<<<<<
 * 
 *     elif util.is_float_object(val):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
      __pyx_r = ((PyObject *)__pyx_n_s__datetime);
      goto __pyx_L0;
      goto __pyx_L10;
    }
    __pyx_L10:;
    goto __pyx_L8;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":63
 *             return 'datetime'
 * 
 *     elif util.is_float_object(val):             # <<<<<<<<<<<<<<
 *         if is_float_array(values):
 * 
 */
  __pyx_t_3 = is_float_object(__pyx_v_val);
  if (__pyx_t_3) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":64
 * 
 *     elif util.is_float_object(val):
 *         if is_float_array(values):             # <<<<<<<<<<<<<<
 * 
 *             return 'floating'
 */
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_float_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":66
 *         if is_float_array(values):
 * 
 *             return 'floating'             # <<<<<<<<<<<<<<
 * 
 *     elif util.is_bool_object(val):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__floating));
      __pyx_r = ((PyObject *)__pyx_n_s__floating);
      goto __pyx_L0;
      goto __pyx_L11;
    }
    __pyx_L11:;
    goto __pyx_L8;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":68
 *             return 'floating'
 * 
 *     elif util.is_bool_object(val):             # <<<<<<<<<<<<<<
 *         if is_bool_array(values):
 *             return 'boolean'
 */
  __pyx_t_3 = is_bool_object(__pyx_v_val);
  if (__pyx_t_3) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":69
 * 
 *     elif util.is_bool_object(val):
 *         if is_bool_array(values):             # <<<<<<<<<<<<<<
 *             return 'boolean'
 * 
 */
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_bool_array); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":70
 *     elif util.is_bool_object(val):
 *         if is_bool_array(values):
 *             return 'boolean'             # <<<<<<<<<<<<<<
 * 
 *     elif util.is_string_object(val):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__boolean));
      __pyx_r = ((PyObject *)__pyx_n_s__boolean);
      goto __pyx_L0;
      goto __pyx_L12;
    }
    __pyx_L12:;
    goto __pyx_L8;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":72
 *             return 'boolean'
 * 
 *     elif util.is_string_object(val):             # <<<<<<<<<<<<<<
 *         if is_string_array(values):
 *             return 'string'
 */
  __pyx_t_3 = is_string_object(__pyx_v_val);
  if (__pyx_t_3) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":73
 * 
 *     elif util.is_string_object(val):
 *         if is_string_array(values):             # <<<<<<<<<<<<<<
 *             return 'string'
 * 
 */
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__is_string_array); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_values));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
    __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":74
 *     elif util.is_string_object(val):
 *         if is_string_array(values):
 *             return 'string'             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_n_s__string));
      __pyx_r = ((PyObject *)__pyx_n_s__string);
      goto __pyx_L0;
      goto __pyx_L13;
    }
    __pyx_L13:;
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":76
 *             return 'string'
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         val = util.get_value_1d(values, i)
 *         if util.is_integer_object(val):
 */
  __pyx_t_6 = __pyx_v_n;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":77
 * 
 *     for i in range(n):
 *         val = util.get_value_1d(values, i)             # <<<<<<<<<<<<<<
 *         if util.is_integer_object(val):
 *             return 'mixed-integer'
 */
    __pyx_t_5 = get_value_1d(__pyx_v_values, __pyx_v_i); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":78
 *     for i in range(n):
 *         val = util.get_value_1d(values, i)
 *         if util.is_integer_object(val):             # <<<<<<<<<<<<<<
 *             return 'mixed-integer'
 * 
 */
    __pyx_t_3 = is_integer_object(__pyx_v_val);
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":79
 *         val = util.get_value_1d(values, i)
 *         if util.is_integer_object(val):
 *             return 'mixed-integer'             # <<<<<<<<<<<<<<
 * 
 *     return 'mixed'
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_106));
      __pyx_r = ((PyObject *)__pyx_kp_s_106);
      goto __pyx_L0;
      goto __pyx_L16;
    }
    __pyx_L16:;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":81
 *             return 'mixed-integer'
 * 
 *     return 'mixed'             # <<<<<<<<<<<<<<
 * 
 * def infer_dtype_list(list values):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mixed));
  __pyx_r = ((PyObject *)__pyx_n_s__mixed);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pandas._tseries.infer_dtype", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF((PyObject *)__pyx_v_values);
  __Pyx_XDECREF(__pyx_v_val_kind);
  __Pyx_XDECREF(__pyx_v__values);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_297infer_dtype_list(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_297infer_dtype_list = {__Pyx_NAMESTR("infer_dtype_list"), (PyCFunction)__pyx_pw_6pandas_8_tseries_297infer_dtype_list, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_297infer_dtype_list(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("infer_dtype_list (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyList_Type), 1, "values", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_296infer_dtype_list(__pyx_self, ((PyObject*)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":83
 *     return 'mixed'
 * 
 * def infer_dtype_list(list values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_296infer_dtype_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_values) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_n;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("infer_dtype_list");

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":85
 * def infer_dtype_list(list values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_values) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_values)); 
  __pyx_v_n = __pyx_t_1;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.infer_dtype_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":88
 *     pass
 * 
 * cdef inline bint is_datetime(object o):             # <<<<<<<<<<<<<<
 *     return PyDateTime_Check(o)
 * 
 */

static CYTHON_INLINE int __pyx_f_6pandas_8_tseries_is_datetime(PyObject *__pyx_v_o) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_datetime");

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":89
 * 
 * cdef inline bint is_datetime(object o):
 *     return PyDateTime_Check(o)             # <<<<<<<<<<<<<<
 * 
 * def is_bool_array(ndarray values):
 */
  __pyx_r = PyDateTime_Check(__pyx_v_o);
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_299is_bool_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_299is_bool_array = {__Pyx_NAMESTR("is_bool_array"), (PyCFunction)__pyx_pw_6pandas_8_tseries_299is_bool_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_299is_bool_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_bool_array (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_298is_bool_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":91
 *     return PyDateTime_Check(o)
 * 
 * def is_bool_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_298is_bool_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_objbuf = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf;
  __Pyx_Buffer __pyx_pybuffer_objbuf;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_bool_array");
  __pyx_pybuffer_objbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_objbuf.refcount = 0;
  __pyx_pybuffernd_objbuf.data = NULL;
  __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":93
 * def is_bool_array(ndarray values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[object] objbuf
 *         object obj
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":97
 *         object obj
 * 
 *     if issubclass(values.dtype.type, np.bool_):             # <<<<<<<<<<<<<<
 *         return True
 *     elif values.dtype == np.object_:
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":98
 * 
 *     if issubclass(values.dtype.type, np.bool_):
 *         return True             # <<<<<<<<<<<<<<
 *     elif values.dtype == np.object_:
 *         objbuf = values
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":99
 *     if issubclass(values.dtype.type, np.bool_):
 *         return True
 *     elif values.dtype == np.object_:             # <<<<<<<<<<<<<<
 *         objbuf = values
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":100
 *         return True
 *     elif values.dtype == np.object_:
 *         objbuf = values             # <<<<<<<<<<<<<<
 * 
 *         if n == 0:
 */
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_6 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":102
 *         objbuf = values
 * 
 *         if n == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_5 = (__pyx_v_n == 0);
    if (__pyx_t_5) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":103
 * 
 *         if n == 0:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":105
 *             return False
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if not util.is_bool_object(objbuf[i]):
 *                 return False
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":106
 * 
 *         for i in range(n):
 *             if not util.is_bool_object(objbuf[i]):             # <<<<<<<<<<<<<<
 *                 return False
 *         return True
 */
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_6 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_objbuf.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_objbuf.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __pyx_t_5 = (!is_bool_object(__pyx_t_3));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_5) {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":107
 *         for i in range(n):
 *             if not util.is_bool_object(objbuf[i]):
 *                 return False             # <<<<<<<<<<<<<<
 *         return True
 *     else:
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;
        goto __pyx_L7;
      }
      __pyx_L7:;
    }

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":108
 *             if not util.is_bool_object(objbuf[i]):
 *                 return False
 *         return True             # <<<<<<<<<<<<<<
 *     else:
 *         return False
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":110
 *         return True
 *     else:
 *         return False             # <<<<<<<<<<<<<<
 * 
 * def is_integer(object o):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_bool_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_objbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_301is_integer(PyObject *__pyx_self, PyObject *__pyx_v_o); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_301is_integer = {__Pyx_NAMESTR("is_integer"), (PyCFunction)__pyx_pw_6pandas_8_tseries_301is_integer, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_301is_integer(PyObject *__pyx_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_integer (wrapper)");
  __pyx_self = __pyx_self;
  __pyx_r = __pyx_pf_6pandas_8_tseries_300is_integer(__pyx_self, ((PyObject *)__pyx_v_o));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":112
 *         return False
 * 
 * def is_integer(object o):             # <<<<<<<<<<<<<<
 *     return util.is_integer_object(o)
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_300is_integer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_integer");

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":113
 * 
 * def is_integer(object o):
 *     return util.is_integer_object(o)             # <<<<<<<<<<<<<<
 * 
 * def is_integer_array(ndarray values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(is_integer_object(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.is_integer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_303is_integer_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_303is_integer_array = {__Pyx_NAMESTR("is_integer_array"), (PyCFunction)__pyx_pw_6pandas_8_tseries_303is_integer_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_303is_integer_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_integer_array (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_302is_integer_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":115
 *     return util.is_integer_object(o)
 * 
 * def is_integer_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_302is_integer_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_objbuf = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf;
  __Pyx_Buffer __pyx_pybuffer_objbuf;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_integer_array");
  __pyx_pybuffer_objbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_objbuf.refcount = 0;
  __pyx_pybuffernd_objbuf.data = NULL;
  __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":117
 * def is_integer_array(ndarray values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[object] objbuf
 *         object obj
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":121
 *         object obj
 * 
 *     if issubclass(values.dtype.type, np.integer):             # <<<<<<<<<<<<<<
 *         return True
 *     elif values.dtype == np.object_:
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__integer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":122
 * 
 *     if issubclass(values.dtype.type, np.integer):
 *         return True             # <<<<<<<<<<<<<<
 *     elif values.dtype == np.object_:
 *         objbuf = values
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":123
 *     if issubclass(values.dtype.type, np.integer):
 *         return True
 *     elif values.dtype == np.object_:             # <<<<<<<<<<<<<<
 *         objbuf = values
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":124
 *         return True
 *     elif values.dtype == np.object_:
 *         objbuf = values             # <<<<<<<<<<<<<<
 * 
 *         if n == 0:
 */
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_6 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":126
 *         objbuf = values
 * 
 *         if n == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_5 = (__pyx_v_n == 0);
    if (__pyx_t_5) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":127
 * 
 *         if n == 0:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":129
 *             return False
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if not util.is_integer_object(objbuf[i]):
 *                 return False
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":130
 * 
 *         for i in range(n):
 *             if not util.is_integer_object(objbuf[i]):             # <<<<<<<<<<<<<<
 *                 return False
 *         return True
 */
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_6 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_objbuf.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_objbuf.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __pyx_t_5 = (!is_integer_object(__pyx_t_3));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_5) {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":131
 *         for i in range(n):
 *             if not util.is_integer_object(objbuf[i]):
 *                 return False             # <<<<<<<<<<<<<<
 *         return True
 *     else:
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;
        goto __pyx_L7;
      }
      __pyx_L7:;
    }

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":132
 *             if not util.is_integer_object(objbuf[i]):
 *                 return False
 *         return True             # <<<<<<<<<<<<<<
 *     else:
 *         return False
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":134
 *         return True
 *     else:
 *         return False             # <<<<<<<<<<<<<<
 * 
 * def is_float_array(ndarray values):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_integer_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_objbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_305is_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_305is_float_array = {__Pyx_NAMESTR("is_float_array"), (PyCFunction)__pyx_pw_6pandas_8_tseries_305is_float_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_305is_float_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_float_array (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_304is_float_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":136
 *         return False
 * 
 * def is_float_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_304is_float_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_objbuf = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf;
  __Pyx_Buffer __pyx_pybuffer_objbuf;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_float_array");
  __pyx_pybuffer_objbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_objbuf.refcount = 0;
  __pyx_pybuffernd_objbuf.data = NULL;
  __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":138
 * def is_float_array(ndarray values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[object] objbuf
 *         object obj
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":142
 *         object obj
 * 
 *     if issubclass(values.dtype.type, np.floating):             # <<<<<<<<<<<<<<
 *         return True
 *     elif values.dtype == np.object_:
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__floating); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":143
 * 
 *     if issubclass(values.dtype.type, np.floating):
 *         return True             # <<<<<<<<<<<<<<
 *     elif values.dtype == np.object_:
 *         objbuf = values
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":144
 *     if issubclass(values.dtype.type, np.floating):
 *         return True
 *     elif values.dtype == np.object_:             # <<<<<<<<<<<<<<
 *         objbuf = values
 * 
 */
  __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":145
 *         return True
 *     elif values.dtype == np.object_:
 *         objbuf = values             # <<<<<<<<<<<<<<
 * 
 *         if n == 0:
 */
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
      __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_6 < 0)) {
        PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        }
      }
      __pyx_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":147
 *         objbuf = values
 * 
 *         if n == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_5 = (__pyx_v_n == 0);
    if (__pyx_t_5) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":148
 * 
 *         if n == 0:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":150
 *             return False
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if not util.is_float_object(objbuf[i]):
 *                 return False
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_1; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":151
 * 
 *         for i in range(n):
 *             if not util.is_float_object(objbuf[i]):             # <<<<<<<<<<<<<<
 *                 return False
 *         return True
 */
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_6 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_objbuf.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_6 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_6 = 0;
      if (unlikely(__pyx_t_6 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_6);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_objbuf.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __pyx_t_5 = (!is_float_object(__pyx_t_3));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_5) {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":152
 *         for i in range(n):
 *             if not util.is_float_object(objbuf[i]):
 *                 return False             # <<<<<<<<<<<<<<
 *         return True
 *     else:
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;
        goto __pyx_L7;
      }
      __pyx_L7:;
    }

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":153
 *             if not util.is_float_object(objbuf[i]):
 *                 return False
 *         return True             # <<<<<<<<<<<<<<
 *     else:
 *         return False
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":155
 *         return True
 *     else:
 *         return False             # <<<<<<<<<<<<<<
 * 
 * def is_string_array(ndarray values):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_float_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_objbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_307is_string_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_307is_string_array = {__Pyx_NAMESTR("is_string_array"), (PyCFunction)__pyx_pw_6pandas_8_tseries_307is_string_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_307is_string_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_string_array (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_306is_string_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":157
 *         return False
 * 
 * def is_string_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_306is_string_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_objbuf = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_objbuf;
  __Pyx_Buffer __pyx_pybuffer_objbuf;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_string_array");
  __pyx_pybuffer_objbuf.pybuffer.buf = NULL;
  __pyx_pybuffer_objbuf.refcount = 0;
  __pyx_pybuffernd_objbuf.data = NULL;
  __pyx_pybuffernd_objbuf.rcbuffer = &__pyx_pybuffer_objbuf;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":159
 * def is_string_array(ndarray values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         ndarray[object] objbuf
 *         object obj
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":163
 *         object obj
 * 
 *     if issubclass(values.dtype.type, (np.string_, np.unicode_)):             # <<<<<<<<<<<<<<
 *         return True
 *     elif values.dtype == np.object_:
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__string_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__unicode_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = PyObject_IsSubclass(__pyx_t_3, ((PyObject *)__pyx_t_2)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (__pyx_t_6) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":164
 * 
 *     if issubclass(values.dtype.type, (np.string_, np.unicode_)):
 *         return True             # <<<<<<<<<<<<<<
 *     elif values.dtype == np.object_:
 *         objbuf = values
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":165
 *     if issubclass(values.dtype.type, (np.string_, np.unicode_)):
 *         return True
 *     elif values.dtype == np.object_:             # <<<<<<<<<<<<<<
 *         objbuf = values
 * 
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_values), __pyx_n_s__dtype); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__object_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":166
 *         return True
 *     elif values.dtype == np.object_:
 *         objbuf = values             # <<<<<<<<<<<<<<
 * 
 *         if n == 0:
 */
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_values), &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_7 < 0)) {
        PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer, (PyObject*)__pyx_v_objbuf, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
        }
      }
      __pyx_pybuffernd_objbuf.diminfo[0].strides = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objbuf.diminfo[0].shape = __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_values));
    __pyx_v_objbuf = ((PyArrayObject *)__pyx_v_values);

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":168
 *         objbuf = values
 * 
 *         if n == 0:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __pyx_t_6 = (__pyx_v_n == 0);
    if (__pyx_t_6) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":169
 * 
 *         if n == 0:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":171
 *             return False
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             if not util.is_string_object(objbuf[i]):
 *                 return False
 */
    __pyx_t_1 = __pyx_v_n;
    for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
      __pyx_v_i = __pyx_t_11;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":172
 * 
 *         for i in range(n):
 *             if not util.is_string_object(objbuf[i]):             # <<<<<<<<<<<<<<
 *                 return False
 *         return True
 */
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_12 < 0) {
        __pyx_t_12 += __pyx_pybuffernd_objbuf.diminfo[0].shape;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_objbuf.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objbuf.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_objbuf.diminfo[0].strides);
      __Pyx_INCREF((PyObject*)__pyx_t_3);
      __pyx_t_6 = (!is_string_object(__pyx_t_3));
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":173
 *         for i in range(n):
 *             if not util.is_string_object(objbuf[i]):
 *                 return False             # <<<<<<<<<<<<<<
 *         return True
 *     else:
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;
        goto __pyx_L7;
      }
      __pyx_L7:;
    }

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":174
 *             if not util.is_string_object(objbuf[i]):
 *                 return False
 *         return True             # <<<<<<<<<<<<<<
 *     else:
 *         return False
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":176
 *         return True
 *     else:
 *         return False             # <<<<<<<<<<<<<<
 * 
 * def is_datetime_array(ndarray[object] values):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_string_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objbuf.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_objbuf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_309is_datetime_array(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_309is_datetime_array = {__Pyx_NAMESTR("is_datetime_array"), (PyCFunction)__pyx_pw_6pandas_8_tseries_309is_datetime_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_309is_datetime_array(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_datetime_array (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_308is_datetime_array(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":178
 *         return False
 * 
 * def is_datetime_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_308is_datetime_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  int __pyx_v_i;
  int __pyx_v_n;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_datetime_array");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":179
 * 
 * def is_datetime_array(ndarray[object] values):
 *     cdef int i, n = len(values)             # <<<<<<<<<<<<<<
 *     if n == 0:
 *         return False
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":180
 * def is_datetime_array(ndarray[object] values):
 *     cdef int i, n = len(values)
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         return False
 *     for i in range(n):
 */
  __pyx_t_2 = (__pyx_v_n == 0);
  if (__pyx_t_2) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":181
 *     cdef int i, n = len(values)
 *     if n == 0:
 *         return False             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         if not is_datetime(values[i]):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":182
 *     if n == 0:
 *         return False
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         if not is_datetime(values[i]):
 *             return False
 */
  __pyx_t_4 = __pyx_v_n;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":183
 *         return False
 *     for i in range(n):
 *         if not is_datetime(values[i]):             # <<<<<<<<<<<<<<
 *             return False
 *     return True
 */
    __pyx_t_6 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_6 < 0) {
      __pyx_t_6 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_6 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_6 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_6, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __pyx_t_2 = (!__pyx_f_6pandas_8_tseries_is_datetime(__pyx_t_3));
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":184
 *     for i in range(n):
 *         if not is_datetime(values[i]):
 *             return False             # <<<<<<<<<<<<<<
 *     return True
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
      goto __pyx_L6;
    }
    __pyx_L6:;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":185
 *         if not is_datetime(values[i]):
 *             return False
 *     return True             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.is_datetime_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_311maybe_convert_numeric(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_310maybe_convert_numeric[] = "\n    Type inference function-- convert strings to numeric (potentially) and\n    convert to proper dtype array\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_311maybe_convert_numeric = {__Pyx_NAMESTR("maybe_convert_numeric"), (PyCFunction)__pyx_pw_6pandas_8_tseries_311maybe_convert_numeric, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_310maybe_convert_numeric)};
static PyObject *__pyx_pw_6pandas_8_tseries_311maybe_convert_numeric(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_na_values = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__na_values,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("maybe_convert_numeric (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_values);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("maybe_convert_numeric", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maybe_convert_numeric") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_na_values = ((PyObject*)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_na_values = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("maybe_convert_numeric", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.maybe_convert_numeric", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_na_values), (&PySet_Type), 1, "na_values", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_310maybe_convert_numeric(__pyx_self, __pyx_v_values, __pyx_v_na_values);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":188
 * 
 * 
 * def maybe_convert_numeric(ndarray[object] values, set na_values):             # <<<<<<<<<<<<<<
 *     '''
 *     Type inference function-- convert strings to numeric (potentially) and
 */

static PyObject *__pyx_pf_6pandas_8_tseries_310maybe_convert_numeric(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_na_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_floats = 0;
  PyArrayObject *__pyx_v_ints = 0;
  int __pyx_v_seen_float;
  PyObject *__pyx_v_val = 0;
  __pyx_t_5numpy_float64_t __pyx_v_fval;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ints;
  __Pyx_Buffer __pyx_pybuffer_ints;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_floats;
  __Pyx_Buffer __pyx_pybuffer_floats;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  __pyx_t_5numpy_float64_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("maybe_convert_numeric");
  __pyx_pybuffer_floats.pybuffer.buf = NULL;
  __pyx_pybuffer_floats.refcount = 0;
  __pyx_pybuffernd_floats.data = NULL;
  __pyx_pybuffernd_floats.rcbuffer = &__pyx_pybuffer_floats;
  __pyx_pybuffer_ints.pybuffer.buf = NULL;
  __pyx_pybuffer_ints.refcount = 0;
  __pyx_pybuffernd_ints.data = NULL;
  __pyx_pybuffernd_ints.rcbuffer = &__pyx_pybuffer_ints;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":197
 *         ndarray[float64_t] floats
 *         ndarray[int64_t] ints
 *         bint seen_float = 0             # <<<<<<<<<<<<<<
 *         object val
 *         float64_t fval
 */
  __pyx_v_seen_float = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":201
 *         float64_t fval
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 * 
 *     floats = np.empty(n, dtype='f8')
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":203
 *     n = len(values)
 * 
 *     floats = np.empty(n, dtype='f8')             # <<<<<<<<<<<<<<
 *     ints = np.empty(n, dtype='i8')
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_floats.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_floats.rcbuffer->pybuffer, (PyObject*)__pyx_v_floats, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_floats.diminfo[0].strides = __pyx_pybuffernd_floats.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_floats.diminfo[0].shape = __pyx_pybuffernd_floats.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_floats = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":204
 * 
 *     floats = np.empty(n, dtype='f8')
 *     ints = np.empty(n, dtype='i8')             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ints.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ints.rcbuffer->pybuffer, (PyObject*)__pyx_v_ints, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_ints.diminfo[0].strides = __pyx_pybuffernd_ints.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ints.diminfo[0].shape = __pyx_pybuffernd_ints.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_ints = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":206
 *     ints = np.empty(n, dtype='i8')
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         val = values[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":207
 * 
 *     for i from 0 <= i < n:
 *         val = values[i]             # <<<<<<<<<<<<<<
 * 
 *         if util.is_float_object(val):
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":209
 *         val = values[i]
 * 
 *         if util.is_float_object(val):             # <<<<<<<<<<<<<<
 *             floats[i] = val
 *             seen_float = 1
 */
    __pyx_t_13 = is_float_object(__pyx_v_val);
    if (__pyx_t_13) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":210
 * 
 *         if util.is_float_object(val):
 *             floats[i] = val             # <<<<<<<<<<<<<<
 *             seen_float = 1
 *         elif val in na_values:
 */
      __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_14 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_14;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":211
 *         if util.is_float_object(val):
 *             floats[i] = val
 *             seen_float = 1             # <<<<<<<<<<<<<<
 *         elif val in na_values:
 *             floats[i] = nan
 */
      __pyx_v_seen_float = 1;
      goto __pyx_L5;
    }

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":212
 *             floats[i] = val
 *             seen_float = 1
 *         elif val in na_values:             # <<<<<<<<<<<<<<
 *             floats[i] = nan
 *             seen_float = 1
 */
    __pyx_t_13 = ((PySequence_Contains(((PyObject *)__pyx_v_na_values), __pyx_v_val))); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_13) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":213
 *             seen_float = 1
 *         elif val in na_values:
 *             floats[i] = nan             # <<<<<<<<<<<<<<
 *             seen_float = 1
 *         elif val is None:
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_nan;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":214
 *         elif val in na_values:
 *             floats[i] = nan
 *             seen_float = 1             # <<<<<<<<<<<<<<
 *         elif val is None:
 *             floats[i] = nan
 */
      __pyx_v_seen_float = 1;
      goto __pyx_L5;
    }

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":215
 *             floats[i] = nan
 *             seen_float = 1
 *         elif val is None:             # <<<<<<<<<<<<<<
 *             floats[i] = nan
 *             seen_float = 1
 */
    __pyx_t_13 = (__pyx_v_val == Py_None);
    if (__pyx_t_13) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":216
 *             seen_float = 1
 *         elif val is None:
 *             floats[i] = nan             # <<<<<<<<<<<<<<
 *             seen_float = 1
 *         elif len(val) == 0:
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_nan;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":217
 *         elif val is None:
 *             floats[i] = nan
 *             seen_float = 1             # <<<<<<<<<<<<<<
 *         elif len(val) == 0:
 *             floats[i] = nan
 */
      __pyx_v_seen_float = 1;
      goto __pyx_L5;
    }

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":218
 *             floats[i] = nan
 *             seen_float = 1
 *         elif len(val) == 0:             # <<<<<<<<<<<<<<
 *             floats[i] = nan
 *             seen_float = 1
 */
    __pyx_t_18 = PyObject_Length(__pyx_v_val); if (unlikely(__pyx_t_18 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_13 = (__pyx_t_18 == 0);
    if (__pyx_t_13) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":219
 *             seen_float = 1
 *         elif len(val) == 0:
 *             floats[i] = nan             # <<<<<<<<<<<<<<
 *             seen_float = 1
 *         else:
 */
      __pyx_t_18 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_6pandas_8_tseries_nan;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":220
 *         elif len(val) == 0:
 *             floats[i] = nan
 *             seen_float = 1             # <<<<<<<<<<<<<<
 *         else:
 *             fval = util.floatify(val)
 */
      __pyx_v_seen_float = 1;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":222
 *             seen_float = 1
 *         else:
 *             fval = util.floatify(val)             # <<<<<<<<<<<<<<
 *             floats[i] = fval
 *             if not seen_float:
 */
      __pyx_t_3 = floatify(__pyx_v_val); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_14 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_fval = __pyx_t_14;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":223
 *         else:
 *             fval = util.floatify(val)
 *             floats[i] = fval             # <<<<<<<<<<<<<<
 *             if not seen_float:
 *                 if '.' in val:
 */
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_fval;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":224
 *             fval = util.floatify(val)
 *             floats[i] = fval
 *             if not seen_float:             # <<<<<<<<<<<<<<
 *                 if '.' in val:
 *                     seen_float = 1
 */
      __pyx_t_13 = (!__pyx_v_seen_float);
      if (__pyx_t_13) {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":225
 *             floats[i] = fval
 *             if not seen_float:
 *                 if '.' in val:             # <<<<<<<<<<<<<<
 *                     seen_float = 1
 *                 else:
 */
        __pyx_t_13 = ((PySequence_Contains(__pyx_v_val, ((PyObject *)__pyx_kp_s_107)))); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        if (__pyx_t_13) {

          /* "/home/wesm/code/pandas/pandas/src/inference.pyx":226
 *             if not seen_float:
 *                 if '.' in val:
 *                     seen_float = 1             # <<<<<<<<<<<<<<
 *                 else:
 *                     ints[i] = <int64_t> fval
 */
          __pyx_v_seen_float = 1;
          goto __pyx_L7;
        }
        /*else*/ {

          /* "/home/wesm/code/pandas/pandas/src/inference.pyx":228
 *                     seen_float = 1
 *                 else:
 *                     ints[i] = <int64_t> fval             # <<<<<<<<<<<<<<
 * 
 *     if seen_float:
 */
          __pyx_t_20 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_20 < 0) {
            __pyx_t_20 += __pyx_pybuffernd_ints.diminfo[0].shape;
            if (unlikely(__pyx_t_20 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_ints.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ints.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_ints.diminfo[0].strides) = ((__pyx_t_5numpy_int64_t)__pyx_v_fval);
        }
        __pyx_L7:;
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":230
 *                     ints[i] = <int64_t> fval
 * 
 *     if seen_float:             # <<<<<<<<<<<<<<
 *         return floats
 *     else:
 */
  if (__pyx_v_seen_float) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":231
 * 
 *     if seen_float:
 *         return floats             # <<<<<<<<<<<<<<
 *     else:
 *         return ints
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_floats));
    __pyx_r = ((PyObject *)__pyx_v_floats);
    goto __pyx_L0;
    goto __pyx_L8;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":233
 *         return floats
 *     else:
 *         return ints             # <<<<<<<<<<<<<<
 * 
 * def maybe_convert_objects(ndarray[object] objects, bint try_float=0,
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_ints));
    __pyx_r = ((PyObject *)__pyx_v_ints);
    goto __pyx_L0;
  }
  __pyx_L8:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.maybe_convert_numeric", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_floats);
  __Pyx_XDECREF((PyObject *)__pyx_v_ints);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_313maybe_convert_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_312maybe_convert_objects[] = "\n    Type inference function-- convert object array to proper dtype\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_313maybe_convert_objects = {__Pyx_NAMESTR("maybe_convert_objects"), (PyCFunction)__pyx_pw_6pandas_8_tseries_313maybe_convert_objects, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_312maybe_convert_objects)};
static PyObject *__pyx_pw_6pandas_8_tseries_313maybe_convert_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_objects = 0;
  int __pyx_v_try_float;
  int __pyx_v_safe;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__objects,&__pyx_n_s__try_float,&__pyx_n_s__safe,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("maybe_convert_objects (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__objects);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__try_float);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__safe);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "maybe_convert_objects") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_objects = ((PyArrayObject *)values[0]);
      if (values[1]) {
        __pyx_v_try_float = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_try_float == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      } else {
        __pyx_v_try_float = ((int)0);
      }
      if (values[2]) {
        __pyx_v_safe = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_safe == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      } else {
        __pyx_v_safe = ((int)0);
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_objects = ((PyArrayObject *)values[0]);
    if (values[1]) {
      __pyx_v_try_float = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_try_float == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_try_float = ((int)0);
    }
    if (values[2]) {
      __pyx_v_safe = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_safe == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_safe = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("maybe_convert_objects", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.maybe_convert_objects", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_objects), __pyx_ptype_5numpy_ndarray, 1, "objects", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_312maybe_convert_objects(__pyx_self, __pyx_v_objects, __pyx_v_try_float, __pyx_v_safe);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":235
 *         return ints
 * 
 * def maybe_convert_objects(ndarray[object] objects, bint try_float=0,             # <<<<<<<<<<<<<<
 *                           bint safe=0):
 *     '''
 */

static PyObject *__pyx_pf_6pandas_8_tseries_312maybe_convert_objects(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_objects, int __pyx_v_try_float, int __pyx_v_safe) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_floats = 0;
  PyArrayObject *__pyx_v_ints = 0;
  PyArrayObject *__pyx_v_bools = 0;
  int __pyx_v_seen_float;
  int __pyx_v_seen_int;
  int __pyx_v_seen_bool;
  int __pyx_v_seen_object;
  int __pyx_v_seen_null;
  PyObject *__pyx_v_val = 0;
  CYTHON_UNUSED PyObject *__pyx_v_onan = 0;
  __pyx_t_5numpy_float64_t __pyx_v_fnan;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_bools;
  __Pyx_Buffer __pyx_pybuffer_bools;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_objects;
  __Pyx_Buffer __pyx_pybuffer_objects;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_ints;
  __Pyx_Buffer __pyx_pybuffer_ints;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_floats;
  __Pyx_Buffer __pyx_pybuffer_floats;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyArrayObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyArrayObject *__pyx_t_13 = NULL;
  __pyx_t_5numpy_float64_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  int __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  __pyx_t_5numpy_uint8_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  __pyx_t_5numpy_int64_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  int __pyx_t_24;
  double __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  int __pyx_t_27;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("maybe_convert_objects");
  __pyx_pybuffer_floats.pybuffer.buf = NULL;
  __pyx_pybuffer_floats.refcount = 0;
  __pyx_pybuffernd_floats.data = NULL;
  __pyx_pybuffernd_floats.rcbuffer = &__pyx_pybuffer_floats;
  __pyx_pybuffer_ints.pybuffer.buf = NULL;
  __pyx_pybuffer_ints.refcount = 0;
  __pyx_pybuffernd_ints.data = NULL;
  __pyx_pybuffernd_ints.rcbuffer = &__pyx_pybuffer_ints;
  __pyx_pybuffer_bools.pybuffer.buf = NULL;
  __pyx_pybuffer_bools.refcount = 0;
  __pyx_pybuffernd_bools.data = NULL;
  __pyx_pybuffernd_bools.rcbuffer = &__pyx_pybuffer_bools;
  __pyx_pybuffer_objects.pybuffer.buf = NULL;
  __pyx_pybuffer_objects.refcount = 0;
  __pyx_pybuffernd_objects.data = NULL;
  __pyx_pybuffernd_objects.rcbuffer = &__pyx_pybuffer_objects;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_objects.rcbuffer->pybuffer, (PyObject*)__pyx_v_objects, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_objects.diminfo[0].strides = __pyx_pybuffernd_objects.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_objects.diminfo[0].shape = __pyx_pybuffernd_objects.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":245
 *         ndarray[int64_t] ints
 *         ndarray[uint8_t] bools
 *         bint seen_float = 0             # <<<<<<<<<<<<<<
 *         bint seen_int = 0
 *         bint seen_bool = 0
 */
  __pyx_v_seen_float = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":246
 *         ndarray[uint8_t] bools
 *         bint seen_float = 0
 *         bint seen_int = 0             # <<<<<<<<<<<<<<
 *         bint seen_bool = 0
 *         bint seen_object = 0
 */
  __pyx_v_seen_int = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":247
 *         bint seen_float = 0
 *         bint seen_int = 0
 *         bint seen_bool = 0             # <<<<<<<<<<<<<<
 *         bint seen_object = 0
 *         bint seen_null = 0
 */
  __pyx_v_seen_bool = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":248
 *         bint seen_int = 0
 *         bint seen_bool = 0
 *         bint seen_object = 0             # <<<<<<<<<<<<<<
 *         bint seen_null = 0
 *         object val, onan
 */
  __pyx_v_seen_object = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":249
 *         bint seen_bool = 0
 *         bint seen_object = 0
 *         bint seen_null = 0             # <<<<<<<<<<<<<<
 *         object val, onan
 *         float64_t fval, fnan
 */
  __pyx_v_seen_null = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":253
 *         float64_t fval, fnan
 * 
 *     n = len(objects)             # <<<<<<<<<<<<<<
 * 
 *     floats = np.empty(n, dtype='f8')
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_objects)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":255
 *     n = len(objects)
 * 
 *     floats = np.empty(n, dtype='f8')             # <<<<<<<<<<<<<<
 *     ints = np.empty(n, dtype='i8')
 *     bools = np.empty(n, dtype=np.uint8)
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_floats.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_floats.rcbuffer->pybuffer, (PyObject*)__pyx_v_floats, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_floats.diminfo[0].strides = __pyx_pybuffernd_floats.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_floats.diminfo[0].shape = __pyx_pybuffernd_floats.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_floats = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":256
 * 
 *     floats = np.empty(n, dtype='f8')
 *     ints = np.empty(n, dtype='i8')             # <<<<<<<<<<<<<<
 *     bools = np.empty(n, dtype=np.uint8)
 * 
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_11 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ints.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ints.rcbuffer->pybuffer, (PyObject*)__pyx_v_ints, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_ints.diminfo[0].strides = __pyx_pybuffernd_ints.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ints.diminfo[0].shape = __pyx_pybuffernd_ints.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_11 = 0;
  __pyx_v_ints = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":257
 *     floats = np.empty(n, dtype='f8')
 *     ints = np.empty(n, dtype='i8')
 *     bools = np.empty(n, dtype=np.uint8)             # <<<<<<<<<<<<<<
 * 
 *     onan = np.nan
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_12 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__uint8); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_12) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_12, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_13 = ((PyArrayObject *)__pyx_t_12);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bools.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bools.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bools.rcbuffer->pybuffer, (PyObject*)__pyx_v_bools, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_bools.diminfo[0].strides = __pyx_pybuffernd_bools.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bools.diminfo[0].shape = __pyx_pybuffernd_bools.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_13 = 0;
  __pyx_v_bools = ((PyArrayObject *)__pyx_t_12);
  __pyx_t_12 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":259
 *     bools = np.empty(n, dtype=np.uint8)
 * 
 *     onan = np.nan             # <<<<<<<<<<<<<<
 *     fnan = np.nan
 * 
 */
  __pyx_t_12 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_v_onan = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":260
 * 
 *     onan = np.nan
 *     fnan = np.nan             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_12 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__nan); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_14 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_v_fnan = __pyx_t_14;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":262
 *     fnan = np.nan
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         val = objects[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":263
 * 
 *     for i from 0 <= i < n:
 *         val = objects[i]             # <<<<<<<<<<<<<<
 * 
 *         if val is None:
 */
    __pyx_t_15 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_15 < 0) {
      __pyx_t_15 += __pyx_pybuffernd_objects.diminfo[0].shape;
      if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_objects.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_12 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_objects.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_objects.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_12);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_12;
    __pyx_t_12 = 0;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":265
 *         val = objects[i]
 * 
 *         if val is None:             # <<<<<<<<<<<<<<
 *             seen_null = 1
 *             floats[i] = fnan
 */
    __pyx_t_16 = (__pyx_v_val == Py_None);
    if (__pyx_t_16) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":266
 * 
 *         if val is None:
 *             seen_null = 1             # <<<<<<<<<<<<<<
 *             floats[i] = fnan
 *         elif util.is_bool_object(val):
 */
      __pyx_v_seen_null = 1;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":267
 *         if val is None:
 *             seen_null = 1
 *             floats[i] = fnan             # <<<<<<<<<<<<<<
 *         elif util.is_bool_object(val):
 *             seen_bool = 1
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_v_fnan;
      goto __pyx_L5;
    }

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":268
 *             seen_null = 1
 *             floats[i] = fnan
 *         elif util.is_bool_object(val):             # <<<<<<<<<<<<<<
 *             seen_bool = 1
 *             bools[i] = val
 */
    __pyx_t_16 = is_bool_object(__pyx_v_val);
    if (__pyx_t_16) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":269
 *             floats[i] = fnan
 *         elif util.is_bool_object(val):
 *             seen_bool = 1             # <<<<<<<<<<<<<<
 *             bools[i] = val
 *         elif util.is_integer_object(val):
 */
      __pyx_v_seen_bool = 1;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":270
 *         elif util.is_bool_object(val):
 *             seen_bool = 1
 *             bools[i] = val             # <<<<<<<<<<<<<<
 *         elif util.is_integer_object(val):
 *             seen_int = 1
 */
      __pyx_t_18 = __Pyx_PyInt_from_py_npy_uint8(__pyx_v_val); if (unlikely((__pyx_t_18 == (npy_uint8)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_bools.diminfo[0].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_bools.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_bools.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_bools.diminfo[0].strides) = __pyx_t_18;
      goto __pyx_L5;
    }

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":271
 *             seen_bool = 1
 *             bools[i] = val
 *         elif util.is_integer_object(val):             # <<<<<<<<<<<<<<
 *             seen_int = 1
 *             floats[i] = <float64_t> val
 */
    __pyx_t_16 = is_integer_object(__pyx_v_val);
    if (__pyx_t_16) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":272
 *             bools[i] = val
 *         elif util.is_integer_object(val):
 *             seen_int = 1             # <<<<<<<<<<<<<<
 *             floats[i] = <float64_t> val
 *             if not seen_null:
 */
      __pyx_v_seen_int = 1;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":273
 *         elif util.is_integer_object(val):
 *             seen_int = 1
 *             floats[i] = <float64_t> val             # <<<<<<<<<<<<<<
 *             if not seen_null:
 *                 ints[i] = val
 */
      __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_14 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_20 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_floats.diminfo[0].strides) = ((__pyx_t_5numpy_float64_t)__pyx_t_14);

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":274
 *             seen_int = 1
 *             floats[i] = <float64_t> val
 *             if not seen_null:             # <<<<<<<<<<<<<<
 *                 ints[i] = val
 *         elif util.is_float_object(val):
 */
      __pyx_t_16 = (!__pyx_v_seen_null);
      if (__pyx_t_16) {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":275
 *             floats[i] = <float64_t> val
 *             if not seen_null:
 *                 ints[i] = val             # <<<<<<<<<<<<<<
 *         elif util.is_float_object(val):
 *             floats[i] = val
 */
        __pyx_t_21 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_val); if (unlikely((__pyx_t_21 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_22 = __pyx_v_i;
        __pyx_t_7 = -1;
        if (__pyx_t_22 < 0) {
          __pyx_t_22 += __pyx_pybuffernd_ints.diminfo[0].shape;
          if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_ints.diminfo[0].shape)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[1]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_ints.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_ints.diminfo[0].strides) = __pyx_t_21;
        goto __pyx_L6;
      }
      __pyx_L6:;
      goto __pyx_L5;
    }

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":276
 *             if not seen_null:
 *                 ints[i] = val
 *         elif util.is_float_object(val):             # <<<<<<<<<<<<<<
 *             floats[i] = val
 *             seen_float = 1
 */
    __pyx_t_16 = is_float_object(__pyx_v_val);
    if (__pyx_t_16) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":277
 *                 ints[i] = val
 *         elif util.is_float_object(val):
 *             floats[i] = val             # <<<<<<<<<<<<<<
 *             seen_float = 1
 *         elif try_float and not util.is_string_object(val):
 */
      __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_v_val); if (unlikely((__pyx_t_14 == (npy_float64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_23 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_23 < 0) {
        __pyx_t_23 += __pyx_pybuffernd_floats.diminfo[0].shape;
        if (unlikely(__pyx_t_23 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_14;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":278
 *         elif util.is_float_object(val):
 *             floats[i] = val
 *             seen_float = 1             # <<<<<<<<<<<<<<
 *         elif try_float and not util.is_string_object(val):
 *             # this will convert Decimal objects
 */
      __pyx_v_seen_float = 1;
      goto __pyx_L5;
    }

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":279
 *             floats[i] = val
 *             seen_float = 1
 *         elif try_float and not util.is_string_object(val):             # <<<<<<<<<<<<<<
 *             # this will convert Decimal objects
 *             try:
 */
    if (__pyx_v_try_float) {
      __pyx_t_16 = (!is_string_object(__pyx_v_val));
      __pyx_t_24 = __pyx_t_16;
    } else {
      __pyx_t_24 = __pyx_v_try_float;
    }
    if (__pyx_t_24) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":281
 *         elif try_float and not util.is_string_object(val):
 *             # this will convert Decimal objects
 *             try:             # <<<<<<<<<<<<<<
 *                 floats[i] = float(val)
 *                 seen_float = 1
 */
      {
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_8);
        /*try:*/ {

          /* "/home/wesm/code/pandas/pandas/src/inference.pyx":282
 *             # this will convert Decimal objects
 *             try:
 *                 floats[i] = float(val)             # <<<<<<<<<<<<<<
 *                 seen_float = 1
 *             except Exception:
 */
          __pyx_t_25 = __Pyx_PyObject_AsDouble(__pyx_v_val); if (unlikely(__pyx_t_25 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          __pyx_t_26 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_26 < 0) {
            __pyx_t_26 += __pyx_pybuffernd_floats.diminfo[0].shape;
            if (unlikely(__pyx_t_26 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_floats.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_floats.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_floats.diminfo[0].strides) = __pyx_t_25;

          /* "/home/wesm/code/pandas/pandas/src/inference.pyx":283
 *             try:
 *                 floats[i] = float(val)
 *                 seen_float = 1             # <<<<<<<<<<<<<<
 *             except Exception:
 *                 seen_object = 1
 */
          __pyx_v_seen_float = 1;
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L14_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":284
 *                 floats[i] = float(val)
 *                 seen_float = 1
 *             except Exception:             # <<<<<<<<<<<<<<
 *                 seen_object = 1
 *         else:
 */
        __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
        if (__pyx_t_7) {
          __Pyx_AddTraceback("pandas._tseries.maybe_convert_objects", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_3, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_GOTREF(__pyx_t_4);

          /* "/home/wesm/code/pandas/pandas/src/inference.pyx":285
 *                 seen_float = 1
 *             except Exception:
 *                 seen_object = 1             # <<<<<<<<<<<<<<
 *         else:
 *             seen_object = 1
 */
          __pyx_v_seen_object = 1;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
        __pyx_L14_try_end:;
      }
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":287
 *                 seen_object = 1
 *         else:
 *             seen_object = 1             # <<<<<<<<<<<<<<
 * 
 *     if not safe:
 */
      __pyx_v_seen_object = 1;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":289
 *             seen_object = 1
 * 
 *     if not safe:             # <<<<<<<<<<<<<<
 *         if seen_null:
 *             if (seen_float or seen_int) and not seen_object:
 */
  __pyx_t_24 = (!__pyx_v_safe);
  if (__pyx_t_24) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":290
 * 
 *     if not safe:
 *         if seen_null:             # <<<<<<<<<<<<<<
 *             if (seen_float or seen_int) and not seen_object:
 *                 return floats
 */
    if (__pyx_v_seen_null) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":291
 *     if not safe:
 *         if seen_null:
 *             if (seen_float or seen_int) and not seen_object:             # <<<<<<<<<<<<<<
 *                 return floats
 *             else:
 */
      if (!__pyx_v_seen_float) {
        __pyx_t_24 = __pyx_v_seen_int;
      } else {
        __pyx_t_24 = __pyx_v_seen_float;
      }
      if (__pyx_t_24) {
        __pyx_t_16 = (!__pyx_v_seen_object);
        __pyx_t_27 = __pyx_t_16;
      } else {
        __pyx_t_27 = __pyx_t_24;
      }
      if (__pyx_t_27) {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":292
 *         if seen_null:
 *             if (seen_float or seen_int) and not seen_object:
 *                 return floats             # <<<<<<<<<<<<<<
 *             else:
 *                 return objects
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(((PyObject *)__pyx_v_floats));
        __pyx_r = ((PyObject *)__pyx_v_floats);
        goto __pyx_L0;
        goto __pyx_L19;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":294
 *                 return floats
 *             else:
 *                 return objects             # <<<<<<<<<<<<<<
 *         else:
 *             if seen_object:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(((PyObject *)__pyx_v_objects));
        __pyx_r = ((PyObject *)__pyx_v_objects);
        goto __pyx_L0;
      }
      __pyx_L19:;
      goto __pyx_L18;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":296
 *                 return objects
 *         else:
 *             if seen_object:             # <<<<<<<<<<<<<<
 *                 return objects
 *             elif not seen_bool:
 */
      if (__pyx_v_seen_object) {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":297
 *         else:
 *             if seen_object:
 *                 return objects             # <<<<<<<<<<<<<<
 *             elif not seen_bool:
 *                 if seen_float:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(((PyObject *)__pyx_v_objects));
        __pyx_r = ((PyObject *)__pyx_v_objects);
        goto __pyx_L0;
        goto __pyx_L20;
      }

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":298
 *             if seen_object:
 *                 return objects
 *             elif not seen_bool:             # <<<<<<<<<<<<<<
 *                 if seen_float:
 *                     return floats
 */
      __pyx_t_27 = (!__pyx_v_seen_bool);
      if (__pyx_t_27) {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":299
 *                 return objects
 *             elif not seen_bool:
 *                 if seen_float:             # <<<<<<<<<<<<<<
 *                     return floats
 *                 elif seen_int:
 */
        if (__pyx_v_seen_float) {

          /* "/home/wesm/code/pandas/pandas/src/inference.pyx":300
 *             elif not seen_bool:
 *                 if seen_float:
 *                     return floats             # <<<<<<<<<<<<<<
 *                 elif seen_int:
 *                     return ints
 */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(((PyObject *)__pyx_v_floats));
          __pyx_r = ((PyObject *)__pyx_v_floats);
          goto __pyx_L0;
          goto __pyx_L21;
        }

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":301
 *                 if seen_float:
 *                     return floats
 *                 elif seen_int:             # <<<<<<<<<<<<<<
 *                     return ints
 *             else:
 */
        if (__pyx_v_seen_int) {

          /* "/home/wesm/code/pandas/pandas/src/inference.pyx":302
 *                     return floats
 *                 elif seen_int:
 *                     return ints             # <<<<<<<<<<<<<<
 *             else:
 *                 if not seen_float and not seen_int:
 */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(((PyObject *)__pyx_v_ints));
          __pyx_r = ((PyObject *)__pyx_v_ints);
          goto __pyx_L0;
          goto __pyx_L21;
        }
        __pyx_L21:;
        goto __pyx_L20;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":304
 *                     return ints
 *             else:
 *                 if not seen_float and not seen_int:             # <<<<<<<<<<<<<<
 *                     return bools.view(np.bool_)
 * 
 */
        __pyx_t_27 = (!__pyx_v_seen_float);
        if (__pyx_t_27) {
          __pyx_t_24 = (!__pyx_v_seen_int);
          __pyx_t_16 = __pyx_t_24;
        } else {
          __pyx_t_16 = __pyx_t_27;
        }
        if (__pyx_t_16) {

          /* "/home/wesm/code/pandas/pandas/src/inference.pyx":305
 *             else:
 *                 if not seen_float and not seen_int:
 *                     return bools.view(np.bool_)             # <<<<<<<<<<<<<<
 * 
 *             return objects
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_bools), __pyx_n_s__view); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_12 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__bool_); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_12);
          __Pyx_GIVEREF(__pyx_t_12);
          __pyx_t_12 = 0;
          __pyx_t_12 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
          __pyx_r = __pyx_t_12;
          __pyx_t_12 = 0;
          goto __pyx_L0;
          goto __pyx_L22;
        }
        __pyx_L22:;
      }
      __pyx_L20:;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":307
 *                     return bools.view(np.bool_)
 * 
 *             return objects             # <<<<<<<<<<<<<<
 *     else:
 *         # don't cast int to float, etc.
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_objects));
      __pyx_r = ((PyObject *)__pyx_v_objects);
      goto __pyx_L0;
    }
    __pyx_L18:;
    goto __pyx_L17;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":310
 *     else:
 *         # don't cast int to float, etc.
 *         if seen_null:             # <<<<<<<<<<<<<<
 *             if (seen_float or seen_int) and not seen_object:
 *                 return floats
 */
    if (__pyx_v_seen_null) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":311
 *         # don't cast int to float, etc.
 *         if seen_null:
 *             if (seen_float or seen_int) and not seen_object:             # <<<<<<<<<<<<<<
 *                 return floats
 *             else:
 */
      if (!__pyx_v_seen_float) {
        __pyx_t_16 = __pyx_v_seen_int;
      } else {
        __pyx_t_16 = __pyx_v_seen_float;
      }
      if (__pyx_t_16) {
        __pyx_t_27 = (!__pyx_v_seen_object);
        __pyx_t_24 = __pyx_t_27;
      } else {
        __pyx_t_24 = __pyx_t_16;
      }
      if (__pyx_t_24) {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":312
 *         if seen_null:
 *             if (seen_float or seen_int) and not seen_object:
 *                 return floats             # <<<<<<<<<<<<<<
 *             else:
 *                 return objects
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(((PyObject *)__pyx_v_floats));
        __pyx_r = ((PyObject *)__pyx_v_floats);
        goto __pyx_L0;
        goto __pyx_L24;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":314
 *                 return floats
 *             else:
 *                 return objects             # <<<<<<<<<<<<<<
 *         else:
 *             if seen_object:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(((PyObject *)__pyx_v_objects));
        __pyx_r = ((PyObject *)__pyx_v_objects);
        goto __pyx_L0;
      }
      __pyx_L24:;
      goto __pyx_L23;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":316
 *                 return objects
 *         else:
 *             if seen_object:             # <<<<<<<<<<<<<<
 *                 return objects
 *             elif not seen_bool:
 */
      if (__pyx_v_seen_object) {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":317
 *         else:
 *             if seen_object:
 *                 return objects             # <<<<<<<<<<<<<<
 *             elif not seen_bool:
 *                 if seen_int and seen_float:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(((PyObject *)__pyx_v_objects));
        __pyx_r = ((PyObject *)__pyx_v_objects);
        goto __pyx_L0;
        goto __pyx_L25;
      }

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":318
 *             if seen_object:
 *                 return objects
 *             elif not seen_bool:             # <<<<<<<<<<<<<<
 *                 if seen_int and seen_float:
 *                     return objects
 */
      __pyx_t_24 = (!__pyx_v_seen_bool);
      if (__pyx_t_24) {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":319
 *                 return objects
 *             elif not seen_bool:
 *                 if seen_int and seen_float:             # <<<<<<<<<<<<<<
 *                     return objects
 *                 elif seen_float:
 */
        if (__pyx_v_seen_int) {
          __pyx_t_24 = __pyx_v_seen_float;
        } else {
          __pyx_t_24 = __pyx_v_seen_int;
        }
        if (__pyx_t_24) {

          /* "/home/wesm/code/pandas/pandas/src/inference.pyx":320
 *             elif not seen_bool:
 *                 if seen_int and seen_float:
 *                     return objects             # <<<<<<<<<<<<<<
 *                 elif seen_float:
 *                     return floats
 */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(((PyObject *)__pyx_v_objects));
          __pyx_r = ((PyObject *)__pyx_v_objects);
          goto __pyx_L0;
          goto __pyx_L26;
        }

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":321
 *                 if seen_int and seen_float:
 *                     return objects
 *                 elif seen_float:             # <<<<<<<<<<<<<<
 *                     return floats
 *                 elif seen_int:
 */
        if (__pyx_v_seen_float) {

          /* "/home/wesm/code/pandas/pandas/src/inference.pyx":322
 *                     return objects
 *                 elif seen_float:
 *                     return floats             # <<<<<<<<<<<<<<
 *                 elif seen_int:
 *                     return ints
 */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(((PyObject *)__pyx_v_floats));
          __pyx_r = ((PyObject *)__pyx_v_floats);
          goto __pyx_L0;
          goto __pyx_L26;
        }

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":323
 *                 elif seen_float:
 *                     return floats
 *                 elif seen_int:             # <<<<<<<<<<<<<<
 *                     return ints
 *             else:
 */
        if (__pyx_v_seen_int) {

          /* "/home/wesm/code/pandas/pandas/src/inference.pyx":324
 *                     return floats
 *                 elif seen_int:
 *                     return ints             # <<<<<<<<<<<<<<
 *             else:
 *                 if not seen_float and not seen_int:
 */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(((PyObject *)__pyx_v_ints));
          __pyx_r = ((PyObject *)__pyx_v_ints);
          goto __pyx_L0;
          goto __pyx_L26;
        }
        __pyx_L26:;
        goto __pyx_L25;
      }
      /*else*/ {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":326
 *                     return ints
 *             else:
 *                 if not seen_float and not seen_int:             # <<<<<<<<<<<<<<
 *                     return bools.view(np.bool_)
 * 
 */
        __pyx_t_24 = (!__pyx_v_seen_float);
        if (__pyx_t_24) {
          __pyx_t_16 = (!__pyx_v_seen_int);
          __pyx_t_27 = __pyx_t_16;
        } else {
          __pyx_t_27 = __pyx_t_24;
        }
        if (__pyx_t_27) {

          /* "/home/wesm/code/pandas/pandas/src/inference.pyx":327
 *             else:
 *                 if not seen_float and not seen_int:
 *                     return bools.view(np.bool_)             # <<<<<<<<<<<<<<
 * 
 *             return objects
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_12 = PyObject_GetAttr(((PyObject *)__pyx_v_bools), __pyx_n_s__view); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_4 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_4 = PyObject_Call(__pyx_t_12, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
          __pyx_r = __pyx_t_4;
          __pyx_t_4 = 0;
          goto __pyx_L0;
          goto __pyx_L27;
        }
        __pyx_L27:;
      }
      __pyx_L25:;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":329
 *                     return bools.view(np.bool_)
 * 
 *             return objects             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_objects));
      __pyx_r = ((PyObject *)__pyx_v_objects);
      goto __pyx_L0;
    }
    __pyx_L23:;
  }
  __pyx_L17:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_12);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bools.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objects.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.maybe_convert_objects", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bools.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_objects.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_ints.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_floats.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_floats);
  __Pyx_XDECREF((PyObject *)__pyx_v_ints);
  __Pyx_XDECREF((PyObject *)__pyx_v_bools);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_onan);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_315convert_sql_column(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_315convert_sql_column = {__Pyx_NAMESTR("convert_sql_column"), (PyCFunction)__pyx_pw_6pandas_8_tseries_315convert_sql_column, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_315convert_sql_column(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("convert_sql_column (wrapper)");
  __pyx_self = __pyx_self;
  __pyx_r = __pyx_pf_6pandas_8_tseries_314convert_sql_column(__pyx_self, ((PyObject *)__pyx_v_x));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":332
 * 
 * 
 * def convert_sql_column(x):             # <<<<<<<<<<<<<<
 *     return maybe_convert_objects(x, try_float=1)
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_314convert_sql_column(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_sql_column");

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":333
 * 
 * def convert_sql_column(x):
 *     return maybe_convert_objects(x, try_float=1)             # <<<<<<<<<<<<<<
 * 
 * def try_parse_dates(ndarray[object] values, parser=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_x);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_x);
  __Pyx_GIVEREF(__pyx_v_x);
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__try_float), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._tseries.convert_sql_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_317try_parse_dates(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_317try_parse_dates = {__Pyx_NAMESTR("try_parse_dates"), (PyCFunction)__pyx_pw_6pandas_8_tseries_317try_parse_dates, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_317try_parse_dates(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_parser = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__parser,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("try_parse_dates (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":335
 *     return maybe_convert_objects(x, try_float=1)
 * 
 * def try_parse_dates(ndarray[object] values, parser=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parser);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "try_parse_dates") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_parser = values[1];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_parser = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("try_parse_dates", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_316try_parse_dates(__pyx_self, __pyx_v_values, __pyx_v_parser);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_15try_parse_dates_1parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_15try_parse_dates_1parse_date = {__Pyx_NAMESTR("parse_date"), (PyCFunction)__pyx_pw_6pandas_8_tseries_15try_parse_dates_1parse_date, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_15try_parse_dates_1parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("parse_date (wrapper)");
  __pyx_self = __pyx_self;
  __pyx_r = __pyx_pf_6pandas_8_tseries_15try_parse_dates_parse_date(__pyx_self, ((PyObject *)__pyx_v_s));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":350
 *             parse_date = parser.parse
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):             # <<<<<<<<<<<<<<
 *                 try:
 *                     return datetime.strptime(s, '%m/%d/%Y')
 */

static PyObject *__pyx_pf_6pandas_8_tseries_15try_parse_dates_parse_date(PyObject *__pyx_self, PyObject *__pyx_v_s) {
  struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates *__pyx_cur_scope;
  struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("parse_date");
  __pyx_outer_scope = (struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":351
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):
 *                 try:             # <<<<<<<<<<<<<<
 *                     return datetime.strptime(s, '%m/%d/%Y')
 *                 except Exception:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":352
 *             def parse_date(s):
 *                 try:
 *                     return datetime.strptime(s, '%m/%d/%Y')             # <<<<<<<<<<<<<<
 *                 except Exception:
 *                     return s
 */
      __Pyx_XDECREF(__pyx_r);
      if (unlikely(!__pyx_cur_scope->__pyx_v_datetime)) { __Pyx_RaiseClosureNameError("datetime"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L3_error;} }
      __pyx_t_4 = PyObject_GetAttr(__pyx_cur_scope->__pyx_v_datetime, __pyx_n_s__strptime); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_s);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_s);
      __Pyx_GIVEREF(__pyx_v_s);
      __Pyx_INCREF(((PyObject *)__pyx_kp_s_108));
      PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_kp_s_108));
      __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_108));
      __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L7_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":353
 *                 try:
 *                     return datetime.strptime(s, '%m/%d/%Y')
 *                 except Exception:             # <<<<<<<<<<<<<<
 *                     return s
 *         # EAFP here
 */
    __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("pandas._tseries.try_parse_dates.parse_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":354
 *                     return datetime.strptime(s, '%m/%d/%Y')
 *                 except Exception:
 *                     return s             # <<<<<<<<<<<<<<
 *         # EAFP here
 *         try:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_s);
      __pyx_r = __pyx_v_s;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_except_return;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pandas._tseries.try_parse_dates.parse_date", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":335
 *     return maybe_convert_objects(x, try_float=1)
 * 
 * def try_parse_dates(ndarray[object] values, parser=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */

static PyObject *__pyx_pf_6pandas_8_tseries_316try_parse_dates(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_parser) {
  struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates *__pyx_cur_scope;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_parse_date = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  PyObject **__pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("try_parse_dates");
  __pyx_cur_scope = (struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates *)__pyx_ptype_6pandas_8_tseries___pyx_scope_struct__try_parse_dates->tp_new(__pyx_ptype_6pandas_8_tseries___pyx_scope_struct__try_parse_dates, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __Pyx_INCREF(__pyx_v_parser);
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":340
 *         ndarray[object] result
 * 
 *     from datetime import datetime             # <<<<<<<<<<<<<<
 * 
 *     n = len(values)
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__datetime);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__datetime);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_datetime = __pyx_t_1;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":342
 *     from datetime import datetime
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype='O')
 * 
 */
  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_3;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":343
 * 
 *     n = len(values)
 *     result = np.empty(n, dtype='O')             # <<<<<<<<<<<<<<
 * 
 *     if parser is None:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":345
 *     result = np.empty(n, dtype='O')
 * 
 *     if parser is None:             # <<<<<<<<<<<<<<
 *         try:
 *             from dateutil import parser
 */
  __pyx_t_11 = (__pyx_v_parser == Py_None);
  if (__pyx_t_11) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":346
 * 
 *     if parser is None:
 *         try:             # <<<<<<<<<<<<<<
 *             from dateutil import parser
 *             parse_date = parser.parse
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_8);
      /*try:*/ {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":347
 *     if parser is None:
 *         try:
 *             from dateutil import parser             # <<<<<<<<<<<<<<
 *             parse_date = parser.parse
 *         except ImportError: # pragma: no cover
 */
        __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(((PyObject *)__pyx_n_s__parser));
        PyList_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_n_s__parser));
        __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parser));
        __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__dateutil), ((PyObject *)__pyx_t_5), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
        __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__parser);
        if (__pyx_t_5 == NULL) {
          if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__parser);
          if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        }
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_v_parser);
        __pyx_v_parser = __pyx_t_5;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":348
 *         try:
 *             from dateutil import parser
 *             parse_date = parser.parse             # <<<<<<<<<<<<<<
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):
 */
        __pyx_t_2 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_s__parse); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_v_parse_date = __pyx_t_2;
        __pyx_t_2 = 0;
      }
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L11_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":349
 *             from dateutil import parser
 *             parse_date = parser.parse
 *         except ImportError: # pragma: no cover             # <<<<<<<<<<<<<<
 *             def parse_date(s):
 *                 try:
 */
      __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_ImportError);
      if (__pyx_t_7) {
        __Pyx_AddTraceback("pandas._tseries.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_4);

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":350
 *             parse_date = parser.parse
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):             # <<<<<<<<<<<<<<
 *                 try:
 *                     return datetime.strptime(s, '%m/%d/%Y')
 */
        __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_15try_parse_dates_1parse_date, 0, ((PyObject*)__pyx_cur_scope), __pyx_n_s_112, ((PyObject *)__pyx_k_codeobj_110)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF(__pyx_v_parse_date);
        __pyx_v_parse_date = __pyx_t_1;
        __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L5_exception_handled;
      }
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      goto __pyx_L1_error;
      __pyx_L5_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      __pyx_L11_try_end:;
    }

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":356
 *                     return s
 *         # EAFP here
 *         try:             # <<<<<<<<<<<<<<
 *             for i from 0 <= i < n:
 *                 result[i] = parse_date(values[i])
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      /*try:*/ {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":357
 *         # EAFP here
 *         try:
 *             for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *                 result[i] = parse_date(values[i])
 *         except Exception:
 */
        __pyx_t_3 = __pyx_v_n;
        for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {

          /* "/home/wesm/code/pandas/pandas/src/inference.pyx":358
 *         try:
 *             for i from 0 <= i < n:
 *                 result[i] = parse_date(values[i])             # <<<<<<<<<<<<<<
 *         except Exception:
 *             # failed
 */
          __pyx_t_12 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_12 < 0) {
            __pyx_t_12 += __pyx_pybuffernd_values.diminfo[0].shape;
            if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
          }
          __pyx_t_4 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_values.diminfo[0].strides);
          __Pyx_INCREF((PyObject*)__pyx_t_4);
          __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
          __Pyx_GOTREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
          __Pyx_GIVEREF(__pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_4 = PyObject_Call(__pyx_v_parse_date, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
          __pyx_t_13 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_13 < 0) {
            __pyx_t_13 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
          }
          __pyx_t_14 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides);
          __Pyx_GOTREF(*__pyx_t_14);
          __Pyx_DECREF(*__pyx_t_14); __Pyx_INCREF(__pyx_t_4);
          *__pyx_t_14 = __pyx_t_4;
          __Pyx_GIVEREF(*__pyx_t_14);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
      }
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L21_try_end;
      __pyx_L14_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":359
 *             for i from 0 <= i < n:
 *                 result[i] = parse_date(values[i])
 *         except Exception:             # <<<<<<<<<<<<<<
 *             # failed
 *             return values
 */
      __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
      if (__pyx_t_7) {
        __Pyx_AddTraceback("pandas._tseries.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_2);

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":361
 *         except Exception:
 *             # failed
 *             return values             # <<<<<<<<<<<<<<
 *     else:
 *         parse_date = parser
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(((PyObject *)__pyx_v_values));
        __pyx_r = ((PyObject *)__pyx_v_values);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L17_except_return;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L15_exception_handled;
      }
      __pyx_L16_except_error:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      goto __pyx_L1_error;
      __pyx_L17_except_return:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      goto __pyx_L0;
      __pyx_L15_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      __pyx_L21_try_end:;
    }
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":363
 *             return values
 *     else:
 *         parse_date = parser             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    __Pyx_INCREF(__pyx_v_parser);
    __pyx_v_parse_date = __pyx_v_parser;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":365
 *         parse_date = parser
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for i from 0 <= i < n:
 *                 result[i] = parse_date(values[i])
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_8);
      /*try:*/ {

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":366
 * 
 *         try:
 *             for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *                 result[i] = parse_date(values[i])
 *         except Exception:
 */
        __pyx_t_3 = __pyx_v_n;
        for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {

          /* "/home/wesm/code/pandas/pandas/src/inference.pyx":367
 *         try:
 *             for i from 0 <= i < n:
 *                 result[i] = parse_date(values[i])             # <<<<<<<<<<<<<<
 *         except Exception:
 *             # raise if passed parser and it failed
 */
          __pyx_t_15 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_15 < 0) {
            __pyx_t_15 += __pyx_pybuffernd_values.diminfo[0].shape;
            if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L26_error;}
          }
          __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_values.diminfo[0].strides);
          __Pyx_INCREF((PyObject*)__pyx_t_2);
          __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L26_error;}
          __Pyx_GOTREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_2);
          __pyx_t_2 = 0;
          __pyx_t_2 = PyObject_Call(__pyx_v_parse_date, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L26_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
          __pyx_t_16 = __pyx_v_i;
          __pyx_t_7 = -1;
          if (__pyx_t_16 < 0) {
            __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L26_error;}
          }
          __pyx_t_14 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides);
          __Pyx_GOTREF(*__pyx_t_14);
          __Pyx_DECREF(*__pyx_t_14); __Pyx_INCREF(__pyx_t_2);
          *__pyx_t_14 = __pyx_t_2;
          __Pyx_GIVEREF(*__pyx_t_14);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
      }
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L33_try_end;
      __pyx_L26_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":368
 *             for i from 0 <= i < n:
 *                 result[i] = parse_date(values[i])
 *         except Exception:             # <<<<<<<<<<<<<<
 *             # raise if passed parser and it failed
 *             raise
 */
      __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
      if (__pyx_t_7) {
        __Pyx_AddTraceback("pandas._tseries.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L28_except_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_t_4);

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":370
 *         except Exception:
 *             # raise if passed parser and it failed
 *             raise             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_ErrRestore(__pyx_t_2, __pyx_t_5, __pyx_t_4);
        __pyx_t_2 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; 
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L28_except_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L27_exception_handled;
      }
      __pyx_L28_except_error:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      goto __pyx_L1_error;
      __pyx_L27_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      __pyx_L33_try_end:;
    }
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":372
 *             raise
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def sanitize_objects(ndarray[object] values, set na_values):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.try_parse_dates", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_parse_date);
  __Pyx_XDECREF(__pyx_v_parser);
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_319sanitize_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_319sanitize_objects = {__Pyx_NAMESTR("sanitize_objects"), (PyCFunction)__pyx_pw_6pandas_8_tseries_319sanitize_objects, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_319sanitize_objects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_na_values = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__na_values,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sanitize_objects (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_values);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("sanitize_objects", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sanitize_objects") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_na_values = ((PyObject*)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_na_values = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sanitize_objects", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.sanitize_objects", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_na_values), (&PySet_Type), 1, "na_values", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_318sanitize_objects(__pyx_self, __pyx_v_values, __pyx_v_na_values);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":374
 *     return result
 * 
 * def sanitize_objects(ndarray[object] values, set na_values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */

static PyObject *__pyx_pf_6pandas_8_tseries_318sanitize_objects(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_na_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_val = 0;
  PyObject *__pyx_v_onan = 0;
  Py_ssize_t __pyx_v_na_count;
  PyObject *__pyx_v_memo = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject **__pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sanitize_objects");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":378
 *         Py_ssize_t i, n
 *         object val, onan
 *         Py_ssize_t na_count = 0             # <<<<<<<<<<<<<<
 *         dict memo = {}
 * 
 */
  __pyx_v_na_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":379
 *         object val, onan
 *         Py_ssize_t na_count = 0
 *         dict memo = {}             # <<<<<<<<<<<<<<
 * 
 *     n = len(values)
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_memo = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":381
 *         dict memo = {}
 * 
 *     n = len(values)             # <<<<<<<<<<<<<<
 *     onan = np.nan
 * 
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_2;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":382
 * 
 *     n = len(values)
 *     onan = np.nan             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__nan); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_onan = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":384
 *     onan = np.nan
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         val = values[i]
 *         if val == '' or val in na_values:
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":385
 * 
 *     for i from 0 <= i < n:
 *         val = values[i]             # <<<<<<<<<<<<<<
 *         if val == '' or val in na_values:
 *             values[i] = onan
 */
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":386
 *     for i from 0 <= i < n:
 *         val = values[i]
 *         if val == '' or val in na_values:             # <<<<<<<<<<<<<<
 *             values[i] = onan
 *             na_count += 1
 */
    __pyx_t_6 = __Pyx_PyString_Equals(__pyx_v_val, ((PyObject *)__pyx_kp_s_113), Py_EQ); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_6) {
      __pyx_t_7 = ((PySequence_Contains(((PyObject *)__pyx_v_na_values), __pyx_v_val))); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_8 = __pyx_t_7;
    } else {
      __pyx_t_8 = __pyx_t_6;
    }
    if (__pyx_t_8) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":387
 *         val = values[i]
 *         if val == '' or val in na_values:
 *             values[i] = onan             # <<<<<<<<<<<<<<
 *             na_count += 1
 *         elif val in memo:
 */
      __pyx_t_9 = __pyx_v_i;
      __pyx_t_5 = -1;
      if (__pyx_t_9 < 0) {
        __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_9 < 0)) __pyx_t_5 = 0;
      } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0;
      if (unlikely(__pyx_t_5 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_5);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_10 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_10);
      __Pyx_DECREF(*__pyx_t_10); __Pyx_INCREF(__pyx_v_onan);
      *__pyx_t_10 = __pyx_v_onan;
      __Pyx_GIVEREF(*__pyx_t_10);

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":388
 *         if val == '' or val in na_values:
 *             values[i] = onan
 *             na_count += 1             # <<<<<<<<<<<<<<
 *         elif val in memo:
 *             values[i] = memo[val]
 */
      __pyx_v_na_count = (__pyx_v_na_count + 1);
      goto __pyx_L5;
    }

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":389
 *             values[i] = onan
 *             na_count += 1
 *         elif val in memo:             # <<<<<<<<<<<<<<
 *             values[i] = memo[val]
 *         else:
 */
    __pyx_t_8 = ((PyDict_Contains(((PyObject *)__pyx_v_memo), __pyx_v_val))); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_8) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":390
 *             na_count += 1
 *         elif val in memo:
 *             values[i] = memo[val]             # <<<<<<<<<<<<<<
 *         else:
 *             memo[val] = val
 */
      __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_memo), __pyx_v_val); if (!__pyx_t_3) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_5 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_values.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0;
      if (unlikely(__pyx_t_5 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_5);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_10 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_values.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_10);
      __Pyx_DECREF(*__pyx_t_10); __Pyx_INCREF(__pyx_t_3);
      *__pyx_t_10 = __pyx_t_3;
      __Pyx_GIVEREF(*__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":392
 *             values[i] = memo[val]
 *         else:
 *             memo[val] = val             # <<<<<<<<<<<<<<
 * 
 *     return na_count
 */
      if (PyDict_SetItem(((PyObject *)__pyx_v_memo), __pyx_v_val, __pyx_v_val) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":394
 *             memo[val] = val
 * 
 *     return na_count             # <<<<<<<<<<<<<<
 * 
 * def maybe_convert_bool(ndarray[object] arr):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_na_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.sanitize_objects", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_onan);
  __Pyx_XDECREF(__pyx_v_memo);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_321maybe_convert_bool(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_321maybe_convert_bool = {__Pyx_NAMESTR("maybe_convert_bool"), (PyCFunction)__pyx_pw_6pandas_8_tseries_321maybe_convert_bool, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_321maybe_convert_bool(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("maybe_convert_bool (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_320maybe_convert_bool(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":396
 *     return na_count
 * 
 * def maybe_convert_bool(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */

static PyObject *__pyx_pf_6pandas_8_tseries_320maybe_convert_bool(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_val = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("maybe_convert_bool");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":402
 *         object val
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype=np.uint8)
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":403
 * 
 *     n = len(arr)
 *     result = np.empty(n, dtype=np.uint8)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__uint8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":405
 *     result = np.empty(n, dtype=np.uint8)
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         val = arr[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":406
 * 
 *     for i from 0 <= i < n:
 *         val = arr[i]             # <<<<<<<<<<<<<<
 * 
 *         if val == 'True' or type(val) == bool and val:
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":408
 *         val = arr[i]
 * 
 *         if val == 'True' or type(val) == bool and val:             # <<<<<<<<<<<<<<
 *             result[i] = 1
 *         elif val == 'False' or type(val) == bool and not val:
 */
    __pyx_t_13 = __Pyx_PyString_Equals(__pyx_v_val, ((PyObject *)__pyx_n_s__True), Py_EQ); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_13) {
      __pyx_t_6 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_val)), ((PyObject*)&PyBool_Type), Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_14) {
        __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_16 = __pyx_t_15;
      } else {
        __pyx_t_16 = __pyx_t_14;
      }
      __pyx_t_14 = __pyx_t_16;
    } else {
      __pyx_t_14 = __pyx_t_13;
    }
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":409
 * 
 *         if val == 'True' or type(val) == bool and val:
 *             result[i] = 1             # <<<<<<<<<<<<<<
 *         elif val == 'False' or type(val) == bool and not val:
 *             result[i] = 0
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_result.diminfo[0].strides) = 1;
      goto __pyx_L5;
    }

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":410
 *         if val == 'True' or type(val) == bool and val:
 *             result[i] = 1
 *         elif val == 'False' or type(val) == bool and not val:             # <<<<<<<<<<<<<<
 *             result[i] = 0
 *         else:
 */
    __pyx_t_14 = __Pyx_PyString_Equals(__pyx_v_val, ((PyObject *)__pyx_n_s__False), Py_EQ); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!__pyx_t_14) {
      __pyx_t_6 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_val)), ((PyObject*)&PyBool_Type), Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_13) {
        __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_16 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_t_15 = (!__pyx_t_16);
        __pyx_t_16 = __pyx_t_15;
      } else {
        __pyx_t_16 = __pyx_t_13;
      }
      __pyx_t_13 = __pyx_t_16;
    } else {
      __pyx_t_13 = __pyx_t_14;
    }
    if (__pyx_t_13) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":411
 *             result[i] = 1
 *         elif val == 'False' or type(val) == bool and not val:
 *             result[i] = 0             # <<<<<<<<<<<<<<
 *         else:
 *             return arr
 */
      __pyx_t_18 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = 0;
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":413
 *             result[i] = 0
 *         else:
 *             return arr             # <<<<<<<<<<<<<<
 * 
 *     return result.view(np.bool_)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(((PyObject *)__pyx_v_arr));
      __pyx_r = ((PyObject *)__pyx_v_arr);
      goto __pyx_L0;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":415
 *             return arr
 * 
 *     return result.view(np.bool_)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_result), __pyx_n_s__view); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__bool_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.maybe_convert_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_323map_infer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6pandas_8_tseries_322map_infer[] = "\n    Substitute for np.vectorize with pandas-friendly dtype inference\n\n    Parameters\n    ----------\n    arr : ndarray\n    f : function\n\n    Returns\n    -------\n    mapped : ndarray\n    ";
static PyMethodDef __pyx_mdef_6pandas_8_tseries_323map_infer = {__Pyx_NAMESTR("map_infer"), (PyCFunction)__pyx_pw_6pandas_8_tseries_323map_infer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_322map_infer)};
static PyObject *__pyx_pw_6pandas_8_tseries_323map_infer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  PyObject *__pyx_v_f = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__f,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map_infer (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("map_infer", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "map_infer") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_arr = ((PyArrayObject *)values[0]);
      __pyx_v_f = values[1];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_arr = ((PyArrayObject *)values[0]);
    __pyx_v_f = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("map_infer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.map_infer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_322map_infer(__pyx_self, __pyx_v_arr, __pyx_v_f);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":418
 * 
 * 
 * def map_infer(ndarray arr, object f):             # <<<<<<<<<<<<<<
 *     '''
 *     Substitute for np.vectorize with pandas-friendly dtype inference
 */

static PyObject *__pyx_pf_6pandas_8_tseries_322map_infer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_f) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayIterObject *__pyx_v_it = 0;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_val = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject **__pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_infer");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":437
 *         object val
 * 
 *     it = <flatiter> PyArray_IterNew(arr)             # <<<<<<<<<<<<<<
 *     n = len(arr)
 *     result = np.empty(n, dtype=object)
 */
  __pyx_t_1 = PyArray_IterNew(((PyObject *)__pyx_v_arr)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)((PyArrayIterObject *)__pyx_t_1)));
  __pyx_v_it = ((PyArrayIterObject *)__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":438
 * 
 *     it = <flatiter> PyArray_IterNew(arr)
 *     n = len(arr)             # <<<<<<<<<<<<<<
 *     result = np.empty(n, dtype=object)
 *     for i in range(n):
 */
  __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_2;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":439
 *     it = <flatiter> PyArray_IterNew(arr)
 *     n = len(arr)
 *     result = np.empty(n, dtype=object)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         val = f(PyArray_GETITEM(arr, PyArray_ITER_DATA(it)))
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":440
 *     n = len(arr)
 *     result = np.empty(n, dtype=object)
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         val = f(PyArray_GETITEM(arr, PyArray_ITER_DATA(it)))
 * 
 */
  __pyx_t_2 = __pyx_v_n;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_2; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":441
 *     result = np.empty(n, dtype=object)
 *     for i in range(n):
 *         val = f(PyArray_GETITEM(arr, PyArray_ITER_DATA(it)))             # <<<<<<<<<<<<<<
 * 
 *         # unbox 0-dim arrays, GH #690
 */
    __pyx_t_5 = PyArray_GETITEM(__pyx_v_arr, PyArray_ITER_DATA(__pyx_v_it)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":444
 * 
 *         # unbox 0-dim arrays, GH #690
 *         if is_array(val) and PyArray_NDIM(val) == 0:             # <<<<<<<<<<<<<<
 *             # is there a faster way to unbox?
 *             val = val.item()
 */
    __pyx_t_5 = __pyx_f_4util_is_array(__pyx_v_val); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_12) {
      if (!(likely(((__pyx_v_val) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_val, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = __pyx_v_val;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_13 = (PyArray_NDIM(((PyArrayObject *)__pyx_t_5)) == 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_14 = __pyx_t_13;
    } else {
      __pyx_t_14 = __pyx_t_12;
    }
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":446
 *         if is_array(val) and PyArray_NDIM(val) == 0:
 *             # is there a faster way to unbox?
 *             val = val.item()             # <<<<<<<<<<<<<<
 * 
 *         result[i] = val
 */
      __pyx_t_5 = PyObject_GetAttr(__pyx_v_val, __pyx_n_s__item); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_v_val);
      __pyx_v_val = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":448
 *             val = val.item()
 * 
 *         result[i] = val             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_15 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_15 < 0) {
      __pyx_t_15 += __pyx_pybuffernd_result.diminfo[0].shape;
      if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_16 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_result.diminfo[0].strides);
    __Pyx_GOTREF(*__pyx_t_16);
    __Pyx_DECREF(*__pyx_t_16); __Pyx_INCREF(__pyx_v_val);
    *__pyx_t_16 = __pyx_v_val;
    __Pyx_GIVEREF(*__pyx_t_16);

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":451
 * 
 * 
 *         PyArray_ITER_NEXT(it)             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_objects(result, try_float=0)
 */
    PyArray_ITER_NEXT(__pyx_v_it);
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":453
 *         PyArray_ITER_NEXT(it)
 * 
 *     return maybe_convert_objects(result, try_float=0)             # <<<<<<<<<<<<<<
 * 
 * def to_object_array(list rows):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__try_float), __pyx_int_0) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.map_infer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_it);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_325to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_rows); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_325to_object_array = {__Pyx_NAMESTR("to_object_array"), (PyCFunction)__pyx_pw_6pandas_8_tseries_325to_object_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_325to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_rows) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_object_array (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rows), (&PyList_Type), 1, "rows", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_324to_object_array(__pyx_self, ((PyObject*)__pyx_v_rows));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":455
 *     return maybe_convert_objects(result, try_float=0)
 * 
 * def to_object_array(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */

static PyObject *__pyx_pf_6pandas_8_tseries_324to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rows) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_tmp;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_row = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyArrayObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  PyObject **__pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_object_array");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":461
 *         list row
 * 
 *     n = len(rows)             # <<<<<<<<<<<<<<
 * 
 *     k = 0
 */
  if (unlikely(((PyObject *)__pyx_v_rows) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_rows)); 
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":463
 *     n = len(rows)
 * 
 *     k = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])
 */
  __pyx_v_k = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":464
 * 
 *     k = 0
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         tmp = len(rows[i])
 *         if tmp > k:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":465
 *     k = 0
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])             # <<<<<<<<<<<<<<
 *         if tmp > k:
 *             k = tmp
 */
    __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_tmp = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":466
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])
 *         if tmp > k:             # <<<<<<<<<<<<<<
 *             k = tmp
 * 
 */
    __pyx_t_4 = (__pyx_v_tmp > __pyx_v_k);
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":467
 *         tmp = len(rows[i])
 *         if tmp > k:
 *             k = tmp             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty((n, k), dtype=object)
 */
      __pyx_v_k = __pyx_v_tmp;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":469
 *             k = tmp
 * 
 *     result = np.empty((n, k), dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     for i from 0 <= i < n:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_2 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_7));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __pyx_t_7 = 0;
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":471
 *     result = np.empty((n, k), dtype=object)
 * 
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         row = rows[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":472
 * 
 *     for i from 0 <= i < n:
 *         row = rows[i]             # <<<<<<<<<<<<<<
 * 
 *         for j from 0 <= j < len(row):
 */
    __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_row));
    __pyx_v_row = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":474
 *         row = rows[i]
 * 
 *         for j from 0 <= j < len(row):             # <<<<<<<<<<<<<<
 *             result[i, j] = row[j]
 * 
 */
    if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_3 = PyList_GET_SIZE(((PyObject *)__pyx_v_row)); 
    for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_3; __pyx_v_j++) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":475
 * 
 *         for j from 0 <= j < len(row):
 *             result[i, j] = row[j]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_row), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_14 = __pyx_v_j;
      __pyx_t_9 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_result.diminfo[1].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 1;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_9 = 1;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_15 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_result.diminfo[1].strides);
      __Pyx_GOTREF(*__pyx_t_15);
      __Pyx_DECREF(*__pyx_t_15); __Pyx_INCREF(__pyx_t_2);
      *__pyx_t_15 = __pyx_t_2;
      __Pyx_GIVEREF(*__pyx_t_15);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":477
 *             result[i, j] = row[j]
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def tuples_to_object_array(ndarray[object] tuples):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.to_object_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_327tuples_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_tuples); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_327tuples_to_object_array = {__Pyx_NAMESTR("tuples_to_object_array"), (PyCFunction)__pyx_pw_6pandas_8_tseries_327tuples_to_object_array, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_327tuples_to_object_array(PyObject *__pyx_self, PyObject *__pyx_v_tuples) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tuples_to_object_array (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tuples), __pyx_ptype_5numpy_ndarray, 1, "tuples", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_326tuples_to_object_array(__pyx_self, ((PyArrayObject *)__pyx_v_tuples));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":479
 *     return result
 * 
 * def tuples_to_object_array(ndarray[object] tuples):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */

static PyObject *__pyx_pf_6pandas_8_tseries_326tuples_to_object_array(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_tuples) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_k;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_tup = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_tuples;
  __Pyx_Buffer __pyx_pybuffer_tuples;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  long __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyArrayObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  PyObject **__pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tuples_to_object_array");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_tuples.pybuffer.buf = NULL;
  __pyx_pybuffer_tuples.refcount = 0;
  __pyx_pybuffernd_tuples.data = NULL;
  __pyx_pybuffernd_tuples.rcbuffer = &__pyx_pybuffer_tuples;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tuples.rcbuffer->pybuffer, (PyObject*)__pyx_v_tuples, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_tuples.diminfo[0].strides = __pyx_pybuffernd_tuples.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tuples.diminfo[0].shape = __pyx_pybuffernd_tuples.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":485
 *         tuple tup
 * 
 *     n = len(tuples)             # <<<<<<<<<<<<<<
 *     k = len(tuples[0])
 *     result = np.empty((n, k), dtype=object)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_tuples)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":486
 * 
 *     n = len(tuples)
 *     k = len(tuples[0])             # <<<<<<<<<<<<<<
 *     result = np.empty((n, k), dtype=object)
 *     for i in range(n):
 */
  __pyx_t_3 = 0;
  __pyx_t_4 = -1;
  if (__pyx_t_3 < 0) {
    __pyx_t_3 += __pyx_pybuffernd_tuples.diminfo[0].shape;
    if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
  } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_tuples.diminfo[0].shape)) __pyx_t_4 = 0;
  if (unlikely(__pyx_t_4 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_4);
    {__pyx_filename = __pyx_f[1]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_tuples.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_tuples.diminfo[0].strides);
  __Pyx_INCREF((PyObject*)__pyx_t_2);
  __pyx_t_1 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_k = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":487
 *     n = len(tuples)
 *     k = len(tuples[0])
 *     result = np.empty((n, k), dtype=object)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         tup = tuples[i]
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_2 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_7));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __pyx_t_7 = 0;
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_4 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_4 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":488
 *     k = len(tuples[0])
 *     result = np.empty((n, k), dtype=object)
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         tup = tuples[i]
 *         for j in range(k):
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":489
 *     result = np.empty((n, k), dtype=object)
 *     for i in range(n):
 *         tup = tuples[i]             # <<<<<<<<<<<<<<
 *         for j in range(k):
 *             result[i, j] = tup[j]
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_4 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_tuples.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_4 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_tuples.diminfo[0].shape)) __pyx_t_4 = 0;
    if (unlikely(__pyx_t_4 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_4);
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_tuples.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_tuples.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_2);
    if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_tup));
    __pyx_v_tup = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":490
 *     for i in range(n):
 *         tup = tuples[i]
 *         for j in range(k):             # <<<<<<<<<<<<<<
 *             result[i, j] = tup[j]
 * 
 */
    __pyx_t_14 = __pyx_v_k;
    for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) {
      __pyx_v_j = __pyx_t_15;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":491
 *         tup = tuples[i]
 *         for j in range(k):
 *             result[i, j] = tup[j]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
      __pyx_t_2 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_tup), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_17 = __pyx_v_j;
      __pyx_t_4 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_result.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_4 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_4 = 0;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_result.diminfo[1].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_4 = 1;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_4 = 1;
      if (unlikely(__pyx_t_4 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_4);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_18 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_result.diminfo[1].strides);
      __Pyx_GOTREF(*__pyx_t_18);
      __Pyx_DECREF(*__pyx_t_18); __Pyx_INCREF(__pyx_t_2);
      *__pyx_t_18 = __pyx_t_2;
      __Pyx_GIVEREF(*__pyx_t_18);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":493
 *             result[i, j] = tup[j]
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def to_object_array_tuples(list rows):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tuples.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.tuples_to_object_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_tuples.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_tup);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_329to_object_array_tuples(PyObject *__pyx_self, PyObject *__pyx_v_rows); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_329to_object_array_tuples = {__Pyx_NAMESTR("to_object_array_tuples"), (PyCFunction)__pyx_pw_6pandas_8_tseries_329to_object_array_tuples, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_329to_object_array_tuples(PyObject *__pyx_self, PyObject *__pyx_v_rows) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("to_object_array_tuples (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rows), (&PyList_Type), 1, "rows", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_328to_object_array_tuples(__pyx_self, ((PyObject*)__pyx_v_rows));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":495
 *     return result
 * 
 * def to_object_array_tuples(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */

static PyObject *__pyx_pf_6pandas_8_tseries_328to_object_array_tuples(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rows) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_tmp;
  PyArrayObject *__pyx_v_result = 0;
  PyObject *__pyx_v_row = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyArrayObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  PyObject **__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_object_array_tuples");
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":501
 *         tuple row
 * 
 *     n = len(rows)             # <<<<<<<<<<<<<<
 * 
 *     k = 0
 */
  if (unlikely(((PyObject *)__pyx_v_rows) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = PyList_GET_SIZE(((PyObject *)__pyx_v_rows)); 
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":503
 *     n = len(rows)
 * 
 *     k = 0             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])
 */
  __pyx_v_k = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":504
 * 
 *     k = 0
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         tmp = len(rows[i])
 *         if tmp > k:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":505
 *     k = 0
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])             # <<<<<<<<<<<<<<
 *         if tmp > k:
 *             k = tmp
 */
    __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_tmp = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":506
 *     for i from 0 <= i < n:
 *         tmp = len(rows[i])
 *         if tmp > k:             # <<<<<<<<<<<<<<
 *             k = tmp
 * 
 */
    __pyx_t_4 = (__pyx_v_tmp > __pyx_v_k);
    if (__pyx_t_4) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":507
 *         tmp = len(rows[i])
 *         if tmp > k:
 *             k = tmp             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty((n, k), dtype=object)
 */
      __pyx_v_k = __pyx_v_tmp;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":509
 *             k = tmp
 * 
 *     result = np.empty((n, k), dtype=object)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_k); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_2 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_7));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
  __pyx_t_7 = 0;
  __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  if (PyDict_SetItem(__pyx_t_7, ((PyObject *)__pyx_n_s__dtype), __pyx_builtin_object) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_9 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack);
    if (unlikely(__pyx_t_9 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_result.diminfo[1].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_result.diminfo[1].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[1];
    if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_8 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":511
 *     result = np.empty((n, k), dtype=object)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             row = rows[i]
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_12);
    __Pyx_XGOTREF(__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_10);
    /*try:*/ {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":512
 * 
 *     try:
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             row = rows[i]
 *             for j from 0 <= j < len(row):
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
        __pyx_v_i = __pyx_t_3;

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":513
 *     try:
 *         for i in range(n):
 *             row = rows[i]             # <<<<<<<<<<<<<<
 *             for j from 0 <= j < len(row):
 *                 result[i, j] = row[j]
 */
        __pyx_t_2 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_2);
        if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_XDECREF(((PyObject *)__pyx_v_row));
        __pyx_v_row = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":514
 *         for i in range(n):
 *             row = rows[i]
 *             for j from 0 <= j < len(row):             # <<<<<<<<<<<<<<
 *                 result[i, j] = row[j]
 *     except Exception:
 */
        if (unlikely(((PyObject *)__pyx_v_row) == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L6_error;} 
        }
        __pyx_t_13 = PyTuple_GET_SIZE(((PyObject *)__pyx_v_row)); 
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_13; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/inference.pyx":515
 *             row = rows[i]
 *             for j from 0 <= j < len(row):
 *                 result[i, j] = row[j]             # <<<<<<<<<<<<<<
 *     except Exception:
 *         # upcast any subclasses to tuple
 */
          __pyx_t_2 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_row), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_2) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_14 = __pyx_v_i;
          __pyx_t_15 = __pyx_v_j;
          __pyx_t_9 = -1;
          if (__pyx_t_14 < 0) {
            __pyx_t_14 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_14 < 0)) __pyx_t_9 = 0;
          } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0;
          if (__pyx_t_15 < 0) {
            __pyx_t_15 += __pyx_pybuffernd_result.diminfo[1].shape;
            if (unlikely(__pyx_t_15 < 0)) __pyx_t_9 = 1;
          } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_9 = 1;
          if (unlikely(__pyx_t_9 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_9);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
          }
          __pyx_t_16 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_result.diminfo[1].strides);
          __Pyx_GOTREF(*__pyx_t_16);
          __Pyx_DECREF(*__pyx_t_16); __Pyx_INCREF(__pyx_t_2);
          *__pyx_t_16 = __pyx_t_2;
          __Pyx_GIVEREF(*__pyx_t_16);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
      }
    }
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L13_try_end;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":516
 *             for j from 0 <= j < len(row):
 *                 result[i, j] = row[j]
 *     except Exception:             # <<<<<<<<<<<<<<
 *         # upcast any subclasses to tuple
 *         for i in range(n):
 */
    __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_Exception);
    if (__pyx_t_9) {
      __Pyx_AddTraceback("pandas._tseries.to_object_array_tuples", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_6);

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":518
 *     except Exception:
 *         # upcast any subclasses to tuple
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             row = tuple(rows[i])
 *             for j from 0 <= j < len(row):
 */
      __pyx_t_1 = __pyx_v_n;
      for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
        __pyx_v_i = __pyx_t_3;

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":519
 *         # upcast any subclasses to tuple
 *         for i in range(n):
 *             row = tuple(rows[i])             # <<<<<<<<<<<<<<
 *             for j from 0 <= j < len(row):
 *                 result[i, j] = row[j]
 */
        __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_rows), __pyx_v_i, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_5) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_17);
        PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_17), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(((PyObject *)__pyx_t_17)); __pyx_t_17 = 0;
        __Pyx_XDECREF(((PyObject *)__pyx_v_row));
        __pyx_v_row = ((PyObject*)__pyx_t_5);
        __pyx_t_5 = 0;

        /* "/home/wesm/code/pandas/pandas/src/inference.pyx":520
 *         for i in range(n):
 *             row = tuple(rows[i])
 *             for j from 0 <= j < len(row):             # <<<<<<<<<<<<<<
 *                 result[i, j] = row[j]
 * 
 */
        __pyx_t_13 = PyTuple_GET_SIZE(((PyObject *)__pyx_v_row)); 
        for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_13; __pyx_v_j++) {

          /* "/home/wesm/code/pandas/pandas/src/inference.pyx":521
 *             row = tuple(rows[i])
 *             for j from 0 <= j < len(row):
 *                 result[i, j] = row[j]             # <<<<<<<<<<<<<<
 * 
 *     return result
 */
          __pyx_t_5 = __Pyx_GetItemInt_Tuple(((PyObject *)__pyx_v_row), __pyx_v_j, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_5) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_18 = __pyx_v_i;
          __pyx_t_19 = __pyx_v_j;
          __pyx_t_9 = -1;
          if (__pyx_t_18 < 0) {
            __pyx_t_18 += __pyx_pybuffernd_result.diminfo[0].shape;
            if (unlikely(__pyx_t_18 < 0)) __pyx_t_9 = 0;
          } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_result.diminfo[0].shape)) __pyx_t_9 = 0;
          if (__pyx_t_19 < 0) {
            __pyx_t_19 += __pyx_pybuffernd_result.diminfo[1].shape;
            if (unlikely(__pyx_t_19 < 0)) __pyx_t_9 = 1;
          } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_result.diminfo[1].shape)) __pyx_t_9 = 1;
          if (unlikely(__pyx_t_9 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_9);
            {__pyx_filename = __pyx_f[1]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          }
          __pyx_t_16 = __Pyx_BufPtrStrided2d(PyObject **, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_result.diminfo[1].strides);
          __Pyx_GOTREF(*__pyx_t_16);
          __Pyx_DECREF(*__pyx_t_16); __Pyx_INCREF(__pyx_t_5);
          *__pyx_t_16 = __pyx_t_5;
          __Pyx_GIVEREF(*__pyx_t_16);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L7_exception_handled;
    }
    __pyx_L8_except_error:;
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
    goto __pyx_L1_error;
    __pyx_L7_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_11, __pyx_t_10);
    __pyx_L13_try_end:;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":523
 *                 result[i, j] = row[j]
 * 
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_17);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.to_object_array_tuples", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_331fast_multiget(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_331fast_multiget = {__Pyx_NAMESTR("fast_multiget"), (PyCFunction)__pyx_pw_6pandas_8_tseries_331fast_multiget, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_331fast_multiget(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_mapping = 0;
  PyArrayObject *__pyx_v_keys = 0;
  PyObject *__pyx_v_default = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__mapping,&__pyx_n_s__keys,&__pyx_n_s__default,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fast_multiget (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    values[2] = __pyx_k_114;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__mapping);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__keys);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("fast_multiget", 0, 2, 3, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__default);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fast_multiget") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_mapping = ((PyObject*)values[0]);
      __pyx_v_keys = ((PyArrayObject *)values[1]);
      __pyx_v_default = values[2];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_mapping = ((PyObject*)values[0]);
    __pyx_v_keys = ((PyArrayObject *)values[1]);
    __pyx_v_default = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fast_multiget", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.fast_multiget", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mapping), (&PyDict_Type), 1, "mapping", 1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keys), __pyx_ptype_5numpy_ndarray, 1, "keys", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_330fast_multiget(__pyx_self, __pyx_v_mapping, __pyx_v_keys, __pyx_v_default);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/inference.pyx":526
 * 
 * 
 * def fast_multiget(dict mapping, ndarray keys, default=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(keys)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_330fast_multiget(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mapping, PyArrayObject *__pyx_v_keys, PyObject *__pyx_v_default) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_val = 0;
  PyArrayObject *__pyx_v_output = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_output;
  __Pyx_Buffer __pyx_pybuffer_output;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  PyObject **__pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fast_multiget");
  __pyx_pybuffer_output.pybuffer.buf = NULL;
  __pyx_pybuffer_output.refcount = 0;
  __pyx_pybuffernd_output.data = NULL;
  __pyx_pybuffernd_output.rcbuffer = &__pyx_pybuffer_output;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":528
 * def fast_multiget(dict mapping, ndarray keys, default=np.nan):
 *     cdef:
 *         Py_ssize_t i, n = len(keys)             # <<<<<<<<<<<<<<
 *         object val
 *         ndarray[object] output = np.empty(n, dtype='O')
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_keys)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":530
 *         Py_ssize_t i, n = len(keys)
 *         object val
 *         ndarray[object] output = np.empty(n, dtype='O')             # <<<<<<<<<<<<<<
 * 
 *     if n == 0:
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__O)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_output.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_output = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_output.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[1]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_output.diminfo[0].strides = __pyx_pybuffernd_output.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_output.diminfo[0].shape = __pyx_pybuffernd_output.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_output = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":532
 *         ndarray[object] output = np.empty(n, dtype='O')
 * 
 *     if n == 0:             # <<<<<<<<<<<<<<
 *         # kludge, for Series
 *         return np.empty(0, dtype='f8')
 */
  __pyx_t_7 = (__pyx_v_n == 0);
  if (__pyx_t_7) {

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":534
 *     if n == 0:
 *         # kludge, for Series
 *         return np.empty(0, dtype='f8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_5));
    if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__f8)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_115), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":536
 *         return np.empty(0, dtype='f8')
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         val = util.get_value_1d(keys, i)
 *         if val in mapping:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":537
 * 
 *     for i in range(n):
 *         val = util.get_value_1d(keys, i)             # <<<<<<<<<<<<<<
 *         if val in mapping:
 *             output[i] = mapping[val]
 */
    __pyx_t_4 = get_value_1d(__pyx_v_keys, __pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":538
 *     for i in range(n):
 *         val = util.get_value_1d(keys, i)
 *         if val in mapping:             # <<<<<<<<<<<<<<
 *             output[i] = mapping[val]
 *         else:
 */
    if (unlikely(((PyObject *)__pyx_v_mapping) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_7 = ((PyDict_Contains(((PyObject *)__pyx_v_mapping), __pyx_v_val))); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_7) {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":539
 *         val = util.get_value_1d(keys, i)
 *         if val in mapping:
 *             output[i] = mapping[val]             # <<<<<<<<<<<<<<
 *         else:
 *             output[i] = default
 */
      __pyx_t_4 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_mapping), __pyx_v_val); if (!__pyx_t_4) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = __pyx_v_i;
      __pyx_t_10 = -1;
      if (__pyx_t_9 < 0) {
        __pyx_t_9 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_output.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_11);
      __Pyx_DECREF(*__pyx_t_11); __Pyx_INCREF(__pyx_t_4);
      *__pyx_t_11 = __pyx_t_4;
      __Pyx_GIVEREF(*__pyx_t_11);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":541
 *             output[i] = mapping[val]
 *         else:
 *             output[i] = default             # <<<<<<<<<<<<<<
 * 
 *     return maybe_convert_objects(output)
 */
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_10 = -1;
      if (__pyx_t_12 < 0) {
        __pyx_t_12 += __pyx_pybuffernd_output.diminfo[0].shape;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_output.diminfo[0].shape)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[1]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_11 = __Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_output.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_output.diminfo[0].strides);
      __Pyx_GOTREF(*__pyx_t_11);
      __Pyx_DECREF(*__pyx_t_11); __Pyx_INCREF(__pyx_v_default);
      *__pyx_t_11 = __pyx_v_default;
      __Pyx_GIVEREF(*__pyx_t_11);
    }
    __pyx_L6:;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":543
 *             output[i] = default
 * 
 *     return maybe_convert_objects(output)             # <<<<<<<<<<<<<<
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_output));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_output));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_output));
  __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.fast_multiget", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_output.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF((PyObject *)__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_333get_reverse_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_333get_reverse_indexer = {__Pyx_NAMESTR("get_reverse_indexer"), (PyCFunction)__pyx_pw_6pandas_8_tseries_333get_reverse_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_333get_reverse_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_indexer = 0;
  Py_ssize_t __pyx_v_length;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__indexer,&__pyx_n_s__length,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_reverse_indexer (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__length);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_reverse_indexer", 1, 2, 2, 1); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_reverse_indexer") < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_indexer = ((PyArrayObject *)values[0]);
      __pyx_v_length = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_length == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_indexer = ((PyArrayObject *)values[0]);
    __pyx_v_length = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_length == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_reverse_indexer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.get_reverse_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_indexer), __pyx_ptype_5numpy_ndarray, 1, "indexer", 0))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_332get_reverse_indexer(__pyx_self, __pyx_v_indexer, __pyx_v_length);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/internals.pyx":1
 * def get_reverse_indexer(ndarray[int32_t] indexer, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(indexer)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_332get_reverse_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_indexer, Py_ssize_t __pyx_v_length) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_rev_indexer = 0;
  __pyx_t_5numpy_int32_t __pyx_v_idx;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_rev_indexer;
  __Pyx_Buffer __pyx_pybuffer_rev_indexer;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  __pyx_t_5numpy_int32_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_reverse_indexer");
  __pyx_pybuffer_rev_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_rev_indexer.refcount = 0;
  __pyx_pybuffernd_rev_indexer.data = NULL;
  __pyx_pybuffernd_rev_indexer.rcbuffer = &__pyx_pybuffer_rev_indexer;
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/internals.pyx":3
 * def get_reverse_indexer(ndarray[int32_t] indexer, Py_ssize_t length):
 *     cdef:
 *         Py_ssize_t i, n = len(indexer)             # <<<<<<<<<<<<<<
 *         ndarray[int32_t] rev_indexer
 *         int32_t idx
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_indexer)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/internals.pyx":7
 *         int32_t idx
 * 
 *     rev_indexer = np.empty(length, dtype='i4')             # <<<<<<<<<<<<<<
 *     rev_indexer.fill(-1)
 *     for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_rev_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_rev_indexer.diminfo[0].strides = __pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_rev_indexer.diminfo[0].shape = __pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_rev_indexer = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/internals.pyx":8
 * 
 *     rev_indexer = np.empty(length, dtype='i4')
 *     rev_indexer.fill(-1)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         idx = indexer[i]
 */
  __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_rev_indexer), __pyx_n_s__fill); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_116), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/internals.pyx":9
 *     rev_indexer = np.empty(length, dtype='i4')
 *     rev_indexer.fill(-1)
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         idx = indexer[i]
 *         if idx != -1:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "/home/wesm/code/pandas/pandas/src/internals.pyx":10
 *     rev_indexer.fill(-1)
 *     for i in range(n):
 *         idx = indexer[i]             # <<<<<<<<<<<<<<
 *         if idx != -1:
 *             rev_indexer[idx] = i
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_indexer.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[10]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_idx = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_indexer.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/internals.pyx":11
 *     for i in range(n):
 *         idx = indexer[i]
 *         if idx != -1:             # <<<<<<<<<<<<<<
 *             rev_indexer[idx] = i
 * 
 */
    __pyx_t_13 = (__pyx_v_idx != -1);
    if (__pyx_t_13) {

      /* "/home/wesm/code/pandas/pandas/src/internals.pyx":12
 *         idx = indexer[i]
 *         if idx != -1:
 *             rev_indexer[idx] = i             # <<<<<<<<<<<<<<
 * 
 *     return rev_indexer
 */
      __pyx_t_14 = __pyx_v_idx;
      __pyx_t_7 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_rev_indexer.diminfo[0].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_rev_indexer.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[10]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_rev_indexer.diminfo[0].strides) = __pyx_v_i;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/internals.pyx":14
 *             rev_indexer[idx] = i
 * 
 *     return rev_indexer             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_rev_indexer));
  __pyx_r = ((PyObject *)__pyx_v_rev_indexer);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.get_reverse_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_rev_indexer.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_rev_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_335test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_335test = {__Pyx_NAMESTR("test"), (PyCFunction)__pyx_pw_6pandas_8_tseries_335test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_335test(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  Py_ssize_t __pyx_v_size_hint;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__size_hint,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("test (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size_hint);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("test", 1, 2, 2, 1); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "test") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_arr = ((PyArrayObject *)values[0]);
      __pyx_v_size_hint = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_size_hint == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_arr = ((PyArrayObject *)values[0]);
    __pyx_v_size_hint = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_size_hint == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("test", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.test", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_334test(__pyx_self, __pyx_v_arr, __pyx_v_size_hint);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":3
 * from khash cimport *
 * 
 * def test(ndarray arr, Py_ssize_t size_hint):             # <<<<<<<<<<<<<<
 *     cdef:
 *         kh_pymap_t *table
 */

static PyObject *__pyx_pf_6pandas_8_tseries_334test(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, Py_ssize_t __pyx_v_size_hint) {
  kh_pymap_t *__pyx_v_table;
  int __pyx_v_ret;
  khiter_t __pyx_v_k;
  PyObject **__pyx_v_data;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_indexer = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("test");
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":6
 *     cdef:
 *         kh_pymap_t *table
 *         int ret = 0             # <<<<<<<<<<<<<<
 *         khiter_t k
 *         PyObject **data
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":12
 *         ndarray[Py_ssize_t] indexer
 * 
 *     table = kh_init_pymap()             # <<<<<<<<<<<<<<
 *     kh_resize_pymap(table, size_hint)
 * 
 */
  __pyx_v_table = kh_init_pymap();

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":13
 * 
 *     table = kh_init_pymap()
 *     kh_resize_pymap(table, size_hint)             # <<<<<<<<<<<<<<
 * 
 *     data = <PyObject**> arr.data
 */
  kh_resize_pymap(__pyx_v_table, __pyx_v_size_hint);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":15
 *     kh_resize_pymap(table, size_hint)
 * 
 *     data = <PyObject**> arr.data             # <<<<<<<<<<<<<<
 *     n = len(arr)
 * 
 */
  __pyx_v_data = ((PyObject **)__pyx_v_arr->data);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":16
 * 
 *     data = <PyObject**> arr.data
 *     n = len(arr)             # <<<<<<<<<<<<<<
 * 
 *     indexer = np.empty(n, dtype=np.int_)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":18
 *     n = len(arr)
 * 
 *     indexer = np.empty(n, dtype=np.int_)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int_); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_Py_ssize_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_Py_ssize_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":20
 *     indexer = np.empty(n, dtype=np.int_)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         k = kh_put_pymap(table, data[i], &ret)
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":21
 * 
 *     for i in range(n):
 *         k = kh_put_pymap(table, data[i], &ret)             # <<<<<<<<<<<<<<
 * 
 *         # if not ret:
 */
    __pyx_v_k = kh_put_pymap(__pyx_v_table, (__pyx_v_data[__pyx_v_i]), (&__pyx_v_ret));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":26
 *         #     kh_del_pymap(table, k)
 * 
 *         table.vals[k] = i             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
    (__pyx_v_table->vals[__pyx_v_k]) = __pyx_v_i;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":28
 *         table.vals[k] = i
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         k = kh_get_pymap(table, data[i])
 *         indexer[i] = table.vals[k]
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":29
 * 
 *     for i in range(n):
 *         k = kh_get_pymap(table, data[i])             # <<<<<<<<<<<<<<
 *         indexer[i] = table.vals[k]
 * 
 */
    __pyx_v_k = kh_get_pymap(__pyx_v_table, (__pyx_v_data[__pyx_v_i]));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":30
 *     for i in range(n):
 *         k = kh_get_pymap(table, data[i])
 *         indexer[i] = table.vals[k]             # <<<<<<<<<<<<<<
 * 
 *     kh_destroy_pymap(table)
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_indexer.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_indexer.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    *__Pyx_BufPtrStrided1d(Py_ssize_t *, __pyx_pybuffernd_indexer.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_indexer.diminfo[0].strides) = (__pyx_v_table->vals[__pyx_v_k]);
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":32
 *         indexer[i] = table.vals[k]
 * 
 *     kh_destroy_pymap(table)             # <<<<<<<<<<<<<<
 * 
 *     return indexer
 */
  kh_destroy_pymap(__pyx_v_table);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":34
 *     kh_destroy_pymap(table)
 * 
 *     return indexer             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_indexer));
  __pyx_r = ((PyObject *)__pyx_v_indexer);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.test", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_337test_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_337test_str = {__Pyx_NAMESTR("test_str"), (PyCFunction)__pyx_pw_6pandas_8_tseries_337test_str, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_337test_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_arr = 0;
  Py_ssize_t __pyx_v_size_hint;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__arr,&__pyx_n_s__size_hint,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("test_str (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__arr);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size_hint);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("test_str", 1, 2, 2, 1); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "test_str") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_arr = ((PyArrayObject *)values[0]);
      __pyx_v_size_hint = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_size_hint == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_arr = ((PyArrayObject *)values[0]);
    __pyx_v_size_hint = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_size_hint == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("test_str", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.test_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_336test_str(__pyx_self, __pyx_v_arr, __pyx_v_size_hint);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":37
 * 
 * 
 * def test_str(ndarray arr, Py_ssize_t size_hint):             # <<<<<<<<<<<<<<
 *     cdef:
 *         kh_str_t *table
 */

static PyObject *__pyx_pf_6pandas_8_tseries_336test_str(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr, Py_ssize_t __pyx_v_size_hint) {
  kh_str_t *__pyx_v_table;
  int __pyx_v_ret;
  khiter_t __pyx_v_k;
  PyObject **__pyx_v_data;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_indexer = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_indexer;
  __Pyx_Buffer __pyx_pybuffer_indexer;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("test_str");
  __pyx_pybuffer_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_indexer.refcount = 0;
  __pyx_pybuffernd_indexer.data = NULL;
  __pyx_pybuffernd_indexer.rcbuffer = &__pyx_pybuffer_indexer;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":41
 *         kh_str_t *table
 *         kh_cstr_t val
 *         int ret = 0             # <<<<<<<<<<<<<<
 *         khiter_t k
 *         PyObject **data
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":47
 *         ndarray[Py_ssize_t] indexer
 * 
 *     table = kh_init_str()             # <<<<<<<<<<<<<<
 *     kh_resize_str(table, size_hint)
 * 
 */
  __pyx_v_table = kh_init_str();

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":48
 * 
 *     table = kh_init_str()
 *     kh_resize_str(table, size_hint)             # <<<<<<<<<<<<<<
 * 
 *     data = <PyObject**> arr.data
 */
  kh_resize_str(__pyx_v_table, __pyx_v_size_hint);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":50
 *     kh_resize_str(table, size_hint)
 * 
 *     data = <PyObject**> arr.data             # <<<<<<<<<<<<<<
 *     n = len(arr)
 * 
 */
  __pyx_v_data = ((PyObject **)__pyx_v_arr->data);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":51
 * 
 *     data = <PyObject**> arr.data
 *     n = len(arr)             # <<<<<<<<<<<<<<
 * 
 *     indexer = np.empty(n, dtype=np.int_)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":53
 *     n = len(arr)
 * 
 *     indexer = np.empty(n, dtype=np.int_)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int_); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_Py_ssize_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_indexer, &__Pyx_TypeInfo_Py_ssize_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_indexer.diminfo[0].strides = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_indexer.diminfo[0].shape = __pyx_pybuffernd_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_indexer = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":55
 *     indexer = np.empty(n, dtype=np.int_)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         k = kh_put_str(table, util.get_c_string(<object> data[i]), &ret)
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":56
 * 
 *     for i in range(n):
 *         k = kh_put_str(table, util.get_c_string(<object> data[i]), &ret)             # <<<<<<<<<<<<<<
 * 
 *         # if not ret:
 */
    __pyx_t_6 = ((PyObject *)(__pyx_v_data[__pyx_v_i]));
    __Pyx_INCREF(__pyx_t_6);
    __pyx_v_k = kh_put_str(__pyx_v_table, get_c_string(__pyx_t_6), (&__pyx_v_ret));
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":61
 *         #     kh_del_str(table, k)
 * 
 *         table.vals[k] = i             # <<<<<<<<<<<<<<
 * 
 *     # for i in range(n):
 */
    (__pyx_v_table->vals[__pyx_v_k]) = __pyx_v_i;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":67
 *     #     indexer[i] = table.vals[k]
 * 
 *     kh_destroy_str(table)             # <<<<<<<<<<<<<<
 * 
 *     return indexer
 */
  kh_destroy_str(__pyx_v_table);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":69
 *     kh_destroy_str(table)
 * 
 *     return indexer             # <<<<<<<<<<<<<<
 * 
 * # def test2(ndarray[object] arr):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_indexer));
  __pyx_r = ((PyObject *)__pyx_v_indexer);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.test_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_indexer.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_339obj_unique(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_339obj_unique = {__Pyx_NAMESTR("obj_unique"), (PyCFunction)__pyx_pw_6pandas_8_tseries_339obj_unique, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_339obj_unique(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("obj_unique (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_338obj_unique(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":90
 * #     return indexer
 * 
 * def obj_unique(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         kh_pyset_t *table
 */

static PyObject *__pyx_pf_6pandas_8_tseries_338obj_unique(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  kh_pyset_t *__pyx_v_table;
  PyObject *__pyx_v_obj = 0;
  CYTHON_UNUSED PyObject **__pyx_v_data;
  int __pyx_v_ret;
  khiter_t __pyx_v_k;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  CYTHON_UNUSED PyObject *__pyx_v_uniques = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("obj_unique");
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":96
 *         object obj
 *         PyObject **data
 *         int ret = 0             # <<<<<<<<<<<<<<
 *         khiter_t k
 *         Py_ssize_t i, n
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":101
 *         list uniques
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 *     uniques = []
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":102
 * 
 *     n = len(arr)
 *     uniques = []             # <<<<<<<<<<<<<<
 * 
 *     table = kh_init_pyset()
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_uniques = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":104
 *     uniques = []
 * 
 *     table = kh_init_pyset()             # <<<<<<<<<<<<<<
 * 
 *     data = <PyObject**> arr.data
 */
  __pyx_v_table = kh_init_pyset();

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":106
 *     table = kh_init_pyset()
 * 
 *     data = <PyObject**> arr.data             # <<<<<<<<<<<<<<
 * 
 *     # size hint
 */
  __pyx_v_data = ((PyObject **)__pyx_v_arr->data);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":109
 * 
 *     # size hint
 *     kh_resize_pyset(table, n // 10)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  kh_resize_pyset(__pyx_v_table, __Pyx_div_Py_ssize_t(__pyx_v_n, 10));

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":111
 *     kh_resize_pyset(table, n // 10)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         obj = arr[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":112
 * 
 *     for i in range(n):
 *         obj = arr[i]             # <<<<<<<<<<<<<<
 * 
 *         k = kh_get_pyset(table, <PyObject*> obj)
 */
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_arr.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_obj);
    __pyx_v_obj = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":114
 *         obj = arr[i]
 * 
 *         k = kh_get_pyset(table, <PyObject*> obj)             # <<<<<<<<<<<<<<
 *         if not kh_exist_pyset(table, k):
 *             k = kh_put_pyset(table, <PyObject*> obj, &ret)
 */
    __pyx_v_k = kh_get_pyset(__pyx_v_table, ((PyObject *)__pyx_v_obj));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":115
 * 
 *         k = kh_get_pyset(table, <PyObject*> obj)
 *         if not kh_exist_pyset(table, k):             # <<<<<<<<<<<<<<
 *             k = kh_put_pyset(table, <PyObject*> obj, &ret)
 *             # uniques.append(obj)
 */
    __pyx_t_6 = (!kh_exist_pyset(__pyx_v_table, __pyx_v_k));
    if (__pyx_t_6) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":116
 *         k = kh_get_pyset(table, <PyObject*> obj)
 *         if not kh_exist_pyset(table, k):
 *             k = kh_put_pyset(table, <PyObject*> obj, &ret)             # <<<<<<<<<<<<<<
 *             # uniques.append(obj)
 *             # Py_INCREF(<object> obj)
 */
      __pyx_v_k = kh_put_pyset(__pyx_v_table, ((PyObject *)__pyx_v_obj), (&__pyx_v_ret));
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":120
 *             # Py_INCREF(<object> obj)
 * 
 *     kh_destroy_pyset(table)             # <<<<<<<<<<<<<<
 * 
 *     return None
 */
  kh_destroy_pyset(__pyx_v_table);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":122
 *     kh_destroy_pyset(table)
 * 
 *     return None             # <<<<<<<<<<<<<<
 * 
 * def int64_unique(ndarray[int64_t] arr):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_None);
  __pyx_r = Py_None;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.obj_unique", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_obj);
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_341int64_unique(PyObject *__pyx_self, PyObject *__pyx_v_arr); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_341int64_unique = {__Pyx_NAMESTR("int64_unique"), (PyCFunction)__pyx_pw_6pandas_8_tseries_341int64_unique, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_341int64_unique(PyObject *__pyx_self, PyObject *__pyx_v_arr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("int64_unique (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), __pyx_ptype_5numpy_ndarray, 1, "arr", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_340int64_unique(__pyx_self, ((PyArrayObject *)__pyx_v_arr));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":124
 *     return None
 * 
 * def int64_unique(ndarray[int64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         kh_int64_t *table
 */

static PyObject *__pyx_pf_6pandas_8_tseries_340int64_unique(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_arr) {
  kh_int64_t *__pyx_v_table;
  __pyx_t_5numpy_int64_t __pyx_v_obj;
  int __pyx_v_ret;
  khiter_t __pyx_v_k;
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_uniques = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_uniques;
  __Pyx_Buffer __pyx_pybuffer_uniques;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("int64_unique");
  __pyx_pybuffer_uniques.pybuffer.buf = NULL;
  __pyx_pybuffer_uniques.refcount = 0;
  __pyx_pybuffernd_uniques.data = NULL;
  __pyx_pybuffernd_uniques.rcbuffer = &__pyx_pybuffer_uniques;
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_v_arr, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":130
 *         int64_t obj
 *         PyObject **data
 *         int ret = 0             # <<<<<<<<<<<<<<
 *         khiter_t k
 *         Py_ssize_t i, j, n
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":135
 *         ndarray[int64_t] uniques
 * 
 *     n = len(arr)             # <<<<<<<<<<<<<<
 *     uniques = np.empty(n, dtype='i8')
 * 
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_arr)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":136
 * 
 *     n = len(arr)
 *     uniques = np.empty(n, dtype='i8')             # <<<<<<<<<<<<<<
 * 
 *     table = kh_init_int64()
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_uniques.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_uniques.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_uniques.rcbuffer->pybuffer, (PyObject*)__pyx_v_uniques, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_uniques.diminfo[0].strides = __pyx_pybuffernd_uniques.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_uniques.diminfo[0].shape = __pyx_pybuffernd_uniques.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_uniques = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":138
 *     uniques = np.empty(n, dtype='i8')
 * 
 *     table = kh_init_int64()             # <<<<<<<<<<<<<<
 *     kh_resize_int64(table, n)
 * 
 */
  __pyx_v_table = kh_init_int64();

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":139
 * 
 *     table = kh_init_int64()
 *     kh_resize_int64(table, n)             # <<<<<<<<<<<<<<
 * 
 *     j = 0
 */
  kh_resize_int64(__pyx_v_table, __pyx_v_n);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":141
 *     kh_resize_int64(table, n)
 * 
 *     j = 0             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_v_j = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":143
 *     j = 0
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         obj = arr[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_1; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":144
 * 
 *     for i in range(n):
 *         obj = arr[i]             # <<<<<<<<<<<<<<
 * 
 *         k = kh_get_int64(table, obj)
 */
    __pyx_t_12 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_12 < 0) {
      __pyx_t_12 += __pyx_pybuffernd_arr.diminfo[0].shape;
      if (unlikely(__pyx_t_12 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_arr.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_obj = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_arr.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":146
 *         obj = arr[i]
 * 
 *         k = kh_get_int64(table, obj)             # <<<<<<<<<<<<<<
 *         if not kh_exist_int64(table, k):
 *             k = kh_put_int64(table, obj, &ret)
 */
    __pyx_v_k = kh_get_int64(__pyx_v_table, __pyx_v_obj);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":147
 * 
 *         k = kh_get_int64(table, obj)
 *         if not kh_exist_int64(table, k):             # <<<<<<<<<<<<<<
 *             k = kh_put_int64(table, obj, &ret)
 *             uniques[j] = obj
 */
    __pyx_t_13 = (!kh_exist_int64(__pyx_v_table, __pyx_v_k));
    if (__pyx_t_13) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":148
 *         k = kh_get_int64(table, obj)
 *         if not kh_exist_int64(table, k):
 *             k = kh_put_int64(table, obj, &ret)             # <<<<<<<<<<<<<<
 *             uniques[j] = obj
 *             j += 1
 */
      __pyx_v_k = kh_put_int64(__pyx_v_table, __pyx_v_obj, (&__pyx_v_ret));

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":149
 *         if not kh_exist_int64(table, k):
 *             k = kh_put_int64(table, obj, &ret)
 *             uniques[j] = obj             # <<<<<<<<<<<<<<
 *             j += 1
 *             # Py_INCREF(<object> obj)
 */
      __pyx_t_14 = __pyx_v_j;
      __pyx_t_7 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_uniques.diminfo[0].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_uniques.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_uniques.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_uniques.diminfo[0].strides) = __pyx_v_obj;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":150
 *             k = kh_put_int64(table, obj, &ret)
 *             uniques[j] = obj
 *             j += 1             # <<<<<<<<<<<<<<
 *             # Py_INCREF(<object> obj)
 * 
 */
      __pyx_v_j = (__pyx_v_j + 1);
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":153
 *             # Py_INCREF(<object> obj)
 * 
 *     kh_destroy_int64(table)             # <<<<<<<<<<<<<<
 * 
 *     return np.sort(uniques[:j])
 */
  kh_destroy_int64(__pyx_v_table);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":155
 *     kh_destroy_int64(table)
 * 
 *     return np.sort(uniques[:j])             # <<<<<<<<<<<<<<
 * 
 * cdef class StringHashTable:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__sort); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_uniques), 0, __pyx_v_j); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_uniques.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.int64_unique", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_uniques.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_uniques);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_15StringHashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_15StringHashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_size_hint = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_1);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size_hint);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_size_hint = values[0];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_size_hint = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.StringHashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_15StringHashTable___init__(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self), __pyx_v_size_hint);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":162
 *         kh_str_t *table
 * 
 *     def __init__(self, size_hint=1):             # <<<<<<<<<<<<<<
 *         if size_hint is not None:
 *             kh_resize_str(self.table, size_hint)
 */

static int __pyx_pf_6pandas_8_tseries_15StringHashTable___init__(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyObject *__pyx_v_size_hint) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  khint_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":163
 * 
 *     def __init__(self, size_hint=1):
 *         if size_hint is not None:             # <<<<<<<<<<<<<<
 *             kh_resize_str(self.table, size_hint)
 * 
 */
  __pyx_t_1 = (__pyx_v_size_hint != Py_None);
  if (__pyx_t_1) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":164
 *     def __init__(self, size_hint=1):
 *         if size_hint is not None:
 *             kh_resize_str(self.table, size_hint)             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
    __pyx_t_2 = __Pyx_PyInt_from_py_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_2 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    kh_resize_str(__pyx_v_self->table, __pyx_t_2);
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.StringHashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_15StringHashTable_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_15StringHashTable_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_6pandas_8_tseries_15StringHashTable_2__cinit__(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":166
 *             kh_resize_str(self.table, size_hint)
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.table = kh_init_str()
 * 
 */

static int __pyx_pf_6pandas_8_tseries_15StringHashTable_2__cinit__(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":167
 * 
 *     def __cinit__(self):
 *         self.table = kh_init_str()             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->table = kh_init_str();

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static void __pyx_pw_6pandas_8_tseries_15StringHashTable_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6pandas_8_tseries_15StringHashTable_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)");
  __pyx_pf_6pandas_8_tseries_15StringHashTable_4__dealloc__(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":169
 *         self.table = kh_init_str()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         kh_destroy_str(self.table)
 * 
 */

static void __pyx_pf_6pandas_8_tseries_15StringHashTable_4__dealloc__(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":170
 * 
 *     def __dealloc__(self):
 *         kh_destroy_str(self.table)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline int check_type(self, object val):
 */
  kh_destroy_str(__pyx_v_self->table);

  __Pyx_RefNannyFinishContext();
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":172
 *         kh_destroy_str(self.table)
 * 
 *     cdef inline int check_type(self, object val):             # <<<<<<<<<<<<<<
 *         return util.is_string_object(val)
 * 
 */

static CYTHON_INLINE int __pyx_f_6pandas_8_tseries_15StringHashTable_check_type(CYTHON_UNUSED struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("check_type");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":173
 * 
 *     cdef inline int check_type(self, object val):
 *         return util.is_string_object(val)             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_item(self, object val):
 */
  __pyx_r = is_string_object(__pyx_v_val);
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":175
 *         return util.is_string_object(val)
 * 
 *     cpdef get_item(self, object val):             # <<<<<<<<<<<<<<
 *         cdef khiter_t k
 *         k = kh_get_str(self.table, util.get_c_string(val))
 */

static PyObject *__pyx_pw_6pandas_8_tseries_15StringHashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_15StringHashTable_get_item(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyObject *__pyx_v_val, int __pyx_skip_dispatch) {
  khiter_t __pyx_v_k;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_item");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pw_6pandas_8_tseries_15StringHashTable_7get_item)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":177
 *     cpdef get_item(self, object val):
 *         cdef khiter_t k
 *         k = kh_get_str(self.table, util.get_c_string(val))             # <<<<<<<<<<<<<<
 *         if k != self.table.n_buckets:
 *             return self.table.vals[k]
 */
  __pyx_v_k = kh_get_str(__pyx_v_self->table, get_c_string(__pyx_v_val));

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":178
 *         cdef khiter_t k
 *         k = kh_get_str(self.table, util.get_c_string(val))
 *         if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *             return self.table.vals[k]
 *         else:
 */
  __pyx_t_4 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
  if (__pyx_t_4) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":179
 *         k = kh_get_str(self.table, util.get_c_string(val))
 *         if k != self.table.n_buckets:
 *             return self.table.vals[k]             # <<<<<<<<<<<<<<
 *         else:
 *             raise KeyError(val)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyInt_FromSsize_t((__pyx_v_self->table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":181
 *             return self.table.vals[k]
 *         else:
 *             raise KeyError(val)             # <<<<<<<<<<<<<<
 * 
 *     def get_iter_test(self, object key, Py_ssize_t iterations):
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_val);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val);
    __Pyx_GIVEREF(__pyx_v_val);
    __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._tseries.StringHashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_15StringHashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_15StringHashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_item (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_15StringHashTable_6get_item(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self), ((PyObject *)__pyx_v_val));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":175
 *         return util.is_string_object(val)
 * 
 *     cpdef get_item(self, object val):             # <<<<<<<<<<<<<<
 *         cdef khiter_t k
 *         k = kh_get_str(self.table, util.get_c_string(val))
 */

static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_6get_item(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_item");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_StringHashTable *)__pyx_v_self->__pyx_vtab)->get_item(__pyx_v_self, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.StringHashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_15StringHashTable_9get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_15StringHashTable_9get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  Py_ssize_t __pyx_v_iterations;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__iterations,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_iter_test (wrapper)");
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterations);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, 1); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_iter_test") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_key = values[0];
      __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = values[0];
    __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.StringHashTable.get_iter_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_15StringHashTable_8get_iter_test(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_iterations);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":183
 *             raise KeyError(val)
 * 
 *     def get_iter_test(self, object key, Py_ssize_t iterations):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i, val
 *         for i in range(iterations):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_8get_iter_test(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_iterations) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  CYTHON_UNUSED Py_ssize_t __pyx_v_val;
  khint_t __pyx_v_k;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("get_iter_test");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":185
 *     def get_iter_test(self, object key, Py_ssize_t iterations):
 *         cdef Py_ssize_t i, val
 *         for i in range(iterations):             # <<<<<<<<<<<<<<
 *             k = kh_get_str(self.table, util.get_c_string(key))
 *             if k != self.table.n_buckets:
 */
  __pyx_t_1 = __pyx_v_iterations;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":186
 *         cdef Py_ssize_t i, val
 *         for i in range(iterations):
 *             k = kh_get_str(self.table, util.get_c_string(key))             # <<<<<<<<<<<<<<
 *             if k != self.table.n_buckets:
 *                 val = self.table.vals[k]
 */
    __pyx_v_k = kh_get_str(__pyx_v_self->table, get_c_string(__pyx_v_key));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":187
 *         for i in range(iterations):
 *             k = kh_get_str(self.table, util.get_c_string(key))
 *             if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 val = self.table.vals[k]
 * 
 */
    __pyx_t_3 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":188
 *             k = kh_get_str(self.table, util.get_c_string(key))
 *             if k != self.table.n_buckets:
 *                 val = self.table.vals[k]             # <<<<<<<<<<<<<<
 * 
 *     cpdef set_item(self, object key, Py_ssize_t val):
 */
      __pyx_v_val = (__pyx_v_self->table->vals[__pyx_v_k]);
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":190
 *                 val = self.table.vals[k]
 * 
 *     cpdef set_item(self, object key, Py_ssize_t val):             # <<<<<<<<<<<<<<
 *         cdef:
 *             khiter_t k
 */

static PyObject *__pyx_pw_6pandas_8_tseries_15StringHashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_15StringHashTable_set_item(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val, int __pyx_skip_dispatch) {
  khiter_t __pyx_v_k;
  int __pyx_v_ret;
  char *__pyx_v_buf;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  kh_cstr_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_item");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__set_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pw_6pandas_8_tseries_15StringHashTable_11set_item)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":193
 *         cdef:
 *             khiter_t k
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             char* buf
 * 
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":196
 *             char* buf
 * 
 *         buf = util.get_c_string(key)             # <<<<<<<<<<<<<<
 * 
 *         k = kh_put_str(self.table, buf, &ret)
 */
  __pyx_v_buf = get_c_string(__pyx_v_key);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":198
 *         buf = util.get_c_string(key)
 * 
 *         k = kh_put_str(self.table, buf, &ret)             # <<<<<<<<<<<<<<
 *         self.table.keys[k] = key
 *         if kh_exist_str(self.table, k):
 */
  __pyx_v_k = kh_put_str(__pyx_v_self->table, __pyx_v_buf, (&__pyx_v_ret));

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":199
 * 
 *         k = kh_put_str(self.table, buf, &ret)
 *         self.table.keys[k] = key             # <<<<<<<<<<<<<<
 *         if kh_exist_str(self.table, k):
 *             self.table.vals[k] = val
 */
  __pyx_t_4 = PyBytes_AsString(__pyx_v_key); if (unlikely((__pyx_t_4 == (kh_cstr_t)NULL) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  (__pyx_v_self->table->keys[__pyx_v_k]) = __pyx_t_4;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":200
 *         k = kh_put_str(self.table, buf, &ret)
 *         self.table.keys[k] = key
 *         if kh_exist_str(self.table, k):             # <<<<<<<<<<<<<<
 *             self.table.vals[k] = val
 *         else:
 */
  __pyx_t_5 = kh_exist_str(__pyx_v_self->table, __pyx_v_k);
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":201
 *         self.table.keys[k] = key
 *         if kh_exist_str(self.table, k):
 *             self.table.vals[k] = val             # <<<<<<<<<<<<<<
 *         else:
 *             raise KeyError(key)
 */
    (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_val;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":203
 *             self.table.vals[k] = val
 *         else:
 *             raise KeyError(key)             # <<<<<<<<<<<<<<
 * 
 *     def get_indexer(self, ndarray[object] values):
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._tseries.StringHashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_15StringHashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_15StringHashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  Py_ssize_t __pyx_v_val;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__val,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_item (wrapper)");
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, 1); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_item") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_key = values[0];
      __pyx_v_val = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = values[0];
    __pyx_v_val = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.StringHashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_15StringHashTable_10set_item(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":190
 *                 val = self.table.vals[k]
 * 
 *     cpdef set_item(self, object key, Py_ssize_t val):             # <<<<<<<<<<<<<<
 *         cdef:
 *             khiter_t k
 */

static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_10set_item(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_item");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_StringHashTable *)__pyx_v_self->__pyx_vtab)->set_item(__pyx_v_self, __pyx_v_key, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.StringHashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_15StringHashTable_13get_indexer(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_15StringHashTable_13get_indexer(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_indexer (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_15StringHashTable_12get_indexer(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":205
 *             raise KeyError(key)
 * 
 *     def get_indexer(self, ndarray[object] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_12get_indexer(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_labels = 0;
  char *__pyx_v_buf;
  __pyx_t_5numpy_int32_t *__pyx_v_resbuf;
  khiter_t __pyx_v_k;
  kh_str_t *__pyx_v_table;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_indexer");
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":207
 *     def get_indexer(self, ndarray[object] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             ndarray[int32_t] labels = np.empty(n, dtype=np.int32)
 *             char *buf
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":208
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             ndarray[int32_t] labels = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 *             char *buf
 *             int32_t *resbuf = <int32_t*> labels.data
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":210
 *             ndarray[int32_t] labels = np.empty(n, dtype=np.int32)
 *             char *buf
 *             int32_t *resbuf = <int32_t*> labels.data             # <<<<<<<<<<<<<<
 *             khiter_t k
 *             kh_str_t *table = self.table
 */
  __pyx_v_resbuf = ((__pyx_t_5numpy_int32_t *)__pyx_v_labels->data);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":212
 *             int32_t *resbuf = <int32_t*> labels.data
 *             khiter_t k
 *             kh_str_t *table = self.table             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_v_table = __pyx_v_self->table;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":214
 *             kh_str_t *table = self.table
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             buf = util.get_c_string(values[i])
 *             k = kh_get_str(table, buf)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":215
 * 
 *         for i in range(n):
 *             buf = util.get_c_string(values[i])             # <<<<<<<<<<<<<<
 *             k = kh_get_str(table, buf)
 *             if k != table.n_buckets:
 */
    __pyx_t_9 = __pyx_v_i;
    __pyx_t_10 = -1;
    if (__pyx_t_9 < 0) {
      __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_6 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_6);
    __pyx_v_buf = get_c_string(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":216
 *         for i in range(n):
 *             buf = util.get_c_string(values[i])
 *             k = kh_get_str(table, buf)             # <<<<<<<<<<<<<<
 *             if k != table.n_buckets:
 *                 resbuf[i] = table.vals[k]
 */
    __pyx_v_k = kh_get_str(__pyx_v_table, __pyx_v_buf);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":217
 *             buf = util.get_c_string(values[i])
 *             k = kh_get_str(table, buf)
 *             if k != table.n_buckets:             # <<<<<<<<<<<<<<
 *                 resbuf[i] = table.vals[k]
 *             else:
 */
    __pyx_t_11 = (__pyx_v_k != __pyx_v_table->n_buckets);
    if (__pyx_t_11) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":218
 *             k = kh_get_str(table, buf)
 *             if k != table.n_buckets:
 *                 resbuf[i] = table.vals[k]             # <<<<<<<<<<<<<<
 *             else:
 *                 resbuf[i] = -1
 */
      (__pyx_v_resbuf[__pyx_v_i]) = (__pyx_v_table->vals[__pyx_v_k]);
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":220
 *                 resbuf[i] = table.vals[k]
 *             else:
 *                 resbuf[i] = -1             # <<<<<<<<<<<<<<
 *         return labels
 * 
 */
      (__pyx_v_resbuf[__pyx_v_i]) = -1;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":221
 *             else:
 *                 resbuf[i] = -1
 *         return labels             # <<<<<<<<<<<<<<
 * 
 *     def unique(self, ndarray[object] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_labels));
  __pyx_r = ((PyObject *)__pyx_v_labels);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.StringHashTable.get_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_labels);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_15StringHashTable_15unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_15StringHashTable_15unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unique (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_15StringHashTable_14unique(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":223
 *         return labels
 * 
 *     def unique(self, ndarray[object] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_14unique(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_count;
  int __pyx_v_ret;
  PyObject *__pyx_v_val = 0;
  char *__pyx_v_buf;
  khiter_t __pyx_v_k;
  PyObject *__pyx_v_uniques = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unique");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":225
 *     def unique(self, ndarray[object] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             Py_ssize_t idx, count = 0
 *             int ret = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":226
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             Py_ssize_t idx, count = 0             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             object val
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":227
 *             Py_ssize_t i, n = len(values)
 *             Py_ssize_t idx, count = 0
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             object val
 *             char *buf
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":231
 *             char *buf
 *             khiter_t k
 *             list uniques = []             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_uniques = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":233
 *             list uniques = []
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             buf = util.get_c_string(val)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":234
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             buf = util.get_c_string(val)
 *             k = kh_get_str(self.table, buf)
 */
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":235
 *         for i in range(n):
 *             val = values[i]
 *             buf = util.get_c_string(val)             # <<<<<<<<<<<<<<
 *             k = kh_get_str(self.table, buf)
 *             if k == self.table.n_buckets:
 */
    __pyx_v_buf = get_c_string(__pyx_v_val);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":236
 *             val = values[i]
 *             buf = util.get_c_string(val)
 *             k = kh_get_str(self.table, buf)             # <<<<<<<<<<<<<<
 *             if k == self.table.n_buckets:
 *                 k = kh_put_str(self.table, buf, &ret)
 */
    __pyx_v_k = kh_get_str(__pyx_v_self->table, __pyx_v_buf);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":237
 *             buf = util.get_c_string(val)
 *             k = kh_get_str(self.table, buf)
 *             if k == self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 k = kh_put_str(self.table, buf, &ret)
 *                 # print 'putting %s, %s' % (val, count)
 */
    __pyx_t_6 = (__pyx_v_k == __pyx_v_self->table->n_buckets);
    if (__pyx_t_6) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":238
 *             k = kh_get_str(self.table, buf)
 *             if k == self.table.n_buckets:
 *                 k = kh_put_str(self.table, buf, &ret)             # <<<<<<<<<<<<<<
 *                 # print 'putting %s, %s' % (val, count)
 *                 if not ret:
 */
      __pyx_v_k = kh_put_str(__pyx_v_self->table, __pyx_v_buf, (&__pyx_v_ret));

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":240
 *                 k = kh_put_str(self.table, buf, &ret)
 *                 # print 'putting %s, %s' % (val, count)
 *                 if not ret:             # <<<<<<<<<<<<<<
 *                     kh_del_str(self.table, k)
 *                 count += 1
 */
      __pyx_t_6 = (!__pyx_v_ret);
      if (__pyx_t_6) {

        /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":241
 *                 # print 'putting %s, %s' % (val, count)
 *                 if not ret:
 *                     kh_del_str(self.table, k)             # <<<<<<<<<<<<<<
 *                 count += 1
 *                 uniques.append(val)
 */
        kh_del_str(__pyx_v_self->table, __pyx_v_k);
        goto __pyx_L6;
      }
      __pyx_L6:;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":242
 *                 if not ret:
 *                     kh_del_str(self.table, k)
 *                 count += 1             # <<<<<<<<<<<<<<
 *                 uniques.append(val)
 * 
 */
      __pyx_v_count = (__pyx_v_count + 1);

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":243
 *                     kh_del_str(self.table, k)
 *                 count += 1
 *                 uniques.append(val)             # <<<<<<<<<<<<<<
 * 
 *         # return None
 */
      __pyx_t_7 = PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":246
 * 
 *         # return None
 *         return uniques             # <<<<<<<<<<<<<<
 * 
 *     def factorize(self, ndarray[object] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_uniques));
  __pyx_r = ((PyObject *)__pyx_v_uniques);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.StringHashTable.unique", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_15StringHashTable_17factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_15StringHashTable_17factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("factorize (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_15StringHashTable_16factorize(((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":248
 *         return uniques
 * 
 *     def factorize(self, ndarray[object] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_15StringHashTable_16factorize(struct __pyx_obj_6pandas_8_tseries_StringHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_labels = 0;
  PyArrayObject *__pyx_v_counts = 0;
  PyObject *__pyx_v_reverse = 0;
  Py_ssize_t __pyx_v_idx;
  Py_ssize_t __pyx_v_count;
  int __pyx_v_ret;
  PyObject *__pyx_v_val = 0;
  char *__pyx_v_buf;
  khiter_t __pyx_v_k;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  PyArrayObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("factorize");
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":250
 *     def factorize(self, ndarray[object] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             ndarray[int32_t] labels = np.empty(n, dtype=np.int32)
 *             ndarray[int32_t] counts = np.empty(n, dtype=np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":251
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             ndarray[int32_t] labels = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 *             ndarray[int32_t] counts = np.empty(n, dtype=np.int32)
 *             dict reverse = {}
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":252
 *             Py_ssize_t i, n = len(values)
 *             ndarray[int32_t] labels = np.empty(n, dtype=np.int32)
 *             ndarray[int32_t] counts = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 *             dict reverse = {}
 *             Py_ssize_t idx, count = 0
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__int32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_8 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":253
 *             ndarray[int32_t] labels = np.empty(n, dtype=np.int32)
 *             ndarray[int32_t] counts = np.empty(n, dtype=np.int32)
 *             dict reverse = {}             # <<<<<<<<<<<<<<
 *             Py_ssize_t idx, count = 0
 *             int ret = 0
 */
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  __pyx_v_reverse = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":254
 *             ndarray[int32_t] counts = np.empty(n, dtype=np.int32)
 *             dict reverse = {}
 *             Py_ssize_t idx, count = 0             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             object val
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":255
 *             dict reverse = {}
 *             Py_ssize_t idx, count = 0
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             object val
 *             char *buf
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":260
 *             khiter_t k
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             buf = util.get_c_string(val)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":261
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             buf = util.get_c_string(val)
 *             k = kh_get_str(self.table, buf)
 */
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_11 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_11 = 0;
    if (unlikely(__pyx_t_11 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_11);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":262
 *         for i in range(n):
 *             val = values[i]
 *             buf = util.get_c_string(val)             # <<<<<<<<<<<<<<
 *             k = kh_get_str(self.table, buf)
 *             if k != self.table.n_buckets:
 */
    __pyx_v_buf = get_c_string(__pyx_v_val);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":263
 *             val = values[i]
 *             buf = util.get_c_string(val)
 *             k = kh_get_str(self.table, buf)             # <<<<<<<<<<<<<<
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]
 */
    __pyx_v_k = kh_get_str(__pyx_v_self->table, __pyx_v_buf);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":264
 *             buf = util.get_c_string(val)
 *             k = kh_get_str(self.table, buf)
 *             if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx
 */
    __pyx_t_12 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
    if (__pyx_t_12) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":265
 *             k = kh_get_str(self.table, buf)
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]             # <<<<<<<<<<<<<<
 *                 labels[i] = idx
 *                 counts[idx] = counts[idx] + 1
 */
      __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]);

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":266
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx             # <<<<<<<<<<<<<<
 *                 counts[idx] = counts[idx] + 1
 *             else:
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_11 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":267
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx
 *                 counts[idx] = counts[idx] + 1             # <<<<<<<<<<<<<<
 *             else:
 *                 k = kh_put_str(self.table, buf, &ret)
 */
      __pyx_t_14 = __pyx_v_idx;
      __pyx_t_11 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_15 = __pyx_v_idx;
      __pyx_t_11 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_counts.diminfo[0].strides)) + 1);
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":269
 *                 counts[idx] = counts[idx] + 1
 *             else:
 *                 k = kh_put_str(self.table, buf, &ret)             # <<<<<<<<<<<<<<
 *                 # print 'putting %s, %s' % (val, count)
 *                 if not ret:
 */
      __pyx_v_k = kh_put_str(__pyx_v_self->table, __pyx_v_buf, (&__pyx_v_ret));

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":271
 *                 k = kh_put_str(self.table, buf, &ret)
 *                 # print 'putting %s, %s' % (val, count)
 *                 if not ret:             # <<<<<<<<<<<<<<
 *                     kh_del_str(self.table, k)
 * 
 */
      __pyx_t_12 = (!__pyx_v_ret);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":272
 *                 # print 'putting %s, %s' % (val, count)
 *                 if not ret:
 *                     kh_del_str(self.table, k)             # <<<<<<<<<<<<<<
 * 
 *                 self.table.vals[k] = count
 */
        kh_del_str(__pyx_v_self->table, __pyx_v_k);
        goto __pyx_L6;
      }
      __pyx_L6:;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":274
 *                     kh_del_str(self.table, k)
 * 
 *                 self.table.vals[k] = count             # <<<<<<<<<<<<<<
 *                 reverse[count] = val
 *                 labels[i] = count
 */
      (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":275
 * 
 *                 self.table.vals[k] = count
 *                 reverse[count] = val             # <<<<<<<<<<<<<<
 *                 labels[i] = count
 *                 counts[count] = 1
 */
      if (__Pyx_SetItemInt(((PyObject *)__pyx_v_reverse), __pyx_v_count, __pyx_v_val, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":276
 *                 self.table.vals[k] = count
 *                 reverse[count] = val
 *                 labels[i] = count             # <<<<<<<<<<<<<<
 *                 counts[count] = 1
 *                 count += 1
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_11 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":277
 *                 reverse[count] = val
 *                 labels[i] = count
 *                 counts[count] = 1             # <<<<<<<<<<<<<<
 *                 count += 1
 * 
 */
      __pyx_t_17 = __pyx_v_count;
      __pyx_t_11 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) = 1;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":278
 *                 labels[i] = count
 *                 counts[count] = 1
 *                 count += 1             # <<<<<<<<<<<<<<
 * 
 *         # return None
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":281
 * 
 *         # return None
 *         return reverse, labels, counts[:count].copy()             # <<<<<<<<<<<<<<
 * 
 * cdef class Int32HashTable:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_counts), 0, __pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__copy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_v_reverse));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_reverse));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_reverse));
  __Pyx_INCREF(((PyObject *)__pyx_v_labels));
  PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_labels));
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = ((PyObject *)__pyx_t_6);
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.StringHashTable.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_labels);
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XDECREF(__pyx_v_reverse);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_14Int32HashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_14Int32HashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_size_hint = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_1);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size_hint);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_size_hint = values[0];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_size_hint = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int32HashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int32HashTable___init__(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self), __pyx_v_size_hint);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":288
 *         kh_int32_t *table
 * 
 *     def __init__(self, size_hint=1):             # <<<<<<<<<<<<<<
 *         if size_hint is not None:
 *             kh_resize_int32(self.table, size_hint)
 */

static int __pyx_pf_6pandas_8_tseries_14Int32HashTable___init__(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  khint_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":289
 * 
 *     def __init__(self, size_hint=1):
 *         if size_hint is not None:             # <<<<<<<<<<<<<<
 *             kh_resize_int32(self.table, size_hint)
 * 
 */
  __pyx_t_1 = (__pyx_v_size_hint != Py_None);
  if (__pyx_t_1) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":290
 *     def __init__(self, size_hint=1):
 *         if size_hint is not None:
 *             kh_resize_int32(self.table, size_hint)             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
    __pyx_t_2 = __Pyx_PyInt_from_py_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_2 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    kh_resize_int32(__pyx_v_self->table, __pyx_t_2);
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Int32HashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_14Int32HashTable_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_14Int32HashTable_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int32HashTable_2__cinit__(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":292
 *             kh_resize_int32(self.table, size_hint)
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.table = kh_init_int32()
 * 
 */

static int __pyx_pf_6pandas_8_tseries_14Int32HashTable_2__cinit__(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":293
 * 
 *     def __cinit__(self):
 *         self.table = kh_init_int32()             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->table = kh_init_int32();

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static void __pyx_pw_6pandas_8_tseries_14Int32HashTable_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6pandas_8_tseries_14Int32HashTable_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)");
  __pyx_pf_6pandas_8_tseries_14Int32HashTable_4__dealloc__(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":295
 *         self.table = kh_init_int32()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         kh_destroy_int32(self.table)
 * 
 */

static void __pyx_pf_6pandas_8_tseries_14Int32HashTable_4__dealloc__(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":296
 * 
 *     def __dealloc__(self):
 *         kh_destroy_int32(self.table)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline int check_type(self, object val):
 */
  kh_destroy_int32(__pyx_v_self->table);

  __Pyx_RefNannyFinishContext();
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":298
 *         kh_destroy_int32(self.table)
 * 
 *     cdef inline int check_type(self, object val):             # <<<<<<<<<<<<<<
 *         return util.is_string_object(val)
 * 
 */

static CYTHON_INLINE int __pyx_f_6pandas_8_tseries_14Int32HashTable_check_type(CYTHON_UNUSED struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, PyObject *__pyx_v_val) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("check_type");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":299
 * 
 *     cdef inline int check_type(self, object val):
 *         return util.is_string_object(val)             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_item(self, int32_t val):
 */
  __pyx_r = is_string_object(__pyx_v_val);
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":301
 *         return util.is_string_object(val)
 * 
 *     cpdef get_item(self, int32_t val):             # <<<<<<<<<<<<<<
 *         cdef khiter_t k
 *         k = kh_get_int32(self.table, val)
 */

static PyObject *__pyx_pw_6pandas_8_tseries_14Int32HashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_14Int32HashTable_get_item(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_val, int __pyx_skip_dispatch) {
  khiter_t __pyx_v_k;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_item");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pw_6pandas_8_tseries_14Int32HashTable_7get_item)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":303
 *     cpdef get_item(self, int32_t val):
 *         cdef khiter_t k
 *         k = kh_get_int32(self.table, val)             # <<<<<<<<<<<<<<
 *         if k != self.table.n_buckets:
 *             return self.table.vals[k]
 */
  __pyx_v_k = kh_get_int32(__pyx_v_self->table, __pyx_v_val);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":304
 *         cdef khiter_t k
 *         k = kh_get_int32(self.table, val)
 *         if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *             return self.table.vals[k]
 *         else:
 */
  __pyx_t_4 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
  if (__pyx_t_4) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":305
 *         k = kh_get_int32(self.table, val)
 *         if k != self.table.n_buckets:
 *             return self.table.vals[k]             # <<<<<<<<<<<<<<
 *         else:
 *             raise KeyError(val)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyInt_FromSsize_t((__pyx_v_self->table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":307
 *             return self.table.vals[k]
 *         else:
 *             raise KeyError(val)             # <<<<<<<<<<<<<<
 * 
 *     def get_iter_test(self, int32_t key, Py_ssize_t iterations):
 */
    __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._tseries.Int32HashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int32HashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int32HashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) {
  __pyx_t_5numpy_int32_t __pyx_v_val;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_item (wrapper)");
  assert(__pyx_arg_val); {
    __pyx_v_val = __Pyx_PyInt_from_py_npy_int32(__pyx_arg_val); if (unlikely((__pyx_v_val == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int32HashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int32HashTable_6get_item(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self), ((__pyx_t_5numpy_int32_t)__pyx_v_val));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":301
 *         return util.is_string_object(val)
 * 
 *     cpdef get_item(self, int32_t val):             # <<<<<<<<<<<<<<
 *         cdef khiter_t k
 *         k = kh_get_int32(self.table, val)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_6get_item(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_item");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Int32HashTable *)__pyx_v_self->__pyx_vtab)->get_item(__pyx_v_self, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.Int32HashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int32HashTable_9get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int32HashTable_9get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_5numpy_int32_t __pyx_v_key;
  Py_ssize_t __pyx_v_iterations;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__iterations,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_iter_test (wrapper)");
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterations);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, 1); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_iter_test") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_key = __Pyx_PyInt_from_py_npy_int32(values[0]); if (unlikely((__pyx_v_key == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = __Pyx_PyInt_from_py_npy_int32(values[0]); if (unlikely((__pyx_v_key == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int32HashTable.get_iter_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int32HashTable_8get_iter_test(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_iterations);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":309
 *             raise KeyError(val)
 * 
 *     def get_iter_test(self, int32_t key, Py_ssize_t iterations):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i, val=0
 *         for i in range(iterations):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_8get_iter_test(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, CYTHON_UNUSED __pyx_t_5numpy_int32_t __pyx_v_key, Py_ssize_t __pyx_v_iterations) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_val;
  khint_t __pyx_v_k;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("get_iter_test");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":310
 * 
 *     def get_iter_test(self, int32_t key, Py_ssize_t iterations):
 *         cdef Py_ssize_t i, val=0             # <<<<<<<<<<<<<<
 *         for i in range(iterations):
 *             k = kh_get_int32(self.table, val)
 */
  __pyx_v_val = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":311
 *     def get_iter_test(self, int32_t key, Py_ssize_t iterations):
 *         cdef Py_ssize_t i, val=0
 *         for i in range(iterations):             # <<<<<<<<<<<<<<
 *             k = kh_get_int32(self.table, val)
 *             if k != self.table.n_buckets:
 */
  __pyx_t_1 = __pyx_v_iterations;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":312
 *         cdef Py_ssize_t i, val=0
 *         for i in range(iterations):
 *             k = kh_get_int32(self.table, val)             # <<<<<<<<<<<<<<
 *             if k != self.table.n_buckets:
 *                 val = self.table.vals[k]
 */
    __pyx_v_k = kh_get_int32(__pyx_v_self->table, __pyx_v_val);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":313
 *         for i in range(iterations):
 *             k = kh_get_int32(self.table, val)
 *             if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 val = self.table.vals[k]
 * 
 */
    __pyx_t_3 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":314
 *             k = kh_get_int32(self.table, val)
 *             if k != self.table.n_buckets:
 *                 val = self.table.vals[k]             # <<<<<<<<<<<<<<
 * 
 *     cpdef set_item(self, int32_t key, Py_ssize_t val):
 */
      __pyx_v_val = (__pyx_v_self->table->vals[__pyx_v_k]);
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":316
 *                 val = self.table.vals[k]
 * 
 *     cpdef set_item(self, int32_t key, Py_ssize_t val):             # <<<<<<<<<<<<<<
 *         cdef:
 *             khiter_t k
 */

static PyObject *__pyx_pw_6pandas_8_tseries_14Int32HashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_14Int32HashTable_set_item(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_key, Py_ssize_t __pyx_v_val, int __pyx_skip_dispatch) {
  khiter_t __pyx_v_k;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_item");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__set_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pw_6pandas_8_tseries_14Int32HashTable_11set_item)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_val); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":319
 *         cdef:
 *             khiter_t k
 *             int ret = 0             # <<<<<<<<<<<<<<
 * 
 *         k = kh_put_int32(self.table, key, &ret)
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":321
 *             int ret = 0
 * 
 *         k = kh_put_int32(self.table, key, &ret)             # <<<<<<<<<<<<<<
 *         self.table.keys[k] = key
 *         if kh_exist_int32(self.table, k):
 */
  __pyx_v_k = kh_put_int32(__pyx_v_self->table, __pyx_v_key, (&__pyx_v_ret));

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":322
 * 
 *         k = kh_put_int32(self.table, key, &ret)
 *         self.table.keys[k] = key             # <<<<<<<<<<<<<<
 *         if kh_exist_int32(self.table, k):
 *             self.table.vals[k] = val
 */
  (__pyx_v_self->table->keys[__pyx_v_k]) = __pyx_v_key;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":323
 *         k = kh_put_int32(self.table, key, &ret)
 *         self.table.keys[k] = key
 *         if kh_exist_int32(self.table, k):             # <<<<<<<<<<<<<<
 *             self.table.vals[k] = val
 *         else:
 */
  __pyx_t_5 = kh_exist_int32(__pyx_v_self->table, __pyx_v_k);
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":324
 *         self.table.keys[k] = key
 *         if kh_exist_int32(self.table, k):
 *             self.table.vals[k] = val             # <<<<<<<<<<<<<<
 *         else:
 *             raise KeyError(key)
 */
    (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_val;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":326
 *             self.table.vals[k] = val
 *         else:
 *             raise KeyError(key)             # <<<<<<<<<<<<<<
 * 
 *     def map_locations(self, ndarray[int32_t] values):
 */
    __pyx_t_1 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._tseries.Int32HashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int32HashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int32HashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_5numpy_int32_t __pyx_v_key;
  Py_ssize_t __pyx_v_val;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__val,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_item (wrapper)");
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, 1); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_item") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_key = __Pyx_PyInt_from_py_npy_int32(values[0]); if (unlikely((__pyx_v_key == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_val = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = __Pyx_PyInt_from_py_npy_int32(values[0]); if (unlikely((__pyx_v_key == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_val = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int32HashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int32HashTable_10set_item(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":316
 *                 val = self.table.vals[k]
 * 
 *     cpdef set_item(self, int32_t key, Py_ssize_t val):             # <<<<<<<<<<<<<<
 *         cdef:
 *             khiter_t k
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_10set_item(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, __pyx_t_5numpy_int32_t __pyx_v_key, Py_ssize_t __pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_item");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Int32HashTable *)__pyx_v_self->__pyx_vtab)->set_item(__pyx_v_self, __pyx_v_key, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.Int32HashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int32HashTable_13map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int32HashTable_13map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map_locations (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int32HashTable_12map_locations(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":328
 *             raise KeyError(key)
 * 
 *     def map_locations(self, ndarray[int32_t] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_12map_locations(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  int __pyx_v_ret;
  __pyx_t_5numpy_int32_t __pyx_v_val;
  khiter_t __pyx_v_k;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_locations");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":330
 *     def map_locations(self, ndarray[int32_t] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             int32_t val
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":331
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             int32_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":335
 *             khiter_t k
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             k = kh_put_int32(self.table, val, &ret)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":336
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             k = kh_put_int32(self.table, val, &ret)
 *             self.table.vals[k] = i
 */
    __pyx_t_3 = __pyx_v_i;
    __pyx_t_4 = -1;
    if (__pyx_t_3 < 0) {
      __pyx_t_3 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
    } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0;
    if (unlikely(__pyx_t_4 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_4);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":337
 *         for i in range(n):
 *             val = values[i]
 *             k = kh_put_int32(self.table, val, &ret)             # <<<<<<<<<<<<<<
 *             self.table.vals[k] = i
 * 
 */
    __pyx_v_k = kh_put_int32(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":338
 *             val = values[i]
 *             k = kh_put_int32(self.table, val, &ret)
 *             self.table.vals[k] = i             # <<<<<<<<<<<<<<
 * 
 *     def lookup(self, ndarray[int32_t] values):
 */
    (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_i;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int32HashTable.map_locations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int32HashTable_15lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int32HashTable_15lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lookup (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int32HashTable_14lookup(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":340
 *             self.table.vals[k] = i
 * 
 *     def lookup(self, ndarray[int32_t] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_14lookup(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  CYTHON_UNUSED int __pyx_v_ret;
  __pyx_t_5numpy_int32_t __pyx_v_val;
  khiter_t __pyx_v_k;
  PyArrayObject *__pyx_v_locs = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_locs;
  __Pyx_Buffer __pyx_pybuffer_locs;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lookup");
  __pyx_pybuffer_locs.pybuffer.buf = NULL;
  __pyx_pybuffer_locs.refcount = 0;
  __pyx_pybuffernd_locs.data = NULL;
  __pyx_pybuffernd_locs.rcbuffer = &__pyx_pybuffer_locs;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":342
 *     def lookup(self, ndarray[int32_t] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             int32_t val
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":343
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             int32_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":346
 *             int32_t val
 *             khiter_t k
 *             ndarray[int32_t] locs = np.empty(n, dtype='i4')             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_locs.diminfo[0].strides = __pyx_pybuffernd_locs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_locs.diminfo[0].shape = __pyx_pybuffernd_locs.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_locs = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":348
 *             ndarray[int32_t] locs = np.empty(n, dtype='i4')
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             k = kh_get_int32(self.table, val)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":349
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             k = kh_get_int32(self.table, val)
 *             if k != self.table.n_buckets:
 */
    __pyx_t_8 = __pyx_v_i;
    __pyx_t_9 = -1;
    if (__pyx_t_8 < 0) {
      __pyx_t_8 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":350
 *         for i in range(n):
 *             val = values[i]
 *             k = kh_get_int32(self.table, val)             # <<<<<<<<<<<<<<
 *             if k != self.table.n_buckets:
 *                 locs[i] = self.table.vals[k]
 */
    __pyx_v_k = kh_get_int32(__pyx_v_self->table, __pyx_v_val);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":351
 *             val = values[i]
 *             k = kh_get_int32(self.table, val)
 *             if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 locs[i] = self.table.vals[k]
 *             else:
 */
    __pyx_t_10 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
    if (__pyx_t_10) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":352
 *             k = kh_get_int32(self.table, val)
 *             if k != self.table.n_buckets:
 *                 locs[i] = self.table.vals[k]             # <<<<<<<<<<<<<<
 *             else:
 *                 locs[i] = -1
 */
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_9 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_locs.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_locs.diminfo[0].strides) = (__pyx_v_self->table->vals[__pyx_v_k]);
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":354
 *                 locs[i] = self.table.vals[k]
 *             else:
 *                 locs[i] = -1             # <<<<<<<<<<<<<<
 * 
 *         return locs
 */
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_9 = -1;
      if (__pyx_t_12 < 0) {
        __pyx_t_12 += __pyx_pybuffernd_locs.diminfo[0].shape;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_locs.diminfo[0].strides) = -1;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":356
 *                 locs[i] = -1
 * 
 *         return locs             # <<<<<<<<<<<<<<
 * 
 *     def factorize(self, ndarray[int32_t] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_locs));
  __pyx_r = ((PyObject *)__pyx_v_locs);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int32HashTable.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int32HashTable_17factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int32HashTable_17factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("factorize (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int32HashTable_16factorize(((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":358
 *         return locs
 * 
 *     def factorize(self, ndarray[int32_t] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int32HashTable_16factorize(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_labels = 0;
  PyArrayObject *__pyx_v_counts = 0;
  PyObject *__pyx_v_reverse = 0;
  Py_ssize_t __pyx_v_idx;
  Py_ssize_t __pyx_v_count;
  int __pyx_v_ret;
  __pyx_t_5numpy_int32_t __pyx_v_val;
  khiter_t __pyx_v_k;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  PyArrayObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("factorize");
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":360
 *     def factorize(self, ndarray[int32_t] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             ndarray[int32_t] labels = np.empty(n, dtype=np.int32)
 *             ndarray[int32_t] counts = np.empty(n, dtype=np.int32)
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":361
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             ndarray[int32_t] labels = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 *             ndarray[int32_t] counts = np.empty(n, dtype=np.int32)
 *             dict reverse = {}
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_labels = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":362
 *             Py_ssize_t i, n = len(values)
 *             ndarray[int32_t] labels = np.empty(n, dtype=np.int32)
 *             ndarray[int32_t] counts = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 *             dict reverse = {}
 *             Py_ssize_t idx, count = 0
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__int32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_8 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_counts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_8 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":363
 *             ndarray[int32_t] labels = np.empty(n, dtype=np.int32)
 *             ndarray[int32_t] counts = np.empty(n, dtype=np.int32)
 *             dict reverse = {}             # <<<<<<<<<<<<<<
 *             Py_ssize_t idx, count = 0
 *             int ret = 0
 */
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  __pyx_v_reverse = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":364
 *             ndarray[int32_t] counts = np.empty(n, dtype=np.int32)
 *             dict reverse = {}
 *             Py_ssize_t idx, count = 0             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             int32_t val
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":365
 *             dict reverse = {}
 *             Py_ssize_t idx, count = 0
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             int32_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":369
 *             khiter_t k
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             k = kh_get_int32(self.table, val)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_1; __pyx_t_9+=1) {
    __pyx_v_i = __pyx_t_9;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":370
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             k = kh_get_int32(self.table, val)
 *             if k != self.table.n_buckets:
 */
    __pyx_t_10 = __pyx_v_i;
    __pyx_t_11 = -1;
    if (__pyx_t_10 < 0) {
      __pyx_t_10 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0;
    } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_11 = 0;
    if (unlikely(__pyx_t_11 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_11);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":371
 *         for i in range(n):
 *             val = values[i]
 *             k = kh_get_int32(self.table, val)             # <<<<<<<<<<<<<<
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]
 */
    __pyx_v_k = kh_get_int32(__pyx_v_self->table, __pyx_v_val);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":372
 *             val = values[i]
 *             k = kh_get_int32(self.table, val)
 *             if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx
 */
    __pyx_t_12 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
    if (__pyx_t_12) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":373
 *             k = kh_get_int32(self.table, val)
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]             # <<<<<<<<<<<<<<
 *                 labels[i] = idx
 *                 counts[idx] = counts[idx] + 1
 */
      __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]);

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":374
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx             # <<<<<<<<<<<<<<
 *                 counts[idx] = counts[idx] + 1
 *             else:
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_11 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":375
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx
 *                 counts[idx] = counts[idx] + 1             # <<<<<<<<<<<<<<
 *             else:
 *                 k = kh_put_int32(self.table, val, &ret)
 */
      __pyx_t_14 = __pyx_v_idx;
      __pyx_t_11 = -1;
      if (__pyx_t_14 < 0) {
        __pyx_t_14 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_14 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_15 = __pyx_v_idx;
      __pyx_t_11 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_counts.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_counts.diminfo[0].strides)) + 1);
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":377
 *                 counts[idx] = counts[idx] + 1
 *             else:
 *                 k = kh_put_int32(self.table, val, &ret)             # <<<<<<<<<<<<<<
 *                 if not ret:
 *                     kh_del_int32(self.table, k)
 */
      __pyx_v_k = kh_put_int32(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret));

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":378
 *             else:
 *                 k = kh_put_int32(self.table, val, &ret)
 *                 if not ret:             # <<<<<<<<<<<<<<
 *                     kh_del_int32(self.table, k)
 *                 self.table.vals[k] = count
 */
      __pyx_t_12 = (!__pyx_v_ret);
      if (__pyx_t_12) {

        /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":379
 *                 k = kh_put_int32(self.table, val, &ret)
 *                 if not ret:
 *                     kh_del_int32(self.table, k)             # <<<<<<<<<<<<<<
 *                 self.table.vals[k] = count
 *                 reverse[count] = val
 */
        kh_del_int32(__pyx_v_self->table, __pyx_v_k);
        goto __pyx_L6;
      }
      __pyx_L6:;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":380
 *                 if not ret:
 *                     kh_del_int32(self.table, k)
 *                 self.table.vals[k] = count             # <<<<<<<<<<<<<<
 *                 reverse[count] = val
 *                 labels[i] = count
 */
      (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":381
 *                     kh_del_int32(self.table, k)
 *                 self.table.vals[k] = count
 *                 reverse[count] = val             # <<<<<<<<<<<<<<
 *                 labels[i] = count
 *                 counts[count] = 1
 */
      __pyx_t_5 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_val); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemInt(((PyObject *)__pyx_v_reverse), __pyx_v_count, __pyx_t_5, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":382
 *                 self.table.vals[k] = count
 *                 reverse[count] = val
 *                 labels[i] = count             # <<<<<<<<<<<<<<
 *                 counts[count] = 1
 *                 count += 1
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_11 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":383
 *                 reverse[count] = val
 *                 labels[i] = count
 *                 counts[count] = 1             # <<<<<<<<<<<<<<
 *                 count += 1
 * 
 */
      __pyx_t_17 = __pyx_v_count;
      __pyx_t_11 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_11 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_11 = 0;
      if (unlikely(__pyx_t_11 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_11);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides) = 1;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":384
 *                 labels[i] = count
 *                 counts[count] = 1
 *                 count += 1             # <<<<<<<<<<<<<<
 * 
 *         # return None
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":387
 * 
 *         # return None
 *         return reverse, labels, counts[:count].copy()             # <<<<<<<<<<<<<<
 * 
 * cdef class Int64HashTable:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_counts), 0, __pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__copy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_v_reverse));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_reverse));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_reverse));
  __Pyx_INCREF(((PyObject *)__pyx_v_labels));
  PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_labels));
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = ((PyObject *)__pyx_t_6);
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int32HashTable.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_labels);
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XDECREF(__pyx_v_reverse);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_14Int64HashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_14Int64HashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_size_hint = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_1);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size_hint);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_size_hint = values[0];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_size_hint = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int64HashTable___init__(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self), __pyx_v_size_hint);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":394
 *         kh_int64_t *table
 * 
 *     def __init__(self, size_hint=1):             # <<<<<<<<<<<<<<
 *         if size_hint is not None:
 *             kh_resize_int64(self.table, size_hint)
 */

static int __pyx_pf_6pandas_8_tseries_14Int64HashTable___init__(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  khint_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":395
 * 
 *     def __init__(self, size_hint=1):
 *         if size_hint is not None:             # <<<<<<<<<<<<<<
 *             kh_resize_int64(self.table, size_hint)
 * 
 */
  __pyx_t_1 = (__pyx_v_size_hint != Py_None);
  if (__pyx_t_1) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":396
 *     def __init__(self, size_hint=1):
 *         if size_hint is not None:
 *             kh_resize_int64(self.table, size_hint)             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
    __pyx_t_2 = __Pyx_PyInt_from_py_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_2 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    kh_resize_int64(__pyx_v_self->table, __pyx_t_2);
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_14Int64HashTable_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_14Int64HashTable_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int64HashTable_2__cinit__(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":398
 *             kh_resize_int64(self.table, size_hint)
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.table = kh_init_int64()
 * 
 */

static int __pyx_pf_6pandas_8_tseries_14Int64HashTable_2__cinit__(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":399
 * 
 *     def __cinit__(self):
 *         self.table = kh_init_int64()             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->table = kh_init_int64();

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static void __pyx_pw_6pandas_8_tseries_14Int64HashTable_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6pandas_8_tseries_14Int64HashTable_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)");
  __pyx_pf_6pandas_8_tseries_14Int64HashTable_4__dealloc__(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":401
 *         self.table = kh_init_int64()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         kh_destroy_int64(self.table)
 * 
 */

static void __pyx_pf_6pandas_8_tseries_14Int64HashTable_4__dealloc__(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":402
 * 
 *     def __dealloc__(self):
 *         kh_destroy_int64(self.table)             # <<<<<<<<<<<<<<
 * 
 *     cdef inline bint has_key(self, int64_t val):
 */
  kh_destroy_int64(__pyx_v_self->table);

  __Pyx_RefNannyFinishContext();
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":404
 *         kh_destroy_int64(self.table)
 * 
 *     cdef inline bint has_key(self, int64_t val):             # <<<<<<<<<<<<<<
 *         cdef khiter_t k
 *         k = kh_get_int64(self.table, val)
 */

static CYTHON_INLINE int __pyx_f_6pandas_8_tseries_14Int64HashTable_has_key(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_val) {
  khiter_t __pyx_v_k;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("has_key");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":406
 *     cdef inline bint has_key(self, int64_t val):
 *         cdef khiter_t k
 *         k = kh_get_int64(self.table, val)             # <<<<<<<<<<<<<<
 *         return k != self.table.n_buckets
 * 
 */
  __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":407
 *         cdef khiter_t k
 *         k = kh_get_int64(self.table, val)
 *         return k != self.table.n_buckets             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_item(self, int64_t val):
 */
  __pyx_r = (__pyx_v_k != __pyx_v_self->table->n_buckets);
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":409
 *         return k != self.table.n_buckets
 * 
 *     cpdef get_item(self, int64_t val):             # <<<<<<<<<<<<<<
 *         cdef khiter_t k
 *         k = kh_get_int64(self.table, val)
 */

static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_14Int64HashTable_get_item(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_val, int __pyx_skip_dispatch) {
  khiter_t __pyx_v_k;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_item");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pw_6pandas_8_tseries_14Int64HashTable_7get_item)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":411
 *     cpdef get_item(self, int64_t val):
 *         cdef khiter_t k
 *         k = kh_get_int64(self.table, val)             # <<<<<<<<<<<<<<
 *         if k != self.table.n_buckets:
 *             return self.table.vals[k]
 */
  __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":412
 *         cdef khiter_t k
 *         k = kh_get_int64(self.table, val)
 *         if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *             return self.table.vals[k]
 *         else:
 */
  __pyx_t_4 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
  if (__pyx_t_4) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":413
 *         k = kh_get_int64(self.table, val)
 *         if k != self.table.n_buckets:
 *             return self.table.vals[k]             # <<<<<<<<<<<<<<
 *         else:
 *             raise KeyError(val)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyInt_FromSsize_t((__pyx_v_self->table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":415
 *             return self.table.vals[k]
 *         else:
 *             raise KeyError(val)             # <<<<<<<<<<<<<<
 * 
 *     def get_iter_test(self, int64_t key, Py_ssize_t iterations):
 */
    __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_arg_val) {
  __pyx_t_5numpy_int64_t __pyx_v_val;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_item (wrapper)");
  assert(__pyx_arg_val); {
    __pyx_v_val = __Pyx_PyInt_from_py_npy_int64(__pyx_arg_val); if (unlikely((__pyx_v_val == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int64HashTable_6get_item(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self), ((__pyx_t_5numpy_int64_t)__pyx_v_val));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":409
 *         return k != self.table.n_buckets
 * 
 *     cpdef get_item(self, int64_t val):             # <<<<<<<<<<<<<<
 *         cdef khiter_t k
 *         k = kh_get_int64(self.table, val)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_6get_item(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_item");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Int64HashTable *)__pyx_v_self->__pyx_vtab)->get_item(__pyx_v_self, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_9get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_9get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_key;
  Py_ssize_t __pyx_v_iterations;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__iterations,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_iter_test (wrapper)");
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterations);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, 1); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_iter_test") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_key = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_key == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_key == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.get_iter_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int64HashTable_8get_iter_test(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_iterations);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":417
 *             raise KeyError(val)
 * 
 *     def get_iter_test(self, int64_t key, Py_ssize_t iterations):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i, val=0
 *         for i in range(iterations):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_8get_iter_test(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, CYTHON_UNUSED __pyx_t_5numpy_int64_t __pyx_v_key, Py_ssize_t __pyx_v_iterations) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_val;
  khint_t __pyx_v_k;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("get_iter_test");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":418
 * 
 *     def get_iter_test(self, int64_t key, Py_ssize_t iterations):
 *         cdef Py_ssize_t i, val=0             # <<<<<<<<<<<<<<
 *         for i in range(iterations):
 *             k = kh_get_int64(self.table, val)
 */
  __pyx_v_val = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":419
 *     def get_iter_test(self, int64_t key, Py_ssize_t iterations):
 *         cdef Py_ssize_t i, val=0
 *         for i in range(iterations):             # <<<<<<<<<<<<<<
 *             k = kh_get_int64(self.table, val)
 *             if k != self.table.n_buckets:
 */
  __pyx_t_1 = __pyx_v_iterations;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":420
 *         cdef Py_ssize_t i, val=0
 *         for i in range(iterations):
 *             k = kh_get_int64(self.table, val)             # <<<<<<<<<<<<<<
 *             if k != self.table.n_buckets:
 *                 val = self.table.vals[k]
 */
    __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":421
 *         for i in range(iterations):
 *             k = kh_get_int64(self.table, val)
 *             if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 val = self.table.vals[k]
 * 
 */
    __pyx_t_3 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":422
 *             k = kh_get_int64(self.table, val)
 *             if k != self.table.n_buckets:
 *                 val = self.table.vals[k]             # <<<<<<<<<<<<<<
 * 
 *     cpdef set_item(self, int64_t key, Py_ssize_t val):
 */
      __pyx_v_val = (__pyx_v_self->table->vals[__pyx_v_k]);
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":424
 *                 val = self.table.vals[k]
 * 
 *     cpdef set_item(self, int64_t key, Py_ssize_t val):             # <<<<<<<<<<<<<<
 *         cdef:
 *             khiter_t k
 */

static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_14Int64HashTable_set_item(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_key, Py_ssize_t __pyx_v_val, int __pyx_skip_dispatch) {
  khiter_t __pyx_v_k;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_item");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__set_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pw_6pandas_8_tseries_14Int64HashTable_11set_item)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_val); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":427
 *         cdef:
 *             khiter_t k
 *             int ret = 0             # <<<<<<<<<<<<<<
 * 
 *         k = kh_put_int64(self.table, key, &ret)
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":429
 *             int ret = 0
 * 
 *         k = kh_put_int64(self.table, key, &ret)             # <<<<<<<<<<<<<<
 *         self.table.keys[k] = key
 *         if kh_exist_int64(self.table, k):
 */
  __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_key, (&__pyx_v_ret));

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":430
 * 
 *         k = kh_put_int64(self.table, key, &ret)
 *         self.table.keys[k] = key             # <<<<<<<<<<<<<<
 *         if kh_exist_int64(self.table, k):
 *             self.table.vals[k] = val
 */
  (__pyx_v_self->table->keys[__pyx_v_k]) = __pyx_v_key;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":431
 *         k = kh_put_int64(self.table, key, &ret)
 *         self.table.keys[k] = key
 *         if kh_exist_int64(self.table, k):             # <<<<<<<<<<<<<<
 *             self.table.vals[k] = val
 *         else:
 */
  __pyx_t_5 = kh_exist_int64(__pyx_v_self->table, __pyx_v_k);
  if (__pyx_t_5) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":432
 *         self.table.keys[k] = key
 *         if kh_exist_int64(self.table, k):
 *             self.table.vals[k] = val             # <<<<<<<<<<<<<<
 *         else:
 *             raise KeyError(key)
 */
    (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_val;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":434
 *             self.table.vals[k] = val
 *         else:
 *             raise KeyError(key)             # <<<<<<<<<<<<<<
 * 
 *     def map(self, ndarray[int64_t] keys, ndarray[int64_t] values):
 */
    __pyx_t_1 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_key); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  __pyx_t_5numpy_int64_t __pyx_v_key;
  Py_ssize_t __pyx_v_val;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__val,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_item (wrapper)");
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, 1); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_item") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_key = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_key == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_val = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = __Pyx_PyInt_from_py_npy_int64(values[0]); if (unlikely((__pyx_v_key == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_val = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int64HashTable_10set_item(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":424
 *                 val = self.table.vals[k]
 * 
 *     cpdef set_item(self, int64_t key, Py_ssize_t val):             # <<<<<<<<<<<<<<
 *         cdef:
 *             khiter_t k
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_10set_item(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, __pyx_t_5numpy_int64_t __pyx_v_key, Py_ssize_t __pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_item");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Int64HashTable *)__pyx_v_self->__pyx_vtab)->set_item(__pyx_v_self, __pyx_v_key, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_13map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_13map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_keys = 0;
  PyArrayObject *__pyx_v_values = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__keys,&__pyx_n_s__values,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map (wrapper)");
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__keys);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("map", 1, 2, 2, 1); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "map") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_keys = ((PyArrayObject *)values[0]);
      __pyx_v_values = ((PyArrayObject *)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_keys = ((PyArrayObject *)values[0]);
    __pyx_v_values = ((PyArrayObject *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("map", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.map", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_keys), __pyx_ptype_5numpy_ndarray, 1, "keys", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int64HashTable_12map(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self), __pyx_v_keys, __pyx_v_values);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":436
 *             raise KeyError(key)
 * 
 *     def map(self, ndarray[int64_t] keys, ndarray[int64_t] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_12map(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_keys, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  int __pyx_v_ret;
  __pyx_t_5numpy_int64_t __pyx_v_key;
  khiter_t __pyx_v_k;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_keys;
  __Pyx_Buffer __pyx_pybuffer_keys;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map");
  __pyx_pybuffer_keys.pybuffer.buf = NULL;
  __pyx_pybuffer_keys.refcount = 0;
  __pyx_pybuffernd_keys.data = NULL;
  __pyx_pybuffernd_keys.rcbuffer = &__pyx_pybuffer_keys;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_keys.rcbuffer->pybuffer, (PyObject*)__pyx_v_keys, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_keys.diminfo[0].strides = __pyx_pybuffernd_keys.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_keys.diminfo[0].shape = __pyx_pybuffernd_keys.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":438
 *     def map(self, ndarray[int64_t] keys, ndarray[int64_t] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             int64_t key
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":439
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             int64_t key
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":443
 *             khiter_t k
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             key = keys[i]
 *             k = kh_put_int64(self.table, key, &ret)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":444
 * 
 *         for i in range(n):
 *             key = keys[i]             # <<<<<<<<<<<<<<
 *             k = kh_put_int64(self.table, key, &ret)
 *             self.table.vals[k] = <Py_ssize_t> values[i]
 */
    __pyx_t_3 = __pyx_v_i;
    __pyx_t_4 = -1;
    if (__pyx_t_3 < 0) {
      __pyx_t_3 += __pyx_pybuffernd_keys.diminfo[0].shape;
      if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
    } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_keys.diminfo[0].shape)) __pyx_t_4 = 0;
    if (unlikely(__pyx_t_4 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_4);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_key = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_keys.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_keys.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":445
 *         for i in range(n):
 *             key = keys[i]
 *             k = kh_put_int64(self.table, key, &ret)             # <<<<<<<<<<<<<<
 *             self.table.vals[k] = <Py_ssize_t> values[i]
 * 
 */
    __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_key, (&__pyx_v_ret));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":446
 *             key = keys[i]
 *             k = kh_put_int64(self.table, key, &ret)
 *             self.table.vals[k] = <Py_ssize_t> values[i]             # <<<<<<<<<<<<<<
 * 
 *     def map_locations(self, ndarray[int64_t] values):
 */
    __pyx_t_5 = __pyx_v_i;
    __pyx_t_4 = -1;
    if (__pyx_t_5 < 0) {
      __pyx_t_5 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_5 < 0)) __pyx_t_4 = 0;
    } else if (unlikely(__pyx_t_5 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0;
    if (unlikely(__pyx_t_4 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_4);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    (__pyx_v_self->table->vals[__pyx_v_k]) = ((Py_ssize_t)(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_5, __pyx_pybuffernd_values.diminfo[0].strides)));
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_keys.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.map", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_keys.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_15map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_15map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map_locations (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int64HashTable_14map_locations(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":448
 *             self.table.vals[k] = <Py_ssize_t> values[i]
 * 
 *     def map_locations(self, ndarray[int64_t] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_14map_locations(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  int __pyx_v_ret;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  khiter_t __pyx_v_k;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_locations");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":450
 *     def map_locations(self, ndarray[int64_t] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             int64_t val
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":451
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             int64_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":455
 *             khiter_t k
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             k = kh_put_int64(self.table, val, &ret)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":456
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             k = kh_put_int64(self.table, val, &ret)
 *             self.table.vals[k] = i
 */
    __pyx_t_3 = __pyx_v_i;
    __pyx_t_4 = -1;
    if (__pyx_t_3 < 0) {
      __pyx_t_3 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
    } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0;
    if (unlikely(__pyx_t_4 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_4);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":457
 *         for i in range(n):
 *             val = values[i]
 *             k = kh_put_int64(self.table, val, &ret)             # <<<<<<<<<<<<<<
 *             self.table.vals[k] = i
 * 
 */
    __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":458
 *             val = values[i]
 *             k = kh_put_int64(self.table, val, &ret)
 *             self.table.vals[k] = i             # <<<<<<<<<<<<<<
 * 
 *     def lookup(self, ndarray[int64_t] values):
 */
    (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_i;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.map_locations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_17lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_17lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lookup (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int64HashTable_16lookup(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":460
 *             self.table.vals[k] = i
 * 
 *     def lookup(self, ndarray[int64_t] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_16lookup(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  CYTHON_UNUSED int __pyx_v_ret;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  khiter_t __pyx_v_k;
  PyArrayObject *__pyx_v_locs = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_locs;
  __Pyx_Buffer __pyx_pybuffer_locs;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lookup");
  __pyx_pybuffer_locs.pybuffer.buf = NULL;
  __pyx_pybuffer_locs.refcount = 0;
  __pyx_pybuffernd_locs.data = NULL;
  __pyx_pybuffernd_locs.rcbuffer = &__pyx_pybuffer_locs;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":462
 *     def lookup(self, ndarray[int64_t] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             int64_t val
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":463
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             int64_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":466
 *             int64_t val
 *             khiter_t k
 *             ndarray[int64_t] locs = np.empty(n, dtype='i8')             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i8)) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_locs.diminfo[0].strides = __pyx_pybuffernd_locs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_locs.diminfo[0].shape = __pyx_pybuffernd_locs.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_locs = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":468
 *             ndarray[int64_t] locs = np.empty(n, dtype='i8')
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             k = kh_get_int64(self.table, val)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":469
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             k = kh_get_int64(self.table, val)
 *             if k != self.table.n_buckets:
 */
    __pyx_t_8 = __pyx_v_i;
    __pyx_t_9 = -1;
    if (__pyx_t_8 < 0) {
      __pyx_t_8 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":470
 *         for i in range(n):
 *             val = values[i]
 *             k = kh_get_int64(self.table, val)             # <<<<<<<<<<<<<<
 *             if k != self.table.n_buckets:
 *                 locs[i] = self.table.vals[k]
 */
    __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":471
 *             val = values[i]
 *             k = kh_get_int64(self.table, val)
 *             if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 locs[i] = self.table.vals[k]
 *             else:
 */
    __pyx_t_10 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
    if (__pyx_t_10) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":472
 *             k = kh_get_int64(self.table, val)
 *             if k != self.table.n_buckets:
 *                 locs[i] = self.table.vals[k]             # <<<<<<<<<<<<<<
 *             else:
 *                 locs[i] = -1
 */
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_9 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_locs.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_locs.diminfo[0].strides) = (__pyx_v_self->table->vals[__pyx_v_k]);
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":474
 *                 locs[i] = self.table.vals[k]
 *             else:
 *                 locs[i] = -1             # <<<<<<<<<<<<<<
 * 
 *         return locs
 */
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_9 = -1;
      if (__pyx_t_12 < 0) {
        __pyx_t_12 += __pyx_pybuffernd_locs.diminfo[0].shape;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_locs.diminfo[0].strides) = -1;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":476
 *                 locs[i] = -1
 * 
 *         return locs             # <<<<<<<<<<<<<<
 * 
 *     def lookup_i4(self, ndarray[int64_t] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_locs));
  __pyx_r = ((PyObject *)__pyx_v_locs);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_19lookup_i4(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_19lookup_i4(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lookup_i4 (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int64HashTable_18lookup_i4(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":478
 *         return locs
 * 
 *     def lookup_i4(self, ndarray[int64_t] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_18lookup_i4(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  CYTHON_UNUSED int __pyx_v_ret;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  khiter_t __pyx_v_k;
  PyArrayObject *__pyx_v_locs = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_locs;
  __Pyx_Buffer __pyx_pybuffer_locs;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lookup_i4");
  __pyx_pybuffer_locs.pybuffer.buf = NULL;
  __pyx_pybuffer_locs.refcount = 0;
  __pyx_pybuffernd_locs.data = NULL;
  __pyx_pybuffernd_locs.rcbuffer = &__pyx_pybuffer_locs;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":480
 *     def lookup_i4(self, ndarray[int64_t] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             int64_t val
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":481
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             int64_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":484
 *             int64_t val
 *             khiter_t k
 *             ndarray[int32_t] locs = np.empty(n, dtype='i4')             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_locs.diminfo[0].strides = __pyx_pybuffernd_locs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_locs.diminfo[0].shape = __pyx_pybuffernd_locs.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_locs = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":486
 *             ndarray[int32_t] locs = np.empty(n, dtype='i4')
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             k = kh_get_int64(self.table, val)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":487
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             k = kh_get_int64(self.table, val)
 *             if k != self.table.n_buckets:
 */
    __pyx_t_8 = __pyx_v_i;
    __pyx_t_9 = -1;
    if (__pyx_t_8 < 0) {
      __pyx_t_8 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":488
 *         for i in range(n):
 *             val = values[i]
 *             k = kh_get_int64(self.table, val)             # <<<<<<<<<<<<<<
 *             if k != self.table.n_buckets:
 *                 locs[i] = self.table.vals[k]
 */
    __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":489
 *             val = values[i]
 *             k = kh_get_int64(self.table, val)
 *             if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 locs[i] = self.table.vals[k]
 *             else:
 */
    __pyx_t_10 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
    if (__pyx_t_10) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":490
 *             k = kh_get_int64(self.table, val)
 *             if k != self.table.n_buckets:
 *                 locs[i] = self.table.vals[k]             # <<<<<<<<<<<<<<
 *             else:
 *                 locs[i] = -1
 */
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_9 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_locs.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_locs.diminfo[0].strides) = (__pyx_v_self->table->vals[__pyx_v_k]);
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":492
 *                 locs[i] = self.table.vals[k]
 *             else:
 *                 locs[i] = -1             # <<<<<<<<<<<<<<
 * 
 *         return locs
 */
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_9 = -1;
      if (__pyx_t_12 < 0) {
        __pyx_t_12 += __pyx_pybuffernd_locs.diminfo[0].shape;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_locs.diminfo[0].strides) = -1;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":494
 *                 locs[i] = -1
 * 
 *         return locs             # <<<<<<<<<<<<<<
 * 
 *     def factorize(self, ndarray[object] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_locs));
  __pyx_r = ((PyObject *)__pyx_v_locs);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.lookup_i4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_21factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_21factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("factorize (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int64HashTable_20factorize(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":496
 *         return locs
 * 
 *     def factorize(self, ndarray[object] values):             # <<<<<<<<<<<<<<
 *         reverse = {}
 *         labels, counts = self.get_labels(values, reverse, 0)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_20factorize(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  PyObject *__pyx_v_reverse = NULL;
  PyObject *__pyx_v_labels = NULL;
  PyObject *__pyx_v_counts = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("factorize");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":497
 * 
 *     def factorize(self, ndarray[object] values):
 *         reverse = {}             # <<<<<<<<<<<<<<
 *         labels, counts = self.get_labels(values, reverse, 0)
 *         return reverse, labels, counts
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_reverse = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":498
 *     def factorize(self, ndarray[object] values):
 *         reverse = {}
 *         labels, counts = self.get_labels(values, reverse, 0)             # <<<<<<<<<<<<<<
 *         return reverse, labels, counts
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_labels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  __Pyx_INCREF(((PyObject *)__pyx_v_reverse));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_reverse));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_reverse));
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
    PyObject* sequence = __pyx_t_3;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_labels = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_counts = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":499
 *         reverse = {}
 *         labels, counts = self.get_labels(values, reverse, 0)
 *         return reverse, labels, counts             # <<<<<<<<<<<<<<
 * 
 *     def get_labels(self, ndarray[int64_t] values, list uniques,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_reverse));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_reverse));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_reverse));
  __Pyx_INCREF(__pyx_v_labels);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_labels);
  __Pyx_GIVEREF(__pyx_v_labels);
  __Pyx_INCREF(__pyx_v_counts);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_counts);
  __Pyx_GIVEREF(__pyx_v_counts);
  __pyx_r = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_reverse);
  __Pyx_XDECREF(__pyx_v_labels);
  __Pyx_XDECREF(__pyx_v_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_23get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_23get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_uniques = 0;
  Py_ssize_t __pyx_v_count_prior;
  CYTHON_UNUSED Py_ssize_t __pyx_v_na_sentinel;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__uniques,&__pyx_n_s__count_prior,&__pyx_n_s__na_sentinel,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_labels (wrapper)");
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__uniques);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 1); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__count_prior);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 2); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_sentinel);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 3); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_labels") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_uniques = ((PyObject*)values[1]);
      __pyx_v_count_prior = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_count_prior == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_na_sentinel = __Pyx_PyIndex_AsSsize_t(values[3]); if (unlikely((__pyx_v_na_sentinel == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_uniques = ((PyObject*)values[1]);
    __pyx_v_count_prior = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_count_prior == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_na_sentinel = __Pyx_PyIndex_AsSsize_t(values[3]); if (unlikely((__pyx_v_na_sentinel == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.get_labels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_uniques), (&PyList_Type), 1, "uniques", 1))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int64HashTable_22get_labels(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self), __pyx_v_values, __pyx_v_uniques, __pyx_v_count_prior, __pyx_v_na_sentinel);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":501
 *         return reverse, labels, counts
 * 
 *     def get_labels(self, ndarray[int64_t] values, list uniques,             # <<<<<<<<<<<<<<
 *                    Py_ssize_t count_prior, Py_ssize_t na_sentinel):
 *         cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_22get_labels(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, CYTHON_UNUSED Py_ssize_t __pyx_v_na_sentinel) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_labels = 0;
  PyArrayObject *__pyx_v_counts = 0;
  Py_ssize_t __pyx_v_idx;
  Py_ssize_t __pyx_v_count;
  int __pyx_v_ret;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  khiter_t __pyx_v_k;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyArrayObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_labels");
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":504
 *                    Py_ssize_t count_prior, Py_ssize_t na_sentinel):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             ndarray[int32_t] labels
 *             ndarray[int32_t] counts
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":507
 *             ndarray[int32_t] labels
 *             ndarray[int32_t] counts
 *             Py_ssize_t idx, count = count_prior             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             int64_t val
 */
  __pyx_v_count = __pyx_v_count_prior;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":508
 *             ndarray[int32_t] counts
 *             Py_ssize_t idx, count = count_prior
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             int64_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":512
 *             khiter_t k
 * 
 *         labels = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 *         counts = np.empty(count_prior + n, dtype=np.int32)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":513
 * 
 *         labels = np.empty(n, dtype=np.int32)
 *         counts = np.empty(count_prior + n, dtype=np.int32)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t((__pyx_v_count_prior + __pyx_v_n)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__int32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_12 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":515
 *         counts = np.empty(count_prior + n, dtype=np.int32)
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             k = kh_get_int64(self.table, val)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":516
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             k = kh_get_int64(self.table, val)
 *             if k != self.table.n_buckets:
 */
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":517
 *         for i in range(n):
 *             val = values[i]
 *             k = kh_get_int64(self.table, val)             # <<<<<<<<<<<<<<
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]
 */
    __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":518
 *             val = values[i]
 *             k = kh_get_int64(self.table, val)
 *             if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx
 */
    __pyx_t_15 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
    if (__pyx_t_15) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":519
 *             k = kh_get_int64(self.table, val)
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]             # <<<<<<<<<<<<<<
 *                 labels[i] = idx
 *                 counts[idx] = counts[idx] + 1
 */
      __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]);

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":520
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx             # <<<<<<<<<<<<<<
 *                 counts[idx] = counts[idx] + 1
 *             else:
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":521
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx
 *                 counts[idx] = counts[idx] + 1             # <<<<<<<<<<<<<<
 *             else:
 *                 k = kh_put_int64(self.table, val, &ret)
 */
      __pyx_t_17 = __pyx_v_idx;
      __pyx_t_8 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_18 = __pyx_v_idx;
      __pyx_t_8 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides)) + 1);
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":523
 *                 counts[idx] = counts[idx] + 1
 *             else:
 *                 k = kh_put_int64(self.table, val, &ret)             # <<<<<<<<<<<<<<
 *                 self.table.vals[k] = count
 *                 uniques.append(val)
 */
      __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret));

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":524
 *             else:
 *                 k = kh_put_int64(self.table, val, &ret)
 *                 self.table.vals[k] = count             # <<<<<<<<<<<<<<
 *                 uniques.append(val)
 *                 labels[i] = count
 */
      (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":525
 *                 k = kh_put_int64(self.table, val, &ret)
 *                 self.table.vals[k] = count
 *                 uniques.append(val)             # <<<<<<<<<<<<<<
 *                 labels[i] = count
 *                 counts[count] = 1
 */
      if (unlikely(((PyObject *)__pyx_v_uniques) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_19 = PyList_Append(__pyx_v_uniques, __pyx_t_5); if (unlikely(__pyx_t_19 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":526
 *                 self.table.vals[k] = count
 *                 uniques.append(val)
 *                 labels[i] = count             # <<<<<<<<<<<<<<
 *                 counts[count] = 1
 *                 count += 1
 */
      __pyx_t_20 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":527
 *                 uniques.append(val)
 *                 labels[i] = count
 *                 counts[count] = 1             # <<<<<<<<<<<<<<
 *                 count += 1
 * 
 */
      __pyx_t_21 = __pyx_v_count;
      __pyx_t_8 = -1;
      if (__pyx_t_21 < 0) {
        __pyx_t_21 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_counts.diminfo[0].strides) = 1;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":528
 *                 labels[i] = count
 *                 counts[count] = 1
 *                 count += 1             # <<<<<<<<<<<<<<
 * 
 *         return labels, counts[:count].copy()
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":530
 *                 count += 1
 * 
 *         return labels, counts[:count].copy()             # <<<<<<<<<<<<<<
 * 
 *     def get_labels_groupby(self, ndarray[int64_t] values, list uniques):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_counts), 0, __pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__copy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_v_labels));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_labels));
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = ((PyObject *)__pyx_t_6);
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.get_labels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_labels);
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_25get_labels_groupby(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_25get_labels_groupby(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_uniques = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__uniques,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_labels_groupby (wrapper)");
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__uniques);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_labels_groupby", 1, 2, 2, 1); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_labels_groupby") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_uniques = ((PyObject*)values[1]);
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_uniques = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_labels_groupby", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.get_labels_groupby", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_uniques), (&PyList_Type), 1, "uniques", 1))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int64HashTable_24get_labels_groupby(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self), __pyx_v_values, __pyx_v_uniques);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":532
 *         return labels, counts[:count].copy()
 * 
 *     def get_labels_groupby(self, ndarray[int64_t] values, list uniques):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_24get_labels_groupby(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_uniques) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_labels = 0;
  Py_ssize_t __pyx_v_idx;
  Py_ssize_t __pyx_v_count;
  int __pyx_v_ret;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  khiter_t __pyx_v_k;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  int __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_labels_groupby");
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":534
 *     def get_labels_groupby(self, ndarray[int64_t] values, list uniques):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             ndarray[int32_t] labels
 *             Py_ssize_t idx, count = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":536
 *             Py_ssize_t i, n = len(values)
 *             ndarray[int32_t] labels
 *             Py_ssize_t idx, count = 0             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             int64_t val
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":537
 *             ndarray[int32_t] labels
 *             Py_ssize_t idx, count = 0
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             int64_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":541
 *             khiter_t k
 * 
 *         labels = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":543
 *         labels = np.empty(n, dtype=np.int32)
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_1; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":544
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 * 
 *             # specific for groupby
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":547
 * 
 *             # specific for groupby
 *             if val < 0:             # <<<<<<<<<<<<<<
 *                 labels[i] = -1
 *                 continue
 */
    __pyx_t_14 = (__pyx_v_val < 0);
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":548
 *             # specific for groupby
 *             if val < 0:
 *                 labels[i] = -1             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_labels.diminfo[0].strides) = -1;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":549
 *             if val < 0:
 *                 labels[i] = -1
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             k = kh_get_int64(self.table, val)
 */
      goto __pyx_L3_continue;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":551
 *                 continue
 * 
 *             k = kh_get_int64(self.table, val)             # <<<<<<<<<<<<<<
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]
 */
    __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":552
 * 
 *             k = kh_get_int64(self.table, val)
 *             if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx
 */
    __pyx_t_14 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":553
 *             k = kh_get_int64(self.table, val)
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]             # <<<<<<<<<<<<<<
 *                 labels[i] = idx
 *             else:
 */
      __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]);

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":554
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx             # <<<<<<<<<<<<<<
 *             else:
 *                 k = kh_put_int64(self.table, val, &ret)
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":556
 *                 labels[i] = idx
 *             else:
 *                 k = kh_put_int64(self.table, val, &ret)             # <<<<<<<<<<<<<<
 *                 self.table.vals[k] = count
 *                 uniques.append(val)
 */
      __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret));

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":557
 *             else:
 *                 k = kh_put_int64(self.table, val, &ret)
 *                 self.table.vals[k] = count             # <<<<<<<<<<<<<<
 *                 uniques.append(val)
 *                 labels[i] = count
 */
      (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":558
 *                 k = kh_put_int64(self.table, val, &ret)
 *                 self.table.vals[k] = count
 *                 uniques.append(val)             # <<<<<<<<<<<<<<
 *                 labels[i] = count
 *                 count += 1
 */
      if (unlikely(((PyObject *)__pyx_v_uniques) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_6 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_17 = PyList_Append(__pyx_v_uniques, __pyx_t_6); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":559
 *                 self.table.vals[k] = count
 *                 uniques.append(val)
 *                 labels[i] = count             # <<<<<<<<<<<<<<
 *                 count += 1
 * 
 */
      __pyx_t_18 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":560
 *                 uniques.append(val)
 *                 labels[i] = count
 *                 count += 1             # <<<<<<<<<<<<<<
 * 
 *         return labels
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L6:;
    __pyx_L3_continue:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":562
 *                 count += 1
 * 
 *         return labels             # <<<<<<<<<<<<<<
 * 
 *     def unique(self, ndarray[int64_t] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_labels));
  __pyx_r = ((PyObject *)__pyx_v_labels);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.get_labels_groupby", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_labels);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_27unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14Int64HashTable_27unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unique (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_14Int64HashTable_26unique(((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":564
 *         return labels
 * 
 *     def unique(self, ndarray[int64_t] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14Int64HashTable_26unique(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_count;
  int __pyx_v_ret;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  khiter_t __pyx_v_k;
  PyObject *__pyx_v_uniques = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unique");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":566
 *     def unique(self, ndarray[int64_t] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             Py_ssize_t idx, count = 0
 *             int ret = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 566; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":567
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             Py_ssize_t idx, count = 0             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             int64_t val
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":568
 *             Py_ssize_t i, n = len(values)
 *             Py_ssize_t idx, count = 0
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             int64_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":571
 *             int64_t val
 *             khiter_t k
 *             list uniques = []             # <<<<<<<<<<<<<<
 * 
 *         # TODO: kvec
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_uniques = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":575
 *         # TODO: kvec
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             k = kh_get_int64(self.table, val)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":576
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             k = kh_get_int64(self.table, val)
 *             if k == self.table.n_buckets:
 */
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":577
 *         for i in range(n):
 *             val = values[i]
 *             k = kh_get_int64(self.table, val)             # <<<<<<<<<<<<<<
 *             if k == self.table.n_buckets:
 *                 k = kh_put_int64(self.table, val, &ret)
 */
    __pyx_v_k = kh_get_int64(__pyx_v_self->table, __pyx_v_val);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":578
 *             val = values[i]
 *             k = kh_get_int64(self.table, val)
 *             if k == self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 k = kh_put_int64(self.table, val, &ret)
 *                 uniques.append(val)
 */
    __pyx_t_6 = (__pyx_v_k == __pyx_v_self->table->n_buckets);
    if (__pyx_t_6) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":579
 *             k = kh_get_int64(self.table, val)
 *             if k == self.table.n_buckets:
 *                 k = kh_put_int64(self.table, val, &ret)             # <<<<<<<<<<<<<<
 *                 uniques.append(val)
 *                 count += 1
 */
      __pyx_v_k = kh_put_int64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret));

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":580
 *             if k == self.table.n_buckets:
 *                 k = kh_put_int64(self.table, val, &ret)
 *                 uniques.append(val)             # <<<<<<<<<<<<<<
 *                 count += 1
 * 
 */
      __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = PyList_Append(__pyx_v_uniques, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":581
 *                 k = kh_put_int64(self.table, val, &ret)
 *                 uniques.append(val)
 *                 count += 1             # <<<<<<<<<<<<<<
 * 
 *         return uniques
 */
      __pyx_v_count = (__pyx_v_count + 1);
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":583
 *                 count += 1
 * 
 *         return uniques             # <<<<<<<<<<<<<<
 * 
 * def value_count_int64(ndarray[int64_t] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_uniques));
  __pyx_r = ((PyObject *)__pyx_v_uniques);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64HashTable.unique", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_343value_count_int64(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_343value_count_int64 = {__Pyx_NAMESTR("value_count_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_343value_count_int64, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_343value_count_int64(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("value_count_int64 (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_342value_count_int64(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":585
 *         return uniques
 * 
 * def value_count_int64(ndarray[int64_t] values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_342value_count_int64(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  kh_int64_t *__pyx_v_table;
  int __pyx_v_ret;
  CYTHON_UNUSED PyObject *__pyx_v_uniques = 0;
  PyObject *__pyx_v_val = NULL;
  khint_t __pyx_v_k;
  PyObject *__pyx_v_result_keys = NULL;
  PyObject *__pyx_v_result_counts = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  __pyx_t_5numpy_int64_t __pyx_t_6;
  int __pyx_t_7;
  khint_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  khint_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("value_count_int64");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":587
 * def value_count_int64(ndarray[int64_t] values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         kh_int64_t *table
 *         int ret = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":589
 *         Py_ssize_t i, n = len(values)
 *         kh_int64_t *table
 *         int ret = 0             # <<<<<<<<<<<<<<
 *         list uniques = []
 * 
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":590
 *         kh_int64_t *table
 *         int ret = 0
 *         list uniques = []             # <<<<<<<<<<<<<<
 * 
 *     table = kh_init_int64()
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_uniques = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":592
 *         list uniques = []
 * 
 *     table = kh_init_int64()             # <<<<<<<<<<<<<<
 *     kh_resize_int64(table, n)
 * 
 */
  __pyx_v_table = kh_init_int64();

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":593
 * 
 *     table = kh_init_int64()
 *     kh_resize_int64(table, n)             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  kh_resize_int64(__pyx_v_table, __pyx_v_n);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":595
 *     kh_resize_int64(table, n)
 * 
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         val = values[i]
 *         k = kh_get_int64(table, val)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":596
 * 
 *     for i in range(n):
 *         val = values[i]             # <<<<<<<<<<<<<<
 *         k = kh_get_int64(table, val)
 *         if k != table.n_buckets:
 */
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = __Pyx_PyInt_to_py_npy_int64((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":597
 *     for i in range(n):
 *         val = values[i]
 *         k = kh_get_int64(table, val)             # <<<<<<<<<<<<<<
 *         if k != table.n_buckets:
 *             table.vals[k] += 1
 */
    __pyx_t_6 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_val); if (unlikely((__pyx_t_6 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_k = kh_get_int64(__pyx_v_table, __pyx_t_6);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":598
 *         val = values[i]
 *         k = kh_get_int64(table, val)
 *         if k != table.n_buckets:             # <<<<<<<<<<<<<<
 *             table.vals[k] += 1
 *         else:
 */
    __pyx_t_7 = (__pyx_v_k != __pyx_v_table->n_buckets);
    if (__pyx_t_7) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":599
 *         k = kh_get_int64(table, val)
 *         if k != table.n_buckets:
 *             table.vals[k] += 1             # <<<<<<<<<<<<<<
 *         else:
 *             k = kh_put_int64(table, val, &ret)
 */
      __pyx_t_8 = __pyx_v_k;
      (__pyx_v_table->vals[__pyx_t_8]) = ((__pyx_v_table->vals[__pyx_t_8]) + 1);
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":601
 *             table.vals[k] += 1
 *         else:
 *             k = kh_put_int64(table, val, &ret)             # <<<<<<<<<<<<<<
 *             table.vals[k] = 1
 * 
 */
      __pyx_t_6 = __Pyx_PyInt_from_py_npy_int64(__pyx_v_val); if (unlikely((__pyx_t_6 == (npy_int64)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_k = kh_put_int64(__pyx_v_table, __pyx_t_6, (&__pyx_v_ret));

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":602
 *         else:
 *             k = kh_put_int64(table, val, &ret)
 *             table.vals[k] = 1             # <<<<<<<<<<<<<<
 * 
 *     # for (k = kh_begin(h); k != kh_end(h); ++k)
 */
      (__pyx_v_table->vals[__pyx_v_k]) = 1;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":606
 *     # for (k = kh_begin(h); k != kh_end(h); ++k)
 *     # 	if (kh_exist(h, k)) kh_value(h, k) = 1;
 *     i = 0             # <<<<<<<<<<<<<<
 *     result_keys = np.empty(table.n_occupied, dtype=np.int64)
 *     result_counts = np.zeros(table.n_occupied, dtype=np.int64)
 */
  __pyx_v_i = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":607
 *     # 	if (kh_exist(h, k)) kh_value(h, k) = 1;
 *     i = 0
 *     result_keys = np.empty(table.n_occupied, dtype=np.int64)             # <<<<<<<<<<<<<<
 *     result_counts = np.zeros(table.n_occupied, dtype=np.int64)
 *     for k in range(table.n_buckets):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyInt_to_py_npy_uint32(__pyx_v_table->n_occupied); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_11 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = PyObject_GetAttr(__pyx_t_11, __pyx_n_s__int64); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_12) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_10), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_result_keys = __pyx_t_12;
  __pyx_t_12 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":608
 *     i = 0
 *     result_keys = np.empty(table.n_occupied, dtype=np.int64)
 *     result_counts = np.zeros(table.n_occupied, dtype=np.int64)             # <<<<<<<<<<<<<<
 *     for k in range(table.n_buckets):
 *         if kh_exist_int64(table, k):
 */
  __pyx_t_12 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_12, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PyInt_to_py_npy_uint32(__pyx_v_table->n_occupied); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_12);
  __pyx_t_12 = 0;
  __pyx_t_12 = PyDict_New(); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_12));
  __pyx_t_9 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_11 = PyObject_GetAttr(__pyx_t_9, __pyx_n_s__int64); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_12, ((PyObject *)__pyx_n_s__dtype), __pyx_t_11) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_10), ((PyObject *)__pyx_t_12)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0;
  __pyx_v_result_counts = __pyx_t_11;
  __pyx_t_11 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":609
 *     result_keys = np.empty(table.n_occupied, dtype=np.int64)
 *     result_counts = np.zeros(table.n_occupied, dtype=np.int64)
 *     for k in range(table.n_buckets):             # <<<<<<<<<<<<<<
 *         if kh_exist_int64(table, k):
 *             result_keys[i] = table.keys[k]
 */
  __pyx_t_8 = __pyx_v_table->n_buckets;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_8; __pyx_t_13+=1) {
    __pyx_v_k = __pyx_t_13;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":610
 *     result_counts = np.zeros(table.n_occupied, dtype=np.int64)
 *     for k in range(table.n_buckets):
 *         if kh_exist_int64(table, k):             # <<<<<<<<<<<<<<
 *             result_keys[i] = table.keys[k]
 *             result_counts[i] = table.vals[k]
 */
    __pyx_t_7 = kh_exist_int64(__pyx_v_table, __pyx_v_k);
    if (__pyx_t_7) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":611
 *     for k in range(table.n_buckets):
 *         if kh_exist_int64(table, k):
 *             result_keys[i] = table.keys[k]             # <<<<<<<<<<<<<<
 *             result_counts[i] = table.vals[k]
 *             i += 1
 */
      __pyx_t_11 = __Pyx_PyInt_to_py_npy_int64((__pyx_v_table->keys[__pyx_v_k])); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      if (__Pyx_SetItemInt(__pyx_v_result_keys, __pyx_v_i, __pyx_t_11, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":612
 *         if kh_exist_int64(table, k):
 *             result_keys[i] = table.keys[k]
 *             result_counts[i] = table.vals[k]             # <<<<<<<<<<<<<<
 *             i += 1
 *     kh_destroy_int64(table)
 */
      __pyx_t_11 = PyInt_FromSsize_t((__pyx_v_table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_11);
      if (__Pyx_SetItemInt(__pyx_v_result_counts, __pyx_v_i, __pyx_t_11, sizeof(Py_ssize_t), PyInt_FromSsize_t) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":613
 *             result_keys[i] = table.keys[k]
 *             result_counts[i] = table.vals[k]
 *             i += 1             # <<<<<<<<<<<<<<
 *     kh_destroy_int64(table)
 * 
 */
      __pyx_v_i = (__pyx_v_i + 1);
      goto __pyx_L8;
    }
    __pyx_L8:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":614
 *             result_counts[i] = table.vals[k]
 *             i += 1
 *     kh_destroy_int64(table)             # <<<<<<<<<<<<<<
 * 
 *     return result_keys, result_counts
 */
  kh_destroy_int64(__pyx_v_table);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":616
 *     kh_destroy_int64(table)
 * 
 *     return result_keys, result_counts             # <<<<<<<<<<<<<<
 * 
 * ONAN = np.nan
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_INCREF(__pyx_v_result_keys);
  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_result_keys);
  __Pyx_GIVEREF(__pyx_v_result_keys);
  __Pyx_INCREF(__pyx_v_result_counts);
  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_result_counts);
  __Pyx_GIVEREF(__pyx_v_result_counts);
  __pyx_r = ((PyObject *)__pyx_t_11);
  __pyx_t_11 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.value_count_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_result_keys);
  __Pyx_XDECREF(__pyx_v_result_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_16Float64HashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_16Float64HashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_size_hint = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_1);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size_hint);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_size_hint = values[0];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_size_hint = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_16Float64HashTable___init__(((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self), __pyx_v_size_hint);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":625
 *         kh_float64_t *table
 * 
 *     def __init__(self, size_hint=1):             # <<<<<<<<<<<<<<
 *         if size_hint is not None:
 *             kh_resize_float64(self.table, size_hint)
 */

static int __pyx_pf_6pandas_8_tseries_16Float64HashTable___init__(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self, PyObject *__pyx_v_size_hint) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  khint_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":626
 * 
 *     def __init__(self, size_hint=1):
 *         if size_hint is not None:             # <<<<<<<<<<<<<<
 *             kh_resize_float64(self.table, size_hint)
 * 
 */
  __pyx_t_1 = (__pyx_v_size_hint != Py_None);
  if (__pyx_t_1) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":627
 *     def __init__(self, size_hint=1):
 *         if size_hint is not None:
 *             kh_resize_float64(self.table, size_hint)             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self):
 */
    __pyx_t_2 = __Pyx_PyInt_from_py_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_2 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    kh_resize_float64(__pyx_v_self->table, __pyx_t_2);
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_16Float64HashTable_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_16Float64HashTable_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_6pandas_8_tseries_16Float64HashTable_2__cinit__(((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":629
 *             kh_resize_float64(self.table, size_hint)
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.table = kh_init_float64()
 * 
 */

static int __pyx_pf_6pandas_8_tseries_16Float64HashTable_2__cinit__(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":630
 * 
 *     def __cinit__(self):
 *         self.table = kh_init_float64()             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->table = kh_init_float64();

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static void __pyx_pw_6pandas_8_tseries_16Float64HashTable_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6pandas_8_tseries_16Float64HashTable_5__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)");
  __pyx_pf_6pandas_8_tseries_16Float64HashTable_4__dealloc__(((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":632
 *         self.table = kh_init_float64()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         kh_destroy_float64(self.table)
 * 
 */

static void __pyx_pf_6pandas_8_tseries_16Float64HashTable_4__dealloc__(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":633
 * 
 *     def __dealloc__(self):
 *         kh_destroy_float64(self.table)             # <<<<<<<<<<<<<<
 * 
 *     def factorize(self, ndarray[float64_t] values):
 */
  kh_destroy_float64(__pyx_v_self->table);

  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_16Float64HashTable_7factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_16Float64HashTable_7factorize(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("factorize (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_16Float64HashTable_6factorize(((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":635
 *         kh_destroy_float64(self.table)
 * 
 *     def factorize(self, ndarray[float64_t] values):             # <<<<<<<<<<<<<<
 *         uniques = []
 *         labels, counts = self.get_labels(values, uniques, 0, -1)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_16Float64HashTable_6factorize(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  PyObject *__pyx_v_uniques = NULL;
  PyObject *__pyx_v_labels = NULL;
  PyObject *__pyx_v_counts = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("factorize");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":636
 * 
 *     def factorize(self, ndarray[float64_t] values):
 *         uniques = []             # <<<<<<<<<<<<<<
 *         labels, counts = self.get_labels(values, uniques, 0, -1)
 *         return uniques, labels, counts
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_uniques = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":637
 *     def factorize(self, ndarray[float64_t] values):
 *         uniques = []
 *         labels, counts = self.get_labels(values, uniques, 0, -1)             # <<<<<<<<<<<<<<
 *         return uniques, labels, counts
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Float64HashTable *)__pyx_v_self->__pyx_vtab)->get_labels(__pyx_v_self, ((PyArrayObject *)__pyx_v_values), __pyx_v_uniques, 0, -1, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_labels = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_counts = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":638
 *         uniques = []
 *         labels, counts = self.get_labels(values, uniques, 0, -1)
 *         return uniques, labels, counts             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_labels(self, ndarray[float64_t] values, list uniques,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_uniques));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_uniques));
  __Pyx_INCREF(__pyx_v_labels);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_labels);
  __Pyx_GIVEREF(__pyx_v_labels);
  __Pyx_INCREF(__pyx_v_counts);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_counts);
  __Pyx_GIVEREF(__pyx_v_counts);
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XDECREF(__pyx_v_labels);
  __Pyx_XDECREF(__pyx_v_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":640
 *         return uniques, labels, counts
 * 
 *     cpdef get_labels(self, ndarray[float64_t] values, list uniques,             # <<<<<<<<<<<<<<
 *                      Py_ssize_t count_prior, int32_t na_sentinel):
 *         cdef:
 */

static PyObject *__pyx_pw_6pandas_8_tseries_16Float64HashTable_9get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_16Float64HashTable_get_labels(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, __pyx_t_5numpy_int32_t __pyx_v_na_sentinel, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_labels = 0;
  PyArrayObject *__pyx_v_counts = 0;
  Py_ssize_t __pyx_v_idx;
  Py_ssize_t __pyx_v_count;
  int __pyx_v_ret;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  khiter_t __pyx_v_k;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyArrayObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_labels");
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_labels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pw_6pandas_8_tseries_16Float64HashTable_9get_labels)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_count_prior); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_na_sentinel); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(((PyObject *)__pyx_v_values));
      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
      __Pyx_INCREF(((PyObject *)__pyx_v_uniques));
      PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_uniques));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_uniques));
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":643
 *                      Py_ssize_t count_prior, int32_t na_sentinel):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             ndarray[int32_t] labels
 *             ndarray[int32_t] counts
 */
  __pyx_t_5 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_5;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":646
 *             ndarray[int32_t] labels
 *             ndarray[int32_t] counts
 *             Py_ssize_t idx, count = count_prior             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             float64_t val
 */
  __pyx_v_count = __pyx_v_count_prior;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":647
 *             ndarray[int32_t] counts
 *             Py_ssize_t idx, count = count_prior
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             float64_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":651
 *             khiter_t k
 * 
 *         labels = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 *         counts = np.empty(count_prior + n, dtype=np.int32)
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":652
 * 
 *         labels = np.empty(n, dtype=np.int32)
 *         counts = np.empty(count_prior + n, dtype=np.int32)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t((__pyx_v_count_prior + __pyx_v_n)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__int32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_12 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":654
 *         counts = np.empty(count_prior + n, dtype=np.int32)
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 * 
 */
  __pyx_t_5 = __pyx_v_n;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_5; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":655
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 * 
 *             if val != val:
 */
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":657
 *             val = values[i]
 * 
 *             if val != val:             # <<<<<<<<<<<<<<
 *                 labels[i] = na_sentinel
 *                 continue
 */
    __pyx_t_15 = (__pyx_v_val != __pyx_v_val);
    if (__pyx_t_15) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":658
 * 
 *             if val != val:
 *                 labels[i] = na_sentinel             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_na_sentinel;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":659
 *             if val != val:
 *                 labels[i] = na_sentinel
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             k = kh_get_float64(self.table, val)
 */
      goto __pyx_L3_continue;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":661
 *                 continue
 * 
 *             k = kh_get_float64(self.table, val)             # <<<<<<<<<<<<<<
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]
 */
    __pyx_v_k = kh_get_float64(__pyx_v_self->table, __pyx_v_val);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":662
 * 
 *             k = kh_get_float64(self.table, val)
 *             if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx
 */
    __pyx_t_15 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
    if (__pyx_t_15) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":663
 *             k = kh_get_float64(self.table, val)
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]             # <<<<<<<<<<<<<<
 *                 labels[i] = idx
 *                 counts[idx] = counts[idx] + 1
 */
      __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]);

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":664
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx             # <<<<<<<<<<<<<<
 *                 counts[idx] = counts[idx] + 1
 *             else:
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":665
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx
 *                 counts[idx] = counts[idx] + 1             # <<<<<<<<<<<<<<
 *             else:
 *                 k = kh_put_float64(self.table, val, &ret)
 */
      __pyx_t_18 = __pyx_v_idx;
      __pyx_t_8 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_19 = __pyx_v_idx;
      __pyx_t_8 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_counts.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides)) + 1);
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":667
 *                 counts[idx] = counts[idx] + 1
 *             else:
 *                 k = kh_put_float64(self.table, val, &ret)             # <<<<<<<<<<<<<<
 *                 self.table.vals[k] = count
 *                 uniques.append(val)
 */
      __pyx_v_k = kh_put_float64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret));

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":668
 *             else:
 *                 k = kh_put_float64(self.table, val, &ret)
 *                 self.table.vals[k] = count             # <<<<<<<<<<<<<<
 *                 uniques.append(val)
 *                 labels[i] = count
 */
      (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":669
 *                 k = kh_put_float64(self.table, val, &ret)
 *                 self.table.vals[k] = count
 *                 uniques.append(val)             # <<<<<<<<<<<<<<
 *                 labels[i] = count
 *                 counts[count] = 1
 */
      if (unlikely(((PyObject *)__pyx_v_uniques) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_2 = PyFloat_FromDouble(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_20 = PyList_Append(__pyx_v_uniques, __pyx_t_2); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":670
 *                 self.table.vals[k] = count
 *                 uniques.append(val)
 *                 labels[i] = count             # <<<<<<<<<<<<<<
 *                 counts[count] = 1
 *                 count += 1
 */
      __pyx_t_21 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_21 < 0) {
        __pyx_t_21 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":671
 *                 uniques.append(val)
 *                 labels[i] = count
 *                 counts[count] = 1             # <<<<<<<<<<<<<<
 *                 count += 1
 * 
 */
      __pyx_t_22 = __pyx_v_count;
      __pyx_t_8 = -1;
      if (__pyx_t_22 < 0) {
        __pyx_t_22 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_22 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_counts.diminfo[0].strides) = 1;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":672
 *                 labels[i] = count
 *                 counts[count] = 1
 *                 count += 1             # <<<<<<<<<<<<<<
 * 
 *         return labels, counts[:count].copy()
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L6:;
    __pyx_L3_continue:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":674
 *                 count += 1
 * 
 *         return labels, counts[:count].copy()             # <<<<<<<<<<<<<<
 * 
 *     def map_locations(self, ndarray[float64_t] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_counts), 0, __pyx_v_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__copy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_v_labels));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_labels));
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject *)__pyx_t_6);
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.get_labels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_labels);
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_16Float64HashTable_9get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_16Float64HashTable_9get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_uniques = 0;
  Py_ssize_t __pyx_v_count_prior;
  __pyx_t_5numpy_int32_t __pyx_v_na_sentinel;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__uniques,&__pyx_n_s__count_prior,&__pyx_n_s__na_sentinel,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_labels (wrapper)");
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__uniques);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 1); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__count_prior);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 2); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_sentinel);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 3); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_labels") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_uniques = ((PyObject*)values[1]);
      __pyx_v_count_prior = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_count_prior == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_na_sentinel = __Pyx_PyInt_from_py_npy_int32(values[3]); if (unlikely((__pyx_v_na_sentinel == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_uniques = ((PyObject*)values[1]);
    __pyx_v_count_prior = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_count_prior == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_na_sentinel = __Pyx_PyInt_from_py_npy_int32(values[3]); if (unlikely((__pyx_v_na_sentinel == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.get_labels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_uniques), (&PyList_Type), 1, "uniques", 1))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_16Float64HashTable_8get_labels(((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self), __pyx_v_values, __pyx_v_uniques, __pyx_v_count_prior, __pyx_v_na_sentinel);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":640
 *         return uniques, labels, counts
 * 
 *     cpdef get_labels(self, ndarray[float64_t] values, list uniques,             # <<<<<<<<<<<<<<
 *                      Py_ssize_t count_prior, int32_t na_sentinel):
 *         cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_16Float64HashTable_8get_labels(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, __pyx_t_5numpy_int32_t __pyx_v_na_sentinel) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_labels");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_Float64HashTable *)__pyx_v_self->__pyx_vtab)->get_labels(__pyx_v_self, __pyx_v_values, __pyx_v_uniques, __pyx_v_count_prior, __pyx_v_na_sentinel, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.get_labels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_16Float64HashTable_11map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_16Float64HashTable_11map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map_locations (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_16Float64HashTable_10map_locations(((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":676
 *         return labels, counts[:count].copy()
 * 
 *     def map_locations(self, ndarray[float64_t] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_16Float64HashTable_10map_locations(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  int __pyx_v_ret;
  khiter_t __pyx_v_k;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_locations");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":678
 *     def map_locations(self, ndarray[float64_t] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             khiter_t k
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":679
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             khiter_t k
 * 
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":682
 *             khiter_t k
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             k = kh_put_float64(self.table, values[i], &ret)
 *             self.table.vals[k] = i
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":683
 * 
 *         for i in range(n):
 *             k = kh_put_float64(self.table, values[i], &ret)             # <<<<<<<<<<<<<<
 *             self.table.vals[k] = i
 * 
 */
    __pyx_t_3 = __pyx_v_i;
    __pyx_t_4 = -1;
    if (__pyx_t_3 < 0) {
      __pyx_t_3 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
    } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0;
    if (unlikely(__pyx_t_4 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_4);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_k = kh_put_float64(__pyx_v_self->table, (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides)), (&__pyx_v_ret));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":684
 *         for i in range(n):
 *             k = kh_put_float64(self.table, values[i], &ret)
 *             self.table.vals[k] = i             # <<<<<<<<<<<<<<
 * 
 *     def lookup(self, ndarray[float64_t] values):
 */
    (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_i;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.map_locations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_16Float64HashTable_13lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_16Float64HashTable_13lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lookup (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_16Float64HashTable_12lookup(((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":686
 *             self.table.vals[k] = i
 * 
 *     def lookup(self, ndarray[float64_t] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_16Float64HashTable_12lookup(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  CYTHON_UNUSED int __pyx_v_ret;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  khiter_t __pyx_v_k;
  PyArrayObject *__pyx_v_locs = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_locs;
  __Pyx_Buffer __pyx_pybuffer_locs;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lookup");
  __pyx_pybuffer_locs.pybuffer.buf = NULL;
  __pyx_pybuffer_locs.refcount = 0;
  __pyx_pybuffernd_locs.data = NULL;
  __pyx_pybuffernd_locs.rcbuffer = &__pyx_pybuffer_locs;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":688
 *     def lookup(self, ndarray[float64_t] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             float64_t val
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":689
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             float64_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":692
 *             float64_t val
 *             khiter_t k
 *             ndarray[int32_t] locs = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_locs.diminfo[0].strides = __pyx_pybuffernd_locs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_locs.diminfo[0].shape = __pyx_pybuffernd_locs.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_locs = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":694
 *             ndarray[int32_t] locs = np.empty(n, dtype=np.int32)
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             k = kh_get_float64(self.table, val)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_1; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":695
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             k = kh_get_float64(self.table, val)
 *             if k != self.table.n_buckets:
 */
    __pyx_t_9 = __pyx_v_i;
    __pyx_t_10 = -1;
    if (__pyx_t_9 < 0) {
      __pyx_t_9 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_9 < 0)) __pyx_t_10 = 0;
    } else if (unlikely(__pyx_t_9 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_10 = 0;
    if (unlikely(__pyx_t_10 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_10);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":696
 *         for i in range(n):
 *             val = values[i]
 *             k = kh_get_float64(self.table, val)             # <<<<<<<<<<<<<<
 *             if k != self.table.n_buckets:
 *                 locs[i] = self.table.vals[k]
 */
    __pyx_v_k = kh_get_float64(__pyx_v_self->table, __pyx_v_val);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":697
 *             val = values[i]
 *             k = kh_get_float64(self.table, val)
 *             if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 locs[i] = self.table.vals[k]
 *             else:
 */
    __pyx_t_11 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
    if (__pyx_t_11) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":698
 *             k = kh_get_float64(self.table, val)
 *             if k != self.table.n_buckets:
 *                 locs[i] = self.table.vals[k]             # <<<<<<<<<<<<<<
 *             else:
 *                 locs[i] = -1
 */
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_10 = -1;
      if (__pyx_t_12 < 0) {
        __pyx_t_12 += __pyx_pybuffernd_locs.diminfo[0].shape;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_locs.diminfo[0].strides) = (__pyx_v_self->table->vals[__pyx_v_k]);
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":700
 *                 locs[i] = self.table.vals[k]
 *             else:
 *                 locs[i] = -1             # <<<<<<<<<<<<<<
 * 
 *         return locs
 */
      __pyx_t_13 = __pyx_v_i;
      __pyx_t_10 = -1;
      if (__pyx_t_13 < 0) {
        __pyx_t_13 += __pyx_pybuffernd_locs.diminfo[0].shape;
        if (unlikely(__pyx_t_13 < 0)) __pyx_t_10 = 0;
      } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_10 = 0;
      if (unlikely(__pyx_t_10 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_10);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_locs.diminfo[0].strides) = -1;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":702
 *                 locs[i] = -1
 * 
 *         return locs             # <<<<<<<<<<<<<<
 * 
 *     def unique(self, ndarray[float64_t] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_locs));
  __pyx_r = ((PyObject *)__pyx_v_locs);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_16Float64HashTable_15unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_16Float64HashTable_15unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unique (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_16Float64HashTable_14unique(((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":704
 *         return locs
 * 
 *     def unique(self, ndarray[float64_t] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_16Float64HashTable_14unique(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_count;
  int __pyx_v_ret;
  __pyx_t_5numpy_float64_t __pyx_v_val;
  khiter_t __pyx_v_k;
  PyObject *__pyx_v_uniques = 0;
  int __pyx_v_seen_na;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unique");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":706
 *     def unique(self, ndarray[float64_t] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             Py_ssize_t idx, count = 0
 *             int ret = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":707
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             Py_ssize_t idx, count = 0             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             float64_t val
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":708
 *             Py_ssize_t i, n = len(values)
 *             Py_ssize_t idx, count = 0
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             float64_t val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":711
 *             float64_t val
 *             khiter_t k
 *             list uniques = []             # <<<<<<<<<<<<<<
 *             bint seen_na = 0
 * 
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_uniques = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":712
 *             khiter_t k
 *             list uniques = []
 *             bint seen_na = 0             # <<<<<<<<<<<<<<
 * 
 *         # TODO: kvec
 */
  __pyx_v_seen_na = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":716
 *         # TODO: kvec
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":717
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 * 
 *             if val == val:
 */
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":719
 *             val = values[i]
 * 
 *             if val == val:             # <<<<<<<<<<<<<<
 *                 k = kh_get_float64(self.table, val)
 *                 if k == self.table.n_buckets:
 */
    __pyx_t_6 = (__pyx_v_val == __pyx_v_val);
    if (__pyx_t_6) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":720
 * 
 *             if val == val:
 *                 k = kh_get_float64(self.table, val)             # <<<<<<<<<<<<<<
 *                 if k == self.table.n_buckets:
 *                     k = kh_put_float64(self.table, val, &ret)
 */
      __pyx_v_k = kh_get_float64(__pyx_v_self->table, __pyx_v_val);

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":721
 *             if val == val:
 *                 k = kh_get_float64(self.table, val)
 *                 if k == self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                     k = kh_put_float64(self.table, val, &ret)
 *                     uniques.append(val)
 */
      __pyx_t_6 = (__pyx_v_k == __pyx_v_self->table->n_buckets);
      if (__pyx_t_6) {

        /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":722
 *                 k = kh_get_float64(self.table, val)
 *                 if k == self.table.n_buckets:
 *                     k = kh_put_float64(self.table, val, &ret)             # <<<<<<<<<<<<<<
 *                     uniques.append(val)
 *                     count += 1
 */
        __pyx_v_k = kh_put_float64(__pyx_v_self->table, __pyx_v_val, (&__pyx_v_ret));

        /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":723
 *                 if k == self.table.n_buckets:
 *                     k = kh_put_float64(self.table, val, &ret)
 *                     uniques.append(val)             # <<<<<<<<<<<<<<
 *                     count += 1
 *             elif not seen_na:
 */
        __pyx_t_2 = PyFloat_FromDouble(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = PyList_Append(__pyx_v_uniques, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":724
 *                     k = kh_put_float64(self.table, val, &ret)
 *                     uniques.append(val)
 *                     count += 1             # <<<<<<<<<<<<<<
 *             elif not seen_na:
 *                 seen_na = 1
 */
        __pyx_v_count = (__pyx_v_count + 1);
        goto __pyx_L6;
      }
      __pyx_L6:;
      goto __pyx_L5;
    }

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":725
 *                     uniques.append(val)
 *                     count += 1
 *             elif not seen_na:             # <<<<<<<<<<<<<<
 *                 seen_na = 1
 *                 uniques.append(ONAN)
 */
    __pyx_t_6 = (!__pyx_v_seen_na);
    if (__pyx_t_6) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":726
 *                     count += 1
 *             elif not seen_na:
 *                 seen_na = 1             # <<<<<<<<<<<<<<
 *                 uniques.append(ONAN)
 * 
 */
      __pyx_v_seen_na = 1;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":727
 *             elif not seen_na:
 *                 seen_na = 1
 *                 uniques.append(ONAN)             # <<<<<<<<<<<<<<
 * 
 *         return uniques
 */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__ONAN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = PyList_Append(__pyx_v_uniques, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":729
 *                 uniques.append(ONAN)
 * 
 *         return uniques             # <<<<<<<<<<<<<<
 * 
 * cdef class PyObjectHashTable:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_uniques));
  __pyx_r = ((PyObject *)__pyx_v_uniques);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Float64HashTable.unique", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_17PyObjectHashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_17PyObjectHashTable_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_size_hint = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  {
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_1);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size_hint);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_size_hint = values[0];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_size_hint = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_17PyObjectHashTable___init__(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self), __pyx_v_size_hint);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":736
 *         kh_pymap_t *table
 * 
 *     def __init__(self, size_hint=1):             # <<<<<<<<<<<<<<
 *         self.table = kh_init_pymap()
 *         kh_resize_pymap(self.table, size_hint)
 */

static int __pyx_pf_6pandas_8_tseries_17PyObjectHashTable___init__(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_size_hint) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  khint_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":737
 * 
 *     def __init__(self, size_hint=1):
 *         self.table = kh_init_pymap()             # <<<<<<<<<<<<<<
 *         kh_resize_pymap(self.table, size_hint)
 * 
 */
  __pyx_v_self->table = kh_init_pymap();

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":738
 *     def __init__(self, size_hint=1):
 *         self.table = kh_init_pymap()
 *         kh_resize_pymap(self.table, size_hint)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_1 = __Pyx_PyInt_from_py_npy_uint32(__pyx_v_size_hint); if (unlikely((__pyx_t_1 == (khint_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  kh_resize_pymap(__pyx_v_self->table, __pyx_t_1);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static void __pyx_pw_6pandas_8_tseries_17PyObjectHashTable_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6pandas_8_tseries_17PyObjectHashTable_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)");
  __pyx_pf_6pandas_8_tseries_17PyObjectHashTable_2__dealloc__(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":740
 *         kh_resize_pymap(self.table, size_hint)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.table is not NULL:
 *             self.destroy()
 */

static void __pyx_pf_6pandas_8_tseries_17PyObjectHashTable_2__dealloc__(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":741
 * 
 *     def __dealloc__(self):
 *         if self.table is not NULL:             # <<<<<<<<<<<<<<
 *             self.destroy()
 * 
 */
  __pyx_t_1 = (__pyx_v_self->table != NULL);
  if (__pyx_t_1) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":742
 *     def __dealloc__(self):
 *         if self.table is not NULL:
 *             self.destroy()             # <<<<<<<<<<<<<<
 * 
 *     cpdef destroy(self):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self->__pyx_vtab)->destroy(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":744
 *             self.destroy()
 * 
 *     cpdef destroy(self):             # <<<<<<<<<<<<<<
 *         kh_destroy_pymap(self.table)
 *         self.table = NULL
 */

static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_5destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_17PyObjectHashTable_destroy(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("destroy");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__destroy); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_5destroy)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":745
 * 
 *     cpdef destroy(self):
 *         kh_destroy_pymap(self.table)             # <<<<<<<<<<<<<<
 *         self.table = NULL
 * 
 */
  kh_destroy_pymap(__pyx_v_self->table);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":746
 *     cpdef destroy(self):
 *         kh_destroy_pymap(self.table)
 *         self.table = NULL             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_item(self, object val):
 */
  __pyx_v_self->table = NULL;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_5destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_5destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_17PyObjectHashTable_4destroy(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":744
 *             self.destroy()
 * 
 *     cpdef destroy(self):             # <<<<<<<<<<<<<<
 *         kh_destroy_pymap(self.table)
 *         self.table = NULL
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_4destroy(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("destroy");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self->__pyx_vtab)->destroy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":748
 *         self.table = NULL
 * 
 *     cpdef get_item(self, object val):             # <<<<<<<<<<<<<<
 *         cdef khiter_t k
 *         k = kh_get_pymap(self.table, <PyObject*>val)
 */

static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_17PyObjectHashTable_get_item(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_val, int __pyx_skip_dispatch) {
  khiter_t __pyx_v_k;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_item");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_7get_item)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":750
 *     cpdef get_item(self, object val):
 *         cdef khiter_t k
 *         k = kh_get_pymap(self.table, <PyObject*>val)             # <<<<<<<<<<<<<<
 *         if k != self.table.n_buckets:
 *             return self.table.vals[k]
 */
  __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val));

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":751
 *         cdef khiter_t k
 *         k = kh_get_pymap(self.table, <PyObject*>val)
 *         if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *             return self.table.vals[k]
 *         else:
 */
  __pyx_t_4 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
  if (__pyx_t_4) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":752
 *         k = kh_get_pymap(self.table, <PyObject*>val)
 *         if k != self.table.n_buckets:
 *             return self.table.vals[k]             # <<<<<<<<<<<<<<
 *         else:
 *             raise KeyError(val)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyInt_FromSsize_t((__pyx_v_self->table->vals[__pyx_v_k])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":754
 *             return self.table.vals[k]
 *         else:
 *             raise KeyError(val)             # <<<<<<<<<<<<<<
 * 
 *     def get_iter_test(self, object key, Py_ssize_t iterations):
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_val);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_val);
    __Pyx_GIVEREF(__pyx_v_val);
    __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_7get_item(PyObject *__pyx_v_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_item (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_17PyObjectHashTable_6get_item(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self), ((PyObject *)__pyx_v_val));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":748
 *         self.table = NULL
 * 
 *     cpdef get_item(self, object val):             # <<<<<<<<<<<<<<
 *         cdef khiter_t k
 *         k = kh_get_pymap(self.table, <PyObject*>val)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_6get_item(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_item");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self->__pyx_vtab)->get_item(__pyx_v_self, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.get_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_9get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_9get_iter_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  Py_ssize_t __pyx_v_iterations;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__iterations,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_iter_test (wrapper)");
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__iterations);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, 1); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_iter_test") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_key = values[0];
      __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = values[0];
    __pyx_v_iterations = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_iterations == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_iter_test", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.get_iter_test", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_17PyObjectHashTable_8get_iter_test(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_iterations);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":756
 *             raise KeyError(val)
 * 
 *     def get_iter_test(self, object key, Py_ssize_t iterations):             # <<<<<<<<<<<<<<
 *         cdef Py_ssize_t i, val
 *         for i in range(iterations):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_8get_iter_test(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_iterations) {
  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
  CYTHON_UNUSED Py_ssize_t __pyx_v_val;
  khint_t __pyx_v_k;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("get_iter_test");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":758
 *     def get_iter_test(self, object key, Py_ssize_t iterations):
 *         cdef Py_ssize_t i, val
 *         for i in range(iterations):             # <<<<<<<<<<<<<<
 *             k = kh_get_pymap(self.table, <PyObject*>key)
 *             if k != self.table.n_buckets:
 */
  __pyx_t_1 = __pyx_v_iterations;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":759
 *         cdef Py_ssize_t i, val
 *         for i in range(iterations):
 *             k = kh_get_pymap(self.table, <PyObject*>key)             # <<<<<<<<<<<<<<
 *             if k != self.table.n_buckets:
 *                 val = self.table.vals[k]
 */
    __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_key));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":760
 *         for i in range(iterations):
 *             k = kh_get_pymap(self.table, <PyObject*>key)
 *             if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 val = self.table.vals[k]
 * 
 */
    __pyx_t_3 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
    if (__pyx_t_3) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":761
 *             k = kh_get_pymap(self.table, <PyObject*>key)
 *             if k != self.table.n_buckets:
 *                 val = self.table.vals[k]             # <<<<<<<<<<<<<<
 * 
 *     cpdef set_item(self, object key, Py_ssize_t val):
 */
      __pyx_v_val = (__pyx_v_self->table->vals[__pyx_v_k]);
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":763
 *                 val = self.table.vals[k]
 * 
 *     cpdef set_item(self, object key, Py_ssize_t val):             # <<<<<<<<<<<<<<
 *         cdef:
 *             khiter_t k
 */

static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_17PyObjectHashTable_set_item(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val, int __pyx_skip_dispatch) {
  khiter_t __pyx_v_k;
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_item");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__set_item); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_11set_item)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_val); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":766
 *         cdef:
 *             khiter_t k
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             char* buf
 * 
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":769
 *             char* buf
 * 
 *         k = kh_put_pymap(self.table, <PyObject*>key, &ret)             # <<<<<<<<<<<<<<
 *         # self.table.keys[k] = key
 *         if kh_exist_pymap(self.table, k):
 */
  __pyx_v_k = kh_put_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_key), (&__pyx_v_ret));

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":771
 *         k = kh_put_pymap(self.table, <PyObject*>key, &ret)
 *         # self.table.keys[k] = key
 *         if kh_exist_pymap(self.table, k):             # <<<<<<<<<<<<<<
 *             self.table.vals[k] = val
 *         else:
 */
  __pyx_t_4 = kh_exist_pymap(__pyx_v_self->table, __pyx_v_k);
  if (__pyx_t_4) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":772
 *         # self.table.keys[k] = key
 *         if kh_exist_pymap(self.table, k):
 *             self.table.vals[k] = val             # <<<<<<<<<<<<<<
 *         else:
 *             raise KeyError(key)
 */
    (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_val;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":774
 *             self.table.vals[k] = val
 *         else:
 *             raise KeyError(key)             # <<<<<<<<<<<<<<
 * 
 *     def map_locations(self, ndarray[object] values):
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_key);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key);
    __Pyx_GIVEREF(__pyx_v_key);
    __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_11set_item(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_key = 0;
  Py_ssize_t __pyx_v_val;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__key,&__pyx_n_s__val,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_item (wrapper)");
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__val);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, 1); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_item") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_key = values[0];
      __pyx_v_val = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_key = values[0];
    __pyx_v_val = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_val == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_item", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_17PyObjectHashTable_10set_item(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self), __pyx_v_key, __pyx_v_val);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":763
 *                 val = self.table.vals[k]
 * 
 *     cpdef set_item(self, object key, Py_ssize_t val):             # <<<<<<<<<<<<<<
 *         cdef:
 *             khiter_t k
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_10set_item(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyObject *__pyx_v_key, Py_ssize_t __pyx_v_val) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_item");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self->__pyx_vtab)->set_item(__pyx_v_self, __pyx_v_key, __pyx_v_val, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.set_item", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_13map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_13map_locations(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("map_locations (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_17PyObjectHashTable_12map_locations(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":776
 *             raise KeyError(key)
 * 
 *     def map_locations(self, ndarray[object] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_12map_locations(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  int __pyx_v_ret;
  PyObject *__pyx_v_val = 0;
  khiter_t __pyx_v_k;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("map_locations");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":778
 *     def map_locations(self, ndarray[object] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             object val
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":779
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             object val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":783
 *             khiter_t k
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             k = kh_put_pymap(self.table, <PyObject*>val, &ret)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":784
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             k = kh_put_pymap(self.table, <PyObject*>val, &ret)
 *             self.table.vals[k] = i
 */
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":785
 *         for i in range(n):
 *             val = values[i]
 *             k = kh_put_pymap(self.table, <PyObject*>val, &ret)             # <<<<<<<<<<<<<<
 *             self.table.vals[k] = i
 * 
 */
    __pyx_v_k = kh_put_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val), (&__pyx_v_ret));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":786
 *             val = values[i]
 *             k = kh_put_pymap(self.table, <PyObject*>val, &ret)
 *             self.table.vals[k] = i             # <<<<<<<<<<<<<<
 * 
 *     def lookup(self, ndarray[object] values):
 */
    (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_i;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.map_locations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_15lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_15lookup(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lookup (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_17PyObjectHashTable_14lookup(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":788
 *             self.table.vals[k] = i
 * 
 *     def lookup(self, ndarray[object] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_14lookup(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  CYTHON_UNUSED int __pyx_v_ret;
  PyObject *__pyx_v_val = 0;
  khiter_t __pyx_v_k;
  PyArrayObject *__pyx_v_locs = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_locs;
  __Pyx_Buffer __pyx_pybuffer_locs;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lookup");
  __pyx_pybuffer_locs.pybuffer.buf = NULL;
  __pyx_pybuffer_locs.refcount = 0;
  __pyx_pybuffernd_locs.data = NULL;
  __pyx_pybuffernd_locs.rcbuffer = &__pyx_pybuffer_locs;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":790
 *     def lookup(self, ndarray[object] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             object val
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":791
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             object val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":794
 *             object val
 *             khiter_t k
 *             ndarray[int32_t] locs = np.empty(n, dtype='i4')             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_locs.diminfo[0].strides = __pyx_pybuffernd_locs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_locs.diminfo[0].shape = __pyx_pybuffernd_locs.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_locs = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":796
 *             ndarray[int32_t] locs = np.empty(n, dtype='i4')
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             k = kh_get_pymap(self.table, <PyObject*>val)
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_1; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":797
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             k = kh_get_pymap(self.table, <PyObject*>val)
 *             if k != self.table.n_buckets:
 */
    __pyx_t_8 = __pyx_v_i;
    __pyx_t_9 = -1;
    if (__pyx_t_8 < 0) {
      __pyx_t_8 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_8 < 0)) __pyx_t_9 = 0;
    } else if (unlikely(__pyx_t_8 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_9 = 0;
    if (unlikely(__pyx_t_9 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_9);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":798
 *         for i in range(n):
 *             val = values[i]
 *             k = kh_get_pymap(self.table, <PyObject*>val)             # <<<<<<<<<<<<<<
 *             if k != self.table.n_buckets:
 *                 locs[i] = self.table.vals[k]
 */
    __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":799
 *             val = values[i]
 *             k = kh_get_pymap(self.table, <PyObject*>val)
 *             if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 locs[i] = self.table.vals[k]
 *             else:
 */
    __pyx_t_10 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
    if (__pyx_t_10) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":800
 *             k = kh_get_pymap(self.table, <PyObject*>val)
 *             if k != self.table.n_buckets:
 *                 locs[i] = self.table.vals[k]             # <<<<<<<<<<<<<<
 *             else:
 *                 locs[i] = -1
 */
      __pyx_t_11 = __pyx_v_i;
      __pyx_t_9 = -1;
      if (__pyx_t_11 < 0) {
        __pyx_t_11 += __pyx_pybuffernd_locs.diminfo[0].shape;
        if (unlikely(__pyx_t_11 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_locs.diminfo[0].strides) = (__pyx_v_self->table->vals[__pyx_v_k]);
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":802
 *                 locs[i] = self.table.vals[k]
 *             else:
 *                 locs[i] = -1             # <<<<<<<<<<<<<<
 * 
 *         return locs
 */
      __pyx_t_12 = __pyx_v_i;
      __pyx_t_9 = -1;
      if (__pyx_t_12 < 0) {
        __pyx_t_12 += __pyx_pybuffernd_locs.diminfo[0].shape;
        if (unlikely(__pyx_t_12 < 0)) __pyx_t_9 = 0;
      } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_locs.diminfo[0].shape)) __pyx_t_9 = 0;
      if (unlikely(__pyx_t_9 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_9);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_locs.diminfo[0].strides) = -1;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":804
 *                 locs[i] = -1
 * 
 *         return locs             # <<<<<<<<<<<<<<
 * 
 *     def lookup2(self, ndarray[object] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_locs));
  __pyx_r = ((PyObject *)__pyx_v_locs);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF((PyObject *)__pyx_v_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_17lookup2(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_17lookup2(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lookup2 (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_17PyObjectHashTable_16lookup2(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":806
 *         return locs
 * 
 *     def lookup2(self, ndarray[object] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_16lookup2(CYTHON_UNUSED struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_n;
  CYTHON_UNUSED int __pyx_v_ret;
  PyArrayObject *__pyx_v_locs = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_locs;
  __Pyx_Buffer __pyx_pybuffer_locs;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lookup2");
  __pyx_pybuffer_locs.pybuffer.buf = NULL;
  __pyx_pybuffer_locs.refcount = 0;
  __pyx_pybuffernd_locs.data = NULL;
  __pyx_pybuffernd_locs.rcbuffer = &__pyx_pybuffer_locs;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":808
 *     def lookup2(self, ndarray[object] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             object val
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":809
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             object val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":813
 *             khiter_t k
 *             long hval
 *             ndarray[int32_t] locs = np.empty(n, dtype='i4')             # <<<<<<<<<<<<<<
 * 
 *         # for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_locs.diminfo[0].strides = __pyx_pybuffernd_locs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_locs.diminfo[0].shape = __pyx_pybuffernd_locs.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_locs = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":820
 *             # k = kh_get_pymap(self.table, <PyObject*>val)
 * 
 *         return locs             # <<<<<<<<<<<<<<
 * 
 *     def unique(self, ndarray[object] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_locs));
  __pyx_r = ((PyObject *)__pyx_v_locs);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.lookup2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_19unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_19unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unique (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_17PyObjectHashTable_18unique(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":822
 *         return locs
 * 
 *     def unique(self, ndarray[object] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_18unique(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  CYTHON_UNUSED Py_ssize_t __pyx_v_count;
  int __pyx_v_ret;
  PyObject *__pyx_v_val = 0;
  khiter_t __pyx_v_k;
  PyObject *__pyx_v_uniques = 0;
  int __pyx_v_seen_na;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unique");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":824
 *     def unique(self, ndarray[object] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             Py_ssize_t idx, count = 0
 *             int ret = 0
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":825
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             Py_ssize_t idx, count = 0             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             object val
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":826
 *             Py_ssize_t i, n = len(values)
 *             Py_ssize_t idx, count = 0
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             object val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":829
 *             object val
 *             khiter_t k
 *             list uniques = []             # <<<<<<<<<<<<<<
 *             bint seen_na = 0
 * 
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_uniques = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":830
 *             khiter_t k
 *             list uniques = []
 *             bint seen_na = 0             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_v_seen_na = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":832
 *             bint seen_na = 0
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_1; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":833
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 * 
 *             if not _checknan(val):
 */
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":835
 *             val = values[i]
 * 
 *             if not _checknan(val):             # <<<<<<<<<<<<<<
 *                 k = kh_get_pymap(self.table, <PyObject*>val)
 *                 if k == self.table.n_buckets:
 */
    __pyx_t_6 = (!__pyx_f_6pandas_8_tseries__checknan(__pyx_v_val));
    if (__pyx_t_6) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":836
 * 
 *             if not _checknan(val):
 *                 k = kh_get_pymap(self.table, <PyObject*>val)             # <<<<<<<<<<<<<<
 *                 if k == self.table.n_buckets:
 *                     k = kh_put_pymap(self.table, <PyObject*>val, &ret)
 */
      __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val));

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":837
 *             if not _checknan(val):
 *                 k = kh_get_pymap(self.table, <PyObject*>val)
 *                 if k == self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                     k = kh_put_pymap(self.table, <PyObject*>val, &ret)
 *                     uniques.append(val)
 */
      __pyx_t_6 = (__pyx_v_k == __pyx_v_self->table->n_buckets);
      if (__pyx_t_6) {

        /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":838
 *                 k = kh_get_pymap(self.table, <PyObject*>val)
 *                 if k == self.table.n_buckets:
 *                     k = kh_put_pymap(self.table, <PyObject*>val, &ret)             # <<<<<<<<<<<<<<
 *                     uniques.append(val)
 *             elif not seen_na:
 */
        __pyx_v_k = kh_put_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val), (&__pyx_v_ret));

        /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":839
 *                 if k == self.table.n_buckets:
 *                     k = kh_put_pymap(self.table, <PyObject*>val, &ret)
 *                     uniques.append(val)             # <<<<<<<<<<<<<<
 *             elif not seen_na:
 *                 seen_na = 1
 */
        __pyx_t_7 = PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L6;
      }
      __pyx_L6:;
      goto __pyx_L5;
    }

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":840
 *                     k = kh_put_pymap(self.table, <PyObject*>val, &ret)
 *                     uniques.append(val)
 *             elif not seen_na:             # <<<<<<<<<<<<<<
 *                 seen_na = 1
 *                 uniques.append(ONAN)
 */
    __pyx_t_6 = (!__pyx_v_seen_na);
    if (__pyx_t_6) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":841
 *                     uniques.append(val)
 *             elif not seen_na:
 *                 seen_na = 1             # <<<<<<<<<<<<<<
 *                 uniques.append(ONAN)
 * 
 */
      __pyx_v_seen_na = 1;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":842
 *             elif not seen_na:
 *                 seen_na = 1
 *                 uniques.append(ONAN)             # <<<<<<<<<<<<<<
 * 
 *         return uniques
 */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__ONAN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = PyList_Append(__pyx_v_uniques, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":844
 *                 uniques.append(ONAN)
 * 
 *         return uniques             # <<<<<<<<<<<<<<
 * 
 *     cpdef get_labels(self, ndarray[object] values, list uniques,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_uniques));
  __pyx_r = ((PyObject *)__pyx_v_uniques);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.unique", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_uniques);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":846
 *         return uniques
 * 
 *     cpdef get_labels(self, ndarray[object] values, list uniques,             # <<<<<<<<<<<<<<
 *                      Py_ssize_t count_prior, int32_t na_sentinel):
 *         cdef:
 */

static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_21get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_6pandas_8_tseries_17PyObjectHashTable_get_labels(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, __pyx_t_5numpy_int32_t __pyx_v_na_sentinel, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_labels = 0;
  PyArrayObject *__pyx_v_counts = 0;
  Py_ssize_t __pyx_v_idx;
  Py_ssize_t __pyx_v_count;
  int __pyx_v_ret;
  PyObject *__pyx_v_val = 0;
  khiter_t __pyx_v_k;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyArrayObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_t_22;
  Py_ssize_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_labels");
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_labels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_21get_labels)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_count_prior); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyInt_to_py_npy_int32(__pyx_v_na_sentinel); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(((PyObject *)__pyx_v_values));
      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_values));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
      __Pyx_INCREF(((PyObject *)__pyx_v_uniques));
      PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_uniques));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_uniques));
      PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":849
 *                      Py_ssize_t count_prior, int32_t na_sentinel):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             ndarray[int32_t] labels
 *             ndarray[int32_t] counts
 */
  __pyx_t_5 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_5;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":852
 *             ndarray[int32_t] labels
 *             ndarray[int32_t] counts
 *             Py_ssize_t idx, count = count_prior             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             object val
 */
  __pyx_v_count = __pyx_v_count_prior;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":853
 *             ndarray[int32_t] counts
 *             Py_ssize_t idx, count = count_prior
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             object val
 *             khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":857
 *             khiter_t k
 * 
 *         labels = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 *         counts = np.empty(count_prior + n, dtype=np.int32)
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":858
 * 
 *         labels = np.empty(n, dtype=np.int32)
 *         counts = np.empty(count_prior + n, dtype=np.int32)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t((__pyx_v_count_prior + __pyx_v_n)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__int32); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_2) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_12 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":860
 *         counts = np.empty(count_prior + n, dtype=np.int32)
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 * 
 */
  __pyx_t_5 = __pyx_v_n;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_5; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":861
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 * 
 *             if val != val or val is None:
 */
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_2 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_2);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":863
 *             val = values[i]
 * 
 *             if val != val or val is None:             # <<<<<<<<<<<<<<
 *                 labels[i] = na_sentinel
 *                 continue
 */
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_val, __pyx_v_val, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (!__pyx_t_15) {
      __pyx_t_16 = (__pyx_v_val == Py_None);
      __pyx_t_17 = __pyx_t_16;
    } else {
      __pyx_t_17 = __pyx_t_15;
    }
    if (__pyx_t_17) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":864
 * 
 *             if val != val or val is None:
 *                 labels[i] = na_sentinel             # <<<<<<<<<<<<<<
 *                 continue
 * 
 */
      __pyx_t_18 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_na_sentinel;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":865
 *             if val != val or val is None:
 *                 labels[i] = na_sentinel
 *                 continue             # <<<<<<<<<<<<<<
 * 
 *             k = kh_get_pymap(self.table, <PyObject*>val)
 */
      goto __pyx_L3_continue;
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":867
 *                 continue
 * 
 *             k = kh_get_pymap(self.table, <PyObject*>val)             # <<<<<<<<<<<<<<
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]
 */
    __pyx_v_k = kh_get_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":868
 * 
 *             k = kh_get_pymap(self.table, <PyObject*>val)
 *             if k != self.table.n_buckets:             # <<<<<<<<<<<<<<
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx
 */
    __pyx_t_17 = (__pyx_v_k != __pyx_v_self->table->n_buckets);
    if (__pyx_t_17) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":869
 *             k = kh_get_pymap(self.table, <PyObject*>val)
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]             # <<<<<<<<<<<<<<
 *                 labels[i] = idx
 *                 counts[idx] = counts[idx] + 1
 */
      __pyx_v_idx = (__pyx_v_self->table->vals[__pyx_v_k]);

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":870
 *             if k != self.table.n_buckets:
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx             # <<<<<<<<<<<<<<
 *                 counts[idx] = counts[idx] + 1
 *             else:
 */
      __pyx_t_19 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_19 < 0) {
        __pyx_t_19 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_19 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":871
 *                 idx = self.table.vals[k]
 *                 labels[i] = idx
 *                 counts[idx] = counts[idx] + 1             # <<<<<<<<<<<<<<
 *             else:
 *                 k = kh_put_pymap(self.table, <PyObject*>val, &ret)
 */
      __pyx_t_20 = __pyx_v_idx;
      __pyx_t_8 = -1;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_21 = __pyx_v_idx;
      __pyx_t_8 = -1;
      if (__pyx_t_21 < 0) {
        __pyx_t_21 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_counts.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_counts.diminfo[0].strides)) + 1);
      goto __pyx_L6;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":873
 *                 counts[idx] = counts[idx] + 1
 *             else:
 *                 k = kh_put_pymap(self.table, <PyObject*>val, &ret)             # <<<<<<<<<<<<<<
 *                 self.table.vals[k] = count
 *                 uniques.append(val)
 */
      __pyx_v_k = kh_put_pymap(__pyx_v_self->table, ((PyObject *)__pyx_v_val), (&__pyx_v_ret));

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":874
 *             else:
 *                 k = kh_put_pymap(self.table, <PyObject*>val, &ret)
 *                 self.table.vals[k] = count             # <<<<<<<<<<<<<<
 *                 uniques.append(val)
 *                 labels[i] = count
 */
      (__pyx_v_self->table->vals[__pyx_v_k]) = __pyx_v_count;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":875
 *                 k = kh_put_pymap(self.table, <PyObject*>val, &ret)
 *                 self.table.vals[k] = count
 *                 uniques.append(val)             # <<<<<<<<<<<<<<
 *                 labels[i] = count
 *                 counts[count] = 1
 */
      if (unlikely(((PyObject *)__pyx_v_uniques) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_22 = PyList_Append(__pyx_v_uniques, __pyx_v_val); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":876
 *                 self.table.vals[k] = count
 *                 uniques.append(val)
 *                 labels[i] = count             # <<<<<<<<<<<<<<
 *                 counts[count] = 1
 *                 count += 1
 */
      __pyx_t_23 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_23 < 0) {
        __pyx_t_23 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_23 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_23 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 876; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":877
 *                 uniques.append(val)
 *                 labels[i] = count
 *                 counts[count] = 1             # <<<<<<<<<<<<<<
 *                 count += 1
 * 
 */
      __pyx_t_24 = __pyx_v_count;
      __pyx_t_8 = -1;
      if (__pyx_t_24 < 0) {
        __pyx_t_24 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_24 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_24 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_24, __pyx_pybuffernd_counts.diminfo[0].strides) = 1;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":878
 *                 labels[i] = count
 *                 counts[count] = 1
 *                 count += 1             # <<<<<<<<<<<<<<
 * 
 *         return labels, counts[:count].copy()
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L6:;
    __pyx_L3_continue:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":880
 *                 count += 1
 * 
 *         return labels, counts[:count].copy()             # <<<<<<<<<<<<<<
 * 
 *     # def unique(self, ndarray[object] values, list uniques):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_counts), 0, __pyx_v_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__copy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_v_labels));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_labels));
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject *)__pyx_t_6);
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.get_labels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_labels);
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_21get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_21get_labels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_uniques = 0;
  Py_ssize_t __pyx_v_count_prior;
  __pyx_t_5numpy_int32_t __pyx_v_na_sentinel;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__uniques,&__pyx_n_s__count_prior,&__pyx_n_s__na_sentinel,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_labels (wrapper)");
  {
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__uniques);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 1); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__count_prior);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 2); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_sentinel);
        if (likely(values[3])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, 3); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_labels") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_uniques = ((PyObject*)values[1]);
      __pyx_v_count_prior = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_count_prior == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_na_sentinel = __Pyx_PyInt_from_py_npy_int32(values[3]); if (unlikely((__pyx_v_na_sentinel == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_uniques = ((PyObject*)values[1]);
    __pyx_v_count_prior = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_count_prior == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_na_sentinel = __Pyx_PyInt_from_py_npy_int32(values[3]); if (unlikely((__pyx_v_na_sentinel == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_labels", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.get_labels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_uniques), (&PyList_Type), 1, "uniques", 1))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_17PyObjectHashTable_20get_labels(((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self), __pyx_v_values, __pyx_v_uniques, __pyx_v_count_prior, __pyx_v_na_sentinel);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":846
 *         return uniques
 * 
 *     cpdef get_labels(self, ndarray[object] values, list uniques,             # <<<<<<<<<<<<<<
 *                      Py_ssize_t count_prior, int32_t na_sentinel):
 *         cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_17PyObjectHashTable_20get_labels(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_uniques, Py_ssize_t __pyx_v_count_prior, __pyx_t_5numpy_int32_t __pyx_v_na_sentinel) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_labels");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self->__pyx_vtab)->get_labels(__pyx_v_self, __pyx_v_values, __pyx_v_uniques, __pyx_v_count_prior, __pyx_v_na_sentinel, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.PyObjectHashTable.get_labels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_10Factorizer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_10Factorizer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_size_hint = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  {
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size_hint);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_size_hint = values[0];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_size_hint = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Factorizer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_10Factorizer___init__(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self), __pyx_v_size_hint);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":905
 *         Py_ssize_t count
 * 
 *     def __init__(self, size_hint):             # <<<<<<<<<<<<<<
 *         self.table = PyObjectHashTable(size_hint)
 *         self.uniques = []
 */

static int __pyx_pf_6pandas_8_tseries_10Factorizer___init__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self, PyObject *__pyx_v_size_hint) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":906
 * 
 *     def __init__(self, size_hint):
 *         self.table = PyObjectHashTable(size_hint)             # <<<<<<<<<<<<<<
 *         self.uniques = []
 *         self.count = 0
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_size_hint);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_size_hint);
  __Pyx_GIVEREF(__pyx_v_size_hint);
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_8_tseries_PyObjectHashTable)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->table);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->table));
  __pyx_v_self->table = ((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":907
 *     def __init__(self, size_hint):
 *         self.table = PyObjectHashTable(size_hint)
 *         self.uniques = []             # <<<<<<<<<<<<<<
 *         self.count = 0
 * 
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __Pyx_GOTREF(__pyx_v_self->uniques);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques));
  __pyx_v_self->uniques = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":908
 *         self.table = PyObjectHashTable(size_hint)
 *         self.uniques = []
 *         self.count = 0             # <<<<<<<<<<<<<<
 * 
 *     def get_count(self):
 */
  __pyx_v_self->count = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._tseries.Factorizer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_10Factorizer_3get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_10Factorizer_3get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_count (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_10Factorizer_2get_count(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":910
 *         self.count = 0
 * 
 *     def get_count(self):             # <<<<<<<<<<<<<<
 *         return self.count
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_2get_count(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_count");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":911
 * 
 *     def get_count(self):
 *         return self.count             # <<<<<<<<<<<<<<
 * 
 *     def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.Factorizer.get_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_10Factorizer_5factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_10Factorizer_5factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_sort = 0;
  PyObject *__pyx_v_na_sentinel = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__sort,&__pyx_n_s__na_sentinel,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("factorize (wrapper)");
  {
    PyObject* values[3] = {0,0,0};
    values[1] = __pyx_k_117;
    values[2] = ((PyObject *)__pyx_int_neg_1);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sort);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__na_sentinel);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "factorize") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_sort = values[1];
      __pyx_v_na_sentinel = values[2];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_sort = values[1];
    __pyx_v_na_sentinel = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("factorize", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Factorizer.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_10Factorizer_4factorize(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self), __pyx_v_values, __pyx_v_sort, __pyx_v_na_sentinel);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":913
 *         return self.count
 * 
 *     def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1):             # <<<<<<<<<<<<<<
 *         labels, counts = self.table.get_labels(values, self.uniques,
 *                                                self.count, na_sentinel)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_4factorize(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_sort, PyObject *__pyx_v_na_sentinel) {
  PyObject *__pyx_v_labels = NULL;
  PyObject *__pyx_v_counts = NULL;
  PyObject *__pyx_v_sorter = NULL;
  PyObject *__pyx_v_reverse_indexer = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __pyx_t_5numpy_int32_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("factorize");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":914
 * 
 *     def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1):
 *         labels, counts = self.table.get_labels(values, self.uniques,             # <<<<<<<<<<<<<<
 *                                                self.count, na_sentinel)
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->uniques);
  __Pyx_INCREF(__pyx_t_1);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":915
 *     def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1):
 *         labels, counts = self.table.get_labels(values, self.uniques,
 *                                                self.count, na_sentinel)             # <<<<<<<<<<<<<<
 * 
 *         # sort on
 */
  __pyx_t_2 = __Pyx_PyInt_from_py_npy_int32(__pyx_v_na_sentinel); if (unlikely((__pyx_t_2 == (npy_int32)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = ((struct __pyx_vtabstruct_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_self->table->__pyx_vtab)->get_labels(__pyx_v_self->table, ((PyArrayObject *)__pyx_v_values), ((PyObject*)__pyx_t_1), __pyx_v_self->count, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
    PyObject* sequence = __pyx_t_3;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext;
    index = 0; __pyx_t_1 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":914
 * 
 *     def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1):
 *         labels, counts = self.table.get_labels(values, self.uniques,             # <<<<<<<<<<<<<<
 *                                                self.count, na_sentinel)
 * 
 */
  __pyx_v_labels = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_counts = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":918
 * 
 *         # sort on
 *         if sort:             # <<<<<<<<<<<<<<
 *             sorter = list_to_object_array(self.uniques).argsort()
 *             reverse_indexer = np.empty(len(sorter), dtype=np.int32)
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_sort); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_7) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":919
 *         # sort on
 *         if sort:
 *             sorter = list_to_object_array(self.uniques).argsort()             # <<<<<<<<<<<<<<
 *             reverse_indexer = np.empty(len(sorter), dtype=np.int32)
 *             reverse_indexer.put(sorter, np.arange(len(sorter)))
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_104); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self->uniques));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->uniques));
    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__argsort); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_sorter = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":920
 *         if sort:
 *             sorter = list_to_object_array(self.uniques).argsort()
 *             reverse_indexer = np.empty(len(sorter), dtype=np.int32)             # <<<<<<<<<<<<<<
 *             reverse_indexer.put(sorter, np.arange(len(sorter)))
 * 
 */
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_v_reverse_indexer = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":921
 *             sorter = list_to_object_array(self.uniques).argsort()
 *             reverse_indexer = np.empty(len(sorter), dtype=np.int32)
 *             reverse_indexer.put(sorter, np.arange(len(sorter)))             # <<<<<<<<<<<<<<
 * 
 *             labels = reverse_indexer.take(labels)
 */
    __pyx_t_9 = PyObject_GetAttr(__pyx_v_reverse_indexer, __pyx_n_s__put); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__arange); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_8 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_sorter);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_sorter);
    __Pyx_GIVEREF(__pyx_v_sorter);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":923
 *             reverse_indexer.put(sorter, np.arange(len(sorter)))
 * 
 *             labels = reverse_indexer.take(labels)             # <<<<<<<<<<<<<<
 *             counts = counts.take(sorter)
 * 
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_reverse_indexer, __pyx_n_s__take); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_labels);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_labels);
    __Pyx_GIVEREF(__pyx_v_labels);
    __pyx_t_9 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_v_labels);
    __pyx_v_labels = __pyx_t_9;
    __pyx_t_9 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":924
 * 
 *             labels = reverse_indexer.take(labels)
 *             counts = counts.take(sorter)             # <<<<<<<<<<<<<<
 * 
 *         self.count = len(counts)
 */
    __pyx_t_9 = PyObject_GetAttr(__pyx_v_counts, __pyx_n_s__take); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_sorter);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_sorter);
    __Pyx_GIVEREF(__pyx_v_sorter);
    __pyx_t_1 = PyObject_Call(__pyx_t_9, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_v_counts);
    __pyx_v_counts = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":926
 *             counts = counts.take(sorter)
 * 
 *         self.count = len(counts)             # <<<<<<<<<<<<<<
 *         return labels, counts
 * 
 */
  __pyx_t_8 = PyObject_Length(__pyx_v_counts); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->count = __pyx_t_8;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":927
 * 
 *         self.count = len(counts)
 *         return labels, counts             # <<<<<<<<<<<<<<
 * 
 *     def unique(self, ndarray[object] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_labels);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_labels);
  __Pyx_GIVEREF(__pyx_v_labels);
  __Pyx_INCREF(__pyx_v_counts);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_counts);
  __Pyx_GIVEREF(__pyx_v_counts);
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Factorizer.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_labels);
  __Pyx_XDECREF(__pyx_v_counts);
  __Pyx_XDECREF(__pyx_v_sorter);
  __Pyx_XDECREF(__pyx_v_reverse_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_10Factorizer_7unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_10Factorizer_7unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unique (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_10Factorizer_6unique(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":929
 *         return labels, counts
 * 
 *     def unique(self, ndarray[object] values):             # <<<<<<<<<<<<<<
 *         # just for fun
 *         return self.table.unique(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_6unique(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unique");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":931
 *     def unique(self, ndarray[object] values):
 *         # just for fun
 *         return self.table.unique(values)             # <<<<<<<<<<<<<<
 * 
 * cdef class Int64Factorizer:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->table), __pyx_n_s__unique); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Factorizer.unique", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_10Factorizer_5table_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_10Factorizer_5table_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_10Factorizer_5table___get__(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":901
 * 
 *     cdef public:
 *         PyObjectHashTable table             # <<<<<<<<<<<<<<
 *         list uniques
 *         Py_ssize_t count
 */

static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_5table___get__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->table));
  __pyx_r = ((PyObject *)__pyx_v_self->table);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_10Factorizer_5table_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_10Factorizer_5table_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_10Factorizer_5table_2__set__(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_10Factorizer_5table_2__set__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pandas_8_tseries_PyObjectHashTable))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->table);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->table));
  __pyx_v_self->table = ((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)__pyx_v_value);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Factorizer.table.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_10Factorizer_5table_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_8_tseries_10Factorizer_5table_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_10Factorizer_5table_4__del__(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_10Factorizer_5table_4__del__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->table);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->table));
  __pyx_v_self->table = ((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)Py_None);

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_10Factorizer_7uniques_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_10Factorizer_7uniques_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_10Factorizer_7uniques___get__(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":902
 *     cdef public:
 *         PyObjectHashTable table
 *         list uniques             # <<<<<<<<<<<<<<
 *         Py_ssize_t count
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_7uniques___get__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques));
  __pyx_r = ((PyObject *)__pyx_v_self->uniques);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_10Factorizer_7uniques_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_10Factorizer_7uniques_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_10Factorizer_7uniques_2__set__(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_10Factorizer_7uniques_2__set__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->uniques);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques));
  __pyx_v_self->uniques = ((PyObject*)__pyx_v_value);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Factorizer.uniques.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_10Factorizer_7uniques_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_8_tseries_10Factorizer_7uniques_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_10Factorizer_7uniques_4__del__(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_10Factorizer_7uniques_4__del__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->uniques);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques));
  __pyx_v_self->uniques = ((PyObject*)Py_None);

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_10Factorizer_5count_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_10Factorizer_5count_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_10Factorizer_5count___get__(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":903
 *         PyObjectHashTable table
 *         list uniques
 *         Py_ssize_t count             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, size_hint):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_10Factorizer_5count___get__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.Factorizer.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_10Factorizer_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_10Factorizer_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_10Factorizer_5count_2__set__(((struct __pyx_obj_6pandas_8_tseries_Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_10Factorizer_5count_2__set__(struct __pyx_obj_6pandas_8_tseries_Factorizer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");
  __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->count = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Factorizer.count.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_15Int64Factorizer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_15Int64Factorizer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_size_hint = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__size_hint,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  {
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size_hint);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_size_hint = values[0];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_size_hint = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64Factorizer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_15Int64Factorizer___init__(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self), __pyx_v_size_hint);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":940
 *         Py_ssize_t count
 * 
 *     def __init__(self, size_hint):             # <<<<<<<<<<<<<<
 *         self.table = Int64HashTable(size_hint)
 *         self.uniques = []
 */

static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer___init__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_size_hint) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":941
 * 
 *     def __init__(self, size_hint):
 *         self.table = Int64HashTable(size_hint)             # <<<<<<<<<<<<<<
 *         self.uniques = []
 *         self.count = 0
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_size_hint);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_size_hint);
  __Pyx_GIVEREF(__pyx_v_size_hint);
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_8_tseries_Int64HashTable)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->table);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->table));
  __pyx_v_self->table = ((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":942
 *     def __init__(self, size_hint):
 *         self.table = Int64HashTable(size_hint)
 *         self.uniques = []             # <<<<<<<<<<<<<<
 *         self.count = 0
 * 
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
  __Pyx_GOTREF(__pyx_v_self->uniques);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques));
  __pyx_v_self->uniques = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":943
 *         self.table = Int64HashTable(size_hint)
 *         self.uniques = []
 *         self.count = 0             # <<<<<<<<<<<<<<
 * 
 *     def get_count(self):
 */
  __pyx_v_self->count = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._tseries.Int64Factorizer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_15Int64Factorizer_3get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_15Int64Factorizer_3get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_count (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_15Int64Factorizer_2get_count(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":945
 *         self.count = 0
 * 
 *     def get_count(self):             # <<<<<<<<<<<<<<
 *         return self.count
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_2get_count(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_count");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":946
 * 
 *     def get_count(self):
 *         return self.count             # <<<<<<<<<<<<<<
 * 
 *     def factorize(self, ndarray[int64_t] values, sort=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.Int64Factorizer.get_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_15Int64Factorizer_5factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_15Int64Factorizer_5factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_sort = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__sort,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("factorize (wrapper)");
  {
    PyObject* values[2] = {0,0};
    values[1] = __pyx_k_118;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sort);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "factorize") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_sort = values[1];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_sort = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("factorize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64Factorizer.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_15Int64Factorizer_4factorize(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self), __pyx_v_values, __pyx_v_sort);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":948
 *         return self.count
 * 
 *     def factorize(self, ndarray[int64_t] values, sort=False):             # <<<<<<<<<<<<<<
 *         labels, counts = self.table.get_labels(values, self.uniques,
 *                                                self.count, -1)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_4factorize(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_sort) {
  PyObject *__pyx_v_labels = NULL;
  PyObject *__pyx_v_counts = NULL;
  PyObject *__pyx_v_sorter = NULL;
  PyObject *__pyx_v_reverse_indexer = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("factorize");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":949
 * 
 *     def factorize(self, ndarray[int64_t] values, sort=False):
 *         labels, counts = self.table.get_labels(values, self.uniques,             # <<<<<<<<<<<<<<
 *                                                self.count, -1)
 * 
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self->table), __pyx_n_s__get_labels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":950
 *     def factorize(self, ndarray[int64_t] values, sort=False):
 *         labels, counts = self.table.get_labels(values, self.uniques,
 *                                                self.count, -1)             # <<<<<<<<<<<<<<
 * 
 *         # sort on
 */
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->uniques));
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":949
 * 
 *     def factorize(self, ndarray[int64_t] values, sort=False):
 *         labels, counts = self.table.get_labels(values, self.uniques,             # <<<<<<<<<<<<<<
 *                                                self.count, -1)
 * 
 */
  __pyx_v_labels = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_counts = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":953
 * 
 *         # sort on
 *         if sort:             # <<<<<<<<<<<<<<
 *             sorter = list_to_object_array(self.uniques).argsort()
 *             reverse_indexer = np.empty(len(sorter), dtype=np.int32)
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_sort); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_6) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":954
 *         # sort on
 *         if sort:
 *             sorter = list_to_object_array(self.uniques).argsort()             # <<<<<<<<<<<<<<
 *             reverse_indexer = np.empty(len(sorter), dtype=np.int32)
 *             reverse_indexer.put(sorter, np.arange(len(sorter)))
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s_104); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->uniques));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->uniques));
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_sorter = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":955
 *         if sort:
 *             sorter = list_to_object_array(self.uniques).argsort()
 *             reverse_indexer = np.empty(len(sorter), dtype=np.int32)             # <<<<<<<<<<<<<<
 *             reverse_indexer.put(sorter, np.arange(len(sorter)))
 * 
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__int32); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __pyx_v_reverse_indexer = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":956
 *             sorter = list_to_object_array(self.uniques).argsort()
 *             reverse_indexer = np.empty(len(sorter), dtype=np.int32)
 *             reverse_indexer.put(sorter, np.arange(len(sorter)))             # <<<<<<<<<<<<<<
 * 
 *             labels = reverse_indexer.take(labels)
 */
    __pyx_t_8 = PyObject_GetAttr(__pyx_v_reverse_indexer, __pyx_n_s__put); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__arange); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_sorter);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sorter);
    __Pyx_GIVEREF(__pyx_v_sorter);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":958
 *             reverse_indexer.put(sorter, np.arange(len(sorter)))
 * 
 *             labels = reverse_indexer.take(labels)             # <<<<<<<<<<<<<<
 *             counts = counts.take(sorter)
 * 
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_reverse_indexer, __pyx_n_s__take); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_labels);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_labels);
    __Pyx_GIVEREF(__pyx_v_labels);
    __pyx_t_8 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_labels);
    __pyx_v_labels = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":959
 * 
 *             labels = reverse_indexer.take(labels)
 *             counts = counts.take(sorter)             # <<<<<<<<<<<<<<
 * 
 *         self.count = len(counts)
 */
    __pyx_t_8 = PyObject_GetAttr(__pyx_v_counts, __pyx_n_s__take); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_sorter);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sorter);
    __Pyx_GIVEREF(__pyx_v_sorter);
    __pyx_t_3 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_counts);
    __pyx_v_counts = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":961
 *             counts = counts.take(sorter)
 * 
 *         self.count = len(counts)             # <<<<<<<<<<<<<<
 *         return labels, counts
 * 
 */
  __pyx_t_7 = PyObject_Length(__pyx_v_counts); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->count = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":962
 * 
 *         self.count = len(counts)
 *         return labels, counts             # <<<<<<<<<<<<<<
 * 
 * cdef class DictFactorizer:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_labels);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_labels);
  __Pyx_GIVEREF(__pyx_v_labels);
  __Pyx_INCREF(__pyx_v_counts);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_counts);
  __Pyx_GIVEREF(__pyx_v_counts);
  __pyx_r = ((PyObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.Int64Factorizer.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_labels);
  __Pyx_XDECREF(__pyx_v_counts);
  __Pyx_XDECREF(__pyx_v_sorter);
  __Pyx_XDECREF(__pyx_v_reverse_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_15Int64Factorizer_5table_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_15Int64Factorizer_5table_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table___get__(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":936
 * 
 *     cdef public:
 *         Int64HashTable table             # <<<<<<<<<<<<<<
 *         list uniques
 *         Py_ssize_t count
 */

static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table___get__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->table));
  __pyx_r = ((PyObject *)__pyx_v_self->table);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_15Int64Factorizer_5table_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_15Int64Factorizer_5table_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table_2__set__(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table_2__set__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");
  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_6pandas_8_tseries_Int64HashTable))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->table);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->table));
  __pyx_v_self->table = ((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)__pyx_v_value);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64Factorizer.table.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_15Int64Factorizer_5table_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_8_tseries_15Int64Factorizer_5table_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table_4__del__(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5table_4__del__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->table);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->table));
  __pyx_v_self->table = ((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)Py_None);

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_15Int64Factorizer_7uniques_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_15Int64Factorizer_7uniques_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques___get__(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":937
 *     cdef public:
 *         Int64HashTable table
 *         list uniques             # <<<<<<<<<<<<<<
 *         Py_ssize_t count
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques___get__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques));
  __pyx_r = ((PyObject *)__pyx_v_self->uniques);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_15Int64Factorizer_7uniques_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_15Int64Factorizer_7uniques_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques_2__set__(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques_2__set__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->uniques);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques));
  __pyx_v_self->uniques = ((PyObject*)__pyx_v_value);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64Factorizer.uniques.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_15Int64Factorizer_7uniques_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_8_tseries_15Int64Factorizer_7uniques_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques_4__del__(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_7uniques_4__del__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->uniques);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques));
  __pyx_v_self->uniques = ((PyObject*)Py_None);

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_15Int64Factorizer_5count_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_15Int64Factorizer_5count_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5count___get__(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":938
 *         Int64HashTable table
 *         list uniques
 *         Py_ssize_t count             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, size_hint):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_15Int64Factorizer_5count___get__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.Int64Factorizer.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_15Int64Factorizer_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_15Int64Factorizer_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5count_2__set__(((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_15Int64Factorizer_5count_2__set__(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");
  __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->count = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.Int64Factorizer.count.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_14DictFactorizer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6pandas_8_tseries_14DictFactorizer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_table = 0;
  PyObject *__pyx_v_uniques = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__table,&__pyx_n_s__uniques,0};
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)");
  {
    PyObject* values[2] = {0,0};

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":971
 *         Py_ssize_t count
 * 
 *     def __init__(self, table=None, uniques=None):             # <<<<<<<<<<<<<<
 *         if table is None:
 *             self.table = {}
 */
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__table);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__uniques);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_table = values[0];
      __pyx_v_uniques = values[1];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_table = values[0];
    __pyx_v_uniques = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_14DictFactorizer___init__(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self), __pyx_v_table, __pyx_v_uniques);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_14DictFactorizer___init__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self, PyObject *__pyx_v_table, PyObject *__pyx_v_uniques) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":972
 * 
 *     def __init__(self, table=None, uniques=None):
 *         if table is None:             # <<<<<<<<<<<<<<
 *             self.table = {}
 *         else:
 */
  __pyx_t_1 = (__pyx_v_table == Py_None);
  if (__pyx_t_1) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":973
 *     def __init__(self, table=None, uniques=None):
 *         if table is None:
 *             self.table = {}             # <<<<<<<<<<<<<<
 *         else:
 *             self.table = table
 */
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
    __Pyx_GOTREF(__pyx_v_self->table);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->table));
    __pyx_v_self->table = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":975
 *             self.table = {}
 *         else:
 *             self.table = table             # <<<<<<<<<<<<<<
 * 
 *         if uniques is None:
 */
    if (!(likely(PyDict_CheckExact(__pyx_v_table))||((__pyx_v_table) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_v_table)->tp_name), 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_INCREF(__pyx_v_table);
    __Pyx_GIVEREF(__pyx_v_table);
    __Pyx_GOTREF(__pyx_v_self->table);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->table));
    __pyx_v_self->table = ((PyObject*)__pyx_v_table);
  }
  __pyx_L3:;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":977
 *             self.table = table
 * 
 *         if uniques is None:             # <<<<<<<<<<<<<<
 *             self.uniques = []
 *             self.count = 0
 */
  __pyx_t_1 = (__pyx_v_uniques == Py_None);
  if (__pyx_t_1) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":978
 * 
 *         if uniques is None:
 *             self.uniques = []             # <<<<<<<<<<<<<<
 *             self.count = 0
 *         else:
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
    __Pyx_GOTREF(__pyx_v_self->uniques);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques));
    __pyx_v_self->uniques = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":979
 *         if uniques is None:
 *             self.uniques = []
 *             self.count = 0             # <<<<<<<<<<<<<<
 *         else:
 *             self.uniques = uniques
 */
    __pyx_v_self->count = 0;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":981
 *             self.count = 0
 *         else:
 *             self.uniques = uniques             # <<<<<<<<<<<<<<
 *             self.count = len(uniques)
 * 
 */
    if (!(likely(PyList_CheckExact(__pyx_v_uniques))||((__pyx_v_uniques) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_v_uniques)->tp_name), 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_INCREF(__pyx_v_uniques);
    __Pyx_GIVEREF(__pyx_v_uniques);
    __Pyx_GOTREF(__pyx_v_self->uniques);
    __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques));
    __pyx_v_self->uniques = ((PyObject*)__pyx_v_uniques);

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":982
 *         else:
 *             self.uniques = uniques
 *             self.count = len(uniques)             # <<<<<<<<<<<<<<
 * 
 *     def get_count(self):
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_uniques); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 982; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_self->count = __pyx_t_3;
  }
  __pyx_L4:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14DictFactorizer_3get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14DictFactorizer_3get_count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_count (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_14DictFactorizer_2get_count(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":984
 *             self.count = len(uniques)
 * 
 *     def get_count(self):             # <<<<<<<<<<<<<<
 *         return self.count
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_2get_count(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_count");

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":985
 * 
 *     def get_count(self):
 *         return self.count             # <<<<<<<<<<<<<<
 * 
 *     def get_labels(self, ndarray[object] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.get_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14DictFactorizer_5get_labels(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14DictFactorizer_5get_labels(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_labels (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_14DictFactorizer_4get_labels(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":987
 *         return self.count
 * 
 *     def get_labels(self, ndarray[object] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_4get_labels(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_labels = 0;
  PyArrayObject *__pyx_v_counts = 0;
  Py_ssize_t __pyx_v_idx;
  Py_ssize_t __pyx_v_count;
  CYTHON_UNUSED int __pyx_v_ret;
  PyObject *__pyx_v_val = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_labels;
  __Pyx_Buffer __pyx_pybuffer_labels;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyArrayObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyArrayObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  int __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_labels");
  __pyx_pybuffer_labels.pybuffer.buf = NULL;
  __pyx_pybuffer_labels.refcount = 0;
  __pyx_pybuffernd_labels.data = NULL;
  __pyx_pybuffernd_labels.rcbuffer = &__pyx_pybuffer_labels;
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":989
 *     def get_labels(self, ndarray[object] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             ndarray[int32_t] labels
 *             ndarray[int32_t] counts
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":992
 *             ndarray[int32_t] labels
 *             ndarray[int32_t] counts
 *             Py_ssize_t idx, count = self.count             # <<<<<<<<<<<<<<
 *             int ret = 0
 *             object val
 */
  __pyx_v_count = __pyx_v_self->count;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":993
 *             ndarray[int32_t] counts
 *             Py_ssize_t idx, count = self.count
 *             int ret = 0             # <<<<<<<<<<<<<<
 *             object val
 * 
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":996
 *             object val
 * 
 *         labels = np.empty(n, dtype=np.int32)             # <<<<<<<<<<<<<<
 *         counts = np.empty(count + n, dtype=np.int32)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__int32); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_6) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_labels.rcbuffer->pybuffer, (PyObject*)__pyx_v_labels, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_11);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      }
    }
    __pyx_pybuffernd_labels.diminfo[0].strides = __pyx_pybuffernd_labels.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_labels.diminfo[0].shape = __pyx_pybuffernd_labels.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_7 = 0;
  __pyx_v_labels = ((PyArrayObject *)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":997
 * 
 *         labels = np.empty(n, dtype=np.int32)
 *         counts = np.empty(count + n, dtype=np.int32)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t((__pyx_v_count + __pyx_v_n)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_6));
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__int32); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__dtype), __pyx_t_5) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_12 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_8 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_8 < 0)) {
      PyErr_Fetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_12 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":999
 *         counts = np.empty(count + n, dtype=np.int32)
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 * 
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_1; __pyx_t_13+=1) {
    __pyx_v_i = __pyx_t_13;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1000
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 * 
 *             if val in self.table:
 */
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_8 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_8 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_8 = 0;
    if (unlikely(__pyx_t_8 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_8);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_5 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_5);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1002
 *             val = values[i]
 * 
 *             if val in self.table:             # <<<<<<<<<<<<<<
 *                 idx = self.table[val]
 *                 labels[i] = idx
 */
    if (unlikely(((PyObject *)__pyx_v_self->table) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_15 = ((PyDict_Contains(((PyObject *)__pyx_v_self->table), __pyx_v_val))); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_15) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1003
 * 
 *             if val in self.table:
 *                 idx = self.table[val]             # <<<<<<<<<<<<<<
 *                 labels[i] = idx
 *                 counts[idx] = counts[idx] + 1
 */
      __pyx_t_5 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_self->table), __pyx_v_val); if (!__pyx_t_5) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_16 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_16 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_idx = __pyx_t_16;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1004
 *             if val in self.table:
 *                 idx = self.table[val]
 *                 labels[i] = idx             # <<<<<<<<<<<<<<
 *                 counts[idx] = counts[idx] + 1
 *             else:
 */
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_idx;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1005
 *                 idx = self.table[val]
 *                 labels[i] = idx
 *                 counts[idx] = counts[idx] + 1             # <<<<<<<<<<<<<<
 *             else:
 *                 self.table[val] = count
 */
      __pyx_t_17 = __pyx_v_idx;
      __pyx_t_8 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_18 = __pyx_v_idx;
      __pyx_t_8 = -1;
      if (__pyx_t_18 < 0) {
        __pyx_t_18 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_18 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_counts.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_counts.diminfo[0].strides)) + 1);
      goto __pyx_L5;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1007
 *                 counts[idx] = counts[idx] + 1
 *             else:
 *                 self.table[val] = count             # <<<<<<<<<<<<<<
 *                 self.uniques.append(val)
 *                 labels[i] = count
 */
      __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(((PyObject *)__pyx_v_self->table), __pyx_v_val, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1008
 *             else:
 *                 self.table[val] = count
 *                 self.uniques.append(val)             # <<<<<<<<<<<<<<
 *                 labels[i] = count
 *                 counts[count] = 1
 */
      if (unlikely(((PyObject *)__pyx_v_self->uniques) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_19 = PyList_Append(__pyx_v_self->uniques, __pyx_v_val); if (unlikely(__pyx_t_19 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1009
 *                 self.table[val] = count
 *                 self.uniques.append(val)
 *                 labels[i] = count             # <<<<<<<<<<<<<<
 *                 counts[count] = 1
 *                 count += 1
 */
      __pyx_t_20 = __pyx_v_i;
      __pyx_t_8 = -1;
      if (__pyx_t_20 < 0) {
        __pyx_t_20 += __pyx_pybuffernd_labels.diminfo[0].shape;
        if (unlikely(__pyx_t_20 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_labels.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_labels.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_labels.diminfo[0].strides) = __pyx_v_count;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1010
 *                 self.uniques.append(val)
 *                 labels[i] = count
 *                 counts[count] = 1             # <<<<<<<<<<<<<<
 *                 count += 1
 * 
 */
      __pyx_t_21 = __pyx_v_count;
      __pyx_t_8 = -1;
      if (__pyx_t_21 < 0) {
        __pyx_t_21 += __pyx_pybuffernd_counts.diminfo[0].shape;
        if (unlikely(__pyx_t_21 < 0)) __pyx_t_8 = 0;
      } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_counts.diminfo[0].shape)) __pyx_t_8 = 0;
      if (unlikely(__pyx_t_8 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_8);
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_counts.diminfo[0].strides) = 1;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1011
 *                 labels[i] = count
 *                 counts[count] = 1
 *                 count += 1             # <<<<<<<<<<<<<<
 * 
 *         return labels, counts[:count].copy()
 */
      __pyx_v_count = (__pyx_v_count + 1);
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1013
 *                 count += 1
 * 
 *         return labels, counts[:count].copy()             # <<<<<<<<<<<<<<
 * 
 *     def factorize(self, ndarray[object] values, sort=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_counts), 0, __pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__copy); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(((PyObject *)__pyx_v_labels));
  PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_labels));
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_r = ((PyObject *)__pyx_t_6);
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.get_labels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_labels.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_labels);
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14DictFactorizer_7factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14DictFactorizer_7factorize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_values = 0;
  PyObject *__pyx_v_sort = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,&__pyx_n_s__sort,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("factorize (wrapper)");
  {
    PyObject* values[2] = {0,0};
    values[1] = __pyx_k_119;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sort);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "factorize") < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_values = ((PyArrayObject *)values[0]);
      __pyx_v_sort = values[1];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_values = ((PyArrayObject *)values[0]);
    __pyx_v_sort = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("factorize", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_14DictFactorizer_6factorize(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self), __pyx_v_values, __pyx_v_sort);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1015
 *         return labels, counts[:count].copy()
 * 
 *     def factorize(self, ndarray[object] values, sort=False):             # <<<<<<<<<<<<<<
 *         labels, counts = self.get_labels(values)
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_6factorize(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self, PyArrayObject *__pyx_v_values, PyObject *__pyx_v_sort) {
  PyObject *__pyx_v_labels = NULL;
  PyObject *__pyx_v_counts = NULL;
  PyObject *__pyx_v_sorter = NULL;
  PyObject *__pyx_v_reverse_indexer = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("factorize");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1016
 * 
 *     def factorize(self, ndarray[object] values, sort=False):
 *         labels, counts = self.get_labels(values)             # <<<<<<<<<<<<<<
 * 
 *         # sort on
 */
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_labels); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_values));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_values));
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
    PyObject* sequence = __pyx_t_3;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_labels = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_counts = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1019
 * 
 *         # sort on
 *         if sort:             # <<<<<<<<<<<<<<
 *             sorter = list_to_object_array(self.uniques).argsort()
 *             reverse_indexer = np.empty(len(sorter), dtype=np.int32)
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_sort); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_6) {

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1020
 *         # sort on
 *         if sort:
 *             sorter = list_to_object_array(self.uniques).argsort()             # <<<<<<<<<<<<<<
 *             reverse_indexer = np.empty(len(sorter), dtype=np.int32)
 *             reverse_indexer.put(sorter, np.arange(len(sorter)))
 */
    __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s_104); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->uniques));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self->uniques));
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__argsort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_sorter = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1021
 *         if sort:
 *             sorter = list_to_object_array(self.uniques).argsort()
 *             reverse_indexer = np.empty(len(sorter), dtype=np.int32)             # <<<<<<<<<<<<<<
 *             reverse_indexer.put(sorter, np.arange(len(sorter)))
 * 
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__int32); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), __pyx_t_8) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_reverse_indexer = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1022
 *             sorter = list_to_object_array(self.uniques).argsort()
 *             reverse_indexer = np.empty(len(sorter), dtype=np.int32)
 *             reverse_indexer.put(sorter, np.arange(len(sorter)))             # <<<<<<<<<<<<<<
 * 
 *             labels = reverse_indexer.take(labels)
 */
    __pyx_t_8 = PyObject_GetAttr(__pyx_v_reverse_indexer, __pyx_n_s__put); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__arange); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = PyObject_Length(__pyx_v_sorter); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_sorter);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sorter);
    __Pyx_GIVEREF(__pyx_v_sorter);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1024
 *             reverse_indexer.put(sorter, np.arange(len(sorter)))
 * 
 *             labels = reverse_indexer.take(labels)             # <<<<<<<<<<<<<<
 *             counts = counts.take(sorter)
 * 
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_reverse_indexer, __pyx_n_s__take); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_labels);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_labels);
    __Pyx_GIVEREF(__pyx_v_labels);
    __pyx_t_8 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_labels);
    __pyx_v_labels = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1025
 * 
 *             labels = reverse_indexer.take(labels)
 *             counts = counts.take(sorter)             # <<<<<<<<<<<<<<
 * 
 *         self.count = len(counts)
 */
    __pyx_t_8 = PyObject_GetAttr(__pyx_v_counts, __pyx_n_s__take); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_sorter);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sorter);
    __Pyx_GIVEREF(__pyx_v_sorter);
    __pyx_t_2 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_v_counts);
    __pyx_v_counts = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1027
 *             counts = counts.take(sorter)
 * 
 *         self.count = len(counts)             # <<<<<<<<<<<<<<
 *         return labels, counts
 * 
 */
  __pyx_t_7 = PyObject_Length(__pyx_v_counts); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->count = __pyx_t_7;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1028
 * 
 *         self.count = len(counts)
 *         return labels, counts             # <<<<<<<<<<<<<<
 * 
 *     def unique(self, ndarray[object] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_labels);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_labels);
  __Pyx_GIVEREF(__pyx_v_labels);
  __Pyx_INCREF(__pyx_v_counts);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_counts);
  __Pyx_GIVEREF(__pyx_v_counts);
  __pyx_r = ((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.factorize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_labels);
  __Pyx_XDECREF(__pyx_v_counts);
  __Pyx_XDECREF(__pyx_v_sorter);
  __Pyx_XDECREF(__pyx_v_reverse_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14DictFactorizer_9unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14DictFactorizer_9unique(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unique (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_14DictFactorizer_8unique(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1030
 *         return labels, counts
 * 
 *     def unique(self, ndarray[object] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_8unique(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_count;
  PyObject *__pyx_v_val = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unique");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1032
 *     def unique(self, ndarray[object] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             Py_ssize_t idx, count = self.count
 *             object val
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1033
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             Py_ssize_t idx, count = self.count             # <<<<<<<<<<<<<<
 *             object val
 * 
 */
  __pyx_v_count = __pyx_v_self->count;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1036
 *             object val
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             if val not in self.table:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1037
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             if val not in self.table:
 *                 self.table[val] = count
 */
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = -1;
    if (__pyx_t_4 < 0) {
      __pyx_t_4 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_4 < 0)) __pyx_t_5 = 0;
    } else if (unlikely(__pyx_t_4 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_5 = 0;
    if (unlikely(__pyx_t_5 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_5);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_3 = *__Pyx_BufPtrStrided1d(PyObject **, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_values.diminfo[0].strides);
    __Pyx_INCREF((PyObject*)__pyx_t_3);
    __Pyx_XDECREF(__pyx_v_val);
    __pyx_v_val = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1038
 *         for i in range(n):
 *             val = values[i]
 *             if val not in self.table:             # <<<<<<<<<<<<<<
 *                 self.table[val] = count
 *                 self.uniques.append(val)
 */
    if (unlikely(((PyObject *)__pyx_v_self->table) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_6 = (__Pyx_NegateNonNeg(PyDict_Contains(((PyObject *)__pyx_v_self->table), __pyx_v_val))); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (__pyx_t_6) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1039
 *             val = values[i]
 *             if val not in self.table:
 *                 self.table[val] = count             # <<<<<<<<<<<<<<
 *                 self.uniques.append(val)
 *                 count += 1
 */
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(((PyObject *)__pyx_v_self->table), __pyx_v_val, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1040
 *             if val not in self.table:
 *                 self.table[val] = count
 *                 self.uniques.append(val)             # <<<<<<<<<<<<<<
 *                 count += 1
 *         return self.uniques
 */
      if (unlikely(((PyObject *)__pyx_v_self->uniques) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_7 = PyList_Append(__pyx_v_self->uniques, __pyx_v_val); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1041
 *                 self.table[val] = count
 *                 self.uniques.append(val)
 *                 count += 1             # <<<<<<<<<<<<<<
 *         return self.uniques
 * 
 */
      __pyx_v_count = (__pyx_v_count + 1);
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1042
 *                 self.uniques.append(val)
 *                 count += 1
 *         return self.uniques             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques));
  __pyx_r = ((PyObject *)__pyx_v_self->uniques);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.unique", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14DictFactorizer_11unique_int64(PyObject *__pyx_v_self, PyObject *__pyx_v_values); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14DictFactorizer_11unique_int64(PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("unique_int64 (wrapper)");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_14DictFactorizer_10unique_int64(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self), ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1045
 * 
 * 
 *     def unique_int64(self, ndarray[int64_t] values):             # <<<<<<<<<<<<<<
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_10unique_int64(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_n;
  Py_ssize_t __pyx_v_count;
  __pyx_t_5numpy_int64_t __pyx_v_val;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unique_int64");
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int64_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1047
 *     def unique_int64(self, ndarray[int64_t] values):
 *         cdef:
 *             Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *             Py_ssize_t idx, count = self.count
 *             int64_t val
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1048
 *         cdef:
 *             Py_ssize_t i, n = len(values)
 *             Py_ssize_t idx, count = self.count             # <<<<<<<<<<<<<<
 *             int64_t val
 * 
 */
  __pyx_v_count = __pyx_v_self->count;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1051
 *             int64_t val
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             val = values[i]
 *             if val not in self.table:
 */
  __pyx_t_1 = __pyx_v_n;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1052
 * 
 *         for i in range(n):
 *             val = values[i]             # <<<<<<<<<<<<<<
 *             if val not in self.table:
 *                 self.table[val] = count
 */
    __pyx_t_3 = __pyx_v_i;
    __pyx_t_4 = -1;
    if (__pyx_t_3 < 0) {
      __pyx_t_3 += __pyx_pybuffernd_values.diminfo[0].shape;
      if (unlikely(__pyx_t_3 < 0)) __pyx_t_4 = 0;
    } else if (unlikely(__pyx_t_3 >= __pyx_pybuffernd_values.diminfo[0].shape)) __pyx_t_4 = 0;
    if (unlikely(__pyx_t_4 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_4);
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_val = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int64_t *, __pyx_pybuffernd_values.rcbuffer->pybuffer.buf, __pyx_t_3, __pyx_pybuffernd_values.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1053
 *         for i in range(n):
 *             val = values[i]
 *             if val not in self.table:             # <<<<<<<<<<<<<<
 *                 self.table[val] = count
 *                 self.uniques.append(val)
 */
    __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(((PyObject *)__pyx_v_self->table) == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_6 = (__Pyx_NegateNonNeg(PyDict_Contains(((PyObject *)__pyx_v_self->table), __pyx_t_5))); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1054
 *             val = values[i]
 *             if val not in self.table:
 *                 self.table[val] = count             # <<<<<<<<<<<<<<
 *                 self.uniques.append(val)
 *                 count += 1
 */
      __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemInt(((PyObject *)__pyx_v_self->table), __pyx_v_val, __pyx_t_5, sizeof(__pyx_t_5numpy_int64_t), __Pyx_PyInt_to_py_npy_int64) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1055
 *             if val not in self.table:
 *                 self.table[val] = count
 *                 self.uniques.append(val)             # <<<<<<<<<<<<<<
 *                 count += 1
 *         return self.uniques
 */
      if (unlikely(((PyObject *)__pyx_v_self->uniques) == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
      }
      __pyx_t_5 = __Pyx_PyInt_to_py_npy_int64(__pyx_v_val); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = PyList_Append(__pyx_v_self->uniques, __pyx_t_5); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1056
 *                 self.table[val] = count
 *                 self.uniques.append(val)
 *                 count += 1             # <<<<<<<<<<<<<<
 *         return self.uniques
 * 
 */
      __pyx_v_count = (__pyx_v_count + 1);
      goto __pyx_L5;
    }
    __pyx_L5:;
  }

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1057
 *                 self.uniques.append(val)
 *                 count += 1
 *         return self.uniques             # <<<<<<<<<<<<<<
 * 
 * def lookup2(ndarray[object] values):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques));
  __pyx_r = ((PyObject *)__pyx_v_self->uniques);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.unique_int64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14DictFactorizer_5table_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14DictFactorizer_5table_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_14DictFactorizer_5table___get__(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":967
 * 
 *     cdef public:
 *         dict table             # <<<<<<<<<<<<<<
 *         list uniques
 *         Py_ssize_t count
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_5table___get__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->table));
  __pyx_r = ((PyObject *)__pyx_v_self->table);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_14DictFactorizer_5table_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_14DictFactorizer_5table_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_14DictFactorizer_5table_2__set__(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_5table_2__set__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");
  if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected dict, got %.200s", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->table);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->table));
  __pyx_v_self->table = ((PyObject*)__pyx_v_value);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.table.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_14DictFactorizer_5table_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_8_tseries_14DictFactorizer_5table_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_14DictFactorizer_5table_4__del__(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_5table_4__del__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->table);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->table));
  __pyx_v_self->table = ((PyObject*)Py_None);

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14DictFactorizer_7uniques_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14DictFactorizer_7uniques_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques___get__(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":968
 *     cdef public:
 *         dict table
 *         list uniques             # <<<<<<<<<<<<<<
 *         Py_ssize_t count
 * 
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques___get__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->uniques));
  __pyx_r = ((PyObject *)__pyx_v_self->uniques);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_14DictFactorizer_7uniques_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_14DictFactorizer_7uniques_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques_2__set__(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques_2__set__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");
  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->uniques);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques));
  __pyx_v_self->uniques = ((PyObject*)__pyx_v_value);

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.uniques.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_14DictFactorizer_7uniques_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6pandas_8_tseries_14DictFactorizer_7uniques_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques_4__del__(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_7uniques_4__del__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__");
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->uniques);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->uniques));
  __pyx_v_self->uniques = ((PyObject*)Py_None);

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_14DictFactorizer_5count_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6pandas_8_tseries_14DictFactorizer_5count_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_14DictFactorizer_5count___get__(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":969
 *         dict table
 *         list uniques
 *         Py_ssize_t count             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, table=None, uniques=None):
 */

static PyObject *__pyx_pf_6pandas_8_tseries_14DictFactorizer_5count___get__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_6pandas_8_tseries_14DictFactorizer_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6pandas_8_tseries_14DictFactorizer_5count_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)");
  __pyx_r = __pyx_pf_6pandas_8_tseries_14DictFactorizer_5count_2__set__(((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)__pyx_v_self), ((PyObject *)__pyx_v_value));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6pandas_8_tseries_14DictFactorizer_5count_2__set__(struct __pyx_obj_6pandas_8_tseries_DictFactorizer *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");
  __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_self->count = __pyx_t_1;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pandas._tseries.DictFactorizer.count.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_345lookup2(PyObject *__pyx_self, PyObject *__pyx_v_values); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_345lookup2 = {__Pyx_NAMESTR("lookup2"), (PyCFunction)__pyx_pw_6pandas_8_tseries_345lookup2, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_345lookup2(PyObject *__pyx_self, PyObject *__pyx_v_values) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lookup2 (wrapper)");
  __pyx_self = __pyx_self;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), __pyx_ptype_5numpy_ndarray, 1, "values", 0))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_344lookup2(__pyx_self, ((PyArrayObject *)__pyx_v_values));
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1059
 *         return self.uniques
 * 
 * def lookup2(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_344lookup2(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_values) {
  Py_ssize_t __pyx_v_n;
  CYTHON_UNUSED int __pyx_v_ret;
  PyArrayObject *__pyx_v_locs = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_locs;
  __Pyx_Buffer __pyx_pybuffer_locs;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_values;
  __Pyx_Buffer __pyx_pybuffer_values;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lookup2");
  __pyx_pybuffer_locs.pybuffer.buf = NULL;
  __pyx_pybuffer_locs.refcount = 0;
  __pyx_pybuffernd_locs.data = NULL;
  __pyx_pybuffernd_locs.rcbuffer = &__pyx_pybuffer_locs;
  __pyx_pybuffer_values.pybuffer.buf = NULL;
  __pyx_pybuffer_values.refcount = 0;
  __pyx_pybuffernd_values.data = NULL;
  __pyx_pybuffernd_values.rcbuffer = &__pyx_pybuffer_values;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_values.rcbuffer->pybuffer, (PyObject*)__pyx_v_values, &__Pyx_TypeInfo_object, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_values.diminfo[0].strides = __pyx_pybuffernd_values.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_values.diminfo[0].shape = __pyx_pybuffernd_values.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1061
 * def lookup2(ndarray[object] values):
 *     cdef:
 *         Py_ssize_t i, n = len(values)             # <<<<<<<<<<<<<<
 *         int ret = 0
 *         object val
 */
  __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_v_values)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_1;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1062
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 *         int ret = 0             # <<<<<<<<<<<<<<
 *         object val
 *         khiter_t k
 */
  __pyx_v_ret = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1066
 *         khiter_t k
 *         long hval
 *         ndarray[int32_t] locs = np.empty(n, dtype='i4')             # <<<<<<<<<<<<<<
 * 
 *     # for i in range(n):
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_5);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_locs.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_locs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_locs.rcbuffer->pybuffer.buf = NULL;
      {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    } else {__pyx_pybuffernd_locs.diminfo[0].strides = __pyx_pybuffernd_locs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_locs.diminfo[0].shape = __pyx_pybuffernd_locs.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_locs = ((PyArrayObject *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1073
 *         # k = kh_get_pymap(self.table, <PyObject*>val)
 * 
 *     return locs             # <<<<<<<<<<<<<<
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_locs));
  __pyx_r = ((PyObject *)__pyx_v_locs);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.lookup2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_locs.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_values.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_locs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_347inner_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_347inner_join = {__Pyx_NAMESTR("inner_join"), (PyCFunction)__pyx_pw_6pandas_8_tseries_347inner_join, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_347inner_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  Py_ssize_t __pyx_v_max_groups;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__max_groups,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("inner_join (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inner_join", 1, 3, 3, 1); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_groups);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("inner_join", 1, 3, 3, 2); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inner_join") < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
      __pyx_v_max_groups = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_groups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
    __pyx_v_max_groups = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_groups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inner_join", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.inner_join", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_346inner_join(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_max_groups);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/join.pyx":3
 * import time
 * 
 * def inner_join(ndarray[int32_t] left, ndarray[int32_t] right,             # <<<<<<<<<<<<<<
 *                Py_ssize_t max_groups):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_346inner_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_count;
  PyArrayObject *__pyx_v_left_count = 0;
  PyArrayObject *__pyx_v_right_count = 0;
  PyArrayObject *__pyx_v_left_sorter = 0;
  PyArrayObject *__pyx_v_right_sorter = 0;
  PyArrayObject *__pyx_v_left_indexer = 0;
  PyArrayObject *__pyx_v_right_indexer = 0;
  __pyx_t_5numpy_int32_t __pyx_v_lc;
  __pyx_t_5numpy_int32_t __pyx_v_rc;
  Py_ssize_t __pyx_v_left_pos;
  Py_ssize_t __pyx_v_right_pos;
  Py_ssize_t __pyx_v_position;
  Py_ssize_t __pyx_v_offset;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left_count;
  __Pyx_Buffer __pyx_pybuffer_left_count;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right_indexer;
  __Pyx_Buffer __pyx_pybuffer_right_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right_sorter;
  __Pyx_Buffer __pyx_pybuffer_right_sorter;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right_count;
  __Pyx_Buffer __pyx_pybuffer_right_count;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left_sorter;
  __Pyx_Buffer __pyx_pybuffer_left_sorter;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left_indexer;
  __Pyx_Buffer __pyx_pybuffer_left_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  long __pyx_t_18;
  long __pyx_t_19;
  PyArrayObject *__pyx_t_20 = NULL;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  __pyx_t_5numpy_int32_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  __pyx_t_5numpy_int32_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("inner_join");
  __pyx_pybuffer_left_count.pybuffer.buf = NULL;
  __pyx_pybuffer_left_count.refcount = 0;
  __pyx_pybuffernd_left_count.data = NULL;
  __pyx_pybuffernd_left_count.rcbuffer = &__pyx_pybuffer_left_count;
  __pyx_pybuffer_right_count.pybuffer.buf = NULL;
  __pyx_pybuffer_right_count.refcount = 0;
  __pyx_pybuffernd_right_count.data = NULL;
  __pyx_pybuffernd_right_count.rcbuffer = &__pyx_pybuffer_right_count;
  __pyx_pybuffer_left_sorter.pybuffer.buf = NULL;
  __pyx_pybuffer_left_sorter.refcount = 0;
  __pyx_pybuffernd_left_sorter.data = NULL;
  __pyx_pybuffernd_left_sorter.rcbuffer = &__pyx_pybuffer_left_sorter;
  __pyx_pybuffer_right_sorter.pybuffer.buf = NULL;
  __pyx_pybuffer_right_sorter.refcount = 0;
  __pyx_pybuffernd_right_sorter.data = NULL;
  __pyx_pybuffernd_right_sorter.rcbuffer = &__pyx_pybuffer_right_sorter;
  __pyx_pybuffer_left_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_left_indexer.refcount = 0;
  __pyx_pybuffernd_left_indexer.data = NULL;
  __pyx_pybuffernd_left_indexer.rcbuffer = &__pyx_pybuffer_left_indexer;
  __pyx_pybuffer_right_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_right_indexer.refcount = 0;
  __pyx_pybuffernd_right_indexer.data = NULL;
  __pyx_pybuffernd_right_indexer.rcbuffer = &__pyx_pybuffer_right_indexer;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":6
 *                Py_ssize_t max_groups):
 *     cdef:
 *         Py_ssize_t i, j, k, count = 0             # <<<<<<<<<<<<<<
 *         ndarray[int32_t] left_count, right_count, left_sorter, right_sorter
 *         ndarray[int32_t] left_indexer, right_indexer
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":13
 *     # NA group in location 0
 * 
 *     left_sorter, left_count = groupsort_indexer(left, max_groups)             # <<<<<<<<<<<<<<
 *     right_sorter, right_count = groupsort_indexer(right, max_groups)
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__groupsort_indexer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_left));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_left));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_sorter, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_left_sorter.diminfo[0].strides = __pyx_pybuffernd_left_sorter.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_sorter.diminfo[0].shape = __pyx_pybuffernd_left_sorter.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_left_sorter = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_left_count.diminfo[0].strides = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_count.diminfo[0].shape = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_left_count = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":14
 * 
 *     left_sorter, left_count = groupsort_indexer(left, max_groups)
 *     right_sorter, right_count = groupsort_indexer(right, max_groups)             # <<<<<<<<<<<<<<
 * 
 *     # First pass, determine size of result set, do not use the NA group
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__groupsort_indexer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_right));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_right));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_right));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L6_unpacking_done;
    __pyx_L5_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L6_unpacking_done:;
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_sorter, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_right_sorter.diminfo[0].strides = __pyx_pybuffernd_right_sorter.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_sorter.diminfo[0].shape = __pyx_pybuffernd_right_sorter.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_right_sorter = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_right_count.diminfo[0].strides = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_count.diminfo[0].shape = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_right_count = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":17
 * 
 *     # First pass, determine size of result set, do not use the NA group
 *     for i in range(1, max_groups + 1):             # <<<<<<<<<<<<<<
 *         lc = left_count[i]
 *         rc = right_count[i]
 */
  __pyx_t_11 = (__pyx_v_max_groups + 1);
  for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":18
 *     # First pass, determine size of result set, do not use the NA group
 *     for i in range(1, max_groups + 1):
 *         lc = left_count[i]             # <<<<<<<<<<<<<<
 *         rc = right_count[i]
 * 
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_left_count.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[12]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_lc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_left_count.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":19
 *     for i in range(1, max_groups + 1):
 *         lc = left_count[i]
 *         rc = right_count[i]             # <<<<<<<<<<<<<<
 * 
 *         if rc > 0 and lc > 0:
 */
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_right_count.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[12]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_rc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_right_count.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":21
 *         rc = right_count[i]
 * 
 *         if rc > 0 and lc > 0:             # <<<<<<<<<<<<<<
 *             count += lc * rc
 * 
 */
    __pyx_t_15 = (__pyx_v_rc > 0);
    if (__pyx_t_15) {
      __pyx_t_16 = (__pyx_v_lc > 0);
      __pyx_t_17 = __pyx_t_16;
    } else {
      __pyx_t_17 = __pyx_t_15;
    }
    if (__pyx_t_17) {

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":22
 * 
 *         if rc > 0 and lc > 0:
 *             count += lc * rc             # <<<<<<<<<<<<<<
 * 
 *     # group 0 is the NA group
 */
      __pyx_v_count = (__pyx_v_count + (__pyx_v_lc * __pyx_v_rc));
      goto __pyx_L9;
    }
    __pyx_L9:;
  }

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":26
 *     # group 0 is the NA group
 *     cdef:
 *         Py_ssize_t loc, left_pos = 0, right_pos = 0, position = 0             # <<<<<<<<<<<<<<
 *         Py_ssize_t offset
 * 
 */
  __pyx_v_left_pos = 0;
  __pyx_v_right_pos = 0;
  __pyx_v_position = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":30
 * 
 *     # exclude the NA group
 *     left_pos = left_count[0]             # <<<<<<<<<<<<<<
 *     right_pos = right_count[0]
 * 
 */
  __pyx_t_18 = 0;
  __pyx_t_7 = -1;
  if (__pyx_t_18 < 0) {
    __pyx_t_18 += __pyx_pybuffernd_left_count.diminfo[0].shape;
    if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0;
  } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0;
  if (unlikely(__pyx_t_7 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_7);
    {__pyx_filename = __pyx_f[12]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_left_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left_count.diminfo[0].strides));

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":31
 *     # exclude the NA group
 *     left_pos = left_count[0]
 *     right_pos = right_count[0]             # <<<<<<<<<<<<<<
 * 
 *     left_indexer = np.empty(count, dtype='i4')
 */
  __pyx_t_19 = 0;
  __pyx_t_7 = -1;
  if (__pyx_t_19 < 0) {
    __pyx_t_19 += __pyx_pybuffernd_right_count.diminfo[0].shape;
    if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0;
  } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0;
  if (unlikely(__pyx_t_7 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_7);
    {__pyx_filename = __pyx_f[12]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_right_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right_count.diminfo[0].strides));

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":33
 *     right_pos = right_count[0]
 * 
 *     left_indexer = np.empty(count, dtype='i4')             # <<<<<<<<<<<<<<
 *     right_indexer = np.empty(count, dtype='i4')
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_20 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_left_indexer.diminfo[0].strides = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_indexer.diminfo[0].shape = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_20 = 0;
  __pyx_v_left_indexer = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":34
 * 
 *     left_indexer = np.empty(count, dtype='i4')
 *     right_indexer = np.empty(count, dtype='i4')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(1, max_groups + 1):
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_20 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_right_indexer.diminfo[0].strides = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_indexer.diminfo[0].shape = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_20 = 0;
  __pyx_v_right_indexer = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":36
 *     right_indexer = np.empty(count, dtype='i4')
 * 
 *     for i in range(1, max_groups + 1):             # <<<<<<<<<<<<<<
 *         lc = left_count[i]
 *         rc = right_count[i]
 */
  __pyx_t_11 = (__pyx_v_max_groups + 1);
  for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":37
 * 
 *     for i in range(1, max_groups + 1):
 *         lc = left_count[i]             # <<<<<<<<<<<<<<
 *         rc = right_count[i]
 * 
 */
    __pyx_t_21 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_21 < 0) {
      __pyx_t_21 += __pyx_pybuffernd_left_count.diminfo[0].shape;
      if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[12]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_lc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left_count.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":38
 *     for i in range(1, max_groups + 1):
 *         lc = left_count[i]
 *         rc = right_count[i]             # <<<<<<<<<<<<<<
 * 
 *         if rc > 0 and lc > 0:
 */
    __pyx_t_22 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_22 < 0) {
      __pyx_t_22 += __pyx_pybuffernd_right_count.diminfo[0].shape;
      if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[12]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_rc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_right_count.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":40
 *         rc = right_count[i]
 * 
 *         if rc > 0 and lc > 0:             # <<<<<<<<<<<<<<
 *             for j in range(lc):
 *                 offset = position + j * rc
 */
    __pyx_t_17 = (__pyx_v_rc > 0);
    if (__pyx_t_17) {
      __pyx_t_15 = (__pyx_v_lc > 0);
      __pyx_t_16 = __pyx_t_15;
    } else {
      __pyx_t_16 = __pyx_t_17;
    }
    if (__pyx_t_16) {

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":41
 * 
 *         if rc > 0 and lc > 0:
 *             for j in range(lc):             # <<<<<<<<<<<<<<
 *                 offset = position + j * rc
 *                 for k in range(rc):
 */
      __pyx_t_23 = __pyx_v_lc;
      for (__pyx_t_24 = 0; __pyx_t_24 < __pyx_t_23; __pyx_t_24+=1) {
        __pyx_v_j = __pyx_t_24;

        /* "/home/wesm/code/pandas/pandas/src/join.pyx":42
 *         if rc > 0 and lc > 0:
 *             for j in range(lc):
 *                 offset = position + j * rc             # <<<<<<<<<<<<<<
 *                 for k in range(rc):
 *                     left_indexer[offset + k] = left_pos + j
 */
        __pyx_v_offset = (__pyx_v_position + (__pyx_v_j * __pyx_v_rc));

        /* "/home/wesm/code/pandas/pandas/src/join.pyx":43
 *             for j in range(lc):
 *                 offset = position + j * rc
 *                 for k in range(rc):             # <<<<<<<<<<<<<<
 *                     left_indexer[offset + k] = left_pos + j
 *                     right_indexer[offset + k] = right_pos + k
 */
        __pyx_t_25 = __pyx_v_rc;
        for (__pyx_t_26 = 0; __pyx_t_26 < __pyx_t_25; __pyx_t_26+=1) {
          __pyx_v_k = __pyx_t_26;

          /* "/home/wesm/code/pandas/pandas/src/join.pyx":44
 *                 offset = position + j * rc
 *                 for k in range(rc):
 *                     left_indexer[offset + k] = left_pos + j             # <<<<<<<<<<<<<<
 *                     right_indexer[offset + k] = right_pos + k
 *             position += lc * rc
 */
          __pyx_t_27 = (__pyx_v_offset + __pyx_v_k);
          __pyx_t_7 = -1;
          if (__pyx_t_27 < 0) {
            __pyx_t_27 += __pyx_pybuffernd_left_indexer.diminfo[0].shape;
            if (unlikely(__pyx_t_27 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[12]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = (__pyx_v_left_pos + __pyx_v_j);

          /* "/home/wesm/code/pandas/pandas/src/join.pyx":45
 *                 for k in range(rc):
 *                     left_indexer[offset + k] = left_pos + j
 *                     right_indexer[offset + k] = right_pos + k             # <<<<<<<<<<<<<<
 *             position += lc * rc
 *         left_pos += lc
 */
          __pyx_t_28 = (__pyx_v_offset + __pyx_v_k);
          __pyx_t_7 = -1;
          if (__pyx_t_28 < 0) {
            __pyx_t_28 += __pyx_pybuffernd_right_indexer.diminfo[0].shape;
            if (unlikely(__pyx_t_28 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[12]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = (__pyx_v_right_pos + __pyx_v_k);
        }
      }

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":46
 *                     left_indexer[offset + k] = left_pos + j
 *                     right_indexer[offset + k] = right_pos + k
 *             position += lc * rc             # <<<<<<<<<<<<<<
 *         left_pos += lc
 *         right_pos += rc
 */
      __pyx_v_position = (__pyx_v_position + (__pyx_v_lc * __pyx_v_rc));
      goto __pyx_L12;
    }
    __pyx_L12:;

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":47
 *                     right_indexer[offset + k] = right_pos + k
 *             position += lc * rc
 *         left_pos += lc             # <<<<<<<<<<<<<<
 *         right_pos += rc
 * 
 */
    __pyx_v_left_pos = (__pyx_v_left_pos + __pyx_v_lc);

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":48
 *             position += lc * rc
 *         left_pos += lc
 *         right_pos += rc             # <<<<<<<<<<<<<<
 * 
 *     return (_get_result_indexer(left_sorter, left_indexer),
 */
    __pyx_v_right_pos = (__pyx_v_right_pos + __pyx_v_rc);
  }

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":50
 *         right_pos += rc
 * 
 *     return (_get_result_indexer(left_sorter, left_indexer),             # <<<<<<<<<<<<<<
 *             _get_result_indexer(right_sorter, right_indexer))
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_result_indexer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_left_sorter));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_left_sorter));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left_sorter));
  __Pyx_INCREF(((PyObject *)__pyx_v_left_indexer));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_left_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left_indexer));
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":51
 * 
 *     return (_get_result_indexer(left_sorter, left_indexer),
 *             _get_result_indexer(right_sorter, right_indexer))             # <<<<<<<<<<<<<<
 * 
 * def left_outer_join(ndarray[int32_t] left, ndarray[int32_t] right,
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_result_indexer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_right_sorter));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_right_sorter));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_right_sorter));
  __Pyx_INCREF(((PyObject *)__pyx_v_right_indexer));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_right_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_right_indexer));
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_r = ((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.inner_join", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_left_count);
  __Pyx_XDECREF((PyObject *)__pyx_v_right_count);
  __Pyx_XDECREF((PyObject *)__pyx_v_left_sorter);
  __Pyx_XDECREF((PyObject *)__pyx_v_right_sorter);
  __Pyx_XDECREF((PyObject *)__pyx_v_left_indexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_right_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_349left_outer_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_349left_outer_join = {__Pyx_NAMESTR("left_outer_join"), (PyCFunction)__pyx_pw_6pandas_8_tseries_349left_outer_join, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_349left_outer_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  Py_ssize_t __pyx_v_max_groups;
  PyObject *__pyx_v_sort = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__max_groups,&__pyx_n_s__sort,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("left_outer_join (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[4] = {0,0,0,0};
    values[3] = __pyx_k_120;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("left_outer_join", 0, 3, 4, 1); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_groups);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("left_outer_join", 0, 3, 4, 2); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sort);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "left_outer_join") < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
      __pyx_v_max_groups = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_groups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __pyx_v_sort = values[3];
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
    __pyx_v_max_groups = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_groups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_sort = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("left_outer_join", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.left_outer_join", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_348left_outer_join(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_max_groups, __pyx_v_sort);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/join.pyx":53
 *             _get_result_indexer(right_sorter, right_indexer))
 * 
 * def left_outer_join(ndarray[int32_t] left, ndarray[int32_t] right,             # <<<<<<<<<<<<<<
 *                     Py_ssize_t max_groups, sort=True):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_348left_outer_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups, PyObject *__pyx_v_sort) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_count;
  PyArrayObject *__pyx_v_left_count = 0;
  PyArrayObject *__pyx_v_right_count = 0;
  PyArrayObject *__pyx_v_left_sorter = 0;
  PyArrayObject *__pyx_v_right_sorter = 0;
  PyArrayObject *__pyx_v_left_indexer = 0;
  PyArrayObject *__pyx_v_right_indexer = 0;
  __pyx_t_5numpy_int32_t __pyx_v_lc;
  __pyx_t_5numpy_int32_t __pyx_v_rc;
  Py_ssize_t __pyx_v_left_pos;
  Py_ssize_t __pyx_v_right_pos;
  Py_ssize_t __pyx_v_position;
  Py_ssize_t __pyx_v_offset;
  PyObject *__pyx_v_rev = NULL;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right_indexer;
  __Pyx_Buffer __pyx_pybuffer_right_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right_count;
  __Pyx_Buffer __pyx_pybuffer_right_count;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left_count;
  __Pyx_Buffer __pyx_pybuffer_left_count;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right_sorter;
  __Pyx_Buffer __pyx_pybuffer_right_sorter;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left_indexer;
  __Pyx_Buffer __pyx_pybuffer_left_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left_sorter;
  __Pyx_Buffer __pyx_pybuffer_left_sorter;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  long __pyx_t_18;
  long __pyx_t_19;
  PyArrayObject *__pyx_t_20 = NULL;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  __pyx_t_5numpy_int32_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  __pyx_t_5numpy_int32_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  Py_ssize_t __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  int __pyx_t_31;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("left_outer_join");
  __pyx_pybuffer_left_count.pybuffer.buf = NULL;
  __pyx_pybuffer_left_count.refcount = 0;
  __pyx_pybuffernd_left_count.data = NULL;
  __pyx_pybuffernd_left_count.rcbuffer = &__pyx_pybuffer_left_count;
  __pyx_pybuffer_right_count.pybuffer.buf = NULL;
  __pyx_pybuffer_right_count.refcount = 0;
  __pyx_pybuffernd_right_count.data = NULL;
  __pyx_pybuffernd_right_count.rcbuffer = &__pyx_pybuffer_right_count;
  __pyx_pybuffer_left_sorter.pybuffer.buf = NULL;
  __pyx_pybuffer_left_sorter.refcount = 0;
  __pyx_pybuffernd_left_sorter.data = NULL;
  __pyx_pybuffernd_left_sorter.rcbuffer = &__pyx_pybuffer_left_sorter;
  __pyx_pybuffer_right_sorter.pybuffer.buf = NULL;
  __pyx_pybuffer_right_sorter.refcount = 0;
  __pyx_pybuffernd_right_sorter.data = NULL;
  __pyx_pybuffernd_right_sorter.rcbuffer = &__pyx_pybuffer_right_sorter;
  __pyx_pybuffer_left_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_left_indexer.refcount = 0;
  __pyx_pybuffernd_left_indexer.data = NULL;
  __pyx_pybuffernd_left_indexer.rcbuffer = &__pyx_pybuffer_left_indexer;
  __pyx_pybuffer_right_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_right_indexer.refcount = 0;
  __pyx_pybuffernd_right_indexer.data = NULL;
  __pyx_pybuffernd_right_indexer.rcbuffer = &__pyx_pybuffer_right_indexer;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":56
 *                     Py_ssize_t max_groups, sort=True):
 *     cdef:
 *         Py_ssize_t i, j, k, count = 0             # <<<<<<<<<<<<<<
 *         ndarray[int32_t] left_count, right_count, left_sorter, right_sorter
 *         ndarray[int32_t] left_indexer, right_indexer
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":63
 *     # NA group in location 0
 * 
 *     left_sorter, left_count = groupsort_indexer(left, max_groups)             # <<<<<<<<<<<<<<
 *     right_sorter, right_count = groupsort_indexer(right, max_groups)
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__groupsort_indexer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_left));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_left));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_sorter, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_left_sorter.diminfo[0].strides = __pyx_pybuffernd_left_sorter.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_sorter.diminfo[0].shape = __pyx_pybuffernd_left_sorter.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_left_sorter = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_left_count.diminfo[0].strides = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_count.diminfo[0].shape = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_left_count = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":64
 * 
 *     left_sorter, left_count = groupsort_indexer(left, max_groups)
 *     right_sorter, right_count = groupsort_indexer(right, max_groups)             # <<<<<<<<<<<<<<
 * 
 *     # First pass, determine size of result set, do not use the NA group
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__groupsort_indexer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_right));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_right));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_right));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L6_unpacking_done;
    __pyx_L5_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L6_unpacking_done:;
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_sorter, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_right_sorter.diminfo[0].strides = __pyx_pybuffernd_right_sorter.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_sorter.diminfo[0].shape = __pyx_pybuffernd_right_sorter.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_right_sorter = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_right_count.diminfo[0].strides = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_count.diminfo[0].shape = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_right_count = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":67
 * 
 *     # First pass, determine size of result set, do not use the NA group
 *     for i in range(1, max_groups + 1):             # <<<<<<<<<<<<<<
 *         if right_count[i] > 0:
 *             count += left_count[i] * right_count[i]
 */
  __pyx_t_11 = (__pyx_v_max_groups + 1);
  for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":68
 *     # First pass, determine size of result set, do not use the NA group
 *     for i in range(1, max_groups + 1):
 *         if right_count[i] > 0:             # <<<<<<<<<<<<<<
 *             count += left_count[i] * right_count[i]
 *         else:
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_right_count.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[12]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_14 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_right_count.diminfo[0].strides)) > 0);
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":69
 *     for i in range(1, max_groups + 1):
 *         if right_count[i] > 0:
 *             count += left_count[i] * right_count[i]             # <<<<<<<<<<<<<<
 *         else:
 *             count += left_count[i]
 */
      __pyx_t_15 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_15 < 0) {
        __pyx_t_15 += __pyx_pybuffernd_left_count.diminfo[0].shape;
        if (unlikely(__pyx_t_15 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[12]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_16 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_16 < 0) {
        __pyx_t_16 += __pyx_pybuffernd_right_count.diminfo[0].shape;
        if (unlikely(__pyx_t_16 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[12]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_count = (__pyx_v_count + ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_left_count.diminfo[0].strides)) * (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_right_count.diminfo[0].strides))));
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":71
 *             count += left_count[i] * right_count[i]
 *         else:
 *             count += left_count[i]             # <<<<<<<<<<<<<<
 * 
 *     # group 0 is the NA group
 */
      __pyx_t_17 = __pyx_v_i;
      __pyx_t_7 = -1;
      if (__pyx_t_17 < 0) {
        __pyx_t_17 += __pyx_pybuffernd_left_count.diminfo[0].shape;
        if (unlikely(__pyx_t_17 < 0)) __pyx_t_7 = 0;
      } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0;
      if (unlikely(__pyx_t_7 != -1)) {
        __Pyx_RaiseBufferIndexError(__pyx_t_7);
        {__pyx_filename = __pyx_f[12]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_v_count = (__pyx_v_count + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_left_count.diminfo[0].strides)));
    }
    __pyx_L9:;
  }

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":75
 *     # group 0 is the NA group
 *     cdef:
 *         Py_ssize_t loc, left_pos = 0, right_pos = 0, position = 0             # <<<<<<<<<<<<<<
 *         Py_ssize_t offset
 * 
 */
  __pyx_v_left_pos = 0;
  __pyx_v_right_pos = 0;
  __pyx_v_position = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":79
 * 
 *     # exclude the NA group
 *     left_pos = left_count[0]             # <<<<<<<<<<<<<<
 *     right_pos = right_count[0]
 * 
 */
  __pyx_t_18 = 0;
  __pyx_t_7 = -1;
  if (__pyx_t_18 < 0) {
    __pyx_t_18 += __pyx_pybuffernd_left_count.diminfo[0].shape;
    if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0;
  } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0;
  if (unlikely(__pyx_t_7 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_7);
    {__pyx_filename = __pyx_f[12]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_left_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left_count.diminfo[0].strides));

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":80
 *     # exclude the NA group
 *     left_pos = left_count[0]
 *     right_pos = right_count[0]             # <<<<<<<<<<<<<<
 * 
 *     left_indexer = np.empty(count, dtype='i4')
 */
  __pyx_t_19 = 0;
  __pyx_t_7 = -1;
  if (__pyx_t_19 < 0) {
    __pyx_t_19 += __pyx_pybuffernd_right_count.diminfo[0].shape;
    if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0;
  } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0;
  if (unlikely(__pyx_t_7 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_7);
    {__pyx_filename = __pyx_f[12]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_right_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right_count.diminfo[0].strides));

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":82
 *     right_pos = right_count[0]
 * 
 *     left_indexer = np.empty(count, dtype='i4')             # <<<<<<<<<<<<<<
 *     right_indexer = np.empty(count, dtype='i4')
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_20 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_left_indexer.diminfo[0].strides = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_indexer.diminfo[0].shape = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_20 = 0;
  __pyx_v_left_indexer = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":83
 * 
 *     left_indexer = np.empty(count, dtype='i4')
 *     right_indexer = np.empty(count, dtype='i4')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(1, max_groups + 1):
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_20 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_right_indexer.diminfo[0].strides = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_indexer.diminfo[0].shape = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_20 = 0;
  __pyx_v_right_indexer = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":85
 *     right_indexer = np.empty(count, dtype='i4')
 * 
 *     for i in range(1, max_groups + 1):             # <<<<<<<<<<<<<<
 *         lc = left_count[i]
 *         rc = right_count[i]
 */
  __pyx_t_11 = (__pyx_v_max_groups + 1);
  for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":86
 * 
 *     for i in range(1, max_groups + 1):
 *         lc = left_count[i]             # <<<<<<<<<<<<<<
 *         rc = right_count[i]
 * 
 */
    __pyx_t_21 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_21 < 0) {
      __pyx_t_21 += __pyx_pybuffernd_left_count.diminfo[0].shape;
      if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[12]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_lc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left_count.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":87
 *     for i in range(1, max_groups + 1):
 *         lc = left_count[i]
 *         rc = right_count[i]             # <<<<<<<<<<<<<<
 * 
 *         if rc == 0:
 */
    __pyx_t_22 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_22 < 0) {
      __pyx_t_22 += __pyx_pybuffernd_right_count.diminfo[0].shape;
      if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[12]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_rc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_right_count.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":89
 *         rc = right_count[i]
 * 
 *         if rc == 0:             # <<<<<<<<<<<<<<
 *             for j in range(lc):
 *                 left_indexer[position + j] = left_pos + j
 */
    __pyx_t_14 = (__pyx_v_rc == 0);
    if (__pyx_t_14) {

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":90
 * 
 *         if rc == 0:
 *             for j in range(lc):             # <<<<<<<<<<<<<<
 *                 left_indexer[position + j] = left_pos + j
 *                 right_indexer[position + j] = -1
 */
      __pyx_t_23 = __pyx_v_lc;
      for (__pyx_t_24 = 0; __pyx_t_24 < __pyx_t_23; __pyx_t_24+=1) {
        __pyx_v_j = __pyx_t_24;

        /* "/home/wesm/code/pandas/pandas/src/join.pyx":91
 *         if rc == 0:
 *             for j in range(lc):
 *                 left_indexer[position + j] = left_pos + j             # <<<<<<<<<<<<<<
 *                 right_indexer[position + j] = -1
 *             position += lc
 */
        __pyx_t_25 = (__pyx_v_position + __pyx_v_j);
        __pyx_t_7 = -1;
        if (__pyx_t_25 < 0) {
          __pyx_t_25 += __pyx_pybuffernd_left_indexer.diminfo[0].shape;
          if (unlikely(__pyx_t_25 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[12]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = (__pyx_v_left_pos + __pyx_v_j);

        /* "/home/wesm/code/pandas/pandas/src/join.pyx":92
 *             for j in range(lc):
 *                 left_indexer[position + j] = left_pos + j
 *                 right_indexer[position + j] = -1             # <<<<<<<<<<<<<<
 *             position += lc
 *         else:
 */
        __pyx_t_26 = (__pyx_v_position + __pyx_v_j);
        __pyx_t_7 = -1;
        if (__pyx_t_26 < 0) {
          __pyx_t_26 += __pyx_pybuffernd_right_indexer.diminfo[0].shape;
          if (unlikely(__pyx_t_26 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[12]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = -1;
      }

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":93
 *                 left_indexer[position + j] = left_pos + j
 *                 right_indexer[position + j] = -1
 *             position += lc             # <<<<<<<<<<<<<<
 *         else:
 *             for j in range(lc):
 */
      __pyx_v_position = (__pyx_v_position + __pyx_v_lc);
      goto __pyx_L12;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":95
 *             position += lc
 *         else:
 *             for j in range(lc):             # <<<<<<<<<<<<<<
 *                 offset = position + j * rc
 *                 for k in range(rc):
 */
      __pyx_t_23 = __pyx_v_lc;
      for (__pyx_t_24 = 0; __pyx_t_24 < __pyx_t_23; __pyx_t_24+=1) {
        __pyx_v_j = __pyx_t_24;

        /* "/home/wesm/code/pandas/pandas/src/join.pyx":96
 *         else:
 *             for j in range(lc):
 *                 offset = position + j * rc             # <<<<<<<<<<<<<<
 *                 for k in range(rc):
 *                     left_indexer[offset + k] = left_pos + j
 */
        __pyx_v_offset = (__pyx_v_position + (__pyx_v_j * __pyx_v_rc));

        /* "/home/wesm/code/pandas/pandas/src/join.pyx":97
 *             for j in range(lc):
 *                 offset = position + j * rc
 *                 for k in range(rc):             # <<<<<<<<<<<<<<
 *                     left_indexer[offset + k] = left_pos + j
 *                     right_indexer[offset + k] = right_pos + k
 */
        __pyx_t_27 = __pyx_v_rc;
        for (__pyx_t_28 = 0; __pyx_t_28 < __pyx_t_27; __pyx_t_28+=1) {
          __pyx_v_k = __pyx_t_28;

          /* "/home/wesm/code/pandas/pandas/src/join.pyx":98
 *                 offset = position + j * rc
 *                 for k in range(rc):
 *                     left_indexer[offset + k] = left_pos + j             # <<<<<<<<<<<<<<
 *                     right_indexer[offset + k] = right_pos + k
 *             position += lc * rc
 */
          __pyx_t_29 = (__pyx_v_offset + __pyx_v_k);
          __pyx_t_7 = -1;
          if (__pyx_t_29 < 0) {
            __pyx_t_29 += __pyx_pybuffernd_left_indexer.diminfo[0].shape;
            if (unlikely(__pyx_t_29 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_29 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[12]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = (__pyx_v_left_pos + __pyx_v_j);

          /* "/home/wesm/code/pandas/pandas/src/join.pyx":99
 *                 for k in range(rc):
 *                     left_indexer[offset + k] = left_pos + j
 *                     right_indexer[offset + k] = right_pos + k             # <<<<<<<<<<<<<<
 *             position += lc * rc
 *         left_pos += lc
 */
          __pyx_t_30 = (__pyx_v_offset + __pyx_v_k);
          __pyx_t_7 = -1;
          if (__pyx_t_30 < 0) {
            __pyx_t_30 += __pyx_pybuffernd_right_indexer.diminfo[0].shape;
            if (unlikely(__pyx_t_30 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_30 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[12]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = (__pyx_v_right_pos + __pyx_v_k);
        }
      }

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":100
 *                     left_indexer[offset + k] = left_pos + j
 *                     right_indexer[offset + k] = right_pos + k
 *             position += lc * rc             # <<<<<<<<<<<<<<
 *         left_pos += lc
 *         right_pos += rc
 */
      __pyx_v_position = (__pyx_v_position + (__pyx_v_lc * __pyx_v_rc));
    }
    __pyx_L12:;

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":101
 *                     right_indexer[offset + k] = right_pos + k
 *             position += lc * rc
 *         left_pos += lc             # <<<<<<<<<<<<<<
 *         right_pos += rc
 * 
 */
    __pyx_v_left_pos = (__pyx_v_left_pos + __pyx_v_lc);

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":102
 *             position += lc * rc
 *         left_pos += lc
 *         right_pos += rc             # <<<<<<<<<<<<<<
 * 
 *     left_indexer = _get_result_indexer(left_sorter, left_indexer)
 */
    __pyx_v_right_pos = (__pyx_v_right_pos + __pyx_v_rc);
  }

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":104
 *         right_pos += rc
 * 
 *     left_indexer = _get_result_indexer(left_sorter, left_indexer)             # <<<<<<<<<<<<<<
 *     right_indexer = _get_result_indexer(right_sorter, right_indexer)
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_result_indexer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_left_sorter));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_left_sorter));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left_sorter));
  __Pyx_INCREF(((PyObject *)__pyx_v_left_indexer));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_left_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left_indexer));
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_20 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_left_indexer.diminfo[0].strides = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_indexer.diminfo[0].shape = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_20 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_left_indexer));
  __pyx_v_left_indexer = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":105
 * 
 *     left_indexer = _get_result_indexer(left_sorter, left_indexer)
 *     right_indexer = _get_result_indexer(right_sorter, right_indexer)             # <<<<<<<<<<<<<<
 * 
 *     if not sort:
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_result_indexer); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_right_sorter));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_right_sorter));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_right_sorter));
  __Pyx_INCREF(((PyObject *)__pyx_v_right_indexer));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_right_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_right_indexer));
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_20 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_right_indexer.diminfo[0].strides = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_indexer.diminfo[0].shape = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_20 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_v_right_indexer));
  __pyx_v_right_indexer = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":107
 *     right_indexer = _get_result_indexer(right_sorter, right_indexer)
 * 
 *     if not sort:             # <<<<<<<<<<<<<<
 *         rev = np.empty(len(left), dtype='i4')
 *         rev.put(left_sorter, np.arange(len(left)))
 */
  __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_v_sort); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_31 = (!__pyx_t_14);
  if (__pyx_t_31) {

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":108
 * 
 *     if not sort:
 *         rev = np.empty(len(left), dtype='i4')             # <<<<<<<<<<<<<<
 *         rev.put(left_sorter, np.arange(len(left)))
 * 
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__empty); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_rev = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":109
 *     if not sort:
 *         rev = np.empty(len(left), dtype='i4')
 *         rev.put(left_sorter, np.arange(len(left)))             # <<<<<<<<<<<<<<
 * 
 *         right_indexer = right_indexer.take(rev)
 */
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_rev, __pyx_n_s__put); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__arange); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_11 = PyObject_Length(((PyObject *)__pyx_v_left)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_left_sorter));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_left_sorter));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_left_sorter));
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":111
 *         rev.put(left_sorter, np.arange(len(left)))
 * 
 *         right_indexer = right_indexer.take(rev)             # <<<<<<<<<<<<<<
 *         left_indexer = left_indexer.take(rev)
 * 
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_right_indexer), __pyx_n_s__take); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_rev);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_rev);
    __Pyx_GIVEREF(__pyx_v_rev);
    __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_20 = ((PyArrayObject *)__pyx_t_1);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_7 < 0)) {
        PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
        }
      }
      __pyx_pybuffernd_right_indexer.diminfo[0].strides = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_indexer.diminfo[0].shape = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_20 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_right_indexer));
    __pyx_v_right_indexer = ((PyArrayObject *)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":112
 * 
 *         right_indexer = right_indexer.take(rev)
 *         left_indexer = left_indexer.take(rev)             # <<<<<<<<<<<<<<
 * 
 *     return left_indexer, right_indexer
 */
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_left_indexer), __pyx_n_s__take); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_rev);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_rev);
    __Pyx_GIVEREF(__pyx_v_rev);
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_20 = ((PyArrayObject *)__pyx_t_2);
    {
      __Pyx_BufFmt_StackElem __pyx_stack[1];
      __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer);
      __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
      if (unlikely(__pyx_t_7 < 0)) {
        PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
        if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
          Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
          __Pyx_RaiseBufferFallbackError();
        } else {
          PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
        }
      }
      __pyx_pybuffernd_left_indexer.diminfo[0].strides = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_indexer.diminfo[0].shape = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.shape[0];
      if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_20 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_v_left_indexer));
    __pyx_v_left_indexer = ((PyArrayObject *)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L19;
  }
  __pyx_L19:;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":114
 *         left_indexer = left_indexer.take(rev)
 * 
 *     return left_indexer, right_indexer             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_left_indexer));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_left_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left_indexer));
  __Pyx_INCREF(((PyObject *)__pyx_v_right_indexer));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_right_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_right_indexer));
  __pyx_r = ((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.left_outer_join", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_left_count);
  __Pyx_XDECREF((PyObject *)__pyx_v_right_count);
  __Pyx_XDECREF((PyObject *)__pyx_v_left_sorter);
  __Pyx_XDECREF((PyObject *)__pyx_v_right_sorter);
  __Pyx_XDECREF((PyObject *)__pyx_v_left_indexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_right_indexer);
  __Pyx_XDECREF(__pyx_v_rev);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_351full_outer_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_351full_outer_join = {__Pyx_NAMESTR("full_outer_join"), (PyCFunction)__pyx_pw_6pandas_8_tseries_351full_outer_join, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_351full_outer_join(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_left = 0;
  PyArrayObject *__pyx_v_right = 0;
  Py_ssize_t __pyx_v_max_groups;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__left,&__pyx_n_s__right,&__pyx_n_s__max_groups,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("full_outer_join (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__left);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__right);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("full_outer_join", 1, 3, 3, 1); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__max_groups);
        if (likely(values[2])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("full_outer_join", 1, 3, 3, 2); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "full_outer_join") < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_left = ((PyArrayObject *)values[0]);
      __pyx_v_right = ((PyArrayObject *)values[1]);
      __pyx_v_max_groups = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_groups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_left = ((PyArrayObject *)values[0]);
    __pyx_v_right = ((PyArrayObject *)values[1]);
    __pyx_v_max_groups = __Pyx_PyIndex_AsSsize_t(values[2]); if (unlikely((__pyx_v_max_groups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("full_outer_join", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.full_outer_join", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left), __pyx_ptype_5numpy_ndarray, 1, "left", 0))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_5numpy_ndarray, 1, "right", 0))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_350full_outer_join(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_max_groups);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/join.pyx":117
 * 
 * 
 * def full_outer_join(ndarray[int32_t] left, ndarray[int32_t] right,             # <<<<<<<<<<<<<<
 *                     Py_ssize_t max_groups):
 *     cdef:
 */

static PyObject *__pyx_pf_6pandas_8_tseries_350full_outer_join(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_left, PyArrayObject *__pyx_v_right, Py_ssize_t __pyx_v_max_groups) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_j;
  Py_ssize_t __pyx_v_k;
  Py_ssize_t __pyx_v_count;
  PyArrayObject *__pyx_v_left_count = 0;
  PyArrayObject *__pyx_v_right_count = 0;
  PyArrayObject *__pyx_v_left_sorter = 0;
  PyArrayObject *__pyx_v_right_sorter = 0;
  PyArrayObject *__pyx_v_left_indexer = 0;
  PyArrayObject *__pyx_v_right_indexer = 0;
  __pyx_t_5numpy_int32_t __pyx_v_lc;
  __pyx_t_5numpy_int32_t __pyx_v_rc;
  Py_ssize_t __pyx_v_left_pos;
  Py_ssize_t __pyx_v_right_pos;
  Py_ssize_t __pyx_v_position;
  Py_ssize_t __pyx_v_offset;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left_count;
  __Pyx_Buffer __pyx_pybuffer_left_count;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right;
  __Pyx_Buffer __pyx_pybuffer_right;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right_indexer;
  __Pyx_Buffer __pyx_pybuffer_right_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right_sorter;
  __Pyx_Buffer __pyx_pybuffer_right_sorter;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_right_count;
  __Pyx_Buffer __pyx_pybuffer_right_count;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left_sorter;
  __Pyx_Buffer __pyx_pybuffer_left_sorter;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left_indexer;
  __Pyx_Buffer __pyx_pybuffer_left_indexer;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_left;
  __Pyx_Buffer __pyx_pybuffer_left;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyArrayObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  long __pyx_t_18;
  long __pyx_t_19;
  PyArrayObject *__pyx_t_20 = NULL;
  Py_ssize_t __pyx_t_21;
  Py_ssize_t __pyx_t_22;
  __pyx_t_5numpy_int32_t __pyx_t_23;
  Py_ssize_t __pyx_t_24;
  Py_ssize_t __pyx_t_25;
  Py_ssize_t __pyx_t_26;
  Py_ssize_t __pyx_t_27;
  Py_ssize_t __pyx_t_28;
  __pyx_t_5numpy_int32_t __pyx_t_29;
  Py_ssize_t __pyx_t_30;
  Py_ssize_t __pyx_t_31;
  Py_ssize_t __pyx_t_32;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("full_outer_join");
  __pyx_pybuffer_left_count.pybuffer.buf = NULL;
  __pyx_pybuffer_left_count.refcount = 0;
  __pyx_pybuffernd_left_count.data = NULL;
  __pyx_pybuffernd_left_count.rcbuffer = &__pyx_pybuffer_left_count;
  __pyx_pybuffer_right_count.pybuffer.buf = NULL;
  __pyx_pybuffer_right_count.refcount = 0;
  __pyx_pybuffernd_right_count.data = NULL;
  __pyx_pybuffernd_right_count.rcbuffer = &__pyx_pybuffer_right_count;
  __pyx_pybuffer_left_sorter.pybuffer.buf = NULL;
  __pyx_pybuffer_left_sorter.refcount = 0;
  __pyx_pybuffernd_left_sorter.data = NULL;
  __pyx_pybuffernd_left_sorter.rcbuffer = &__pyx_pybuffer_left_sorter;
  __pyx_pybuffer_right_sorter.pybuffer.buf = NULL;
  __pyx_pybuffer_right_sorter.refcount = 0;
  __pyx_pybuffernd_right_sorter.data = NULL;
  __pyx_pybuffernd_right_sorter.rcbuffer = &__pyx_pybuffer_right_sorter;
  __pyx_pybuffer_left_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_left_indexer.refcount = 0;
  __pyx_pybuffernd_left_indexer.data = NULL;
  __pyx_pybuffernd_left_indexer.rcbuffer = &__pyx_pybuffer_left_indexer;
  __pyx_pybuffer_right_indexer.pybuffer.buf = NULL;
  __pyx_pybuffer_right_indexer.refcount = 0;
  __pyx_pybuffernd_right_indexer.data = NULL;
  __pyx_pybuffernd_right_indexer.rcbuffer = &__pyx_pybuffer_right_indexer;
  __pyx_pybuffer_left.pybuffer.buf = NULL;
  __pyx_pybuffer_left.refcount = 0;
  __pyx_pybuffernd_left.data = NULL;
  __pyx_pybuffernd_left.rcbuffer = &__pyx_pybuffer_left;
  __pyx_pybuffer_right.pybuffer.buf = NULL;
  __pyx_pybuffer_right.refcount = 0;
  __pyx_pybuffernd_right.data = NULL;
  __pyx_pybuffernd_right.rcbuffer = &__pyx_pybuffer_right;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left.rcbuffer->pybuffer, (PyObject*)__pyx_v_left, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_left.diminfo[0].strides = __pyx_pybuffernd_left.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left.diminfo[0].shape = __pyx_pybuffernd_left.rcbuffer->pybuffer.shape[0];
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right.rcbuffer->pybuffer, (PyObject*)__pyx_v_right, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_right.diminfo[0].strides = __pyx_pybuffernd_right.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right.diminfo[0].shape = __pyx_pybuffernd_right.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":120
 *                     Py_ssize_t max_groups):
 *     cdef:
 *         Py_ssize_t i, j, k, count = 0             # <<<<<<<<<<<<<<
 *         ndarray[int32_t] left_count, right_count, left_sorter, right_sorter
 *         ndarray[int32_t] left_indexer, right_indexer
 */
  __pyx_v_count = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":127
 *     # NA group in location 0
 * 
 *     left_sorter, left_count = groupsort_indexer(left, max_groups)             # <<<<<<<<<<<<<<
 *     right_sorter, right_count = groupsort_indexer(right, max_groups)
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__groupsort_indexer); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_left));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_left));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L4_unpacking_done:;
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_sorter, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_left_sorter.diminfo[0].strides = __pyx_pybuffernd_left_sorter.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_sorter.diminfo[0].shape = __pyx_pybuffernd_left_sorter.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_left_sorter = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_left_count.diminfo[0].strides = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_count.diminfo[0].shape = __pyx_pybuffernd_left_count.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_left_count = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":128
 * 
 *     left_sorter, left_count = groupsort_indexer(left, max_groups)
 *     right_sorter, right_count = groupsort_indexer(right, max_groups)             # <<<<<<<<<<<<<<
 * 
 *     # First pass, determine size of result set, do not use the NA group
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__groupsort_indexer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_max_groups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_right));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_right));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_right));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    if (likely(PyTuple_CheckExact(sequence))) {
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
        if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
    index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L6_unpacking_done;
    __pyx_L5_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
    if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
    {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_L6_unpacking_done:;
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_3);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_sorter, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_right_sorter.diminfo[0].strides = __pyx_pybuffernd_right_sorter.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_sorter.diminfo[0].shape = __pyx_pybuffernd_right_sorter.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_right_sorter = ((PyArrayObject *)__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_count, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_right_count.diminfo[0].strides = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_count.diminfo[0].shape = __pyx_pybuffernd_right_count.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_6 = 0;
  __pyx_v_right_count = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":131
 * 
 *     # First pass, determine size of result set, do not use the NA group
 *     for i in range(1, max_groups + 1):             # <<<<<<<<<<<<<<
 *         lc = left_count[i]
 *         rc = right_count[i]
 */
  __pyx_t_11 = (__pyx_v_max_groups + 1);
  for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":132
 *     # First pass, determine size of result set, do not use the NA group
 *     for i in range(1, max_groups + 1):
 *         lc = left_count[i]             # <<<<<<<<<<<<<<
 *         rc = right_count[i]
 * 
 */
    __pyx_t_13 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_13 < 0) {
      __pyx_t_13 += __pyx_pybuffernd_left_count.diminfo[0].shape;
      if (unlikely(__pyx_t_13 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[12]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_lc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_left_count.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":133
 *     for i in range(1, max_groups + 1):
 *         lc = left_count[i]
 *         rc = right_count[i]             # <<<<<<<<<<<<<<
 * 
 *         if rc > 0 and lc > 0:
 */
    __pyx_t_14 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_14 < 0) {
      __pyx_t_14 += __pyx_pybuffernd_right_count.diminfo[0].shape;
      if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[12]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_rc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_right_count.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":135
 *         rc = right_count[i]
 * 
 *         if rc > 0 and lc > 0:             # <<<<<<<<<<<<<<
 *             count += lc * rc
 *         else:
 */
    __pyx_t_15 = (__pyx_v_rc > 0);
    if (__pyx_t_15) {
      __pyx_t_16 = (__pyx_v_lc > 0);
      __pyx_t_17 = __pyx_t_16;
    } else {
      __pyx_t_17 = __pyx_t_15;
    }
    if (__pyx_t_17) {

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":136
 * 
 *         if rc > 0 and lc > 0:
 *             count += lc * rc             # <<<<<<<<<<<<<<
 *         else:
 *             count += lc + rc
 */
      __pyx_v_count = (__pyx_v_count + (__pyx_v_lc * __pyx_v_rc));
      goto __pyx_L9;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":138
 *             count += lc * rc
 *         else:
 *             count += lc + rc             # <<<<<<<<<<<<<<
 * 
 *     # group 0 is the NA group
 */
      __pyx_v_count = (__pyx_v_count + (__pyx_v_lc + __pyx_v_rc));
    }
    __pyx_L9:;
  }

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":142
 *     # group 0 is the NA group
 *     cdef:
 *         Py_ssize_t loc, left_pos = 0, right_pos = 0, position = 0             # <<<<<<<<<<<<<<
 *         Py_ssize_t offset
 * 
 */
  __pyx_v_left_pos = 0;
  __pyx_v_right_pos = 0;
  __pyx_v_position = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":146
 * 
 *     # exclude the NA group
 *     left_pos = left_count[0]             # <<<<<<<<<<<<<<
 *     right_pos = right_count[0]
 * 
 */
  __pyx_t_18 = 0;
  __pyx_t_7 = -1;
  if (__pyx_t_18 < 0) {
    __pyx_t_18 += __pyx_pybuffernd_left_count.diminfo[0].shape;
    if (unlikely(__pyx_t_18 < 0)) __pyx_t_7 = 0;
  } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0;
  if (unlikely(__pyx_t_7 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_7);
    {__pyx_filename = __pyx_f[12]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_left_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_left_count.diminfo[0].strides));

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":147
 *     # exclude the NA group
 *     left_pos = left_count[0]
 *     right_pos = right_count[0]             # <<<<<<<<<<<<<<
 * 
 *     left_indexer = np.empty(count, dtype='i4')
 */
  __pyx_t_19 = 0;
  __pyx_t_7 = -1;
  if (__pyx_t_19 < 0) {
    __pyx_t_19 += __pyx_pybuffernd_right_count.diminfo[0].shape;
    if (unlikely(__pyx_t_19 < 0)) __pyx_t_7 = 0;
  } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0;
  if (unlikely(__pyx_t_7 != -1)) {
    __Pyx_RaiseBufferIndexError(__pyx_t_7);
    {__pyx_filename = __pyx_f[12]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_v_right_pos = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_right_count.diminfo[0].strides));

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":149
 *     right_pos = right_count[0]
 * 
 *     left_indexer = np.empty(count, dtype='i4')             # <<<<<<<<<<<<<<
 *     right_indexer = np.empty(count, dtype='i4')
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__empty); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_20 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_left_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_10);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      }
    }
    __pyx_pybuffernd_left_indexer.diminfo[0].strides = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_left_indexer.diminfo[0].shape = __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_20 = 0;
  __pyx_v_left_indexer = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":150
 * 
 *     left_indexer = np.empty(count, dtype='i4')
 *     right_indexer = np.empty(count, dtype='i4')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(1, max_groups + 1):
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__empty); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_count); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_20 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer);
    __pyx_t_7 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_t_20, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_7 < 0)) {
      PyErr_Fetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer, (PyObject*)__pyx_v_right_indexer, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_10); Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      }
    }
    __pyx_pybuffernd_right_indexer.diminfo[0].strides = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_right_indexer.diminfo[0].shape = __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_20 = 0;
  __pyx_v_right_indexer = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":152
 *     right_indexer = np.empty(count, dtype='i4')
 * 
 *     for i in range(1, max_groups + 1):             # <<<<<<<<<<<<<<
 *         lc = left_count[i]
 *         rc = right_count[i]
 */
  __pyx_t_11 = (__pyx_v_max_groups + 1);
  for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {
    __pyx_v_i = __pyx_t_12;

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":153
 * 
 *     for i in range(1, max_groups + 1):
 *         lc = left_count[i]             # <<<<<<<<<<<<<<
 *         rc = right_count[i]
 * 
 */
    __pyx_t_21 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_21 < 0) {
      __pyx_t_21 += __pyx_pybuffernd_left_count.diminfo[0].shape;
      if (unlikely(__pyx_t_21 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_left_count.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[12]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_lc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left_count.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_left_count.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":154
 *     for i in range(1, max_groups + 1):
 *         lc = left_count[i]
 *         rc = right_count[i]             # <<<<<<<<<<<<<<
 * 
 *         if rc == 0:
 */
    __pyx_t_22 = __pyx_v_i;
    __pyx_t_7 = -1;
    if (__pyx_t_22 < 0) {
      __pyx_t_22 += __pyx_pybuffernd_right_count.diminfo[0].shape;
      if (unlikely(__pyx_t_22 < 0)) __pyx_t_7 = 0;
    } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_right_count.diminfo[0].shape)) __pyx_t_7 = 0;
    if (unlikely(__pyx_t_7 != -1)) {
      __Pyx_RaiseBufferIndexError(__pyx_t_7);
      {__pyx_filename = __pyx_f[12]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_v_rc = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right_count.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_right_count.diminfo[0].strides));

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":156
 *         rc = right_count[i]
 * 
 *         if rc == 0:             # <<<<<<<<<<<<<<
 *             for j in range(lc):
 *                 left_indexer[position + j] = left_pos + j
 */
    __pyx_t_17 = (__pyx_v_rc == 0);
    if (__pyx_t_17) {

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":157
 * 
 *         if rc == 0:
 *             for j in range(lc):             # <<<<<<<<<<<<<<
 *                 left_indexer[position + j] = left_pos + j
 *                 right_indexer[position + j] = -1
 */
      __pyx_t_23 = __pyx_v_lc;
      for (__pyx_t_24 = 0; __pyx_t_24 < __pyx_t_23; __pyx_t_24+=1) {
        __pyx_v_j = __pyx_t_24;

        /* "/home/wesm/code/pandas/pandas/src/join.pyx":158
 *         if rc == 0:
 *             for j in range(lc):
 *                 left_indexer[position + j] = left_pos + j             # <<<<<<<<<<<<<<
 *                 right_indexer[position + j] = -1
 *             position += lc
 */
        __pyx_t_25 = (__pyx_v_position + __pyx_v_j);
        __pyx_t_7 = -1;
        if (__pyx_t_25 < 0) {
          __pyx_t_25 += __pyx_pybuffernd_left_indexer.diminfo[0].shape;
          if (unlikely(__pyx_t_25 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_25 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[12]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = (__pyx_v_left_pos + __pyx_v_j);

        /* "/home/wesm/code/pandas/pandas/src/join.pyx":159
 *             for j in range(lc):
 *                 left_indexer[position + j] = left_pos + j
 *                 right_indexer[position + j] = -1             # <<<<<<<<<<<<<<
 *             position += lc
 *         elif lc == 0:
 */
        __pyx_t_26 = (__pyx_v_position + __pyx_v_j);
        __pyx_t_7 = -1;
        if (__pyx_t_26 < 0) {
          __pyx_t_26 += __pyx_pybuffernd_right_indexer.diminfo[0].shape;
          if (unlikely(__pyx_t_26 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_26 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[12]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = -1;
      }

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":160
 *                 left_indexer[position + j] = left_pos + j
 *                 right_indexer[position + j] = -1
 *             position += lc             # <<<<<<<<<<<<<<
 *         elif lc == 0:
 *             for j in range(rc):
 */
      __pyx_v_position = (__pyx_v_position + __pyx_v_lc);
      goto __pyx_L12;
    }

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":161
 *                 right_indexer[position + j] = -1
 *             position += lc
 *         elif lc == 0:             # <<<<<<<<<<<<<<
 *             for j in range(rc):
 *                 left_indexer[position + j] = -1
 */
    __pyx_t_17 = (__pyx_v_lc == 0);
    if (__pyx_t_17) {

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":162
 *             position += lc
 *         elif lc == 0:
 *             for j in range(rc):             # <<<<<<<<<<<<<<
 *                 left_indexer[position + j] = -1
 *                 right_indexer[position + j] = right_pos + j
 */
      __pyx_t_23 = __pyx_v_rc;
      for (__pyx_t_24 = 0; __pyx_t_24 < __pyx_t_23; __pyx_t_24+=1) {
        __pyx_v_j = __pyx_t_24;

        /* "/home/wesm/code/pandas/pandas/src/join.pyx":163
 *         elif lc == 0:
 *             for j in range(rc):
 *                 left_indexer[position + j] = -1             # <<<<<<<<<<<<<<
 *                 right_indexer[position + j] = right_pos + j
 *             position += rc
 */
        __pyx_t_27 = (__pyx_v_position + __pyx_v_j);
        __pyx_t_7 = -1;
        if (__pyx_t_27 < 0) {
          __pyx_t_27 += __pyx_pybuffernd_left_indexer.diminfo[0].shape;
          if (unlikely(__pyx_t_27 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_27 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[12]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = -1;

        /* "/home/wesm/code/pandas/pandas/src/join.pyx":164
 *             for j in range(rc):
 *                 left_indexer[position + j] = -1
 *                 right_indexer[position + j] = right_pos + j             # <<<<<<<<<<<<<<
 *             position += rc
 *         else:
 */
        __pyx_t_28 = (__pyx_v_position + __pyx_v_j);
        __pyx_t_7 = -1;
        if (__pyx_t_28 < 0) {
          __pyx_t_28 += __pyx_pybuffernd_right_indexer.diminfo[0].shape;
          if (unlikely(__pyx_t_28 < 0)) __pyx_t_7 = 0;
        } else if (unlikely(__pyx_t_28 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0;
        if (unlikely(__pyx_t_7 != -1)) {
          __Pyx_RaiseBufferIndexError(__pyx_t_7);
          {__pyx_filename = __pyx_f[12]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = (__pyx_v_right_pos + __pyx_v_j);
      }

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":165
 *                 left_indexer[position + j] = -1
 *                 right_indexer[position + j] = right_pos + j
 *             position += rc             # <<<<<<<<<<<<<<
 *         else:
 *             for j in range(lc):
 */
      __pyx_v_position = (__pyx_v_position + __pyx_v_rc);
      goto __pyx_L12;
    }
    /*else*/ {

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":167
 *             position += rc
 *         else:
 *             for j in range(lc):             # <<<<<<<<<<<<<<
 *                 offset = position + j * rc
 *                 for k in range(rc):
 */
      __pyx_t_23 = __pyx_v_lc;
      for (__pyx_t_24 = 0; __pyx_t_24 < __pyx_t_23; __pyx_t_24+=1) {
        __pyx_v_j = __pyx_t_24;

        /* "/home/wesm/code/pandas/pandas/src/join.pyx":168
 *         else:
 *             for j in range(lc):
 *                 offset = position + j * rc             # <<<<<<<<<<<<<<
 *                 for k in range(rc):
 *                     left_indexer[offset + k] = left_pos + j
 */
        __pyx_v_offset = (__pyx_v_position + (__pyx_v_j * __pyx_v_rc));

        /* "/home/wesm/code/pandas/pandas/src/join.pyx":169
 *             for j in range(lc):
 *                 offset = position + j * rc
 *                 for k in range(rc):             # <<<<<<<<<<<<<<
 *                     left_indexer[offset + k] = left_pos + j
 *                     right_indexer[offset + k] = right_pos + k
 */
        __pyx_t_29 = __pyx_v_rc;
        for (__pyx_t_30 = 0; __pyx_t_30 < __pyx_t_29; __pyx_t_30+=1) {
          __pyx_v_k = __pyx_t_30;

          /* "/home/wesm/code/pandas/pandas/src/join.pyx":170
 *                 offset = position + j * rc
 *                 for k in range(rc):
 *                     left_indexer[offset + k] = left_pos + j             # <<<<<<<<<<<<<<
 *                     right_indexer[offset + k] = right_pos + k
 *             position += lc * rc
 */
          __pyx_t_31 = (__pyx_v_offset + __pyx_v_k);
          __pyx_t_7 = -1;
          if (__pyx_t_31 < 0) {
            __pyx_t_31 += __pyx_pybuffernd_left_indexer.diminfo[0].shape;
            if (unlikely(__pyx_t_31 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_31 >= __pyx_pybuffernd_left_indexer.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[12]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_left_indexer.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_left_indexer.diminfo[0].strides) = (__pyx_v_left_pos + __pyx_v_j);

          /* "/home/wesm/code/pandas/pandas/src/join.pyx":171
 *                 for k in range(rc):
 *                     left_indexer[offset + k] = left_pos + j
 *                     right_indexer[offset + k] = right_pos + k             # <<<<<<<<<<<<<<
 *             position += lc * rc
 *         left_pos += lc
 */
          __pyx_t_32 = (__pyx_v_offset + __pyx_v_k);
          __pyx_t_7 = -1;
          if (__pyx_t_32 < 0) {
            __pyx_t_32 += __pyx_pybuffernd_right_indexer.diminfo[0].shape;
            if (unlikely(__pyx_t_32 < 0)) __pyx_t_7 = 0;
          } else if (unlikely(__pyx_t_32 >= __pyx_pybuffernd_right_indexer.diminfo[0].shape)) __pyx_t_7 = 0;
          if (unlikely(__pyx_t_7 != -1)) {
            __Pyx_RaiseBufferIndexError(__pyx_t_7);
            {__pyx_filename = __pyx_f[12]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_right_indexer.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_right_indexer.diminfo[0].strides) = (__pyx_v_right_pos + __pyx_v_k);
        }
      }

      /* "/home/wesm/code/pandas/pandas/src/join.pyx":172
 *                     left_indexer[offset + k] = left_pos + j
 *                     right_indexer[offset + k] = right_pos + k
 *             position += lc * rc             # <<<<<<<<<<<<<<
 *         left_pos += lc
 *         right_pos += rc
 */
      __pyx_v_position = (__pyx_v_position + (__pyx_v_lc * __pyx_v_rc));
    }
    __pyx_L12:;

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":173
 *                     right_indexer[offset + k] = right_pos + k
 *             position += lc * rc
 *         left_pos += lc             # <<<<<<<<<<<<<<
 *         right_pos += rc
 * 
 */
    __pyx_v_left_pos = (__pyx_v_left_pos + __pyx_v_lc);

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":174
 *             position += lc * rc
 *         left_pos += lc
 *         right_pos += rc             # <<<<<<<<<<<<<<
 * 
 *     return (_get_result_indexer(left_sorter, left_indexer),
 */
    __pyx_v_right_pos = (__pyx_v_right_pos + __pyx_v_rc);
  }

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":176
 *         right_pos += rc
 * 
 *     return (_get_result_indexer(left_sorter, left_indexer),             # <<<<<<<<<<<<<<
 *             _get_result_indexer(right_sorter, right_indexer))
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_result_indexer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_left_sorter));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_left_sorter));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left_sorter));
  __Pyx_INCREF(((PyObject *)__pyx_v_left_indexer));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_left_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left_indexer));
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":177
 * 
 *     return (_get_result_indexer(left_sorter, left_indexer),
 *             _get_result_indexer(right_sorter, right_indexer))             # <<<<<<<<<<<<<<
 * 
 * def _get_result_indexer(sorter, indexer):
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___get_result_indexer); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_right_sorter));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_right_sorter));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_right_sorter));
  __Pyx_INCREF(((PyObject *)__pyx_v_right_indexer));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_right_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_right_indexer));
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_r = ((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.full_outer_join", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_count.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_sorter.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_right_count.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_sorter.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left_indexer.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_left.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_left_count);
  __Pyx_XDECREF((PyObject *)__pyx_v_right_count);
  __Pyx_XDECREF((PyObject *)__pyx_v_left_sorter);
  __Pyx_XDECREF((PyObject *)__pyx_v_right_sorter);
  __Pyx_XDECREF((PyObject *)__pyx_v_left_indexer);
  __Pyx_XDECREF((PyObject *)__pyx_v_right_indexer);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_353_get_result_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_353_get_result_indexer = {__Pyx_NAMESTR("_get_result_indexer"), (PyCFunction)__pyx_pw_6pandas_8_tseries_353_get_result_indexer, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_353_get_result_indexer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_sorter = 0;
  PyObject *__pyx_v_indexer = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__sorter,&__pyx_n_s__indexer,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get_result_indexer (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sorter);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__indexer);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("_get_result_indexer", 1, 2, 2, 1); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_get_result_indexer") < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_sorter = values[0];
      __pyx_v_indexer = values[1];
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_sorter = values[0];
    __pyx_v_indexer = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_get_result_indexer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries._get_result_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6pandas_8_tseries_352_get_result_indexer(__pyx_self, __pyx_v_sorter, __pyx_v_indexer);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/join.pyx":179
 *             _get_result_indexer(right_sorter, right_indexer))
 * 
 * def _get_result_indexer(sorter, indexer):             # <<<<<<<<<<<<<<
 *     res = sorter.take(indexer)
 *     np.putmask(res, indexer == -1, -1)
 */

static PyObject *__pyx_pf_6pandas_8_tseries_352_get_result_indexer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_sorter, PyObject *__pyx_v_indexer) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_result_indexer");

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":180
 * 
 * def _get_result_indexer(sorter, indexer):
 *     res = sorter.take(indexer)             # <<<<<<<<<<<<<<
 *     np.putmask(res, indexer == -1, -1)
 *     return res
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_sorter, __pyx_n_s__take); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_indexer);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_indexer);
  __Pyx_GIVEREF(__pyx_v_indexer);
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_res = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":181
 * def _get_result_indexer(sorter, indexer):
 *     res = sorter.take(indexer)
 *     np.putmask(res, indexer == -1, -1)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__putmask); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_v_indexer, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_res);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_res);
  __Pyx_GIVEREF(__pyx_v_res);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":182
 *     res = sorter.take(indexer)
 *     np.putmask(res, indexer == -1, -1)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pandas._tseries._get_result_indexer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_355join_sorter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_355join_sorter = {__Pyx_NAMESTR("join_sorter"), (PyCFunction)__pyx_pw_6pandas_8_tseries_355join_sorter, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_355join_sorter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyArrayObject *__pyx_v_index = 0;
  Py_ssize_t __pyx_v_ngroups;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__ngroups,0};
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("join_sorter (wrapper)");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ngroups);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("join_sorter", 1, 2, 2, 1); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "join_sorter") < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
      __pyx_v_index = ((PyArrayObject *)values[0]);
      __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_index = ((PyArrayObject *)values[0]);
    __pyx_v_ngroups = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_ngroups == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("join_sorter", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[12]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pandas._tseries.join_sorter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index), __pyx_ptype_5numpy_ndarray, 1, "index", 0))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_6pandas_8_tseries_354join_sorter(__pyx_self, __pyx_v_index, __pyx_v_ngroups);
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/join.pyx":187
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def join_sorter(ndarray[int32_t] index, Py_ssize_t ngroups):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, loc, label, n
 */

static PyObject *__pyx_pf_6pandas_8_tseries_354join_sorter(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_index, Py_ssize_t __pyx_v_ngroups) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_label;
  Py_ssize_t __pyx_v_n;
  PyArrayObject *__pyx_v_counts = 0;
  PyArrayObject *__pyx_v_where = 0;
  PyArrayObject *__pyx_v_result = 0;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_index;
  __Pyx_Buffer __pyx_pybuffer_index;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_result;
  __Pyx_Buffer __pyx_pybuffer_result;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_counts;
  __Pyx_Buffer __pyx_pybuffer_counts;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_where;
  __Pyx_Buffer __pyx_pybuffer_where;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyArrayObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  long __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  __pyx_t_5numpy_int32_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("join_sorter");
  __pyx_pybuffer_counts.pybuffer.buf = NULL;
  __pyx_pybuffer_counts.refcount = 0;
  __pyx_pybuffernd_counts.data = NULL;
  __pyx_pybuffernd_counts.rcbuffer = &__pyx_pybuffer_counts;
  __pyx_pybuffer_where.pybuffer.buf = NULL;
  __pyx_pybuffer_where.refcount = 0;
  __pyx_pybuffernd_where.data = NULL;
  __pyx_pybuffernd_where.rcbuffer = &__pyx_pybuffer_where;
  __pyx_pybuffer_result.pybuffer.buf = NULL;
  __pyx_pybuffer_result.refcount = 0;
  __pyx_pybuffernd_result.data = NULL;
  __pyx_pybuffernd_result.rcbuffer = &__pyx_pybuffer_result;
  __pyx_pybuffer_index.pybuffer.buf = NULL;
  __pyx_pybuffer_index.refcount = 0;
  __pyx_pybuffernd_index.data = NULL;
  __pyx_pybuffernd_index.rcbuffer = &__pyx_pybuffer_index;
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_index.rcbuffer->pybuffer, (PyObject*)__pyx_v_index, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_pybuffernd_index.diminfo[0].strides = __pyx_pybuffernd_index.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_index.diminfo[0].shape = __pyx_pybuffernd_index.rcbuffer->pybuffer.shape[0];

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":193
 * 
 *     # count group sizes, location 0 for NA
 *     counts = np.zeros(ngroups + 1, dtype='i4')             # <<<<<<<<<<<<<<
 *     n = len(index)
 *     for i from 0 <= i < n:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t((__pyx_v_ngroups + 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_4);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_counts.rcbuffer->pybuffer, (PyObject*)__pyx_v_counts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_counts = ((PyArrayObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":194
 *     # count group sizes, location 0 for NA
 *     counts = np.zeros(ngroups + 1, dtype='i4')
 *     n = len(index)             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         counts[index[i] + 1] += 1
 */
  __pyx_t_10 = PyObject_Length(((PyObject *)__pyx_v_index)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_n = __pyx_t_10;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":195
 *     counts = np.zeros(ngroups + 1, dtype='i4')
 *     n = len(index)
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         counts[index[i] + 1] += 1
 * 
 */
  __pyx_t_10 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_10; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":196
 *     n = len(index)
 *     for i from 0 <= i < n:
 *         counts[index[i] + 1] += 1             # <<<<<<<<<<<<<<
 * 
 *     # mark the start of each contiguous group of like-indexed data
 */
    __pyx_t_11 = __pyx_v_i;
    __pyx_t_12 = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_index.diminfo[0].strides)) + 1);
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_counts.diminfo[0].strides) += 1;
  }

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":199
 * 
 *     # mark the start of each contiguous group of like-indexed data
 *     where = np.zeros(ngroups + 1, dtype='i4')             # <<<<<<<<<<<<<<
 *     for i from 1 <= i < ngroups + 1:
 *         where[i] = where[i - 1] + counts[i - 1]
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__zeros); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromSsize_t((__pyx_v_ngroups + 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_2);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_where.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_where.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_where.rcbuffer->pybuffer, (PyObject*)__pyx_v_where, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_9); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_7);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_9, __pyx_t_8, __pyx_t_7);
      }
    }
    __pyx_pybuffernd_where.diminfo[0].strides = __pyx_pybuffernd_where.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_where.diminfo[0].shape = __pyx_pybuffernd_where.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_where = ((PyArrayObject *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":200
 *     # mark the start of each contiguous group of like-indexed data
 *     where = np.zeros(ngroups + 1, dtype='i4')
 *     for i from 1 <= i < ngroups + 1:             # <<<<<<<<<<<<<<
 *         where[i] = where[i - 1] + counts[i - 1]
 * 
 */
  __pyx_t_10 = (__pyx_v_ngroups + 1);
  for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_10; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":201
 *     where = np.zeros(ngroups + 1, dtype='i4')
 *     for i from 1 <= i < ngroups + 1:
 *         where[i] = where[i - 1] + counts[i - 1]             # <<<<<<<<<<<<<<
 * 
 *     # this is our indexer
 */
    __pyx_t_13 = (__pyx_v_i - 1);
    __pyx_t_14 = (__pyx_v_i - 1);
    __pyx_t_15 = __pyx_v_i;
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_where.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_where.diminfo[0].strides) = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_where.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_where.diminfo[0].strides)) + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_counts.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_counts.diminfo[0].strides)));
  }

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":204
 * 
 *     # this is our indexer
 *     result = np.zeros(n, dtype='i4')             # <<<<<<<<<<<<<<
 *     for i from 0 <= i < n:
 *         label = index[i] + 1
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__zeros); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__dtype), ((PyObject *)__pyx_n_s__i4)) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __pyx_t_6 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_t_5, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack);
    if (unlikely(__pyx_t_6 < 0)) {
      PyErr_Fetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
      if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_result.rcbuffer->pybuffer, (PyObject*)__pyx_v_result, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
        Py_XDECREF(__pyx_t_7); Py_XDECREF(__pyx_t_8); Py_XDECREF(__pyx_t_9);
        __Pyx_RaiseBufferFallbackError();
      } else {
        PyErr_Restore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
      }
    }
    __pyx_pybuffernd_result.diminfo[0].strides = __pyx_pybuffernd_result.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_result.diminfo[0].shape = __pyx_pybuffernd_result.rcbuffer->pybuffer.shape[0];
    if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = 0;
  __pyx_v_result = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":205
 *     # this is our indexer
 *     result = np.zeros(n, dtype='i4')
 *     for i from 0 <= i < n:             # <<<<<<<<<<<<<<
 *         label = index[i] + 1
 *         result[where[label]] = i
 */
  __pyx_t_10 = __pyx_v_n;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_10; __pyx_v_i++) {

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":206
 *     result = np.zeros(n, dtype='i4')
 *     for i from 0 <= i < n:
 *         label = index[i] + 1             # <<<<<<<<<<<<<<
 *         result[where[label]] = i
 *         where[label] += 1
 */
    __pyx_t_16 = __pyx_v_i;
    __pyx_v_label = ((*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_index.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_index.diminfo[0].strides)) + 1);

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":207
 *     for i from 0 <= i < n:
 *         label = index[i] + 1
 *         result[where[label]] = i             # <<<<<<<<<<<<<<
 *         where[label] += 1
 * 
 */
    __pyx_t_17 = __pyx_v_label;
    __pyx_t_18 = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_where.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_where.diminfo[0].strides));
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_result.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_result.diminfo[0].strides) = __pyx_v_i;

    /* "/home/wesm/code/pandas/pandas/src/join.pyx":208
 *         label = index[i] + 1
 *         result[where[label]] = i
 *         where[label] += 1             # <<<<<<<<<<<<<<
 * 
 *     return result, counts
 */
    __pyx_t_19 = __pyx_v_label;
    *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_where.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_where.diminfo[0].strides) += 1;
  }

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":210
 *         where[label] += 1
 * 
 *     return result, counts             # <<<<<<<<<<<<<<
 * 
 * def _big_join_sorter(index):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result));
  __Pyx_INCREF(((PyObject *)__pyx_v_counts));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_counts));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_where.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("pandas._tseries.join_sorter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_index.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_result.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_counts.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_where.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_counts);
  __Pyx_XDECREF((PyObject *)__pyx_v_where);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6pandas_8_tseries_357_big_join_sorter(PyObject *__pyx_self, PyObject *__pyx_v_index); /*proto*/
static PyMethodDef __pyx_mdef_6pandas_8_tseries_357_big_join_sorter = {__Pyx_NAMESTR("_big_join_sorter"), (PyCFunction)__pyx_pw_6pandas_8_tseries_357_big_join_sorter, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pw_6pandas_8_tseries_357_big_join_sorter(PyObject *__pyx_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_big_join_sorter (wrapper)");
  __pyx_self = __pyx_self;
  __pyx_r = __pyx_pf_6pandas_8_tseries_356_big_join_sorter(__pyx_self, ((PyObject *)__pyx_v_index));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "/home/wesm/code/pandas/pandas/src/join.pyx":212
 *     return result, counts
 * 
 * def _big_join_sorter(index):             # <<<<<<<<<<<<<<
 *     pass
 */

static PyObject *__pyx_pf_6pandas_8_tseries_356_big_join_sorter(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_big_join_sorter");

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)");
  __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":193
 *         # experimental exception made for __getbuffer__ and __releasebuffer__
 *         # -- the details of this may change.
 *         def __getbuffer__(ndarray self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fullfill the PEP.
 */

static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_v_copy_shape;
  int __pyx_v_i;
  int __pyx_v_ndim;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  int __pyx_v_t;
  char *__pyx_v_f;
  PyArray_Descr *__pyx_v_descr = 0;
  int __pyx_v_offset;
  int __pyx_v_hasfields;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getbuffer__");
  if (__pyx_v_info != NULL) {
    __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(__pyx_v_info->obj);
  }

  /* "numpy.pxd":199
 *             # of flags
 * 
 *             if info == NULL: return             # <<<<<<<<<<<<<<
 * 
 *             cdef int copy_shape, i, ndim
 */
  __pyx_t_1 = (__pyx_v_info == NULL);
  if (__pyx_t_1) {
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "numpy.pxd":202
 * 
 *             cdef int copy_shape, i, ndim
 *             cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 */
  __pyx_v_endian_detector = 1;

  /* "numpy.pxd":203
 *             cdef int copy_shape, i, ndim
 *             cdef int endian_detector = 1
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 * 
 *             ndim = PyArray_NDIM(self)
 */
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "numpy.pxd":205
 *             cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 * 
 *             ndim = PyArray_NDIM(self)             # <<<<<<<<<<<<<<
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);

  /* "numpy.pxd":207
 *             ndim = PyArray_NDIM(self)
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 copy_shape = 1
 *             else:
 */
  __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
  if (__pyx_t_1) {

    /* "numpy.pxd":208
 * 
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 copy_shape = 1             # <<<<<<<<<<<<<<
 *             else:
 *                 copy_shape = 0
 */
    __pyx_v_copy_shape = 1;
    goto __pyx_L4;
  }
  /*else*/ {

    /* "numpy.pxd":210
 *                 copy_shape = 1
 *             else:
 *                 copy_shape = 0             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 */
    __pyx_v_copy_shape = 0;
  }
  __pyx_L4:;

  /* "numpy.pxd":212
 *                 copy_shape = 0
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")
 */
  __pyx_t_1 = ((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS);
  if (__pyx_t_1) {

    /* "numpy.pxd":213
 * 
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 */
    __pyx_t_2 = (!PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS));
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "numpy.pxd":214
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_122), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[13]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "numpy.pxd":216
 *                 raise ValueError(u"ndarray is not C contiguous")
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)             # <<<<<<<<<<<<<<
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 */
  __pyx_t_3 = ((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS);
  if (__pyx_t_3) {

    /* "numpy.pxd":217
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):             # <<<<<<<<<<<<<<
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 */
    __pyx_t_1 = (!PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS));
    __pyx_t_2 = __pyx_t_1;
  } else {
    __pyx_t_2 = __pyx_t_3;
  }
  if (__pyx_t_2) {

    /* "numpy.pxd":218
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
    __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_124), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[13]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "numpy.pxd":220
 *                 raise ValueError(u"ndarray is not Fortran contiguous")
 * 
 *             info.buf = PyArray_DATA(self)             # <<<<<<<<<<<<<<
 *             info.ndim = ndim
 *             if copy_shape:
 */
  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);

  /* "numpy.pxd":221
 * 
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim             # <<<<<<<<<<<<<<
 *             if copy_shape:
 *                 # Allocate new buffer for strides and shape info.
 */
  __pyx_v_info->ndim = __pyx_v_ndim;

  /* "numpy.pxd":222
 *             info.buf = PyArray_DATA(self)
 *             info.ndim = ndim
 *             if copy_shape:             # <<<<<<<<<<<<<<
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 */
  if (__pyx_v_copy_shape) {

    /* "numpy.pxd":225
 *                 # Allocate new buffer for strides and shape info.
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)             # <<<<<<<<<<<<<<
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 */
    __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2)));

    /* "numpy.pxd":226
 *                 # This is allocated as one block, strides first.
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
 *                 info.shape = info.strides + ndim             # <<<<<<<<<<<<<<
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 */
    __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);

    /* "numpy.pxd":227
 *                 info.strides = <Py_ssize_t*>stdlib.malloc(sizeof(Py_ssize_t) * <size_t>ndim * 2)
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):             # <<<<<<<<<<<<<<
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 */
    __pyx_t_5 = __pyx_v_ndim;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "numpy.pxd":228
 *                 info.shape = info.strides + ndim
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]             # <<<<<<<<<<<<<<
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 */
      (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);

      /* "numpy.pxd":229
 *                 for i in range(ndim):
 *                     info.strides[i] = PyArray_STRIDES(self)[i]
 *                     info.shape[i] = PyArray_DIMS(self)[i]             # <<<<<<<<<<<<<<
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 */
      (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
    }
    goto __pyx_L7;
  }
  /*else*/ {

    /* "numpy.pxd":231
 *                     info.shape[i] = PyArray_DIMS(self)[i]
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 */
    __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));

    /* "numpy.pxd":232
 *             else:
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)             # <<<<<<<<<<<<<<
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 */
    __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
  }
  __pyx_L7:;

  /* "numpy.pxd":233
 *                 info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 */
  __pyx_v_info->suboffsets = NULL;

  /* "numpy.pxd":234
 *                 info.shape = <Py_ssize_t*>PyArray_DIMS(self)
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)             # <<<<<<<<<<<<<<
 *             info.readonly = not PyArray_ISWRITEABLE(self)
 * 
 */
  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);

  /* "numpy.pxd":235
 *             info.suboffsets = NULL
 *             info.itemsize = PyArray_ITEMSIZE(self)
 *             info.readonly = not PyArray_ISWRITEABLE(self)             # <<<<<<<<<<<<<<
 * 
 *             cdef int t
 */
  __pyx_v_info->readonly = (!PyArray_ISWRITEABLE(__pyx_v_self));

  /* "numpy.pxd":238
 * 
 *             cdef int t
 *             cdef char* f = NULL             # <<<<<<<<<<<<<<
 *             cdef dtype descr = self.descr
 *             cdef list stack
 */
  __pyx_v_f = NULL;

  /* "numpy.pxd":239
 *             cdef int t
 *             cdef char* f = NULL
 *             cdef dtype descr = self.descr             # <<<<<<<<<<<<<<
 *             cdef list stack
 *             cdef int offset
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self->descr));
  __pyx_v_descr = __pyx_v_self->descr;

  /* "numpy.pxd":243
 *             cdef int offset
 * 
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)             # <<<<<<<<<<<<<<
 * 
 *             if not hasfields and not copy_shape:
 */
  __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr);

  /* "numpy.pxd":245
 *             cdef bint hasfields = PyDataType_HASFIELDS(descr)
 * 
 *             if not hasfields and not copy_shape:             # <<<<<<<<<<<<<<
 *                 # do not call releasebuffer
 *                 info.obj = None
 */
  __pyx_t_2 = (!__pyx_v_hasfields);
  if (__pyx_t_2) {
    __pyx_t_3 = (!__pyx_v_copy_shape);
    __pyx_t_1 = __pyx_t_3;
  } else {
    __pyx_t_1 = __pyx_t_2;
  }
  if (__pyx_t_1) {

    /* "numpy.pxd":247
 *             if not hasfields and not copy_shape:
 *                 # do not call releasebuffer
 *                 info.obj = None             # <<<<<<<<<<<<<<
 *             else:
 *                 # need to call releasebuffer
 */
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj);
    __pyx_v_info->obj = Py_None;
    goto __pyx_L10;
  }
  /*else*/ {

    /* "numpy.pxd":250
 *             else:
 *                 # need to call releasebuffer
 *                 info.obj = self             # <<<<<<<<<<<<<<
 * 
 *             if not hasfields:
 */
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj);
    __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
  }
  __pyx_L10:;

  /* "numpy.pxd":252
 *                 info.obj = self
 * 
 *             if not hasfields:             # <<<<<<<<<<<<<<
 *                 t = descr.type_num
 *                 if ((descr.byteorder == '>' and little_endian) or
 */
  __pyx_t_1 = (!__pyx_v_hasfields);
  if (__pyx_t_1) {

    /* "numpy.pxd":253
 * 
 *             if not hasfields:
 *                 t = descr.type_num             # <<<<<<<<<<<<<<
 *                 if ((descr.byteorder == '>' and little_endian) or
 *                     (descr.byteorder == '<' and not little_endian)):
 */
    __pyx_v_t = __pyx_v_descr->type_num;

    /* "numpy.pxd":254
 *             if not hasfields:
 *                 t = descr.type_num
 *                 if ((descr.byteorder == '>' and little_endian) or             # <<<<<<<<<<<<<<
 *                     (descr.byteorder == '<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 */
    __pyx_t_1 = (__pyx_v_descr->byteorder == '>');
    if (__pyx_t_1) {
      __pyx_t_2 = __pyx_v_little_endian;
    } else {
      __pyx_t_2 = __pyx_t_1;
    }
    if (!__pyx_t_2) {

      /* "numpy.pxd":255
 *                 t = descr.type_num
 *                 if ((descr.byteorder == '>' and little_endian) or
 *                     (descr.byteorder == '<' and not little_endian)):             # <<<<<<<<<<<<<<
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 */
      __pyx_t_1 = (__pyx_v_descr->byteorder == '<');
      if (__pyx_t_1) {
        __pyx_t_3 = (!__pyx_v_little_endian);
        __pyx_t_7 = __pyx_t_3;
      } else {
        __pyx_t_7 = __pyx_t_1;
      }
      __pyx_t_1 = __pyx_t_7;
    } else {
      __pyx_t_1 = __pyx_t_2;
    }
    if (__pyx_t_1) {

      /* "numpy.pxd":256
 *                 if ((descr.byteorder == '>' and little_endian) or
 *                     (descr.byteorder == '<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
      __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_126), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[13]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L12;
    }
    __pyx_L12:;

    /* "numpy.pxd":257
 *                     (descr.byteorder == '<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_BYTE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__b;
      goto __pyx_L13;
    }

    /* "numpy.pxd":258
 *                     raise ValueError(u"Non-native byte order not supported")
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_UBYTE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__B;
      goto __pyx_L13;
    }

    /* "numpy.pxd":259
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_SHORT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__h;
      goto __pyx_L13;
    }

    /* "numpy.pxd":260
 *                 elif t == NPY_UBYTE:       f = "B"
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_USHORT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__H;
      goto __pyx_L13;
    }

    /* "numpy.pxd":261
 *                 elif t == NPY_SHORT:       f = "h"
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_INT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__i;
      goto __pyx_L13;
    }

    /* "numpy.pxd":262
 *                 elif t == NPY_USHORT:      f = "H"
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_UINT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__I;
      goto __pyx_L13;
    }

    /* "numpy.pxd":263
 *                 elif t == NPY_INT:         f = "i"
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_LONG);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__l;
      goto __pyx_L13;
    }

    /* "numpy.pxd":264
 *                 elif t == NPY_UINT:        f = "I"
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_ULONG);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__L;
      goto __pyx_L13;
    }

    /* "numpy.pxd":265
 *                 elif t == NPY_LONG:        f = "l"
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_LONGLONG);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__q;
      goto __pyx_L13;
    }

    /* "numpy.pxd":266
 *                 elif t == NPY_ULONG:       f = "L"
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_ULONGLONG);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__Q;
      goto __pyx_L13;
    }

    /* "numpy.pxd":267
 *                 elif t == NPY_LONGLONG:    f = "q"
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_FLOAT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__f;
      goto __pyx_L13;
    }

    /* "numpy.pxd":268
 *                 elif t == NPY_ULONGLONG:   f = "Q"
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_DOUBLE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__d;
      goto __pyx_L13;
    }

    /* "numpy.pxd":269
 *                 elif t == NPY_FLOAT:       f = "f"
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_LONGDOUBLE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__g;
      goto __pyx_L13;
    }

    /* "numpy.pxd":270
 *                 elif t == NPY_DOUBLE:      f = "d"
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_CFLOAT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__Zf;
      goto __pyx_L13;
    }

    /* "numpy.pxd":271
 *                 elif t == NPY_LONGDOUBLE:  f = "g"
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"
 */
    __pyx_t_1 = (__pyx_v_t == NPY_CDOUBLE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__Zd;
      goto __pyx_L13;
    }

    /* "numpy.pxd":272
 *                 elif t == NPY_CFLOAT:      f = "Zf"
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"             # <<<<<<<<<<<<<<
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 */
    __pyx_t_1 = (__pyx_v_t == NPY_CLONGDOUBLE);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__Zg;
      goto __pyx_L13;
    }

    /* "numpy.pxd":273
 *                 elif t == NPY_CDOUBLE:     f = "Zd"
 *                 elif t == NPY_CLONGDOUBLE: f = "Zg"
 *                 elif t == NPY_OBJECT:      f = "O"             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
    __pyx_t_1 = (__pyx_v_t == NPY_OBJECT);
    if (__pyx_t_1) {
      __pyx_v_f = __pyx_k__O;
      goto __pyx_L13;
    }
    /*else*/ {

      /* "numpy.pxd":275
 *                 elif t == NPY_OBJECT:      f = "O"
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *                 info.format = f
 *                 return
 */
      __pyx_t_4 = PyInt_FromLong(__pyx_v_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_127), __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_8));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
      __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      {__pyx_filename = __pyx_f[13]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L13:;

    /* "numpy.pxd":276
 *                 else:
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f             # <<<<<<<<<<<<<<
 *                 return
 *             else:
 */
    __pyx_v_info->format = __pyx_v_f;

    /* "numpy.pxd":277
 *                     raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *                 info.format = f
 *                 return             # <<<<<<<<<<<<<<
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
 */
    __pyx_r = 0;
    goto __pyx_L0;
    goto __pyx_L11;
  }
  /*else*/ {

    /* "numpy.pxd":279
 *                 return
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)             # <<<<<<<<<<<<<<
 *                 info.format[0] = '^' # Native data types, manual alignment
 *                 offset = 0
 */
    __pyx_v_info->format = ((char *)malloc(255));

    /* "numpy.pxd":280
 *             else:
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
 *                 info.format[0] = '^' # Native data types, manual alignment             # <<<<<<<<<<<<<<
 *                 offset = 0
 *                 f = _util_dtypestring(descr, info.format + 1,
 */
    (__pyx_v_info->format[0]) = '^';

    /* "numpy.pxd":281
 *                 info.format = <char*>stdlib.malloc(_buffer_format_string_len)
 *                 info.format[0] = '^' # Native data types, manual alignment
 *                 offset = 0             # <<<<<<<<<<<<<<
 *                 f = _util_dtypestring(descr, info.format + 1,
 *                                       info.format + _buffer_format_string_len,
 */
    __pyx_v_offset = 0;

    /* "numpy.pxd":284
 *                 f = _util_dtypestring(descr, info.format + 1,
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)             # <<<<<<<<<<<<<<
 *                 f[0] = 0 # Terminate format string
 * 
 */
    __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_f = __pyx_t_9;

    /* "numpy.pxd":285
 *                                       info.format + _buffer_format_string_len,
 *                                       &offset)
 *                 f[0] = 0 # Terminate format string             # <<<<<<<<<<<<<<
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 */
    (__pyx_v_f[0]) = 0;
  }
  __pyx_L11:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info != NULL && __pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = NULL;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info != NULL && __pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(Py_None);
    __Pyx_DECREF(Py_None); __pyx_v_info->obj = NULL;
  }
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_descr);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
static void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)");
  __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
  __Pyx_RefNannyFinishContext();
}

/* "numpy.pxd":287
 *                 f[0] = 0 # Terminate format string
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)
 */

static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__releasebuffer__");

  /* "numpy.pxd":288
 * 
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):             # <<<<<<<<<<<<<<
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 */
  __pyx_t_1 = PyArray_HASFIELDS(__pyx_v_self);
  if (__pyx_t_1) {

    /* "numpy.pxd":289
 *         def __releasebuffer__(ndarray self, Py_buffer* info):
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)             # <<<<<<<<<<<<<<
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 stdlib.free(info.strides)
 */
    free(__pyx_v_info->format);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "numpy.pxd":290
 *             if PyArray_HASFIELDS(self):
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):             # <<<<<<<<<<<<<<
 *                 stdlib.free(info.strides)
 *                 # info.shape was stored after info.strides in the same block
 */
  __pyx_t_1 = ((sizeof(npy_intp)) != (sizeof(Py_ssize_t)));
  if (__pyx_t_1) {

    /* "numpy.pxd":291
 *                 stdlib.free(info.format)
 *             if sizeof(npy_intp) != sizeof(Py_ssize_t):
 *                 stdlib.free(info.strides)             # <<<<<<<<<<<<<<
 *                 # info.shape was stored after info.strides in the same block
 * 
 */
    free(__pyx_v_info->strides);
    goto __pyx_L4;
  }
  __pyx_L4:;

  __Pyx_RefNannyFinishContext();
}

/* "numpy.pxd":767
 * ctypedef npy_cdouble     complex_t
 * 
 * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1");

  /* "numpy.pxd":768
 * 
 * cdef inline object PyArray_MultiIterNew1(a):
 *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":770
 *     return PyArray_MultiIterNew(1, <void*>a)
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2");

  /* "numpy.pxd":771
 * 
 * cdef inline object PyArray_MultiIterNew2(a, b):
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":773
 *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3");

  /* "numpy.pxd":774
 * 
 * cdef inline object PyArray_MultiIterNew3(a, b, c):
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":776
 *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4");

  /* "numpy.pxd":777
 * 
 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":779
 *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5");

  /* "numpy.pxd":780
 * 
 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":782
 *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
 * 
 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:             # <<<<<<<<<<<<<<
 *     # Recursive utility function used in __getbuffer__ to get format
 *     # string. The new location in the format string is returned.
 */

static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
  PyArray_Descr *__pyx_v_child = 0;
  int __pyx_v_endian_detector;
  int __pyx_v_little_endian;
  PyObject *__pyx_v_fields = 0;
  PyObject *__pyx_v_childname = NULL;
  PyObject *__pyx_v_new_offset = NULL;
  PyObject *__pyx_v_t = NULL;
  char *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  long __pyx_t_10;
  char *__pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_util_dtypestring");

  /* "numpy.pxd":789
 *     cdef int delta_offset
 *     cdef tuple i
 *     cdef int endian_detector = 1             # <<<<<<<<<<<<<<
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
 *     cdef tuple fields
 */
  __pyx_v_endian_detector = 1;

  /* "numpy.pxd":790
 *     cdef tuple i
 *     cdef int endian_detector = 1
 *     cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)             # <<<<<<<<<<<<<<
 *     cdef tuple fields
 * 
 */
  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);

  /* "numpy.pxd":793
 *     cdef tuple fields
 * 
 *     for childname in descr.names:             # <<<<<<<<<<<<<<
 *         fields = descr.fields[childname]
 *         child, new_offset = fields
 */
  if (unlikely(((PyObject *)__pyx_v_descr->names) == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[13]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
  }
  __pyx_t_1 = ((PyObject *)__pyx_v_descr->names); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  for (;;) {
    if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
    __Pyx_XDECREF(__pyx_v_childname);
    __pyx_v_childname = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "numpy.pxd":794
 * 
 *     for childname in descr.names:
 *         fields = descr.fields[childname]             # <<<<<<<<<<<<<<
 *         child, new_offset = fields
 * 
 */
    __pyx_t_3 = PyObject_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (!__pyx_t_3) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected tuple, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 794; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_fields));
    __pyx_v_fields = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "numpy.pxd":795
 *     for childname in descr.names:
 *         fields = descr.fields[childname]
 *         child, new_offset = fields             # <<<<<<<<<<<<<<
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:
 */
    if (likely(PyTuple_CheckExact(((PyObject *)__pyx_v_fields)))) {
      PyObject* sequence = ((PyObject *)__pyx_v_fields);
      if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
        if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
        else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
        {__pyx_filename = __pyx_f[13]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
    } else {
      __Pyx_UnpackTupleError(((PyObject *)__pyx_v_fields), 2);
      {__pyx_filename = __pyx_f[13]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_child));
    __pyx_v_child = ((PyArray_Descr *)__pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_v_new_offset);
    __pyx_v_new_offset = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "numpy.pxd":797
 *         child, new_offset = fields
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 */
    __pyx_t_4 = PyInt_FromLong((__pyx_v_end - __pyx_v_f)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_15, Py_LT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {

      /* "numpy.pxd":798
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == '>' and little_endian) or
 */
      __pyx_t_5 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_129), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[13]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L5;
    }
    __pyx_L5:;

    /* "numpy.pxd":800
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
 * 
 *         if ((child.byteorder == '>' and little_endian) or             # <<<<<<<<<<<<<<
 *             (child.byteorder == '<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")
 */
    __pyx_t_6 = (__pyx_v_child->byteorder == '>');
    if (__pyx_t_6) {
      __pyx_t_7 = __pyx_v_little_endian;
    } else {
      __pyx_t_7 = __pyx_t_6;
    }
    if (!__pyx_t_7) {

      /* "numpy.pxd":801
 * 
 *         if ((child.byteorder == '>' and little_endian) or
 *             (child.byteorder == '<' and not little_endian)):             # <<<<<<<<<<<<<<
 *             raise ValueError(u"Non-native byte order not supported")
 *             # One could encode it in the format string and have Cython
 */
      __pyx_t_6 = (__pyx_v_child->byteorder == '<');
      if (__pyx_t_6) {
        __pyx_t_8 = (!__pyx_v_little_endian);
        __pyx_t_9 = __pyx_t_8;
      } else {
        __pyx_t_9 = __pyx_t_6;
      }
      __pyx_t_6 = __pyx_t_9;
    } else {
      __pyx_t_6 = __pyx_t_7;
    }
    if (__pyx_t_6) {

      /* "numpy.pxd":802
 *         if ((child.byteorder == '>' and little_endian) or
 *             (child.byteorder == '<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
      __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_130), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[13]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      goto __pyx_L6;
    }
    __pyx_L6:;

    /* "numpy.pxd":812
 * 
 *         # Output padding bytes
 *         while offset[0] < new_offset:             # <<<<<<<<<<<<<<
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 */
    while (1) {
      __pyx_t_5 = PyInt_FromLong((__pyx_v_offset[0])); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_v_new_offset, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!__pyx_t_6) break;

      /* "numpy.pxd":813
 *         # Output padding bytes
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte             # <<<<<<<<<<<<<<
 *             f += 1
 *             offset[0] += 1
 */
      (__pyx_v_f[0]) = 120;

      /* "numpy.pxd":814
 *         while offset[0] < new_offset:
 *             f[0] = 120 # "x"; pad byte
 *             f += 1             # <<<<<<<<<<<<<<
 *             offset[0] += 1
 * 
 */
      __pyx_v_f = (__pyx_v_f + 1);

      /* "numpy.pxd":815
 *             f[0] = 120 # "x"; pad byte
 *             f += 1
 *             offset[0] += 1             # <<<<<<<<<<<<<<
 * 
 *         offset[0] += child.itemsize
 */
      __pyx_t_10 = 0;
      (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + 1);
    }

    /* "numpy.pxd":817
 *             offset[0] += 1
 * 
 *         offset[0] += child.itemsize             # <<<<<<<<<<<<<<
 * 
 *         if not PyDataType_HASFIELDS(child):
 */
    __pyx_t_10 = 0;
    (__pyx_v_offset[__pyx_t_10]) = ((__pyx_v_offset[__pyx_t_10]) + __pyx_v_child->elsize);

    /* "numpy.pxd":819
 *         offset[0] += child.itemsize
 * 
 *         if not PyDataType_HASFIELDS(child):             # <<<<<<<<<<<<<<
 *             t = child.type_num
 *             if end - f < 5:
 */
    __pyx_t_6 = (!PyDataType_HASFIELDS(__pyx_v_child));
    if (__pyx_t_6) {

      /* "numpy.pxd":820
 * 
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num             # <<<<<<<<<<<<<<
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")
 */
      __pyx_t_3 = PyInt_FromLong(__pyx_v_child->type_num); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_v_t);
      __pyx_v_t = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "numpy.pxd":821
 *         if not PyDataType_HASFIELDS(child):
 *             t = child.type_num
 *             if end - f < 5:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError(u"Format string allocated too short.")
 * 
 */
      __pyx_t_6 = ((__pyx_v_end - __pyx_v_f) < 5);
      if (__pyx_t_6) {

        /* "numpy.pxd":822
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
        __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_132), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        {__pyx_filename = __pyx_f[13]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        goto __pyx_L10;
      }
      __pyx_L10:;

      /* "numpy.pxd":825
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_BYTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 98;
        goto __pyx_L11;
      }

      /* "numpy.pxd":826
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"             # <<<<<<<<<<<<<<
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_UBYTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 66;
        goto __pyx_L11;
      }

      /* "numpy.pxd":827
 *             if   t == NPY_BYTE:        f[0] =  98 #"b"
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"             # <<<<<<<<<<<<<<
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_SHORT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 104;
        goto __pyx_L11;
      }

      /* "numpy.pxd":828
 *             elif t == NPY_UBYTE:       f[0] =  66 #"B"
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"             # <<<<<<<<<<<<<<
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_USHORT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 72;
        goto __pyx_L11;
      }

      /* "numpy.pxd":829
 *             elif t == NPY_SHORT:       f[0] = 104 #"h"
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"             # <<<<<<<<<<<<<<
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_INT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 105;
        goto __pyx_L11;
      }

      /* "numpy.pxd":830
 *             elif t == NPY_USHORT:      f[0] =  72 #"H"
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_UINT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 73;
        goto __pyx_L11;
      }

      /* "numpy.pxd":831
 *             elif t == NPY_INT:         f[0] = 105 #"i"
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_LONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 108;
        goto __pyx_L11;
      }

      /* "numpy.pxd":832
 *             elif t == NPY_UINT:        f[0] =  73 #"I"
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_ULONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 76;
        goto __pyx_L11;
      }

      /* "numpy.pxd":833
 *             elif t == NPY_LONG:        f[0] = 108 #"l"
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_LONGLONG); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 113;
        goto __pyx_L11;
      }

      /* "numpy.pxd":834
 *             elif t == NPY_ULONG:       f[0] = 76  #"L"
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"             # <<<<<<<<<<<<<<
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 */
      __pyx_t_5 = PyInt_FromLong(NPY_ULONGLONG); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 834; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 81;
        goto __pyx_L11;
      }

      /* "numpy.pxd":835
 *             elif t == NPY_LONGLONG:    f[0] = 113 #"q"
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"             # <<<<<<<<<<<<<<
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_FLOAT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 102;
        goto __pyx_L11;
      }

      /* "numpy.pxd":836
 *             elif t == NPY_ULONGLONG:   f[0] = 81  #"Q"
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"             # <<<<<<<<<<<<<<
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 */
      __pyx_t_5 = PyInt_FromLong(NPY_DOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 100;
        goto __pyx_L11;
      }

      /* "numpy.pxd":837
 *             elif t == NPY_FLOAT:       f[0] = 102 #"f"
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"             # <<<<<<<<<<<<<<
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 */
      __pyx_t_3 = PyInt_FromLong(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 103;
        goto __pyx_L11;
      }

      /* "numpy.pxd":838
 *             elif t == NPY_DOUBLE:      f[0] = 100 #"d"
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf             # <<<<<<<<<<<<<<
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 */
      __pyx_t_5 = PyInt_FromLong(NPY_CFLOAT); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 102;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L11;
      }

      /* "numpy.pxd":839
 *             elif t == NPY_LONGDOUBLE:  f[0] = 103 #"g"
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd             # <<<<<<<<<<<<<<
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 */
      __pyx_t_3 = PyInt_FromLong(NPY_CDOUBLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 100;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L11;
      }

      /* "numpy.pxd":840
 *             elif t == NPY_CFLOAT:      f[0] = 90; f[1] = 102; f += 1 # Zf
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg             # <<<<<<<<<<<<<<
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 */
      __pyx_t_5 = PyInt_FromLong(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 90;
        (__pyx_v_f[1]) = 103;
        __pyx_v_f = (__pyx_v_f + 1);
        goto __pyx_L11;
      }

      /* "numpy.pxd":841
 *             elif t == NPY_CDOUBLE:     f[0] = 90; f[1] = 100; f += 1 # Zd
 *             elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"             # <<<<<<<<<<<<<<
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 */
      __pyx_t_3 = PyInt_FromLong(NPY_OBJECT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_6) {
        (__pyx_v_f[0]) = 79;
        goto __pyx_L11;
      }
      /*else*/ {

        /* "numpy.pxd":843
 *             elif t == NPY_OBJECT:      f[0] = 79 #"O"
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)             # <<<<<<<<<<<<<<
 *             f += 1
 *         else:
 */
        __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_127), __pyx_v_t); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_5));
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_5));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_5));
        __pyx_t_5 = 0;
        __pyx_t_5 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        {__pyx_filename = __pyx_f[13]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L11:;

      /* "numpy.pxd":844
 *             else:
 *                 raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
 *             f += 1             # <<<<<<<<<<<<<<
 *         else:
 *             # Cython ignores struct boundary information ("T{...}"),
 */
      __pyx_v_f = (__pyx_v_f + 1);
      goto __pyx_L9;
    }
    /*else*/ {

      /* "numpy.pxd":848
 *             # Cython ignores struct boundary information ("T{...}"),
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)             # <<<<<<<<<<<<<<
 *     return f
 * 
 */
      __pyx_t_11 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_f = __pyx_t_11;
    }
    __pyx_L9:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "numpy.pxd":849
 *             # so don't output it
 *             f = _util_dtypestring(child, f, end, offset)
 *     return f             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_f;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_child);
  __Pyx_XDECREF(__pyx_v_fields);
  __Pyx_XDECREF(__pyx_v_childname);
  __Pyx_XDECREF(__pyx_v_new_offset);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "numpy.pxd":964
 * 
 * 
 * cdef inline void set_array_base(ndarray arr, object base):             # <<<<<<<<<<<<<<
 *      cdef PyObject* baseptr
 *      if base is None:
 */

static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
  PyObject *__pyx_v_baseptr;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("set_array_base");

  /* "numpy.pxd":966
 * cdef inline void set_array_base(ndarray arr, object base):
 *      cdef PyObject* baseptr
 *      if base is None:             # <<<<<<<<<<<<<<
 *          baseptr = NULL
 *      else:
 */
  __pyx_t_1 = (__pyx_v_base == Py_None);
  if (__pyx_t_1) {

    /* "numpy.pxd":967
 *      cdef PyObject* baseptr
 *      if base is None:
 *          baseptr = NULL             # <<<<<<<<<<<<<<
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!
 */
    __pyx_v_baseptr = NULL;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "numpy.pxd":969
 *          baseptr = NULL
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!             # <<<<<<<<<<<<<<
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)
 */
    Py_INCREF(__pyx_v_base);

    /* "numpy.pxd":970
 *      else:
 *          Py_INCREF(base) # important to do this before decref below!
 *          baseptr = <PyObject*>base             # <<<<<<<<<<<<<<
 *      Py_XDECREF(arr.base)
 *      arr.base = baseptr
 */
    __pyx_v_baseptr = ((PyObject *)__pyx_v_base);
  }
  __pyx_L3:;

  /* "numpy.pxd":971
 *          Py_INCREF(base) # important to do this before decref below!
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)             # <<<<<<<<<<<<<<
 *      arr.base = baseptr
 * 
 */
  Py_XDECREF(__pyx_v_arr->base);

  /* "numpy.pxd":972
 *          baseptr = <PyObject*>base
 *      Py_XDECREF(arr.base)
 *      arr.base = baseptr             # <<<<<<<<<<<<<<
 * 
 * cdef inline object get_array_base(ndarray arr):
 */
  __pyx_v_arr->base = __pyx_v_baseptr;

  __Pyx_RefNannyFinishContext();
}

/* "numpy.pxd":974
 *      arr.base = baseptr
 * 
 * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
 *     if arr.base is NULL:
 *         return None
 */

static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("get_array_base");

  /* "numpy.pxd":975
 * 
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:             # <<<<<<<<<<<<<<
 *         return None
 *     else:
 */
  __pyx_t_1 = (__pyx_v_arr->base == NULL);
  if (__pyx_t_1) {

    /* "numpy.pxd":976
 * cdef inline object get_array_base(ndarray arr):
 *     if arr.base is NULL:
 *         return None             # <<<<<<<<<<<<<<
 *     else:
 *         return <object>arr.base
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "numpy.pxd":978
 *         return None
 *     else:
 *         return <object>arr.base             # <<<<<<<<<<<<<<
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(((PyObject *)__pyx_v_arr->base));
    __pyx_r = ((PyObject *)__pyx_v_arr->base);
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "util.pxd":14
 *     inline object floatify(object)
 * 
 * cdef inline object get_value_at(ndarray arr, object loc):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */

static CYTHON_INLINE PyObject *__pyx_f_4util_get_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_sz;
  PyObject *__pyx_v_casted = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_value_at");
  __Pyx_INCREF(__pyx_v_loc);

  /* "util.pxd":18
 *         Py_ssize_t i, sz
 *         void* data_ptr
 *     if is_float_object(loc):             # <<<<<<<<<<<<<<
 *         casted = int(loc)
 *         if casted == loc:
 */
  __pyx_t_1 = is_float_object(__pyx_v_loc);
  if (__pyx_t_1) {

    /* "util.pxd":19
 *         void* data_ptr
 *     if is_float_object(loc):
 *         casted = int(loc)             # <<<<<<<<<<<<<<
 *         if casted == loc:
 *             loc = casted
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_loc);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc);
    __Pyx_GIVEREF(__pyx_v_loc);
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_casted = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "util.pxd":20
 *     if is_float_object(loc):
 *         casted = int(loc)
 *         if casted == loc:             # <<<<<<<<<<<<<<
 *             loc = casted
 *     i = <Py_ssize_t> loc
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "util.pxd":21
 *         casted = int(loc)
 *         if casted == loc:
 *             loc = casted             # <<<<<<<<<<<<<<
 *     i = <Py_ssize_t> loc
 *     sz = cnp.PyArray_SIZE(arr)
 */
      __Pyx_INCREF(__pyx_v_casted);
      __Pyx_DECREF(__pyx_v_loc);
      __pyx_v_loc = __pyx_v_casted;
      goto __pyx_L4;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "util.pxd":22
 *         if casted == loc:
 *             loc = casted
 *     i = <Py_ssize_t> loc             # <<<<<<<<<<<<<<
 *     sz = cnp.PyArray_SIZE(arr)
 * 
 */
  __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_i = ((Py_ssize_t)__pyx_t_4);

  /* "util.pxd":23
 *             loc = casted
 *     i = <Py_ssize_t> loc
 *     sz = cnp.PyArray_SIZE(arr)             # <<<<<<<<<<<<<<
 * 
 *     if i < 0 and sz > 0:
 */
  __pyx_v_sz = PyArray_SIZE(__pyx_v_arr);

  /* "util.pxd":25
 *     sz = cnp.PyArray_SIZE(arr)
 * 
 *     if i < 0 and sz > 0:             # <<<<<<<<<<<<<<
 *         i += sz
 *     elif i >= sz or sz == 0:
 */
  __pyx_t_1 = (__pyx_v_i < 0);
  if (__pyx_t_1) {
    __pyx_t_5 = (__pyx_v_sz > 0);
    __pyx_t_6 = __pyx_t_5;
  } else {
    __pyx_t_6 = __pyx_t_1;
  }
  if (__pyx_t_6) {

    /* "util.pxd":26
 * 
 *     if i < 0 and sz > 0:
 *         i += sz             # <<<<<<<<<<<<<<
 *     elif i >= sz or sz == 0:
 *         raise IndexError('index out of bounds')
 */
    __pyx_v_i = (__pyx_v_i + __pyx_v_sz);
    goto __pyx_L5;
  }

  /* "util.pxd":27
 *     if i < 0 and sz > 0:
 *         i += sz
 *     elif i >= sz or sz == 0:             # <<<<<<<<<<<<<<
 *         raise IndexError('index out of bounds')
 * 
 */
  __pyx_t_6 = (__pyx_v_i >= __pyx_v_sz);
  if (!__pyx_t_6) {
    __pyx_t_1 = (__pyx_v_sz == 0);
    __pyx_t_5 = __pyx_t_1;
  } else {
    __pyx_t_5 = __pyx_t_6;
  }
  if (__pyx_t_5) {

    /* "util.pxd":28
 *         i += sz
 *     elif i >= sz or sz == 0:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     return get_value_1d(arr, i)
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_134), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[14]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "util.pxd":30
 *         raise IndexError('index out of bounds')
 * 
 *     return get_value_1d(arr, i)             # <<<<<<<<<<<<<<
 * 
 * cdef inline set_value_at(ndarray arr, object loc, object value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = get_value_1d(__pyx_v_arr, __pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("util.get_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_casted);
  __Pyx_XDECREF(__pyx_v_loc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "util.pxd":32
 *     return get_value_1d(arr, i)
 * 
 * cdef inline set_value_at(ndarray arr, object loc, object value):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, sz
 */

static CYTHON_INLINE PyObject *__pyx_f_4util_set_value_at(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_loc, PyObject *__pyx_v_value) {
  Py_ssize_t __pyx_v_i;
  Py_ssize_t __pyx_v_sz;
  PyObject *__pyx_v_casted = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_value_at");
  __Pyx_INCREF(__pyx_v_loc);

  /* "util.pxd":35
 *     cdef:
 *         Py_ssize_t i, sz
 *     if is_float_object(loc):             # <<<<<<<<<<<<<<
 *         casted = int(loc)
 *         if casted == loc:
 */
  __pyx_t_1 = is_float_object(__pyx_v_loc);
  if (__pyx_t_1) {

    /* "util.pxd":36
 *         Py_ssize_t i, sz
 *     if is_float_object(loc):
 *         casted = int(loc)             # <<<<<<<<<<<<<<
 *         if casted == loc:
 *             loc = casted
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_loc);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_loc);
    __Pyx_GIVEREF(__pyx_v_loc);
    __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
    __pyx_v_casted = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "util.pxd":37
 *     if is_float_object(loc):
 *         casted = int(loc)
 *         if casted == loc:             # <<<<<<<<<<<<<<
 *             loc = casted
 *     i = <Py_ssize_t> loc
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_casted, __pyx_v_loc, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "util.pxd":38
 *         casted = int(loc)
 *         if casted == loc:
 *             loc = casted             # <<<<<<<<<<<<<<
 *     i = <Py_ssize_t> loc
 *     sz = cnp.PyArray_SIZE(arr)
 */
      __Pyx_INCREF(__pyx_v_casted);
      __Pyx_DECREF(__pyx_v_loc);
      __pyx_v_loc = __pyx_v_casted;
      goto __pyx_L4;
    }
    __pyx_L4:;
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "util.pxd":39
 *         if casted == loc:
 *             loc = casted
 *     i = <Py_ssize_t> loc             # <<<<<<<<<<<<<<
 *     sz = cnp.PyArray_SIZE(arr)
 * 
 */
  __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_i = ((Py_ssize_t)__pyx_t_4);

  /* "util.pxd":40
 *             loc = casted
 *     i = <Py_ssize_t> loc
 *     sz = cnp.PyArray_SIZE(arr)             # <<<<<<<<<<<<<<
 * 
 *     if i < 0:
 */
  __pyx_v_sz = PyArray_SIZE(__pyx_v_arr);

  /* "util.pxd":42
 *     sz = cnp.PyArray_SIZE(arr)
 * 
 *     if i < 0:             # <<<<<<<<<<<<<<
 *         i += sz
 *     elif i >= sz:
 */
  __pyx_t_1 = (__pyx_v_i < 0);
  if (__pyx_t_1) {

    /* "util.pxd":43
 * 
 *     if i < 0:
 *         i += sz             # <<<<<<<<<<<<<<
 *     elif i >= sz:
 *         raise IndexError('index out of bounds')
 */
    __pyx_v_i = (__pyx_v_i + __pyx_v_sz);
    goto __pyx_L5;
  }

  /* "util.pxd":44
 *     if i < 0:
 *         i += sz
 *     elif i >= sz:             # <<<<<<<<<<<<<<
 *         raise IndexError('index out of bounds')
 * 
 */
  __pyx_t_1 = (__pyx_v_i >= __pyx_v_sz);
  if (__pyx_t_1) {

    /* "util.pxd":45
 *         i += sz
 *     elif i >= sz:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     assign_value_1d(arr, i, value)
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_135), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[14]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "util.pxd":47
 *         raise IndexError('index out of bounds')
 * 
 *     assign_value_1d(arr, i, value)             # <<<<<<<<<<<<<<
 * 
 * cdef inline int is_contiguous(ndarray arr):
 */
  __pyx_t_5 = assign_value_1d(__pyx_v_arr, __pyx_v_i, __pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("util.set_value_at", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_casted);
  __Pyx_XDECREF(__pyx_v_loc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "util.pxd":49
 *     assign_value_1d(arr, i, value)
 * 
 * cdef inline int is_contiguous(ndarray arr):             # <<<<<<<<<<<<<<
 *     return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS)
 * 
 */

static CYTHON_INLINE int __pyx_f_4util_is_contiguous(PyArrayObject *__pyx_v_arr) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_contiguous");

  /* "util.pxd":50
 * 
 * cdef inline int is_contiguous(ndarray arr):
 *     return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS)             # <<<<<<<<<<<<<<
 * 
 * cdef inline is_array(object o):
 */
  __pyx_r = PyArray_CHKFLAGS(__pyx_v_arr, NPY_C_CONTIGUOUS);
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "util.pxd":52
 *     return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS)
 * 
 * cdef inline is_array(object o):             # <<<<<<<<<<<<<<
 *     return cnp.PyArray_Check(o)
 */

static CYTHON_INLINE PyObject *__pyx_f_4util_is_array(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_array");

  /* "util.pxd":53
 * 
 * cdef inline is_array(object o):
 *     return cnp.PyArray_Check(o)             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(PyArray_Check(__pyx_v_o)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("util.is_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_6pandas_8_tseries_MultiMap __pyx_vtable_6pandas_8_tseries_MultiMap;

static PyObject *__pyx_tp_new_6pandas_8_tseries_MultiMap(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries_MultiMap *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries_MultiMap *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_8_tseries_MultiMap;
  p->store = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_MultiMap(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_MultiMap *p = (struct __pyx_obj_6pandas_8_tseries_MultiMap *)o;
  Py_XDECREF(((PyObject *)p->store));
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_8_tseries_MultiMap(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_8_tseries_MultiMap *p = (struct __pyx_obj_6pandas_8_tseries_MultiMap *)o;
  if (p->store) {
    e = (*v)(p->store, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_8_tseries_MultiMap(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_MultiMap *p = (struct __pyx_obj_6pandas_8_tseries_MultiMap *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->store);
  p->store = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_MultiMap[] = {
  {__Pyx_NAMESTR("get"), (PyCFunction)__pyx_pw_6pandas_8_tseries_8MultiMap_3get, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_MultiMap = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_MultiMap = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_MultiMap = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_MultiMap = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_MultiMap = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.MultiMap"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_MultiMap), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_MultiMap, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_MultiMap, /*tp_as_number*/
  &__pyx_tp_as_sequence_MultiMap, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_MultiMap, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_MultiMap, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("\n    Need to come up with a better data structure for multi-level indexing\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pandas_8_tseries_MultiMap, /*tp_traverse*/
  __pyx_tp_clear_6pandas_8_tseries_MultiMap, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_MultiMap, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_8MultiMap_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_MultiMap, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_8_tseries_Node(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries_Node *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries_Node *)o);
  p->next = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->width = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_Node(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_Node *p = (struct __pyx_obj_6pandas_8_tseries_Node *)o;
  Py_XDECREF(((PyObject *)p->next));
  Py_XDECREF(((PyObject *)p->width));
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_8_tseries_Node(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_8_tseries_Node *p = (struct __pyx_obj_6pandas_8_tseries_Node *)o;
  if (p->next) {
    e = (*v)(p->next, a); if (e) return e;
  }
  if (p->width) {
    e = (*v)(p->width, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_8_tseries_Node(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_Node *p = (struct __pyx_obj_6pandas_8_tseries_Node *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->next);
  p->next = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->width);
  p->width = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pandas_8_tseries_4Node_value(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_4Node_5value_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_4Node_value(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_4Node_5value_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_4Node_next(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_4Node_4next_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_4Node_next(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_4Node_4next_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_8_tseries_4Node_4next_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_4Node_width(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_4Node_5width_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_4Node_width(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_4Node_5width_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_8_tseries_4Node_5width_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_Node[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_8_tseries_Node[] = {
  {(char *)"value", __pyx_getprop_6pandas_8_tseries_4Node_value, __pyx_setprop_6pandas_8_tseries_4Node_value, 0, 0},
  {(char *)"next", __pyx_getprop_6pandas_8_tseries_4Node_next, __pyx_setprop_6pandas_8_tseries_4Node_next, 0, 0},
  {(char *)"width", __pyx_getprop_6pandas_8_tseries_4Node_width, __pyx_setprop_6pandas_8_tseries_4Node_width, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Node = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Node = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Node = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Node = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_Node = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.Node"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_Node), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_Node, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Node, /*tp_as_number*/
  &__pyx_tp_as_sequence_Node, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Node, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Node, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_8_tseries_Node, /*tp_traverse*/
  __pyx_tp_clear_6pandas_8_tseries_Node, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_Node, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_8_tseries_Node, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_4Node_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_Node, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_8_tseries_IndexableSkiplist __pyx_vtable_6pandas_8_tseries_IndexableSkiplist;

static PyObject *__pyx_tp_new_6pandas_8_tseries_IndexableSkiplist(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_8_tseries_IndexableSkiplist;
  p->head = ((struct __pyx_obj_6pandas_8_tseries_Node *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_IndexableSkiplist(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *p = (struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)o;
  Py_XDECREF(((PyObject *)p->head));
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_8_tseries_IndexableSkiplist(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *p = (struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)o;
  if (p->head) {
    e = (*v)(((PyObject*)p->head), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_8_tseries_IndexableSkiplist(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *p = (struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->head);
  p->head = ((struct __pyx_obj_6pandas_8_tseries_Node *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_6pandas_8_tseries_IndexableSkiplist(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_IndexableSkiplist[] = {
  {__Pyx_NAMESTR("get"), (PyCFunction)__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_7get, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("insert"), (PyCFunction)__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_9insert, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("remove"), (PyCFunction)__pyx_pw_6pandas_8_tseries_17IndexableSkiplist_11remove, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_IndexableSkiplist = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_IndexableSkiplist = {
  __pyx_pw_6pandas_8_tseries_17IndexableSkiplist_3__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_6pandas_8_tseries_IndexableSkiplist, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_IndexableSkiplist = {
  __pyx_pw_6pandas_8_tseries_17IndexableSkiplist_3__len__, /*mp_length*/
  __pyx_pw_6pandas_8_tseries_17IndexableSkiplist_5__getitem__, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_IndexableSkiplist = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_IndexableSkiplist = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.IndexableSkiplist"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_IndexableSkiplist, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_IndexableSkiplist, /*tp_as_number*/
  &__pyx_tp_as_sequence_IndexableSkiplist, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_IndexableSkiplist, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_IndexableSkiplist, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("\n    Sorted collection supporting O(lg n) insertion, removal, and\n    lookup by rank.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pandas_8_tseries_IndexableSkiplist, /*tp_traverse*/
  __pyx_tp_clear_6pandas_8_tseries_IndexableSkiplist, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_IndexableSkiplist, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_17IndexableSkiplist_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_IndexableSkiplist, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_8_tseries_Reducer(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries_Reducer *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries_Reducer *)o);
  p->arr = Py_None; Py_INCREF(Py_None);
  p->dummy = Py_None; Py_INCREF(Py_None);
  p->f = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_Reducer(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_Reducer *p = (struct __pyx_obj_6pandas_8_tseries_Reducer *)o;
  Py_XDECREF(p->arr);
  Py_XDECREF(p->dummy);
  Py_XDECREF(p->f);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_8_tseries_Reducer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_8_tseries_Reducer *p = (struct __pyx_obj_6pandas_8_tseries_Reducer *)o;
  if (p->arr) {
    e = (*v)(p->arr, a); if (e) return e;
  }
  if (p->dummy) {
    e = (*v)(p->dummy, a); if (e) return e;
  }
  if (p->f) {
    e = (*v)(p->f, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_8_tseries_Reducer(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_Reducer *p = (struct __pyx_obj_6pandas_8_tseries_Reducer *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->arr);
  p->arr = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dummy);
  p->dummy = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->f);
  p->f = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_Reducer[] = {
  {__Pyx_NAMESTR("_check_dummy"), (PyCFunction)__pyx_pw_6pandas_8_tseries_7Reducer_3_check_dummy, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_result"), (PyCFunction)__pyx_pw_6pandas_8_tseries_7Reducer_5get_result, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_get_result_array"), (PyCFunction)__pyx_pw_6pandas_8_tseries_7Reducer_7_get_result_array, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Reducer = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Reducer = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Reducer = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Reducer = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_Reducer = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.Reducer"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_Reducer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_Reducer, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Reducer, /*tp_as_number*/
  &__pyx_tp_as_sequence_Reducer, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Reducer, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Reducer, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("\n    Performs generic reduction operation on a C or Fortran-contiguous ndarray\n    while avoiding ndarray construction overhead\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pandas_8_tseries_Reducer, /*tp_traverse*/
  __pyx_tp_clear_6pandas_8_tseries_Reducer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_Reducer, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_7Reducer_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_Reducer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_8_tseries_SeriesGrouper(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)o);
  p->arr = Py_None; Py_INCREF(Py_None);
  p->index = Py_None; Py_INCREF(Py_None);
  p->dummy = Py_None; Py_INCREF(Py_None);
  p->f = Py_None; Py_INCREF(Py_None);
  p->labels = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_SeriesGrouper(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *p = (struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)o;
  Py_XDECREF(p->arr);
  Py_XDECREF(p->index);
  Py_XDECREF(p->dummy);
  Py_XDECREF(p->f);
  Py_XDECREF(p->labels);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_8_tseries_SeriesGrouper(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *p = (struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)o;
  if (p->arr) {
    e = (*v)(p->arr, a); if (e) return e;
  }
  if (p->index) {
    e = (*v)(p->index, a); if (e) return e;
  }
  if (p->dummy) {
    e = (*v)(p->dummy, a); if (e) return e;
  }
  if (p->f) {
    e = (*v)(p->f, a); if (e) return e;
  }
  if (p->labels) {
    e = (*v)(p->labels, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_8_tseries_SeriesGrouper(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *p = (struct __pyx_obj_6pandas_8_tseries_SeriesGrouper *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->arr);
  p->arr = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->index);
  p->index = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dummy);
  p->dummy = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->f);
  p->f = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->labels);
  p->labels = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pandas_8_tseries_13SeriesGrouper_arr(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_13SeriesGrouper_3arr_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_13SeriesGrouper_arr(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_13SeriesGrouper_3arr_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_8_tseries_13SeriesGrouper_3arr_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_13SeriesGrouper_index(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_13SeriesGrouper_5index_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_13SeriesGrouper_index(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_13SeriesGrouper_5index_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_8_tseries_13SeriesGrouper_5index_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_13SeriesGrouper_dummy(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_13SeriesGrouper_5dummy_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_13SeriesGrouper_dummy(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_13SeriesGrouper_5dummy_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_8_tseries_13SeriesGrouper_5dummy_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_13SeriesGrouper_f(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_13SeriesGrouper_1f_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_13SeriesGrouper_f(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_13SeriesGrouper_1f_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_8_tseries_13SeriesGrouper_1f_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_13SeriesGrouper_labels(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_13SeriesGrouper_6labels_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_13SeriesGrouper_labels(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_13SeriesGrouper_6labels_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_8_tseries_13SeriesGrouper_6labels_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_SeriesGrouper[] = {
  {__Pyx_NAMESTR("_check_dummy"), (PyCFunction)__pyx_pw_6pandas_8_tseries_13SeriesGrouper_3_check_dummy, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_result"), (PyCFunction)__pyx_pw_6pandas_8_tseries_13SeriesGrouper_5get_result, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("_get_result_array"), (PyCFunction)__pyx_pw_6pandas_8_tseries_13SeriesGrouper_7_get_result_array, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_8_tseries_SeriesGrouper[] = {
  {(char *)"arr", __pyx_getprop_6pandas_8_tseries_13SeriesGrouper_arr, __pyx_setprop_6pandas_8_tseries_13SeriesGrouper_arr, 0, 0},
  {(char *)"index", __pyx_getprop_6pandas_8_tseries_13SeriesGrouper_index, __pyx_setprop_6pandas_8_tseries_13SeriesGrouper_index, 0, 0},
  {(char *)"dummy", __pyx_getprop_6pandas_8_tseries_13SeriesGrouper_dummy, __pyx_setprop_6pandas_8_tseries_13SeriesGrouper_dummy, 0, 0},
  {(char *)"f", __pyx_getprop_6pandas_8_tseries_13SeriesGrouper_f, __pyx_setprop_6pandas_8_tseries_13SeriesGrouper_f, 0, 0},
  {(char *)"labels", __pyx_getprop_6pandas_8_tseries_13SeriesGrouper_labels, __pyx_setprop_6pandas_8_tseries_13SeriesGrouper_labels, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_SeriesGrouper = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_SeriesGrouper = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_SeriesGrouper = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_SeriesGrouper = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_SeriesGrouper = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.SeriesGrouper"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_SeriesGrouper), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_SeriesGrouper, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_SeriesGrouper, /*tp_as_number*/
  &__pyx_tp_as_sequence_SeriesGrouper, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_SeriesGrouper, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_SeriesGrouper, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("\n    Performs generic grouping operation while avoiding ndarray construction\n    overhead\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pandas_8_tseries_SeriesGrouper, /*tp_traverse*/
  __pyx_tp_clear_6pandas_8_tseries_SeriesGrouper, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_SeriesGrouper, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_8_tseries_SeriesGrouper, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_13SeriesGrouper_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_SeriesGrouper, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_8_tseries_Slider __pyx_vtable_6pandas_8_tseries_Slider;

static PyObject *__pyx_tp_new_6pandas_8_tseries_Slider(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries_Slider *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries_Slider *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_8_tseries_Slider;
  p->values = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  p->buf = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_Slider(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_Slider *p = (struct __pyx_obj_6pandas_8_tseries_Slider *)o;
  Py_XDECREF(((PyObject *)p->values));
  Py_XDECREF(((PyObject *)p->buf));
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_8_tseries_Slider(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_8_tseries_Slider *p = (struct __pyx_obj_6pandas_8_tseries_Slider *)o;
  if (p->values) {
    e = (*v)(((PyObject*)p->values), a); if (e) return e;
  }
  if (p->buf) {
    e = (*v)(((PyObject*)p->buf), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_8_tseries_Slider(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_Slider *p = (struct __pyx_obj_6pandas_8_tseries_Slider *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->values);
  p->values = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->buf);
  p->buf = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_Slider[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Slider = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Slider = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Slider = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Slider = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_Slider = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.Slider"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_Slider), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_Slider, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Slider, /*tp_as_number*/
  &__pyx_tp_as_sequence_Slider, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Slider, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Slider, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  __Pyx_DOCSTR("\n    Only handles contiguous data for now\n    "), /*tp_doc*/
  __pyx_tp_traverse_6pandas_8_tseries_Slider, /*tp_traverse*/
  __pyx_tp_clear_6pandas_8_tseries_Slider, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_Slider, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_6Slider_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_Slider, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_8_tseries_cache_readonly(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries_cache_readonly *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries_cache_readonly *)o);
  p->fget = Py_None; Py_INCREF(Py_None);
  p->name = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_cache_readonly(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_cache_readonly *p = (struct __pyx_obj_6pandas_8_tseries_cache_readonly *)o;
  Py_XDECREF(p->fget);
  Py_XDECREF(p->name);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_8_tseries_cache_readonly(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_8_tseries_cache_readonly *p = (struct __pyx_obj_6pandas_8_tseries_cache_readonly *)o;
  if (p->fget) {
    e = (*v)(p->fget, a); if (e) return e;
  }
  if (p->name) {
    e = (*v)(p->name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_8_tseries_cache_readonly(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_cache_readonly *p = (struct __pyx_obj_6pandas_8_tseries_cache_readonly *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->fget);
  p->fget = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->name);
  p->name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_tp_descr_get_6pandas_8_tseries_cache_readonly(PyObject *o, PyObject *i, PyObject *c) {
  PyObject *r = 0;
  if (!i) i = Py_None;
  if (!c) c = Py_None;
  r = __pyx_pw_6pandas_8_tseries_14cache_readonly_3__get__(o, i, c);
  return r;
}

static PyObject *__pyx_getprop_6pandas_8_tseries_14cache_readonly_fget(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_14cache_readonly_4fget_1__get__(o);
}

static PyObject *__pyx_getprop_6pandas_8_tseries_14cache_readonly_name(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_14cache_readonly_4name_1__get__(o);
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_cache_readonly[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_8_tseries_cache_readonly[] = {
  {(char *)"fget", __pyx_getprop_6pandas_8_tseries_14cache_readonly_fget, 0, 0, 0},
  {(char *)"name", __pyx_getprop_6pandas_8_tseries_14cache_readonly_name, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_cache_readonly = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_cache_readonly = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_cache_readonly = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_cache_readonly = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_cache_readonly = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.cache_readonly"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_cache_readonly), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_cache_readonly, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_cache_readonly, /*tp_as_number*/
  &__pyx_tp_as_sequence_cache_readonly, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_cache_readonly, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_cache_readonly, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_8_tseries_cache_readonly, /*tp_traverse*/
  __pyx_tp_clear_6pandas_8_tseries_cache_readonly, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_cache_readonly, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_8_tseries_cache_readonly, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  __pyx_tp_descr_get_6pandas_8_tseries_cache_readonly, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_14cache_readonly_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_cache_readonly, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_8_tseries_AxisProperty(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_AxisProperty(PyObject *o) {
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_tp_descr_get_6pandas_8_tseries_AxisProperty(PyObject *o, PyObject *i, PyObject *c) {
  PyObject *r = 0;
  if (!i) i = Py_None;
  if (!c) c = Py_None;
  r = __pyx_pw_6pandas_8_tseries_12AxisProperty_3__get__(o, i, c);
  return r;
}

static int __pyx_tp_descr_set_6pandas_8_tseries_AxisProperty(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_12AxisProperty_5__set__(o, i, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__delete__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_AxisProperty[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_AxisProperty = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_AxisProperty = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_AxisProperty = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_AxisProperty = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_AxisProperty = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.AxisProperty"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_AxisProperty), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_AxisProperty, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_AxisProperty, /*tp_as_number*/
  &__pyx_tp_as_sequence_AxisProperty, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_AxisProperty, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_AxisProperty, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_AxisProperty, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  __pyx_tp_descr_get_6pandas_8_tseries_AxisProperty, /*tp_descr_get*/
  __pyx_tp_descr_set_6pandas_8_tseries_AxisProperty, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_12AxisProperty_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_AxisProperty, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_8_tseries_SeriesIndex(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries_SeriesIndex *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries_SeriesIndex *)o);
  p->_check_type = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_SeriesIndex(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_SeriesIndex *p = (struct __pyx_obj_6pandas_8_tseries_SeriesIndex *)o;
  Py_XDECREF(p->_check_type);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_8_tseries_SeriesIndex(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_8_tseries_SeriesIndex *p = (struct __pyx_obj_6pandas_8_tseries_SeriesIndex *)o;
  if (p->_check_type) {
    e = (*v)(p->_check_type, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_8_tseries_SeriesIndex(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_SeriesIndex *p = (struct __pyx_obj_6pandas_8_tseries_SeriesIndex *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->_check_type);
  p->_check_type = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_tp_descr_get_6pandas_8_tseries_SeriesIndex(PyObject *o, PyObject *i, PyObject *c) {
  PyObject *r = 0;
  if (!i) i = Py_None;
  if (!c) c = Py_None;
  r = __pyx_pw_6pandas_8_tseries_11SeriesIndex_3__get__(o, i, c);
  return r;
}

static int __pyx_tp_descr_set_6pandas_8_tseries_SeriesIndex(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_11SeriesIndex_5__set__(o, i, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__delete__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_SeriesIndex[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_SeriesIndex = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_SeriesIndex = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_SeriesIndex = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_SeriesIndex = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_SeriesIndex = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.SeriesIndex"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_SeriesIndex), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_SeriesIndex, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_SeriesIndex, /*tp_as_number*/
  &__pyx_tp_as_sequence_SeriesIndex, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_SeriesIndex, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_SeriesIndex, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_8_tseries_SeriesIndex, /*tp_traverse*/
  __pyx_tp_clear_6pandas_8_tseries_SeriesIndex, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_SeriesIndex, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  __pyx_tp_descr_get_6pandas_8_tseries_SeriesIndex, /*tp_descr_get*/
  __pyx_tp_descr_set_6pandas_8_tseries_SeriesIndex, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_11SeriesIndex_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_SeriesIndex, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_8_tseries_ValuesProperty(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_ValuesProperty(PyObject *o) {
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_tp_descr_get_6pandas_8_tseries_ValuesProperty(PyObject *o, PyObject *i, PyObject *c) {
  PyObject *r = 0;
  if (!i) i = Py_None;
  if (!c) c = Py_None;
  r = __pyx_pw_6pandas_8_tseries_14ValuesProperty_1__get__(o, i, c);
  return r;
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_ValuesProperty[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_ValuesProperty = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_ValuesProperty = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_ValuesProperty = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_ValuesProperty = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_ValuesProperty = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.ValuesProperty"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_ValuesProperty), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_ValuesProperty, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_ValuesProperty, /*tp_as_number*/
  &__pyx_tp_as_sequence_ValuesProperty, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_ValuesProperty, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_ValuesProperty, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_ValuesProperty, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  __pyx_tp_descr_get_6pandas_8_tseries_ValuesProperty, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_ValuesProperty, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_8_tseries_StringHashTable __pyx_vtable_6pandas_8_tseries_StringHashTable;

static PyObject *__pyx_tp_new_6pandas_8_tseries_StringHashTable(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries_StringHashTable *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries_StringHashTable *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_8_tseries_StringHashTable;
  if (__pyx_pw_6pandas_8_tseries_15StringHashTable_3__cinit__(o, __pyx_empty_tuple, NULL) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_StringHashTable(PyObject *o) {
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_6pandas_8_tseries_15StringHashTable_5__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_StringHashTable[] = {
  {__Pyx_NAMESTR("get_item"), (PyCFunction)__pyx_pw_6pandas_8_tseries_15StringHashTable_7get_item, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_iter_test"), (PyCFunction)__pyx_pw_6pandas_8_tseries_15StringHashTable_9get_iter_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("set_item"), (PyCFunction)__pyx_pw_6pandas_8_tseries_15StringHashTable_11set_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_indexer"), (PyCFunction)__pyx_pw_6pandas_8_tseries_15StringHashTable_13get_indexer, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pw_6pandas_8_tseries_15StringHashTable_15unique, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_8_tseries_15StringHashTable_17factorize, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_StringHashTable = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_StringHashTable = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_StringHashTable = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_StringHashTable = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_StringHashTable = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.StringHashTable"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_StringHashTable), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_StringHashTable, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_StringHashTable, /*tp_as_number*/
  &__pyx_tp_as_sequence_StringHashTable, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_StringHashTable, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_StringHashTable, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_StringHashTable, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_15StringHashTable_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_StringHashTable, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_8_tseries_Int32HashTable __pyx_vtable_6pandas_8_tseries_Int32HashTable;

static PyObject *__pyx_tp_new_6pandas_8_tseries_Int32HashTable(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries_Int32HashTable *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries_Int32HashTable *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_8_tseries_Int32HashTable;
  if (__pyx_pw_6pandas_8_tseries_14Int32HashTable_3__cinit__(o, __pyx_empty_tuple, NULL) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_Int32HashTable(PyObject *o) {
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_6pandas_8_tseries_14Int32HashTable_5__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_Int32HashTable[] = {
  {__Pyx_NAMESTR("get_item"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int32HashTable_7get_item, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_iter_test"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int32HashTable_9get_iter_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("set_item"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int32HashTable_11set_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("map_locations"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int32HashTable_13map_locations, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int32HashTable_15lookup, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int32HashTable_17factorize, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Int32HashTable = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Int32HashTable = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Int32HashTable = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Int32HashTable = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_Int32HashTable = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.Int32HashTable"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_Int32HashTable), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_Int32HashTable, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Int32HashTable, /*tp_as_number*/
  &__pyx_tp_as_sequence_Int32HashTable, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Int32HashTable, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Int32HashTable, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_Int32HashTable, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_14Int32HashTable_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_Int32HashTable, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_8_tseries_Int64HashTable __pyx_vtable_6pandas_8_tseries_Int64HashTable;

static PyObject *__pyx_tp_new_6pandas_8_tseries_Int64HashTable(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries_Int64HashTable *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_8_tseries_Int64HashTable;
  if (__pyx_pw_6pandas_8_tseries_14Int64HashTable_3__cinit__(o, __pyx_empty_tuple, NULL) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_Int64HashTable(PyObject *o) {
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_6pandas_8_tseries_14Int64HashTable_5__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_Int64HashTable[] = {
  {__Pyx_NAMESTR("get_item"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int64HashTable_7get_item, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_iter_test"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int64HashTable_9get_iter_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("set_item"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int64HashTable_11set_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("map"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int64HashTable_13map, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("map_locations"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int64HashTable_15map_locations, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int64HashTable_17lookup, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("lookup_i4"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int64HashTable_19lookup_i4, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int64HashTable_21factorize, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_labels"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int64HashTable_23get_labels, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_labels_groupby"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int64HashTable_25get_labels_groupby, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14Int64HashTable_27unique, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Int64HashTable = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Int64HashTable = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Int64HashTable = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Int64HashTable = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_Int64HashTable = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.Int64HashTable"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_Int64HashTable), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_Int64HashTable, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Int64HashTable, /*tp_as_number*/
  &__pyx_tp_as_sequence_Int64HashTable, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Int64HashTable, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Int64HashTable, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_Int64HashTable, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_14Int64HashTable_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_Int64HashTable, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_8_tseries_Float64HashTable __pyx_vtable_6pandas_8_tseries_Float64HashTable;

static PyObject *__pyx_tp_new_6pandas_8_tseries_Float64HashTable(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries_Float64HashTable *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries_Float64HashTable *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_8_tseries_Float64HashTable;
  if (__pyx_pw_6pandas_8_tseries_16Float64HashTable_3__cinit__(o, __pyx_empty_tuple, NULL) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_Float64HashTable(PyObject *o) {
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_6pandas_8_tseries_16Float64HashTable_5__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_Float64HashTable[] = {
  {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_8_tseries_16Float64HashTable_7factorize, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_labels"), (PyCFunction)__pyx_pw_6pandas_8_tseries_16Float64HashTable_9get_labels, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("map_locations"), (PyCFunction)__pyx_pw_6pandas_8_tseries_16Float64HashTable_11map_locations, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_6pandas_8_tseries_16Float64HashTable_13lookup, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pw_6pandas_8_tseries_16Float64HashTable_15unique, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Float64HashTable = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Float64HashTable = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Float64HashTable = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Float64HashTable = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_Float64HashTable = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.Float64HashTable"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_Float64HashTable), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_Float64HashTable, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Float64HashTable, /*tp_as_number*/
  &__pyx_tp_as_sequence_Float64HashTable, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Float64HashTable, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Float64HashTable, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_Float64HashTable, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_16Float64HashTable_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_Float64HashTable, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_6pandas_8_tseries_PyObjectHashTable __pyx_vtable_6pandas_8_tseries_PyObjectHashTable;

static PyObject *__pyx_tp_new_6pandas_8_tseries_PyObjectHashTable(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)o);
  p->__pyx_vtab = __pyx_vtabptr_6pandas_8_tseries_PyObjectHashTable;
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_PyObjectHashTable(PyObject *o) {
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_6pandas_8_tseries_17PyObjectHashTable_3__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_PyObjectHashTable[] = {
  {__Pyx_NAMESTR("destroy"), (PyCFunction)__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_5destroy, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_item"), (PyCFunction)__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_7get_item, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_iter_test"), (PyCFunction)__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_9get_iter_test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("set_item"), (PyCFunction)__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_11set_item, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("map_locations"), (PyCFunction)__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_13map_locations, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_15lookup, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("lookup2"), (PyCFunction)__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_17lookup2, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_19unique, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_labels"), (PyCFunction)__pyx_pw_6pandas_8_tseries_17PyObjectHashTable_21get_labels, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_PyObjectHashTable = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_PyObjectHashTable = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_PyObjectHashTable = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_PyObjectHashTable = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_PyObjectHashTable = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.PyObjectHashTable"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_PyObjectHashTable, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_PyObjectHashTable, /*tp_as_number*/
  &__pyx_tp_as_sequence_PyObjectHashTable, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_PyObjectHashTable, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_PyObjectHashTable, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_PyObjectHashTable, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_17PyObjectHashTable_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_PyObjectHashTable, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_8_tseries_Factorizer(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries_Factorizer *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries_Factorizer *)o);
  p->table = ((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)Py_None); Py_INCREF(Py_None);
  p->uniques = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_Factorizer(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_Factorizer *p = (struct __pyx_obj_6pandas_8_tseries_Factorizer *)o;
  Py_XDECREF(((PyObject *)p->table));
  Py_XDECREF(((PyObject *)p->uniques));
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_8_tseries_Factorizer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_8_tseries_Factorizer *p = (struct __pyx_obj_6pandas_8_tseries_Factorizer *)o;
  if (p->table) {
    e = (*v)(((PyObject*)p->table), a); if (e) return e;
  }
  if (p->uniques) {
    e = (*v)(p->uniques, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_8_tseries_Factorizer(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_Factorizer *p = (struct __pyx_obj_6pandas_8_tseries_Factorizer *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->table);
  p->table = ((struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->uniques);
  p->uniques = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pandas_8_tseries_10Factorizer_table(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_10Factorizer_5table_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_10Factorizer_table(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_10Factorizer_5table_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_8_tseries_10Factorizer_5table_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_10Factorizer_uniques(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_10Factorizer_7uniques_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_10Factorizer_uniques(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_10Factorizer_7uniques_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_8_tseries_10Factorizer_7uniques_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_10Factorizer_count(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_10Factorizer_5count_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_10Factorizer_count(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_10Factorizer_5count_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_Factorizer[] = {
  {__Pyx_NAMESTR("get_count"), (PyCFunction)__pyx_pw_6pandas_8_tseries_10Factorizer_3get_count, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_8_tseries_10Factorizer_5factorize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pw_6pandas_8_tseries_10Factorizer_7unique, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_8_tseries_Factorizer[] = {
  {(char *)"table", __pyx_getprop_6pandas_8_tseries_10Factorizer_table, __pyx_setprop_6pandas_8_tseries_10Factorizer_table, 0, 0},
  {(char *)"uniques", __pyx_getprop_6pandas_8_tseries_10Factorizer_uniques, __pyx_setprop_6pandas_8_tseries_10Factorizer_uniques, 0, 0},
  {(char *)"count", __pyx_getprop_6pandas_8_tseries_10Factorizer_count, __pyx_setprop_6pandas_8_tseries_10Factorizer_count, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Factorizer = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Factorizer = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Factorizer = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Factorizer = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_Factorizer = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.Factorizer"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_Factorizer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_Factorizer, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Factorizer, /*tp_as_number*/
  &__pyx_tp_as_sequence_Factorizer, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Factorizer, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Factorizer, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_8_tseries_Factorizer, /*tp_traverse*/
  __pyx_tp_clear_6pandas_8_tseries_Factorizer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_Factorizer, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_8_tseries_Factorizer, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_10Factorizer_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_Factorizer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_8_tseries_Int64Factorizer(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)o);
  p->table = ((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)Py_None); Py_INCREF(Py_None);
  p->uniques = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_Int64Factorizer(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *p = (struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)o;
  Py_XDECREF(((PyObject *)p->table));
  Py_XDECREF(((PyObject *)p->uniques));
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_8_tseries_Int64Factorizer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *p = (struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)o;
  if (p->table) {
    e = (*v)(((PyObject*)p->table), a); if (e) return e;
  }
  if (p->uniques) {
    e = (*v)(p->uniques, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_8_tseries_Int64Factorizer(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *p = (struct __pyx_obj_6pandas_8_tseries_Int64Factorizer *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->table);
  p->table = ((struct __pyx_obj_6pandas_8_tseries_Int64HashTable *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->uniques);
  p->uniques = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pandas_8_tseries_15Int64Factorizer_table(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_15Int64Factorizer_5table_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_15Int64Factorizer_table(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_15Int64Factorizer_5table_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_8_tseries_15Int64Factorizer_5table_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_15Int64Factorizer_uniques(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_15Int64Factorizer_7uniques_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_15Int64Factorizer_uniques(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_15Int64Factorizer_7uniques_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_8_tseries_15Int64Factorizer_7uniques_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_15Int64Factorizer_count(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_15Int64Factorizer_5count_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_15Int64Factorizer_count(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_15Int64Factorizer_5count_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_Int64Factorizer[] = {
  {__Pyx_NAMESTR("get_count"), (PyCFunction)__pyx_pw_6pandas_8_tseries_15Int64Factorizer_3get_count, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_8_tseries_15Int64Factorizer_5factorize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_8_tseries_Int64Factorizer[] = {
  {(char *)"table", __pyx_getprop_6pandas_8_tseries_15Int64Factorizer_table, __pyx_setprop_6pandas_8_tseries_15Int64Factorizer_table, 0, 0},
  {(char *)"uniques", __pyx_getprop_6pandas_8_tseries_15Int64Factorizer_uniques, __pyx_setprop_6pandas_8_tseries_15Int64Factorizer_uniques, 0, 0},
  {(char *)"count", __pyx_getprop_6pandas_8_tseries_15Int64Factorizer_count, __pyx_setprop_6pandas_8_tseries_15Int64Factorizer_count, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Int64Factorizer = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Int64Factorizer = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Int64Factorizer = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Int64Factorizer = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_Int64Factorizer = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.Int64Factorizer"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_Int64Factorizer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_Int64Factorizer, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_Int64Factorizer, /*tp_as_number*/
  &__pyx_tp_as_sequence_Int64Factorizer, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Int64Factorizer, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Int64Factorizer, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_8_tseries_Int64Factorizer, /*tp_traverse*/
  __pyx_tp_clear_6pandas_8_tseries_Int64Factorizer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_Int64Factorizer, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_8_tseries_Int64Factorizer, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_15Int64Factorizer_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_Int64Factorizer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_8_tseries_DictFactorizer(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries_DictFactorizer *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)o);
  p->table = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->uniques = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries_DictFactorizer(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_DictFactorizer *p = (struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)o;
  Py_XDECREF(((PyObject *)p->table));
  Py_XDECREF(((PyObject *)p->uniques));
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_8_tseries_DictFactorizer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_8_tseries_DictFactorizer *p = (struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)o;
  if (p->table) {
    e = (*v)(p->table, a); if (e) return e;
  }
  if (p->uniques) {
    e = (*v)(p->uniques, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_8_tseries_DictFactorizer(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries_DictFactorizer *p = (struct __pyx_obj_6pandas_8_tseries_DictFactorizer *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->table);
  p->table = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->uniques);
  p->uniques = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6pandas_8_tseries_14DictFactorizer_table(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_14DictFactorizer_5table_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_14DictFactorizer_table(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_14DictFactorizer_5table_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_8_tseries_14DictFactorizer_5table_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_14DictFactorizer_uniques(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_14DictFactorizer_7uniques_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_14DictFactorizer_uniques(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_14DictFactorizer_7uniques_3__set__(o, v);
  }
  else {
    return __pyx_pw_6pandas_8_tseries_14DictFactorizer_7uniques_5__del__(o);
  }
}

static PyObject *__pyx_getprop_6pandas_8_tseries_14DictFactorizer_count(PyObject *o, void *x) {
  return __pyx_pw_6pandas_8_tseries_14DictFactorizer_5count_1__get__(o);
}

static int __pyx_setprop_6pandas_8_tseries_14DictFactorizer_count(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pw_6pandas_8_tseries_14DictFactorizer_5count_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_6pandas_8_tseries_DictFactorizer[] = {
  {__Pyx_NAMESTR("get_count"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14DictFactorizer_3get_count, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_labels"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14DictFactorizer_5get_labels, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("factorize"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14DictFactorizer_7factorize, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("unique"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14DictFactorizer_9unique, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("unique_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_14DictFactorizer_11unique_int64, METH_O, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6pandas_8_tseries_DictFactorizer[] = {
  {(char *)"table", __pyx_getprop_6pandas_8_tseries_14DictFactorizer_table, __pyx_setprop_6pandas_8_tseries_14DictFactorizer_table, 0, 0},
  {(char *)"uniques", __pyx_getprop_6pandas_8_tseries_14DictFactorizer_uniques, __pyx_setprop_6pandas_8_tseries_14DictFactorizer_uniques, 0, 0},
  {(char *)"count", __pyx_getprop_6pandas_8_tseries_14DictFactorizer_count, __pyx_setprop_6pandas_8_tseries_14DictFactorizer_count, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_DictFactorizer = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_DictFactorizer = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_DictFactorizer = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_DictFactorizer = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries_DictFactorizer = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.DictFactorizer"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries_DictFactorizer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries_DictFactorizer, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_DictFactorizer, /*tp_as_number*/
  &__pyx_tp_as_sequence_DictFactorizer, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_DictFactorizer, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_DictFactorizer, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_8_tseries_DictFactorizer, /*tp_traverse*/
  __pyx_tp_clear_6pandas_8_tseries_DictFactorizer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries_DictFactorizer, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6pandas_8_tseries_DictFactorizer, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6pandas_8_tseries_14DictFactorizer_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries_DictFactorizer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_6pandas_8_tseries___pyx_scope_struct__try_parse_dates(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates *)o);
  p->__pyx_v_datetime = 0;
  return o;
}

static void __pyx_tp_dealloc_6pandas_8_tseries___pyx_scope_struct__try_parse_dates(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates *p = (struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates *)o;
  Py_XDECREF(p->__pyx_v_datetime);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_6pandas_8_tseries___pyx_scope_struct__try_parse_dates(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates *p = (struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates *)o;
  if (p->__pyx_v_datetime) {
    e = (*v)(p->__pyx_v_datetime, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6pandas_8_tseries___pyx_scope_struct__try_parse_dates(PyObject *o) {
  struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates *p = (struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->__pyx_v_datetime);
  p->__pyx_v_datetime = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_6pandas_8_tseries___pyx_scope_struct__try_parse_dates[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct__try_parse_dates = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct__try_parse_dates = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct__try_parse_dates = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct__try_parse_dates = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_6pandas_8_tseries___pyx_scope_struct__try_parse_dates = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("pandas._tseries.__pyx_scope_struct__try_parse_dates"), /*tp_name*/
  sizeof(struct __pyx_obj_6pandas_8_tseries___pyx_scope_struct__try_parse_dates), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6pandas_8_tseries___pyx_scope_struct__try_parse_dates, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number___pyx_scope_struct__try_parse_dates, /*tp_as_number*/
  &__pyx_tp_as_sequence___pyx_scope_struct__try_parse_dates, /*tp_as_sequence*/
  &__pyx_tp_as_mapping___pyx_scope_struct__try_parse_dates, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer___pyx_scope_struct__try_parse_dates, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6pandas_8_tseries___pyx_scope_struct__try_parse_dates, /*tp_traverse*/
  __pyx_tp_clear_6pandas_8_tseries___pyx_scope_struct__try_parse_dates, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6pandas_8_tseries___pyx_scope_struct__try_parse_dates, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6pandas_8_tseries___pyx_scope_struct__try_parse_dates, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {__Pyx_NAMESTR("map_indices_list"), (PyCFunction)__pyx_pw_6pandas_8_tseries_1map_indices_list, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_map_indices_list)},
  {__Pyx_NAMESTR("to_datetime"), (PyCFunction)__pyx_pw_6pandas_8_tseries_5to_datetime, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("to_timestamp"), (PyCFunction)__pyx_pw_6pandas_8_tseries_7to_timestamp, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("checknull"), (PyCFunction)__pyx_pw_6pandas_8_tseries_13checknull, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("groupby_indices_naive"), (PyCFunction)__pyx_pw_6pandas_8_tseries_53groupby_indices_naive, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("map_indices_float64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_137map_indices_float64, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_136map_indices_float64)},
  {__Pyx_NAMESTR("map_indices_object"), (PyCFunction)__pyx_pw_6pandas_8_tseries_139map_indices_object, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_138map_indices_object)},
  {__Pyx_NAMESTR("map_indices_int32"), (PyCFunction)__pyx_pw_6pandas_8_tseries_141map_indices_int32, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_140map_indices_int32)},
  {__Pyx_NAMESTR("map_indices_int64"), (PyCFunction)__pyx_pw_6pandas_8_tseries_143map_indices_int64, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_142map_indices_int64)},
  {__Pyx_NAMESTR("map_indices_bool"), (PyCFunction)__pyx_pw_6pandas_8_tseries_145map_indices_bool, METH_O, __Pyx_DOCSTR(__pyx_doc_6pandas_8_tseries_144map_indices_bool)},
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    __Pyx_NAMESTR("_tseries"),
    0, /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
  {&__pyx_n_s_101, __pyx_k_101, sizeof(__pyx_k_101), 0, 0, 1, 1},
  {&__pyx_kp_s_102, __pyx_k_102, sizeof(__pyx_k_102), 0, 0, 1, 0},
  {&__pyx_n_s_104, __pyx_k_104, sizeof(__pyx_k_104), 0, 0, 1, 1},
  {&__pyx_kp_s_106, __pyx_k_106, sizeof(__pyx_k_106), 0, 0, 1, 0},
  {&__pyx_kp_s_107, __pyx_k_107, sizeof(__pyx_k_107), 0, 0, 1, 0},
  {&__pyx_kp_s_108, __pyx_k_108, sizeof(__pyx_k_108), 0, 0, 1, 0},
  {&__pyx_kp_s_111, __pyx_k_111, sizeof(__pyx_k_111), 0, 0, 1, 0},
  {&__pyx_n_s_112, __pyx_k_112, sizeof(__pyx_k_112), 0, 0, 1, 1},
  {&__pyx_kp_s_113, __pyx_k_113, sizeof(__pyx_k_113), 0, 0, 1, 0},
  {&__pyx_kp_u_121, __pyx_k_121, sizeof(__pyx_k_121), 0, 1, 0, 0},
  {&__pyx_kp_u_123, __pyx_k_123, sizeof(__pyx_k_123), 0, 1, 0, 0},
  {&__pyx_kp_u_125, __pyx_k_125, sizeof(__pyx_k_125), 0, 1, 0, 0},
  {&__pyx_kp_u_127, __pyx_k_127, sizeof(__pyx_k_127), 0, 1, 0, 0},
  {&__pyx_kp_u_128, __pyx_k_128, sizeof(__pyx_k_128), 0, 1, 0, 0},
  {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
  {&__pyx_kp_u_131, __pyx_k_131, sizeof(__pyx_k_131), 0, 1, 0, 0},
  {&__pyx_kp_s_133, __pyx_k_133, sizeof(__pyx_k_133), 0, 0, 1, 0},
  {&__pyx_kp_s_138, __pyx_k_138, sizeof(__pyx_k_138), 0, 0, 1, 0},
  {&__pyx_n_s_153, __pyx_k_153, sizeof(__pyx_k_153), 0, 0, 1, 1},
  {&__pyx_n_s_156, __pyx_k_156, sizeof(__pyx_k_156), 0, 0, 1, 1},
  {&__pyx_n_s_159, __pyx_k_159, sizeof(__pyx_k_159), 0, 0, 1, 1},
  {&__pyx_kp_s_180, __pyx_k_180, sizeof(__pyx_k_180), 0, 0, 1, 0},
  {&__pyx_n_s_185, __pyx_k_185, sizeof(__pyx_k_185), 0, 0, 1, 1},
  {&__pyx_kp_s_222, __pyx_k_222, sizeof(__pyx_k_222), 0, 0, 1, 0},
  {&__pyx_kp_s_253, __pyx_k_253, sizeof(__pyx_k_253), 0, 0, 1, 0},
  {&__pyx_n_s_258, __pyx_k_258, sizeof(__pyx_k_258), 0, 0, 1, 1},
  {&__pyx_n_s_261, __pyx_k_261, sizeof(__pyx_k_261), 0, 0, 1, 1},
  {&__pyx_n_s_270, __pyx_k_270, sizeof(__pyx_k_270), 0, 0, 1, 1},
  {&__pyx_n_s_275, __pyx_k_275, sizeof(__pyx_k_275), 0, 0, 1, 1},
  {&__pyx_kp_s_276, __pyx_k_276, sizeof(__pyx_k_276), 0, 0, 1, 0},
  {&__pyx_n_s_279, __pyx_k_279, sizeof(__pyx_k_279), 0, 0, 1, 1},
  {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0},
  {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
  {&__pyx_n_s_308, __pyx_k_308, sizeof(__pyx_k_308), 0, 0, 1, 1},
  {&__pyx_n_s_311, __pyx_k_311, sizeof(__pyx_k_311), 0, 0, 1, 1},
  {&__pyx_n_s_314, __pyx_k_314, sizeof(__pyx_k_314), 0, 0, 1, 1},
  {&__pyx_n_s_317, __pyx_k_317, sizeof(__pyx_k_317), 0, 0, 1, 1},
  {&__pyx_n_s_322, __pyx_k_322, sizeof(__pyx_k_322), 0, 0, 1, 1},
  {&__pyx_n_s_325, __pyx_k_325, sizeof(__pyx_k_325), 0, 0, 1, 1},
  {&__pyx_n_s_328, __pyx_k_328, sizeof(__pyx_k_328), 0, 0, 1, 1},
  {&__pyx_n_s_331, __pyx_k_331, sizeof(__pyx_k_331), 0, 0, 1, 1},
  {&__pyx_n_s_334, __pyx_k_334, sizeof(__pyx_k_334), 0, 0, 1, 1},
  {&__pyx_n_s_347, __pyx_k_347, sizeof(__pyx_k_347), 0, 0, 1, 1},
  {&__pyx_n_s_378, __pyx_k_378, sizeof(__pyx_k_378), 0, 0, 1, 1},
  {&__pyx_n_s_381, __pyx_k_381, sizeof(__pyx_k_381), 0, 0, 1, 1},
  {&__pyx_n_s_390, __pyx_k_390, sizeof(__pyx_k_390), 0, 0, 1, 1},
  {&__pyx_n_s_393, __pyx_k_393, sizeof(__pyx_k_393), 0, 0, 1, 1},
  {&__pyx_n_s_402, __pyx_k_402, sizeof(__pyx_k_402), 0, 0, 1, 1},
  {&__pyx_n_s_405, __pyx_k_405, sizeof(__pyx_k_405), 0, 0, 1, 1},
  {&__pyx_n_s_408, __pyx_k_408, sizeof(__pyx_k_408), 0, 0, 1, 1},
  {&__pyx_n_s_411, __pyx_k_411, sizeof(__pyx_k_411), 0, 0, 1, 1},
  {&__pyx_n_s_414, __pyx_k_414, sizeof(__pyx_k_414), 0, 0, 1, 1},
  {&__pyx_n_s_417, __pyx_k_417, sizeof(__pyx_k_417), 0, 0, 1, 1},
  {&__pyx_n_s_420, __pyx_k_420, sizeof(__pyx_k_420), 0, 0, 1, 1},
  {&__pyx_n_s_423, __pyx_k_423, sizeof(__pyx_k_423), 0, 0, 1, 1},
  {&__pyx_n_s_426, __pyx_k_426, sizeof(__pyx_k_426), 0, 0, 1, 1},
  {&__pyx_n_s_429, __pyx_k_429, sizeof(__pyx_k_429), 0, 0, 1, 1},
  {&__pyx_n_s_432, __pyx_k_432, sizeof(__pyx_k_432), 0, 0, 1, 1},
  {&__pyx_n_s_435, __pyx_k_435, sizeof(__pyx_k_435), 0, 0, 1, 1},
  {&__pyx_kp_s_438, __pyx_k_438, sizeof(__pyx_k_438), 0, 0, 1, 0},
  {&__pyx_kp_s_441, __pyx_k_441, sizeof(__pyx_k_441), 0, 0, 1, 0},
  {&__pyx_n_s_470, __pyx_k_470, sizeof(__pyx_k_470), 0, 0, 1, 1},
  {&__pyx_n_s_487, __pyx_k_487, sizeof(__pyx_k_487), 0, 0, 1, 1},
  {&__pyx_n_s_490, __pyx_k_490, sizeof(__pyx_k_490), 0, 0, 1, 1},
  {&__pyx_kp_s_495, __pyx_k_495, sizeof(__pyx_k_495), 0, 0, 1, 0},
  {&__pyx_kp_s_498, __pyx_k_498, sizeof(__pyx_k_498), 0, 0, 1, 0},
  {&__pyx_kp_s_511, __pyx_k_511, sizeof(__pyx_k_511), 0, 0, 1, 0},
  {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0},
  {&__pyx_kp_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 0},
  {&__pyx_kp_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 0},
  {&__pyx_kp_s_63, __pyx_k_63, sizeof(__pyx_k_63), 0, 0, 1, 0},
  {&__pyx_n_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 1},
  {&__pyx_kp_s_91, __pyx_k_91, sizeof(__pyx_k_91), 0, 0, 1, 0},
  {&__pyx_n_s__A, __pyx_k__A, sizeof(__pyx_k__A), 0, 0, 1, 1},
  {&__pyx_n_s__AssertionError, __pyx_k__AssertionError, sizeof(__pyx_k__AssertionError), 0, 0, 1, 1},
  {&__pyx_n_s__AttributeError, __pyx_k__AttributeError, sizeof(__pyx_k__AttributeError), 0, 0, 1, 1},
  {&__pyx_n_s__B, __pyx_k__B, sizeof(__pyx_k__B), 0, 0, 1, 1},
  {&__pyx_n_s__C, __pyx_k__C, sizeof(__pyx_k__C), 0, 0, 1, 1},
  {&__pyx_n_s__D, __pyx_k__D, sizeof(__pyx_k__D), 0, 0, 1, 1},
  {&__pyx_n_s__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 0, 0, 1, 1},
  {&__pyx_n_s__F, __pyx_k__F, sizeof(__pyx_k__F), 0, 0, 1, 1},
  {&__pyx_n_s__False, __pyx_k__False, sizeof(__pyx_k__False), 0, 0, 1, 1},
  {&__pyx_n_s__ImportError, __pyx_k__ImportError, sizeof(__pyx_k__ImportError), 0, 0, 1, 1},
  {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1},
  {&__pyx_n_s__Infinity, __pyx_k__Infinity, sizeof(__pyx_k__Infinity), 0, 0, 1, 1},
  {&__pyx_n_s__K, __pyx_k__K, sizeof(__pyx_k__K), 0, 0, 1, 1},
  {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1},
  {&__pyx_n_s__N, __pyx_k__N, sizeof(__pyx_k__N), 0, 0, 1, 1},
  {&__pyx_n_s__NIL, __pyx_k__NIL, sizeof(__pyx_k__NIL), 0, 0, 1, 1},
  {&__pyx_n_s__NaN, __pyx_k__NaN, sizeof(__pyx_k__NaN), 0, 0, 1, 1},
  {&__pyx_n_s__NegInfinity, __pyx_k__NegInfinity, sizeof(__pyx_k__NegInfinity), 0, 0, 1, 1},
  {&__pyx_n_s__O, __pyx_k__O, sizeof(__pyx_k__O), 0, 0, 1, 1},
  {&__pyx_n_s__ONAN, __pyx_k__ONAN, sizeof(__pyx_k__ONAN), 0, 0, 1, 1},
  {&__pyx_n_s__R, __pyx_k__R, sizeof(__pyx_k__R), 0, 0, 1, 1},
  {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s__T, __pyx_k__T, sizeof(__pyx_k__T), 0, 0, 1, 1},
  {&__pyx_n_s__True, __pyx_k__True, sizeof(__pyx_k__True), 0, 0, 1, 1},
  {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
  {&__pyx_n_s___TYPE_MAP, __pyx_k___TYPE_MAP, sizeof(__pyx_k___TYPE_MAP), 0, 0, 1, 1},
  {&__pyx_n_s____cmp__, __pyx_k____cmp__, sizeof(__pyx_k____cmp__), 0, 0, 1, 1},
  {&__pyx_n_s____eq__, __pyx_k____eq__, sizeof(__pyx_k____eq__), 0, 0, 1, 1},
  {&__pyx_n_s____ge__, __pyx_k____ge__, sizeof(__pyx_k____ge__), 0, 0, 1, 1},
  {&__pyx_n_s____gt__, __pyx_k____gt__, sizeof(__pyx_k____gt__), 0, 0, 1, 1},
  {&__pyx_n_s____le__, __pyx_k____le__, sizeof(__pyx_k____le__), 0, 0, 1, 1},
  {&__pyx_n_s____lt__, __pyx_k____lt__, sizeof(__pyx_k____lt__), 0, 0, 1, 1},
  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
  {&__pyx_n_s____name__, __pyx_k____name__, sizeof(__pyx_k____name__), 0, 0, 1, 1},
  {&__pyx_n_s____ne__, __pyx_k____ne__, sizeof(__pyx_k____ne__), 0, 0, 1, 1},
  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
  {&__pyx_n_s___as, __pyx_k___as, sizeof(__pyx_k___as), 0, 0, 1, 1},
  {&__pyx_n_s___big_join_sorter, __pyx_k___big_join_sorter, sizeof(__pyx_k___big_join_sorter), 0, 0, 1, 1},
  {&__pyx_n_s___bucket_locs, __pyx_k___bucket_locs, sizeof(__pyx_k___bucket_locs), 0, 0, 1, 1},
  {&__pyx_n_s___cache, __pyx_k___cache, sizeof(__pyx_k___cache), 0, 0, 1, 1},
  {&__pyx_n_s___check_dummy, __pyx_k___check_dummy, sizeof(__pyx_k___check_dummy), 0, 0, 1, 1},
  {&__pyx_n_s___check_minp, __pyx_k___check_minp, sizeof(__pyx_k___check_minp), 0, 0, 1, 1},
  {&__pyx_n_s___data, __pyx_k___data, sizeof(__pyx_k___data), 0, 0, 1, 1},
  {&__pyx_n_s___ensure_index, __pyx_k___ensure_index, sizeof(__pyx_k___ensure_index), 0, 0, 1, 1},
  {&__pyx_n_s___get_result_array, __pyx_k___get_result_array, sizeof(__pyx_k___get_result_array), 0, 0, 1, 1},
  {&__pyx_n_s___get_result_indexer, __pyx_k___get_result_indexer, sizeof(__pyx_k___get_result_indexer), 0, 0, 1, 1},
  {&__pyx_n_s___index, __pyx_k___index, sizeof(__pyx_k___index), 0, 0, 1, 1},
  {&__pyx_n_s___return_false, __pyx_k___return_false, sizeof(__pyx_k___return_false), 0, 0, 1, 1},
  {&__pyx_n_s___return_true, __pyx_k___return_true, sizeof(__pyx_k___return_true), 0, 0, 1, 1},
  {&__pyx_n_s___set_axis, __pyx_k___set_axis, sizeof(__pyx_k___set_axis), 0, 0, 1, 1},
  {&__pyx_n_s___values, __pyx_k___values, sizeof(__pyx_k___values), 0, 0, 1, 1},
  {&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1},
  {&__pyx_n_s__adj, __pyx_k__adj, sizeof(__pyx_k__adj), 0, 0, 1, 1},
  {&__pyx_n_s__aggfunc, __pyx_k__aggfunc, sizeof(__pyx_k__aggfunc), 0, 0, 1, 1},
  {&__pyx_n_s__arange, __pyx_k__arange, sizeof(__pyx_k__arange), 0, 0, 1, 1},
  {&__pyx_n_s__arg, __pyx_k__arg, sizeof(__pyx_k__arg), 0, 0, 1, 1},
  {&__pyx_n_s__args, __pyx_k__args, sizeof(__pyx_k__args), 0, 0, 1, 1},
  {&__pyx_n_s__argsort, __pyx_k__argsort, sizeof(__pyx_k__argsort), 0, 0, 1, 1},
  {&__pyx_n_s__argsorted, __pyx_k__argsorted, sizeof(__pyx_k__argsorted), 0, 0, 1, 1},
  {&__pyx_n_s__arr, __pyx_k__arr, sizeof(__pyx_k__arr), 0, 0, 1, 1},
  {&__pyx_n_s__array, __pyx_k__array, sizeof(__pyx_k__array), 0, 0, 1, 1},
  {&__pyx_n_s__array_to_datetime, __pyx_k__array_to_datetime, sizeof(__pyx_k__array_to_datetime), 0, 0, 1, 1},
  {&__pyx_n_s__array_to_timestamp, __pyx_k__array_to_timestamp, sizeof(__pyx_k__array_to_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s__arrays, __pyx_k__arrays, sizeof(__pyx_k__arrays), 0, 0, 1, 1},
  {&__pyx_n_s__arrmap, __pyx_k__arrmap, sizeof(__pyx_k__arrmap), 0, 0, 1, 1},
  {&__pyx_n_s__arrmap_bool, __pyx_k__arrmap_bool, sizeof(__pyx_k__arrmap_bool), 0, 0, 1, 1},
  {&__pyx_n_s__arrmap_float64, __pyx_k__arrmap_float64, sizeof(__pyx_k__arrmap_float64), 0, 0, 1, 1},
  {&__pyx_n_s__arrmap_int32, __pyx_k__arrmap_int32, sizeof(__pyx_k__arrmap_int32), 0, 0, 1, 1},
  {&__pyx_n_s__arrmap_int64, __pyx_k__arrmap_int64, sizeof(__pyx_k__arrmap_int64), 0, 0, 1, 1},
  {&__pyx_n_s__arrmap_object, __pyx_k__arrmap_object, sizeof(__pyx_k__arrmap_object), 0, 0, 1, 1},
  {&__pyx_n_s__asarray, __pyx_k__asarray, sizeof(__pyx_k__asarray), 0, 0, 1, 1},
  {&__pyx_n_s__ascending, __pyx_k__ascending, sizeof(__pyx_k__ascending), 0, 0, 1, 1},
  {&__pyx_n_s__astype, __pyx_k__astype, sizeof(__pyx_k__astype), 0, 0, 1, 1},
  {&__pyx_n_s__average, __pyx_k__average, sizeof(__pyx_k__average), 0, 0, 1, 1},
  {&__pyx_n_s__axes, __pyx_k__axes, sizeof(__pyx_k__axes), 0, 0, 1, 1},
  {&__pyx_n_s__axis, __pyx_k__axis, sizeof(__pyx_k__axis), 0, 0, 1, 1},
  {&__pyx_n_s__backfill_bool, __pyx_k__backfill_bool, sizeof(__pyx_k__backfill_bool), 0, 0, 1, 1},
  {&__pyx_n_s__backfill_float64, __pyx_k__backfill_float64, sizeof(__pyx_k__backfill_float64), 0, 0, 1, 1},
  {&__pyx_n_s__backfill_int32, __pyx_k__backfill_int32, sizeof(__pyx_k__backfill_int32), 0, 0, 1, 1},
  {&__pyx_n_s__backfill_int64, __pyx_k__backfill_int64, sizeof(__pyx_k__backfill_int64), 0, 0, 1, 1},
  {&__pyx_n_s__backfill_object, __pyx_k__backfill_object, sizeof(__pyx_k__backfill_object), 0, 0, 1, 1},
  {&__pyx_n_s__bool_, __pyx_k__bool_, sizeof(__pyx_k__bool_), 0, 0, 1, 1},
  {&__pyx_n_s__boolean, __pyx_k__boolean, sizeof(__pyx_k__boolean), 0, 0, 1, 1},
  {&__pyx_n_s__bools, __pyx_k__bools, sizeof(__pyx_k__bools), 0, 0, 1, 1},
  {&__pyx_n_s__buckets, __pyx_k__buckets, sizeof(__pyx_k__buckets), 0, 0, 1, 1},
  {&__pyx_n_s__buf, __pyx_k__buf, sizeof(__pyx_k__buf), 0, 0, 1, 1},
  {&__pyx_n_s__bufarr, __pyx_k__bufarr, sizeof(__pyx_k__bufarr), 0, 0, 1, 1},
  {&__pyx_n_s__c_contiguous, __pyx_k__c_contiguous, sizeof(__pyx_k__c_contiguous), 0, 0, 1, 1},
  {&__pyx_n_s__cache, __pyx_k__cache, sizeof(__pyx_k__cache), 0, 0, 1, 1},
  {&__pyx_n_s__col, __pyx_k__col, sizeof(__pyx_k__col), 0, 0, 1, 1},
  {&__pyx_n_s__columns, __pyx_k__columns, sizeof(__pyx_k__columns), 0, 0, 1, 1},
  {&__pyx_n_s__com, __pyx_k__com, sizeof(__pyx_k__com), 0, 0, 1, 1},
  {&__pyx_n_s__complex, __pyx_k__complex, sizeof(__pyx_k__complex), 0, 0, 1, 1},
  {&__pyx_n_s__complex128, __pyx_k__complex128, sizeof(__pyx_k__complex128), 0, 0, 1, 1},
  {&__pyx_n_s__complex256, __pyx_k__complex256, sizeof(__pyx_k__complex256), 0, 0, 1, 1},
  {&__pyx_n_s__complex64, __pyx_k__complex64, sizeof(__pyx_k__complex64), 0, 0, 1, 1},
  {&__pyx_n_s__contiguous, __pyx_k__contiguous, sizeof(__pyx_k__contiguous), 0, 0, 1, 1},
  {&__pyx_n_s__convert_sql_column, __pyx_k__convert_sql_column, sizeof(__pyx_k__convert_sql_column), 0, 0, 1, 1},
  {&__pyx_n_s__convert_timestamps, __pyx_k__convert_timestamps, sizeof(__pyx_k__convert_timestamps), 0, 0, 1, 1},
  {&__pyx_n_s__copy, __pyx_k__copy, sizeof(__pyx_k__copy), 0, 0, 1, 1},
  {&__pyx_n_s__count, __pyx_k__count, sizeof(__pyx_k__count), 0, 0, 1, 1},
  {&__pyx_n_s__count_level_1d, __pyx_k__count_level_1d, sizeof(__pyx_k__count_level_1d), 0, 0, 1, 1},
  {&__pyx_n_s__count_level_2d, __pyx_k__count_level_2d, sizeof(__pyx_k__count_level_2d), 0, 0, 1, 1},
  {&__pyx_n_s__count_prior, __pyx_k__count_prior, sizeof(__pyx_k__count_prior), 0, 0, 1, 1},
  {&__pyx_n_s__counts, __pyx_k__counts, sizeof(__pyx_k__counts), 0, 0, 1, 1},
  {&__pyx_n_s__ct, __pyx_k__ct, sizeof(__pyx_k__ct), 0, 0, 1, 1},
  {&__pyx_n_s__cur, __pyx_k__cur, sizeof(__pyx_k__cur), 0, 0, 1, 1},
  {&__pyx_n_s__curLoc, __pyx_k__curLoc, sizeof(__pyx_k__curLoc), 0, 0, 1, 1},
  {&__pyx_n_s__curOld, __pyx_k__curOld, sizeof(__pyx_k__curOld), 0, 0, 1, 1},
  {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1},
  {&__pyx_n_s__date, __pyx_k__date, sizeof(__pyx_k__date), 0, 0, 1, 1},
  {&__pyx_n_s__datetime, __pyx_k__datetime, sizeof(__pyx_k__datetime), 0, 0, 1, 1},
  {&__pyx_n_s__datetime64, __pyx_k__datetime64, sizeof(__pyx_k__datetime64), 0, 0, 1, 1},
  {&__pyx_n_s__dateutil, __pyx_k__dateutil, sizeof(__pyx_k__dateutil), 0, 0, 1, 1},
  {&__pyx_n_s__default, __pyx_k__default, sizeof(__pyx_k__default), 0, 0, 1, 1},
  {&__pyx_n_s__destroy, __pyx_k__destroy, sizeof(__pyx_k__destroy), 0, 0, 1, 1},
  {&__pyx_n_s__dicts, __pyx_k__dicts, sizeof(__pyx_k__dicts), 0, 0, 1, 1},
  {&__pyx_n_s__dicts_to_array, __pyx_k__dicts_to_array, sizeof(__pyx_k__dicts_to_array), 0, 0, 1, 1},
  {&__pyx_n_s__done, __pyx_k__done, sizeof(__pyx_k__done), 0, 0, 1, 1},
  {&__pyx_n_s__dtype, __pyx_k__dtype, sizeof(__pyx_k__dtype), 0, 0, 1, 1},
  {&__pyx_n_s__dummy, __pyx_k__dummy, sizeof(__pyx_k__dummy), 0, 0, 1, 1},
  {&__pyx_n_s__duplicated, __pyx_k__duplicated, sizeof(__pyx_k__duplicated), 0, 0, 1, 1},
  {&__pyx_n_s__dups, __pyx_k__dups, sizeof(__pyx_k__dups), 0, 0, 1, 1},
  {&__pyx_n_s__empty, __pyx_k__empty, sizeof(__pyx_k__empty), 0, 0, 1, 1},
  {&__pyx_n_s__empty_like, __pyx_k__empty_like, sizeof(__pyx_k__empty_like), 0, 0, 1, 1},
  {&__pyx_n_s__ends, __pyx_k__ends, sizeof(__pyx_k__ends), 0, 0, 1, 1},
  {&__pyx_n_s__eq, __pyx_k__eq, sizeof(__pyx_k__eq), 0, 0, 1, 1},
  {&__pyx_n_s__ewma, __pyx_k__ewma, sizeof(__pyx_k__ewma), 0, 0, 1, 1},
  {&__pyx_n_s__expected_size, __pyx_k__expected_size, sizeof(__pyx_k__expected_size), 0, 0, 1, 1},
  {&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1},
  {&__pyx_n_s__f8, __pyx_k__f8, sizeof(__pyx_k__f8), 0, 0, 1, 1},
  {&__pyx_n_s__f_contiguous, __pyx_k__f_contiguous, sizeof(__pyx_k__f_contiguous), 0, 0, 1, 1},
  {&__pyx_n_s__fast_multiget, __pyx_k__fast_multiget, sizeof(__pyx_k__fast_multiget), 0, 0, 1, 1},
  {&__pyx_n_s__fast_unique, __pyx_k__fast_unique, sizeof(__pyx_k__fast_unique), 0, 0, 1, 1},
  {&__pyx_n_s__fast_zip, __pyx_k__fast_zip, sizeof(__pyx_k__fast_zip), 0, 0, 1, 1},
  {&__pyx_n_s__fill, __pyx_k__fill, sizeof(__pyx_k__fill), 0, 0, 1, 1},
  {&__pyx_n_s__fillVec, __pyx_k__fillVec, sizeof(__pyx_k__fillVec), 0, 0, 1, 1},
  {&__pyx_n_s__fill_value, __pyx_k__fill_value, sizeof(__pyx_k__fill_value), 0, 0, 1, 1},
  {&__pyx_n_s__fill_vec, __pyx_k__fill_vec, sizeof(__pyx_k__fill_vec), 0, 0, 1, 1},
  {&__pyx_n_s__first, __pyx_k__first, sizeof(__pyx_k__first), 0, 0, 1, 1},
  {&__pyx_n_s__flag, __pyx_k__flag, sizeof(__pyx_k__flag), 0, 0, 1, 1},
  {&__pyx_n_s__flags, __pyx_k__flags, sizeof(__pyx_k__flags), 0, 0, 1, 1},
  {&__pyx_n_s__float128, __pyx_k__float128, sizeof(__pyx_k__float128), 0, 0, 1, 1},
  {&__pyx_n_s__float16, __pyx_k__float16, sizeof(__pyx_k__float16), 0, 0, 1, 1},
  {&__pyx_n_s__float32, __pyx_k__float32, sizeof(__pyx_k__float32), 0, 0, 1, 1},
  {&__pyx_n_s__float64, __pyx_k__float64, sizeof(__pyx_k__float64), 0, 0, 1, 1},
  {&__pyx_n_s__floating, __pyx_k__floating, sizeof(__pyx_k__floating), 0, 0, 1, 1},
  {&__pyx_n_s__floats, __pyx_k__floats, sizeof(__pyx_k__floats), 0, 0, 1, 1},
  {&__pyx_n_s__fnan, __pyx_k__fnan, sizeof(__pyx_k__fnan), 0, 0, 1, 1},
  {&__pyx_n_s__fromtimestamp, __pyx_k__fromtimestamp, sizeof(__pyx_k__fromtimestamp), 0, 0, 1, 1},
  {&__pyx_n_s__full_outer_join, __pyx_k__full_outer_join, sizeof(__pyx_k__full_outer_join), 0, 0, 1, 1},
  {&__pyx_n_s__func, __pyx_k__func, sizeof(__pyx_k__func), 0, 0, 1, 1},
  {&__pyx_n_s__fv, __pyx_k__fv, sizeof(__pyx_k__fv), 0, 0, 1, 1},
  {&__pyx_n_s__fval, __pyx_k__fval, sizeof(__pyx_k__fval), 0, 0, 1, 1},
  {&__pyx_n_s__ge, __pyx_k__ge, sizeof(__pyx_k__ge), 0, 0, 1, 1},
  {&__pyx_n_s__gen, __pyx_k__gen, sizeof(__pyx_k__gen), 0, 0, 1, 1},
  {&__pyx_n_s__generate_slices, __pyx_k__generate_slices, sizeof(__pyx_k__generate_slices), 0, 0, 1, 1},
  {&__pyx_n_s__get, __pyx_k__get, sizeof(__pyx_k__get), 0, 0, 1, 1},
  {&__pyx_n_s__get_item, __pyx_k__get_item, sizeof(__pyx_k__get_item), 0, 0, 1, 1},
  {&__pyx_n_s__get_labels, __pyx_k__get_labels, sizeof(__pyx_k__get_labels), 0, 0, 1, 1},
  {&__pyx_n_s__get_pad_indexer, __pyx_k__get_pad_indexer, sizeof(__pyx_k__get_pad_indexer), 0, 0, 1, 1},
  {&__pyx_n_s__get_result, __pyx_k__get_result, sizeof(__pyx_k__get_result), 0, 0, 1, 1},
  {&__pyx_n_s__get_reverse_indexer, __pyx_k__get_reverse_indexer, sizeof(__pyx_k__get_reverse_indexer), 0, 0, 1, 1},
  {&__pyx_n_s__get_unique_labels, __pyx_k__get_unique_labels, sizeof(__pyx_k__get_unique_labels), 0, 0, 1, 1},
  {&__pyx_n_s__group_add, __pyx_k__group_add, sizeof(__pyx_k__group_add), 0, 0, 1, 1},
  {&__pyx_n_s__group_count, __pyx_k__group_count, sizeof(__pyx_k__group_count), 0, 0, 1, 1},
  {&__pyx_n_s__group_labels, __pyx_k__group_labels, sizeof(__pyx_k__group_labels), 0, 0, 1, 1},
  {&__pyx_n_s__group_mean, __pyx_k__group_mean, sizeof(__pyx_k__group_mean), 0, 0, 1, 1},
  {&__pyx_n_s__group_size, __pyx_k__group_size, sizeof(__pyx_k__group_size), 0, 0, 1, 1},
  {&__pyx_n_s__group_var, __pyx_k__group_var, sizeof(__pyx_k__group_var), 0, 0, 1, 1},
  {&__pyx_n_s__groupby_bool, __pyx_k__groupby_bool, sizeof(__pyx_k__groupby_bool), 0, 0, 1, 1},
  {&__pyx_n_s__groupby_float64, __pyx_k__groupby_float64, sizeof(__pyx_k__groupby_float64), 0, 0, 1, 1},
  {&__pyx_n_s__groupby_func, __pyx_k__groupby_func, sizeof(__pyx_k__groupby_func), 0, 0, 1, 1},
  {&__pyx_n_s__groupby_indices, __pyx_k__groupby_indices, sizeof(__pyx_k__groupby_indices), 0, 0, 1, 1},
  {&__pyx_n_s__groupby_int32, __pyx_k__groupby_int32, sizeof(__pyx_k__groupby_int32), 0, 0, 1, 1},
  {&__pyx_n_s__groupby_int64, __pyx_k__groupby_int64, sizeof(__pyx_k__groupby_int64), 0, 0, 1, 1},
  {&__pyx_n_s__groupby_object, __pyx_k__groupby_object, sizeof(__pyx_k__groupby_object), 0, 0, 1, 1},
  {&__pyx_n_s__groupsort_indexer, __pyx_k__groupsort_indexer, sizeof(__pyx_k__groupsort_indexer), 0, 0, 1, 1},
  {&__pyx_n_s__gt, __pyx_k__gt, sizeof(__pyx_k__gt), 0, 0, 1, 1},
  {&__pyx_n_s__has_infs_f4, __pyx_k__has_infs_f4, sizeof(__pyx_k__has_infs_f4), 0, 0, 1, 1},
  {&__pyx_n_s__has_infs_f8, __pyx_k__has_infs_f8, sizeof(__pyx_k__has_infs_f8), 0, 0, 1, 1},
  {&__pyx_n_s__hval, __pyx_k__hval, sizeof(__pyx_k__hval), 0, 0, 1, 1},
  {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1},
  {&__pyx_n_s__i4, __pyx_k__i4, sizeof(__pyx_k__i4), 0, 0, 1, 1},
  {&__pyx_n_s__i8, __pyx_k__i8, sizeof(__pyx_k__i8), 0, 0, 1, 1},
  {&__pyx_n_s__idMap, __pyx_k__idMap, sizeof(__pyx_k__idMap), 0, 0, 1, 1},
  {&__pyx_n_s__ids, __pyx_k__ids, sizeof(__pyx_k__ids), 0, 0, 1, 1},
  {&__pyx_n_s__idx, __pyx_k__idx, sizeof(__pyx_k__idx), 0, 0, 1, 1},
  {&__pyx_n_s__in_arr, __pyx_k__in_arr, sizeof(__pyx_k__in_arr), 0, 0, 1, 1},
  {&__pyx_n_s__inclusive, __pyx_k__inclusive, sizeof(__pyx_k__inclusive), 0, 0, 1, 1},
  {&__pyx_n_s__index, __pyx_k__index, sizeof(__pyx_k__index), 0, 0, 1, 1},
  {&__pyx_n_s__index_buf, __pyx_k__index_buf, sizeof(__pyx_k__index_buf), 0, 0, 1, 1},
  {&__pyx_n_s__indexer, __pyx_k__indexer, sizeof(__pyx_k__indexer), 0, 0, 1, 1},
  {&__pyx_n_s__indices, __pyx_k__indices, sizeof(__pyx_k__indices), 0, 0, 1, 1},
  {&__pyx_n_s__inf, __pyx_k__inf, sizeof(__pyx_k__inf), 0, 0, 1, 1},
  {&__pyx_n_s__infer_dtype, __pyx_k__infer_dtype, sizeof(__pyx_k__infer_dtype), 0, 0, 1, 1},
  {&__pyx_n_s__infer_dtype_list, __pyx_k__infer_dtype_list, sizeof(__pyx_k__infer_dtype_list), 0, 0, 1, 1},
  {&__pyx_n_s__infs, __pyx_k__infs, sizeof(__pyx_k__infs), 0, 0, 1, 1},
  {&__pyx_n_s__inner_join, __pyx_k__inner_join, sizeof(__pyx_k__inner_join), 0, 0, 1, 1},
  {&__pyx_n_s__input, __pyx_k__input, sizeof(__pyx_k__input), 0, 0, 1, 1},
  {&__pyx_n_s__insert, __pyx_k__insert, sizeof(__pyx_k__insert), 0, 0, 1, 1},
  {&__pyx_n_s__int16, __pyx_k__int16, sizeof(__pyx_k__int16), 0, 0, 1, 1},
  {&__pyx_n_s__int32, __pyx_k__int32, sizeof(__pyx_k__int32), 0, 0, 1, 1},
  {&__pyx_n_s__int64, __pyx_k__int64, sizeof(__pyx_k__int64), 0, 0, 1, 1},
  {&__pyx_n_s__int64_unique, __pyx_k__int64_unique, sizeof(__pyx_k__int64_unique), 0, 0, 1, 1},
  {&__pyx_n_s__int8, __pyx_k__int8, sizeof(__pyx_k__int8), 0, 0, 1, 1},
  {&__pyx_n_s__int_, __pyx_k__int_, sizeof(__pyx_k__int_), 0, 0, 1, 1},
  {&__pyx_n_s__integer, __pyx_k__integer, sizeof(__pyx_k__integer), 0, 0, 1, 1},
  {&__pyx_n_s__ints, __pyx_k__ints, sizeof(__pyx_k__ints), 0, 0, 1, 1},
  {&__pyx_n_s__is_bool_array, __pyx_k__is_bool_array, sizeof(__pyx_k__is_bool_array), 0, 0, 1, 1},
  {&__pyx_n_s__is_datetime_array, __pyx_k__is_datetime_array, sizeof(__pyx_k__is_datetime_array), 0, 0, 1, 1},
  {&__pyx_n_s__is_float_array, __pyx_k__is_float_array, sizeof(__pyx_k__is_float_array), 0, 0, 1, 1},
  {&__pyx_n_s__is_integer, __pyx_k__is_integer, sizeof(__pyx_k__is_integer), 0, 0, 1, 1},
  {&__pyx_n_s__is_integer_array, __pyx_k__is_integer_array, sizeof(__pyx_k__is_integer_array), 0, 0, 1, 1},
  {&__pyx_n_s__is_lexsorted, __pyx_k__is_lexsorted, sizeof(__pyx_k__is_lexsorted), 0, 0, 1, 1},
  {&__pyx_n_s__is_monotonic_bool, __pyx_k__is_monotonic_bool, sizeof(__pyx_k__is_monotonic_bool), 0, 0, 1, 1},
  {&__pyx_n_s__is_monotonic_int32, __pyx_k__is_monotonic_int32, sizeof(__pyx_k__is_monotonic_int32), 0, 0, 1, 1},
  {&__pyx_n_s__is_monotonic_int64, __pyx_k__is_monotonic_int64, sizeof(__pyx_k__is_monotonic_int64), 0, 0, 1, 1},
  {&__pyx_n_s__is_monotonic_object, __pyx_k__is_monotonic_object, sizeof(__pyx_k__is_monotonic_object), 0, 0, 1, 1},
  {&__pyx_n_s__is_string_array, __pyx_k__is_string_array, sizeof(__pyx_k__is_string_array), 0, 0, 1, 1},
  {&__pyx_n_s__isfinite, __pyx_k__isfinite, sizeof(__pyx_k__isfinite), 0, 0, 1, 1},
  {&__pyx_n_s__ismember, __pyx_k__ismember, sizeof(__pyx_k__ismember), 0, 0, 1, 1},
  {&__pyx_n_s__isnan, __pyx_k__isnan, sizeof(__pyx_k__isnan), 0, 0, 1, 1},
  {&__pyx_n_s__isnullobj, __pyx_k__isnullobj, sizeof(__pyx_k__isnullobj), 0, 0, 1, 1},
  {&__pyx_n_s__isnullobj2d, __pyx_k__isnullobj2d, sizeof(__pyx_k__isnullobj2d), 0, 0, 1, 1},
  {&__pyx_n_s__it, __pyx_k__it, sizeof(__pyx_k__it), 0, 0, 1, 1},
  {&__pyx_n_s__item, __pyx_k__item, sizeof(__pyx_k__item), 0, 0, 1, 1},
  {&__pyx_n_s__itemsize, __pyx_k__itemsize, sizeof(__pyx_k__itemsize), 0, 0, 1, 1},
  {&__pyx_n_s__iterations, __pyx_k__iterations, sizeof(__pyx_k__iterations), 0, 0, 1, 1},
  {&__pyx_n_s__j, __pyx_k__j, sizeof(__pyx_k__j), 0, 0, 1, 1},
  {&__pyx_n_s__join_sorter, __pyx_k__join_sorter, sizeof(__pyx_k__join_sorter), 0, 0, 1, 1},
  {&__pyx_n_s__jstart, __pyx_k__jstart, sizeof(__pyx_k__jstart), 0, 0, 1, 1},
  {&__pyx_n_s__k, __pyx_k__k, sizeof(__pyx_k__k), 0, 0, 1, 1},
  {&__pyx_n_s__key, __pyx_k__key, sizeof(__pyx_k__key), 0, 0, 1, 1},
  {&__pyx_n_s__keys, __pyx_k__keys, sizeof(__pyx_k__keys), 0, 0, 1, 1},
  {&__pyx_n_s__kind, __pyx_k__kind, sizeof(__pyx_k__kind), 0, 0, 1, 1},
  {&__pyx_n_s__kleft, __pyx_k__kleft, sizeof(__pyx_k__kleft), 0, 0, 1, 1},
  {&__pyx_n_s__kright, __pyx_k__kright, sizeof(__pyx_k__kright), 0, 0, 1, 1},
  {&__pyx_n_s__kth_smallest, __pyx_k__kth_smallest, sizeof(__pyx_k__kth_smallest), 0, 0, 1, 1},
  {&__pyx_n_s__l, __pyx_k__l, sizeof(__pyx_k__l), 0, 0, 1, 1},
  {&__pyx_n_s__lab, __pyx_k__lab, sizeof(__pyx_k__lab), 0, 0, 1, 1},
  {&__pyx_n_s__label, __pyx_k__label, sizeof(__pyx_k__label), 0, 0, 1, 1},
  {&__pyx_n_s__label_arrays, __pyx_k__label_arrays, sizeof(__pyx_k__label_arrays), 0, 0, 1, 1},
  {&__pyx_n_s__labels, __pyx_k__labels, sizeof(__pyx_k__labels), 0, 0, 1, 1},
  {&__pyx_n_s__lc, __pyx_k__lc, sizeof(__pyx_k__lc), 0, 0, 1, 1},
  {&__pyx_n_s__le, __pyx_k__le, sizeof(__pyx_k__le), 0, 0, 1, 1},
  {&__pyx_n_s__left, __pyx_k__left, sizeof(__pyx_k__left), 0, 0, 1, 1},
  {&__pyx_n_s__left_count, __pyx_k__left_count, sizeof(__pyx_k__left_count), 0, 0, 1, 1},
  {&__pyx_n_s__left_indexer, __pyx_k__left_indexer, sizeof(__pyx_k__left_indexer), 0, 0, 1, 1},
  {&__pyx_n_s__left_join_1d, __pyx_k__left_join_1d, sizeof(__pyx_k__left_join_1d), 0, 0, 1, 1},
  {&__pyx_n_s__left_join_2d, __pyx_k__left_join_2d, sizeof(__pyx_k__left_join_2d), 0, 0, 1, 1},
  {&__pyx_n_s__left_outer_join, __pyx_k__left_outer_join, sizeof(__pyx_k__left_outer_join), 0, 0, 1, 1},
  {&__pyx_n_s__left_pos, __pyx_k__left_pos, sizeof(__pyx_k__left_pos), 0, 0, 1, 1},
  {&__pyx_n_s__left_sorter, __pyx_k__left_sorter, sizeof(__pyx_k__left_sorter), 0, 0, 1, 1},
  {&__pyx_n_s__length, __pyx_k__length, sizeof(__pyx_k__length), 0, 0, 1, 1},
  {&__pyx_n_s__lidx, __pyx_k__lidx, sizeof(__pyx_k__lidx), 0, 0, 1, 1},
  {&__pyx_n_s__lindexer, __pyx_k__lindexer, sizeof(__pyx_k__lindexer), 0, 0, 1, 1},
  {&__pyx_n_s__list_of_arrays, __pyx_k__list_of_arrays, sizeof(__pyx_k__list_of_arrays), 0, 0, 1, 1},
  {&__pyx_n_s__lists, __pyx_k__lists, sizeof(__pyx_k__lists), 0, 0, 1, 1},
  {&__pyx_n_s__lk, __pyx_k__lk, sizeof(__pyx_k__lk), 0, 0, 1, 1},
  {&__pyx_n_s__loc, __pyx_k__loc, sizeof(__pyx_k__loc), 0, 0, 1, 1},
  {&__pyx_n_s__locs, __pyx_k__locs, sizeof(__pyx_k__locs), 0, 0, 1, 1},
  {&__pyx_n_s__lookup2, __pyx_k__lookup2, sizeof(__pyx_k__lookup2), 0, 0, 1, 1},
  {&__pyx_n_s__lookup_values, __pyx_k__lookup_values, sizeof(__pyx_k__lookup_values), 0, 0, 1, 1},
  {&__pyx_n_s__lt, __pyx_k__lt, sizeof(__pyx_k__lt), 0, 0, 1, 1},
  {&__pyx_n_s__lval, __pyx_k__lval, sizeof(__pyx_k__lval), 0, 0, 1, 1},
  {&__pyx_n_s__lvalues, __pyx_k__lvalues, sizeof(__pyx_k__lvalues), 0, 0, 1, 1},
  {&__pyx_n_s__m, __pyx_k__m, sizeof(__pyx_k__m), 0, 0, 1, 1},
  {&__pyx_n_s__map_infer, __pyx_k__map_infer, sizeof(__pyx_k__map_infer), 0, 0, 1, 1},
  {&__pyx_n_s__mapped_index, __pyx_k__mapped_index, sizeof(__pyx_k__mapped_index), 0, 0, 1, 1},
  {&__pyx_n_s__mapper, __pyx_k__mapper, sizeof(__pyx_k__mapper), 0, 0, 1, 1},
  {&__pyx_n_s__mapping, __pyx_k__mapping, sizeof(__pyx_k__mapping), 0, 0, 1, 1},
  {&__pyx_n_s__mask, __pyx_k__mask, sizeof(__pyx_k__mask), 0, 0, 1, 1},
  {&__pyx_n_s__max, __pyx_k__max, sizeof(__pyx_k__max), 0, 0, 1, 1},
  {&__pyx_n_s__max_bin, __pyx_k__max_bin, sizeof(__pyx_k__max_bin), 0, 0, 1, 1},
  {&__pyx_n_s__max_groups, __pyx_k__max_groups, sizeof(__pyx_k__max_groups), 0, 0, 1, 1},
  {&__pyx_n_s__maybe_convert_bool, __pyx_k__maybe_convert_bool, sizeof(__pyx_k__maybe_convert_bool), 0, 0, 1, 1},
  {&__pyx_n_s__median, __pyx_k__median, sizeof(__pyx_k__median), 0, 0, 1, 1},
  {&__pyx_n_s__members, __pyx_k__members, sizeof(__pyx_k__members), 0, 0, 1, 1},
  {&__pyx_n_s__memo, __pyx_k__memo, sizeof(__pyx_k__memo), 0, 0, 1, 1},
  {&__pyx_n_s__merge_indexer_bool, __pyx_k__merge_indexer_bool, sizeof(__pyx_k__merge_indexer_bool), 0, 0, 1, 1},
  {&__pyx_n_s__merge_indexer_int32, __pyx_k__merge_indexer_int32, sizeof(__pyx_k__merge_indexer_int32), 0, 0, 1, 1},
  {&__pyx_n_s__merge_indexer_int64, __pyx_k__merge_indexer_int64, sizeof(__pyx_k__merge_indexer_int64), 0, 0, 1, 1},
  {&__pyx_n_s__merge_indexer_list, __pyx_k__merge_indexer_list, sizeof(__pyx_k__merge_indexer_list), 0, 0, 1, 1},
  {&__pyx_n_s__mergesort, __pyx_k__mergesort, sizeof(__pyx_k__mergesort), 0, 0, 1, 1},
  {&__pyx_n_s__midpoint, __pyx_k__midpoint, sizeof(__pyx_k__midpoint), 0, 0, 1, 1},
  {&__pyx_n_s__min, __pyx_k__min, sizeof(__pyx_k__min), 0, 0, 1, 1},
  {&__pyx_n_s__minp, __pyx_k__minp, sizeof(__pyx_k__minp), 0, 0, 1, 1},
  {&__pyx_n_s__mixed, __pyx_k__mixed, sizeof(__pyx_k__mixed), 0, 0, 1, 1},
  {&__pyx_n_s__n, __pyx_k__n, sizeof(__pyx_k__n), 0, 0, 1, 1},
  {&__pyx_n_s__na_count, __pyx_k__na_count, sizeof(__pyx_k__na_count), 0, 0, 1, 1},
  {&__pyx_n_s__na_sentinel, __pyx_k__na_sentinel, sizeof(__pyx_k__na_sentinel), 0, 0, 1, 1},
  {&__pyx_n_s__na_values, __pyx_k__na_values, sizeof(__pyx_k__na_values), 0, 0, 1, 1},
  {&__pyx_n_s__nan, __pyx_k__nan, sizeof(__pyx_k__nan), 0, 0, 1, 1},
  {&__pyx_n_s__nan_value, __pyx_k__nan_value, sizeof(__pyx_k__nan_value), 0, 0, 1, 1},
  {&__pyx_n_s__nbuckets, __pyx_k__nbuckets, sizeof(__pyx_k__nbuckets), 0, 0, 1, 1},
  {&__pyx_n_s__ndarrays, __pyx_k__ndarrays, sizeof(__pyx_k__ndarrays), 0, 0, 1, 1},
  {&__pyx_n_s__ndim, __pyx_k__ndim, sizeof(__pyx_k__ndim), 0, 0, 1, 1},
  {&__pyx_n_s__ne, __pyx_k__ne, sizeof(__pyx_k__ne), 0, 0, 1, 1},
  {&__pyx_n_s__neginf, __pyx_k__neginf, sizeof(__pyx_k__neginf), 0, 0, 1, 1},
  {&__pyx_n_s__newIndex, __pyx_k__newIndex, sizeof(__pyx_k__newIndex), 0, 0, 1, 1},
  {&__pyx_n_s__newLength, __pyx_k__newLength, sizeof(__pyx_k__newLength), 0, 0, 1, 1},
  {&__pyx_n_s__newMap, __pyx_k__newMap, sizeof(__pyx_k__newMap), 0, 0, 1, 1},
  {&__pyx_n_s__newPos, __pyx_k__newPos, sizeof(__pyx_k__newPos), 0, 0, 1, 1},
  {&__pyx_n_s__neww, __pyx_k__neww, sizeof(__pyx_k__neww), 0, 0, 1, 1},
  {&__pyx_n_s__next, __pyx_k__next, sizeof(__pyx_k__next), 0, 0, 1, 1},
  {&__pyx_n_s__nextOld, __pyx_k__nextOld, sizeof(__pyx_k__nextOld), 0, 0, 1, 1},
  {&__pyx_n_s__next_bound, __pyx_k__next_bound, sizeof(__pyx_k__next_bound), 0, 0, 1, 1},
  {&__pyx_n_s__ngroups, __pyx_k__ngroups, sizeof(__pyx_k__ngroups), 0, 0, 1, 1},
  {&__pyx_n_s__nleft, __pyx_k__nleft, sizeof(__pyx_k__nleft), 0, 0, 1, 1},
  {&__pyx_n_s__nlevels, __pyx_k__nlevels, sizeof(__pyx_k__nlevels), 0, 0, 1, 1},
  {&__pyx_n_s__nobs, __pyx_k__nobs, sizeof(__pyx_k__nobs), 0, 0, 1, 1},
  {&__pyx_n_s__nonzero, __pyx_k__nonzero, sizeof(__pyx_k__nonzero), 0, 0, 1, 1},
  {&__pyx_n_s__np, __pyx_k__np, sizeof(__pyx_k__np), 0, 0, 1, 1},
  {&__pyx_n_s__nright, __pyx_k__nright, sizeof(__pyx_k__nright), 0, 0, 1, 1},
  {&__pyx_n_s__numpy, __pyx_k__numpy, sizeof(__pyx_k__numpy), 0, 0, 1, 1},
  {&__pyx_n_s__nvalues, __pyx_k__nvalues, sizeof(__pyx_k__nvalues), 0, 0, 1, 1},
  {&__pyx_n_s__o, __pyx_k__o, sizeof(__pyx_k__o), 0, 0, 1, 1},
  {&__pyx_n_s__obj, __pyx_k__obj, sizeof(__pyx_k__obj), 0, 0, 1, 1},
  {&__pyx_n_s__obj_unique, __pyx_k__obj_unique, sizeof(__pyx_k__obj_unique), 0, 0, 1, 1},
  {&__pyx_n_s__objbuf, __pyx_k__objbuf, sizeof(__pyx_k__objbuf), 0, 0, 1, 1},
  {&__pyx_n_s__object, __pyx_k__object, sizeof(__pyx_k__object), 0, 0, 1, 1},
  {&__pyx_n_s__object_, __pyx_k__object_, sizeof(__pyx_k__object_), 0, 0, 1, 1},
  {&__pyx_n_s__objects, __pyx_k__objects, sizeof(__pyx_k__objects), 0, 0, 1, 1},
  {&__pyx_n_s__offset, __pyx_k__offset, sizeof(__pyx_k__offset), 0, 0, 1, 1},
  {&__pyx_n_s__oldIndex, __pyx_k__oldIndex, sizeof(__pyx_k__oldIndex), 0, 0, 1, 1},
  {&__pyx_n_s__oldLength, __pyx_k__oldLength, sizeof(__pyx_k__oldLength), 0, 0, 1, 1},
  {&__pyx_n_s__oldMap, __pyx_k__oldMap, sizeof(__pyx_k__oldMap), 0, 0, 1, 1},
  {&__pyx_n_s__oldPos, __pyx_k__oldPos, sizeof(__pyx_k__oldPos), 0, 0, 1, 1},
  {&__pyx_n_s__oldbuf, __pyx_k__oldbuf, sizeof(__pyx_k__oldbuf), 0, 0, 1, 1},
  {&__pyx_n_s__oldw, __pyx_k__oldw, sizeof(__pyx_k__oldw), 0, 0, 1, 1},
  {&__pyx_n_s__onan, __pyx_k__onan, sizeof(__pyx_k__onan), 0, 0, 1, 1},
  {&__pyx_n_s__ones, __pyx_k__ones, sizeof(__pyx_k__ones), 0, 0, 1, 1},
  {&__pyx_n_s__op, __pyx_k__op, sizeof(__pyx_k__op), 0, 0, 1, 1},
  {&__pyx_n_s__operator, __pyx_k__operator, sizeof(__pyx_k__operator), 0, 0, 1, 1},
  {&__pyx_n_s__ordered_left_join, __pyx_k__ordered_left_join, sizeof(__pyx_k__ordered_left_join), 0, 0, 1, 1},
  {&__pyx_n_s__other, __pyx_k__other, sizeof(__pyx_k__other), 0, 0, 1, 1},
  {&__pyx_n_s__out, __pyx_k__out, sizeof(__pyx_k__out), 0, 0, 1, 1},
  {&__pyx_n_s__outbuf, __pyx_k__outbuf, sizeof(__pyx_k__outbuf), 0, 0, 1, 1},
  {&__pyx_n_s__output, __pyx_k__output, sizeof(__pyx_k__output), 0, 0, 1, 1},
  {&__pyx_n_s__pad_2d_inplace_bool, __pyx_k__pad_2d_inplace_bool, sizeof(__pyx_k__pad_2d_inplace_bool), 0, 0, 1, 1},
  {&__pyx_n_s__pad_bool, __pyx_k__pad_bool, sizeof(__pyx_k__pad_bool), 0, 0, 1, 1},
  {&__pyx_n_s__pad_float64, __pyx_k__pad_float64, sizeof(__pyx_k__pad_float64), 0, 0, 1, 1},
  {&__pyx_n_s__pad_inplace_float64, __pyx_k__pad_inplace_float64, sizeof(__pyx_k__pad_inplace_float64), 0, 0, 1, 1},
  {&__pyx_n_s__pad_int32, __pyx_k__pad_int32, sizeof(__pyx_k__pad_int32), 0, 0, 1, 1},
  {&__pyx_n_s__pad_int64, __pyx_k__pad_int64, sizeof(__pyx_k__pad_int64), 0, 0, 1, 1},
  {&__pyx_n_s__pad_object, __pyx_k__pad_object, sizeof(__pyx_k__pad_object), 0, 0, 1, 1},
  {&__pyx_n_s__parse, __pyx_k__parse, sizeof(__pyx_k__parse), 0, 0, 1, 1},
  {&__pyx_n_s__parse_date, __pyx_k__parse_date, sizeof(__pyx_k__parse_date), 0, 0, 1, 1},
  {&__pyx_n_s__parser, __pyx_k__parser, sizeof(__pyx_k__parser), 0, 0, 1, 1},
  {&__pyx_n_s__position, __pyx_k__position, sizeof(__pyx_k__position), 0, 0, 1, 1},
  {&__pyx_n_s__pre, __pyx_k__pre, sizeof(__pyx_k__pre), 0, 0, 1, 1},
  {&__pyx_n_s__prev, __pyx_k__prev, sizeof(__pyx_k__prev), 0, 0, 1, 1},
  {&__pyx_n_s__prevOld, __pyx_k__prevOld, sizeof(__pyx_k__prevOld), 0, 0, 1, 1},
  {&__pyx_n_s__put, __pyx_k__put, sizeof(__pyx_k__put), 0, 0, 1, 1},
  {&__pyx_n_s__putmask, __pyx_k__putmask, sizeof(__pyx_k__putmask), 0, 0, 1, 1},
  {&__pyx_n_s__pydate, __pyx_k__pydate, sizeof(__pyx_k__pydate), 0, 0, 1, 1},
  {&__pyx_n_s__pydatetime, __pyx_k__pydatetime, sizeof(__pyx_k__pydatetime), 0, 0, 1, 1},
  {&__pyx_n_s__quantile, __pyx_k__quantile, sizeof(__pyx_k__quantile), 0, 0, 1, 1},
  {&__pyx_n_s__random, __pyx_k__random, sizeof(__pyx_k__random), 0, 0, 1, 1},
  {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
  {&__pyx_n_s__rank_1d_float64, __pyx_k__rank_1d_float64, sizeof(__pyx_k__rank_1d_float64), 0, 0, 1, 1},
  {&__pyx_n_s__rank_1d_generic, __pyx_k__rank_1d_generic, sizeof(__pyx_k__rank_1d_generic), 0, 0, 1, 1},
  {&__pyx_n_s__rank_1d_int64, __pyx_k__rank_1d_int64, sizeof(__pyx_k__rank_1d_int64), 0, 0, 1, 1},
  {&__pyx_n_s__rank_2d_float64, __pyx_k__rank_2d_float64, sizeof(__pyx_k__rank_2d_float64), 0, 0, 1, 1},
  {&__pyx_n_s__rank_2d_generic, __pyx_k__rank_2d_generic, sizeof(__pyx_k__rank_2d_generic), 0, 0, 1, 1},
  {&__pyx_n_s__rank_2d_int64, __pyx_k__rank_2d_int64, sizeof(__pyx_k__rank_2d_int64), 0, 0, 1, 1},
  {&__pyx_n_s__ranks, __pyx_k__ranks, sizeof(__pyx_k__ranks), 0, 0, 1, 1},
  {&__pyx_n_s__rc, __pyx_k__rc, sizeof(__pyx_k__rc), 0, 0, 1, 1},
  {&__pyx_n_s__reduce, __pyx_k__reduce, sizeof(__pyx_k__reduce), 0, 0, 1, 1},
  {&__pyx_n_s__reduce_mean, __pyx_k__reduce_mean, sizeof(__pyx_k__reduce_mean), 0, 0, 1, 1},
  {&__pyx_n_s__reducer, __pyx_k__reducer, sizeof(__pyx_k__reducer), 0, 0, 1, 1},
  {&__pyx_n_s__remove, __pyx_k__remove, sizeof(__pyx_k__remove), 0, 0, 1, 1},
  {&__pyx_n_s__res, __pyx_k__res, sizeof(__pyx_k__res), 0, 0, 1, 1},
  {&__pyx_n_s__result, __pyx_k__result, sizeof(__pyx_k__result), 0, 0, 1, 1},
  {&__pyx_n_s__result_counts, __pyx_k__result_counts, sizeof(__pyx_k__result_counts), 0, 0, 1, 1},
  {&__pyx_n_s__result_keys, __pyx_k__result_keys, sizeof(__pyx_k__result_keys), 0, 0, 1, 1},
  {&__pyx_n_s__ret, __pyx_k__ret, sizeof(__pyx_k__ret), 0, 0, 1, 1},
  {&__pyx_n_s__retry, __pyx_k__retry, sizeof(__pyx_k__retry), 0, 0, 1, 1},
  {&__pyx_n_s__rev, __pyx_k__rev, sizeof(__pyx_k__rev), 0, 0, 1, 1},
  {&__pyx_n_s__rev_indexer, __pyx_k__rev_indexer, sizeof(__pyx_k__rev_indexer), 0, 0, 1, 1},
  {&__pyx_n_s__reverse, __pyx_k__reverse, sizeof(__pyx_k__reverse), 0, 0, 1, 1},
  {&__pyx_n_s__ridx, __pyx_k__ridx, sizeof(__pyx_k__ridx), 0, 0, 1, 1},
  {&__pyx_n_s__right, __pyx_k__right, sizeof(__pyx_k__right), 0, 0, 1, 1},
  {&__pyx_n_s__right_count, __pyx_k__right_count, sizeof(__pyx_k__right_count), 0, 0, 1, 1},
  {&__pyx_n_s__right_indexer, __pyx_k__right_indexer, sizeof(__pyx_k__right_indexer), 0, 0, 1, 1},
  {&__pyx_n_s__right_pos, __pyx_k__right_pos, sizeof(__pyx_k__right_pos), 0, 0, 1, 1},
  {&__pyx_n_s__right_sorter, __pyx_k__right_sorter, sizeof(__pyx_k__right_sorter), 0, 0, 1, 1},
  {&__pyx_n_s__rindexer, __pyx_k__rindexer, sizeof(__pyx_k__rindexer), 0, 0, 1, 1},
  {&__pyx_n_s__rk, __pyx_k__rk, sizeof(__pyx_k__rk), 0, 0, 1, 1},
  {&__pyx_n_s__roll_generic, __pyx_k__roll_generic, sizeof(__pyx_k__roll_generic), 0, 0, 1, 1},
  {&__pyx_n_s__roll_kurt, __pyx_k__roll_kurt, sizeof(__pyx_k__roll_kurt), 0, 0, 1, 1},
  {&__pyx_n_s__roll_max, __pyx_k__roll_max, sizeof(__pyx_k__roll_max), 0, 0, 1, 1},
  {&__pyx_n_s__roll_mean, __pyx_k__roll_mean, sizeof(__pyx_k__roll_mean), 0, 0, 1, 1},
  {&__pyx_n_s__roll_median_c, __pyx_k__roll_median_c, sizeof(__pyx_k__roll_median_c), 0, 0, 1, 1},
  {&__pyx_n_s__roll_median_cython, __pyx_k__roll_median_cython, sizeof(__pyx_k__roll_median_cython), 0, 0, 1, 1},
  {&__pyx_n_s__roll_min, __pyx_k__roll_min, sizeof(__pyx_k__roll_min), 0, 0, 1, 1},
  {&__pyx_n_s__roll_quantile, __pyx_k__roll_quantile, sizeof(__pyx_k__roll_quantile), 0, 0, 1, 1},
  {&__pyx_n_s__roll_skew, __pyx_k__roll_skew, sizeof(__pyx_k__roll_skew), 0, 0, 1, 1},
  {&__pyx_n_s__roll_sum, __pyx_k__roll_sum, sizeof(__pyx_k__roll_sum), 0, 0, 1, 1},
  {&__pyx_n_s__roll_var, __pyx_k__roll_var, sizeof(__pyx_k__roll_var), 0, 0, 1, 1},
  {&__pyx_n_s__row, __pyx_k__row, sizeof(__pyx_k__row), 0, 0, 1, 1},
  {&__pyx_n_s__rows, __pyx_k__rows, sizeof(__pyx_k__rows), 0, 0, 1, 1},
  {&__pyx_n_s__rval, __pyx_k__rval, sizeof(__pyx_k__rval), 0, 0, 1, 1},
  {&__pyx_n_s__rvalues, __pyx_k__rvalues, sizeof(__pyx_k__rvalues), 0, 0, 1, 1},
  {&__pyx_n_s__s, __pyx_k__s, sizeof(__pyx_k__s), 0, 0, 1, 1},
  {&__pyx_n_s__safe, __pyx_k__safe, sizeof(__pyx_k__safe), 0, 0, 1, 1},
  {&__pyx_n_s__sanitize_objects, __pyx_k__sanitize_objects, sizeof(__pyx_k__sanitize_objects), 0, 0, 1, 1},
  {&__pyx_n_s__scalar_binop, __pyx_k__scalar_binop, sizeof(__pyx_k__scalar_binop), 0, 0, 1, 1},
  {&__pyx_n_s__scalar_compare, __pyx_k__scalar_compare, sizeof(__pyx_k__scalar_compare), 0, 0, 1, 1},
  {&__pyx_n_s__searchsorted, __pyx_k__searchsorted, sizeof(__pyx_k__searchsorted), 0, 0, 1, 1},
  {&__pyx_n_s__seen, __pyx_k__seen, sizeof(__pyx_k__seen), 0, 0, 1, 1},
  {&__pyx_n_s__seen_bool, __pyx_k__seen_bool, sizeof(__pyx_k__seen_bool), 0, 0, 1, 1},
  {&__pyx_n_s__seen_float, __pyx_k__seen_float, sizeof(__pyx_k__seen_float), 0, 0, 1, 1},
  {&__pyx_n_s__seen_int, __pyx_k__seen_int, sizeof(__pyx_k__seen_int), 0, 0, 1, 1},
  {&__pyx_n_s__seen_null, __pyx_k__seen_null, sizeof(__pyx_k__seen_null), 0, 0, 1, 1},
  {&__pyx_n_s__seen_object, __pyx_k__seen_object, sizeof(__pyx_k__seen_object), 0, 0, 1, 1},
  {&__pyx_n_s__self, __pyx_k__self, sizeof(__pyx_k__self), 0, 0, 1, 1},
  {&__pyx_n_s__series, __pyx_k__series, sizeof(__pyx_k__series), 0, 0, 1, 1},
  {&__pyx_n_s__set_item, __pyx_k__set_item, sizeof(__pyx_k__set_item), 0, 0, 1, 1},
  {&__pyx_n_s__shape, __pyx_k__shape, sizeof(__pyx_k__shape), 0, 0, 1, 1},
  {&__pyx_n_s__side, __pyx_k__side, sizeof(__pyx_k__side), 0, 0, 1, 1},
  {&__pyx_n_s__size, __pyx_k__size, sizeof(__pyx_k__size), 0, 0, 1, 1},
  {&__pyx_n_s__size_hint, __pyx_k__size_hint, sizeof(__pyx_k__size_hint), 0, 0, 1, 1},
  {&__pyx_n_s__skiplist, __pyx_k__skiplist, sizeof(__pyx_k__skiplist), 0, 0, 1, 1},
  {&__pyx_n_s__sl, __pyx_k__sl, sizeof(__pyx_k__sl), 0, 0, 1, 1},
  {&__pyx_n_s__slobj, __pyx_k__slobj, sizeof(__pyx_k__slobj), 0, 0, 1, 1},
  {&__pyx_n_s__sort, __pyx_k__sort, sizeof(__pyx_k__sort), 0, 0, 1, 1},
  {&__pyx_n_s__sorted_data, __pyx_k__sorted_data, sizeof(__pyx_k__sorted_data), 0, 0, 1, 1},
  {&__pyx_n_s__sorter, __pyx_k__sorter, sizeof(__pyx_k__sorter), 0, 0, 1, 1},
  {&__pyx_n_s__start, __pyx_k__start, sizeof(__pyx_k__start), 0, 0, 1, 1},
  {&__pyx_n_s__starts, __pyx_k__starts, sizeof(__pyx_k__starts), 0, 0, 1, 1},
  {&__pyx_n_s__string, __pyx_k__string, sizeof(__pyx_k__string), 0, 0, 1, 1},
  {&__pyx_n_s__string_, __pyx_k__string_, sizeof(__pyx_k__string_), 0, 0, 1, 1},
  {&__pyx_n_s__strptime, __pyx_k__strptime, sizeof(__pyx_k__strptime), 0, 0, 1, 1},
  {&__pyx_n_s__stub, __pyx_k__stub, sizeof(__pyx_k__stub), 0, 0, 1, 1},
  {&__pyx_n_s__sum_ranks, __pyx_k__sum_ranks, sizeof(__pyx_k__sum_ranks), 0, 0, 1, 1},
  {&__pyx_n_s__sum_x, __pyx_k__sum_x, sizeof(__pyx_k__sum_x), 0, 0, 1, 1},
  {&__pyx_n_s__sum_xx, __pyx_k__sum_xx, sizeof(__pyx_k__sum_xx), 0, 0, 1, 1},
  {&__pyx_n_s__sumx, __pyx_k__sumx, sizeof(__pyx_k__sumx), 0, 0, 1, 1},
  {&__pyx_n_s__sumxx, __pyx_k__sumxx, sizeof(__pyx_k__sumxx), 0, 0, 1, 1},
  {&__pyx_n_s__t, __pyx_k__t, sizeof(__pyx_k__t), 0, 0, 1, 1},
  {&__pyx_n_s__table, __pyx_k__table, sizeof(__pyx_k__table), 0, 0, 1, 1},
  {&__pyx_n_s__take, __pyx_k__take, sizeof(__pyx_k__take), 0, 0, 1, 1},
  {&__pyx_n_s__take_1d_bool, __pyx_k__take_1d_bool, sizeof(__pyx_k__take_1d_bool), 0, 0, 1, 1},
  {&__pyx_n_s__take_1d_float64, __pyx_k__take_1d_float64, sizeof(__pyx_k__take_1d_float64), 0, 0, 1, 1},
  {&__pyx_n_s__take_1d_int32, __pyx_k__take_1d_int32, sizeof(__pyx_k__take_1d_int32), 0, 0, 1, 1},
  {&__pyx_n_s__take_1d_int64, __pyx_k__take_1d_int64, sizeof(__pyx_k__take_1d_int64), 0, 0, 1, 1},
  {&__pyx_n_s__take_1d_object, __pyx_k__take_1d_object, sizeof(__pyx_k__take_1d_object), 0, 0, 1, 1},
  {&__pyx_n_s__take_2d_axis0_bool, __pyx_k__take_2d_axis0_bool, sizeof(__pyx_k__take_2d_axis0_bool), 0, 0, 1, 1},
  {&__pyx_n_s__take_2d_axis0_int32, __pyx_k__take_2d_axis0_int32, sizeof(__pyx_k__take_2d_axis0_int32), 0, 0, 1, 1},
  {&__pyx_n_s__take_2d_axis0_int64, __pyx_k__take_2d_axis0_int64, sizeof(__pyx_k__take_2d_axis0_int64), 0, 0, 1, 1},
  {&__pyx_n_s__take_2d_axis1_bool, __pyx_k__take_2d_axis1_bool, sizeof(__pyx_k__take_2d_axis1_bool), 0, 0, 1, 1},
  {&__pyx_n_s__take_2d_axis1_int32, __pyx_k__take_2d_axis1_int32, sizeof(__pyx_k__take_2d_axis1_int32), 0, 0, 1, 1},
  {&__pyx_n_s__take_2d_axis1_int64, __pyx_k__take_2d_axis1_int64, sizeof(__pyx_k__take_2d_axis1_int64), 0, 0, 1, 1},
  {&__pyx_n_s__take_last, __pyx_k__take_last, sizeof(__pyx_k__take_last), 0, 0, 1, 1},
  {&__pyx_n_s__test, __pyx_k__test, sizeof(__pyx_k__test), 0, 0, 1, 1},
  {&__pyx_n_s__test_str, __pyx_k__test_str, sizeof(__pyx_k__test_str), 0, 0, 1, 1},
  {&__pyx_n_s__the_sum, __pyx_k__the_sum, sizeof(__pyx_k__the_sum), 0, 0, 1, 1},
  {&__pyx_n_s__tiebreak, __pyx_k__tiebreak, sizeof(__pyx_k__tiebreak), 0, 0, 1, 1},
  {&__pyx_n_s__tiebreakers, __pyx_k__tiebreakers, sizeof(__pyx_k__tiebreakers), 0, 0, 1, 1},
  {&__pyx_n_s__ties_method, __pyx_k__ties_method, sizeof(__pyx_k__ties_method), 0, 0, 1, 1},
  {&__pyx_n_s__time, __pyx_k__time, sizeof(__pyx_k__time), 0, 0, 1, 1},
  {&__pyx_n_s__tmp, __pyx_k__tmp, sizeof(__pyx_k__tmp), 0, 0, 1, 1},
  {&__pyx_n_s__to_object_array, __pyx_k__to_object_array, sizeof(__pyx_k__to_object_array), 0, 0, 1, 1},
  {&__pyx_n_s__toordinal, __pyx_k__toordinal, sizeof(__pyx_k__toordinal), 0, 0, 1, 1},
  {&__pyx_n_s__try_float, __pyx_k__try_float, sizeof(__pyx_k__try_float), 0, 0, 1, 1},
  {&__pyx_n_s__try_parse_dates, __pyx_k__try_parse_dates, sizeof(__pyx_k__try_parse_dates), 0, 0, 1, 1},
  {&__pyx_n_s__ts_upsample_generic, __pyx_k__ts_upsample_generic, sizeof(__pyx_k__ts_upsample_generic), 0, 0, 1, 1},
  {&__pyx_n_s__tup, __pyx_k__tup, sizeof(__pyx_k__tup), 0, 0, 1, 1},
  {&__pyx_n_s__tuples, __pyx_k__tuples, sizeof(__pyx_k__tuples), 0, 0, 1, 1},
  {&__pyx_n_s__type, __pyx_k__type, sizeof(__pyx_k__type), 0, 0, 1, 1},
  {&__pyx_n_s__uint16, __pyx_k__uint16, sizeof(__pyx_k__uint16), 0, 0, 1, 1},
  {&__pyx_n_s__uint32, __pyx_k__uint32, sizeof(__pyx_k__uint32), 0, 0, 1, 1},
  {&__pyx_n_s__uint64, __pyx_k__uint64, sizeof(__pyx_k__uint64), 0, 0, 1, 1},
  {&__pyx_n_s__uint8, __pyx_k__uint8, sizeof(__pyx_k__uint8), 0, 0, 1, 1},
  {&__pyx_n_s__unicode, __pyx_k__unicode, sizeof(__pyx_k__unicode), 0, 0, 1, 1},
  {&__pyx_n_s__unicode_, __pyx_k__unicode_, sizeof(__pyx_k__unicode_), 0, 0, 1, 1},
  {&__pyx_n_s__unique, __pyx_k__unique, sizeof(__pyx_k__unique), 0, 0, 1, 1},
  {&__pyx_n_s__uniques, __pyx_k__uniques, sizeof(__pyx_k__uniques), 0, 0, 1, 1},
  {&__pyx_n_s__utcfromtimestamp, __pyx_k__utcfromtimestamp, sizeof(__pyx_k__utcfromtimestamp), 0, 0, 1, 1},
  {&__pyx_n_s__val, __pyx_k__val, sizeof(__pyx_k__val), 0, 0, 1, 1},
  {&__pyx_n_s__val_kind, __pyx_k__val_kind, sizeof(__pyx_k__val_kind), 0, 0, 1, 1},
  {&__pyx_n_s__valid_locs, __pyx_k__valid_locs, sizeof(__pyx_k__valid_locs), 0, 0, 1, 1},
  {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1},
  {&__pyx_n_s__value_count_int64, __pyx_k__value_count_int64, sizeof(__pyx_k__value_count_int64), 0, 0, 1, 1},
  {&__pyx_n_s__values, __pyx_k__values, sizeof(__pyx_k__values), 0, 0, 1, 1},
  {&__pyx_n_s__vec_binop, __pyx_k__vec_binop, sizeof(__pyx_k__vec_binop), 0, 0, 1, 1},
  {&__pyx_n_s__vec_compare, __pyx_k__vec_compare, sizeof(__pyx_k__vec_compare), 0, 0, 1, 1},
  {&__pyx_n_s__vecs, __pyx_k__vecs, sizeof(__pyx_k__vecs), 0, 0, 1, 1},
  {&__pyx_n_s__view, __pyx_k__view, sizeof(__pyx_k__view), 0, 0, 1, 1},
  {&__pyx_n_s__where, __pyx_k__where, sizeof(__pyx_k__where), 0, 0, 1, 1},
  {&__pyx_n_s__width, __pyx_k__width, sizeof(__pyx_k__width), 0, 0, 1, 1},
  {&__pyx_n_s__win, __pyx_k__win, sizeof(__pyx_k__win), 0, 0, 1, 1},
  {&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1},
  {&__pyx_n_s__xx, __pyx_k__xx, sizeof(__pyx_k__xx), 0, 0, 1, 1},
  {&__pyx_n_s__xxx, __pyx_k__xxx, sizeof(__pyx_k__xxx), 0, 0, 1, 1},
  {&__pyx_n_s__xxxx, __pyx_k__xxxx, sizeof(__pyx_k__xxxx), 0, 0, 1, 1},
  {&__pyx_n_s__y, __pyx_k__y, sizeof(__pyx_k__y), 0, 0, 1, 1},
  {&__pyx_n_s__z, __pyx_k__z, sizeof(__pyx_k__z), 0, 0, 1, 1},
  {&__pyx_n_s__zeros, __pyx_k__zeros, sizeof(__pyx_k__zeros), 0, 0, 1, 1},
  {&__pyx_n_s__zeros_like, __pyx_k__zeros_like, sizeof(__pyx_k__zeros_like), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_n_s__object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_Exception = __Pyx_GetName(__pyx_b, __pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_AssertionError = __Pyx_GetName(__pyx_b, __pyx_n_s__AssertionError); if (!__pyx_builtin_AssertionError) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ImportError = __Pyx_GetName(__pyx_b, __pyx_n_s__ImportError); if (!__pyx_builtin_ImportError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants");

  /* "pandas/src/tseries.pyx":437
 *         it = <flatiter> PyArray_IterNew(arr)
 *         if len(arr) != n:
 *             raise ValueError('all arrays but be same length')             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_k_tuple_2 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_2);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_1));
  PyTuple_SET_ITEM(__pyx_k_tuple_2, 0, ((PyObject *)__pyx_kp_s_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2));

  /* "pandas/src/tseries.pyx":520
 *         flag = cpython.Py_NE
 *     else:
 *         raise ValueError('Unrecognized operator')             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n, dtype=object)
 */
  __pyx_k_tuple_4 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_4);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
  PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, ((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));

  /* "pandas/src/tseries.pyx":554
 *         flag = cpython.Py_NE
 *     else:
 *         raise ValueError('Unrecognized operator')             # <<<<<<<<<<<<<<
 * 
 *     result = np.empty(n, dtype=object)
 */
  __pyx_k_tuple_5 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_5);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
  PyTuple_SET_ITEM(__pyx_k_tuple_5, 0, ((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5));

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":138
 * 
 *         if value != (<Node> (<Node> (<Node> chain[0]).next)[0]).value:
 *             raise KeyError('Not Found')             # <<<<<<<<<<<<<<
 * 
 *         # remove one link at each level
 */
  __pyx_k_tuple_7 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_7);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_6));
  PyTuple_SET_ITEM(__pyx_k_tuple_7, 0, ((PyObject *)__pyx_kp_s_6));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_6));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7));

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":220
 *         minp = 1
 *     elif minp < 0:
 *         raise ValueError('min_periods must be >= 0')             # <<<<<<<<<<<<<<
 *     return minp
 * 
 */
  __pyx_k_tuple_14 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_14);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_13));
  PyTuple_SET_ITEM(__pyx_k_tuple_14, 0, ((PyObject *)__pyx_kp_s_13));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":541
 * cdef double_t _get_min(object skiplist, int nobs, int minp):
 *     if nobs >= minp:
 *         return <IndexableSkiplist> skiplist.get(0)             # <<<<<<<<<<<<<<
 *     else:
 *         return NaN
 */
  __pyx_k_tuple_15 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_15);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_15, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":599
 * 
 *     if not input.flags.c_contiguous:
 *         input = input.copy('C')             # <<<<<<<<<<<<<<
 * 
 *     buf = <float64_t*> input.data
 */
  __pyx_k_tuple_16 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_16);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__C));
  PyTuple_SET_ITEM(__pyx_k_tuple_16, 0, ((PyObject *)__pyx_n_s__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":217
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_k_tuple_17 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_17);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_17, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_17));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":275
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_k_tuple_18 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_18);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_18, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_18));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":333
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_k_tuple_19 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_19);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_19, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":391
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_k_tuple_20 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_20)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_20);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_20, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_20));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":449
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_k_tuple_21 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_21);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":508
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_k_tuple_22 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_22)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_22);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_22, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_22));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":560
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_k_tuple_23 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_23)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_23);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_23, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_23));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":612
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_k_tuple_24 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_24);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_24, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":664
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_k_tuple_25 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_25);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_25, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":716
 * 
 *     fill_vec = np.empty(len(newIndex), dtype = np.int32)
 *     fill_vec.fill(-1)             # <<<<<<<<<<<<<<
 * 
 *     if oldLength == 0 or newLength == 0:
 */
  __pyx_k_tuple_26 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_26);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_26, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":947
 *             idx = indexer[i]
 *             if idx == -1:
 *                 raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 outbuf[i] = values[idx]
 */
  __pyx_k_tuple_29 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_29)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_29);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_29, 0, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_29));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":979
 *             idx = indexer[i]
 *             if idx == -1:
 *                 raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 outbuf[i] = values[idx]
 */
  __pyx_k_tuple_31 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_31)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_31);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_31, 0, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_31));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1011
 *             idx = indexer[i]
 *             if idx == -1:
 *                 raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 outbuf[i] = values[idx]
 */
  __pyx_k_tuple_33 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_33)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_33);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_33, 0, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_33));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1043
 *             idx = indexer[i]
 *             if idx == -1:
 *                 raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 outbuf[i] = values[idx]
 */
  __pyx_k_tuple_35 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_35);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_35, 0, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1075
 *             idx = indexer[i]
 *             if idx == -1:
 *                 raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 outbuf[i] = values[idx]
 */
  __pyx_k_tuple_37 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_37);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 0, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1404
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for j from 0 <= j < k:
 */
  __pyx_k_tuple_39 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_39);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 0, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1442
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for j from 0 <= j < k:
 */
  __pyx_k_tuple_41 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_41);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 0, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1480
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for j from 0 <= j < k:
 */
  __pyx_k_tuple_43 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_43);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_43, 0, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1518
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for j from 0 <= j < k:
 */
  __pyx_k_tuple_45 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_45);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_45, 0, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1556
 *             if idx == -1:
 *                 for j from 0 <= j < k:
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for j from 0 <= j < k:
 */
  __pyx_k_tuple_47 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_47)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_47);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_47, 0, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_47));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1596
 *             if idx == -1:
 *                 for i in range(n):
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(n):
 */
  __pyx_k_tuple_49 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_49)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_49);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_49, 0, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_49));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1636
 *             if idx == -1:
 *                 for i in range(n):
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(n):
 */
  __pyx_k_tuple_51 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_51);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_51, 0, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1676
 *             if idx == -1:
 *                 for i in range(n):
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(n):
 */
  __pyx_k_tuple_53 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_53)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_53);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_53, 0, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_53));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1716
 *             if idx == -1:
 *                 for i in range(n):
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(n):
 */
  __pyx_k_tuple_55 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_55)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_55);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_55, 0, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_55));

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1756
 *             if idx == -1:
 *                 for i in range(n):
 *                     raise ValueError('No NA values allowed')             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(n):
 */
  __pyx_k_tuple_57 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_57)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_57);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_28));
  PyTuple_SET_ITEM(__pyx_k_tuple_57, 0, ((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_28));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_57));

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":18
 *         if axis == 0:
 *             if not arr.flags.f_contiguous:
 *                 arr = arr.copy('F')             # <<<<<<<<<<<<<<
 * 
 *             self.nresults = k
 */
  __pyx_k_tuple_58 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_58)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_58);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__F));
  PyTuple_SET_ITEM(__pyx_k_tuple_58, 0, ((PyObject *)__pyx_n_s__F));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__F));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_58));

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":25
 *         else:
 *             if not arr.flags.c_contiguous:
 *                 arr = arr.copy('C')             # <<<<<<<<<<<<<<
 * 
 *             self.nresults = n
 */
  __pyx_k_tuple_59 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_59);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__C));
  PyTuple_SET_ITEM(__pyx_k_tuple_59, 0, ((PyObject *)__pyx_n_s__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59));

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":40
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')             # <<<<<<<<<<<<<<
 *             if len(dummy) != self.chunksize:
 *                 raise ValueError('Dummy array must be length %d' %
 */
  __pyx_k_tuple_61 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_61);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_60));
  PyTuple_SET_ITEM(__pyx_k_tuple_61, 0, ((PyObject *)__pyx_kp_s_60));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_60));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61));

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":88
 *             result[0] = res
 *         except Exception:
 *             raise ValueError('function does not reduce')             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_k_tuple_64 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_64)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_64);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_63));
  PyTuple_SET_ITEM(__pyx_k_tuple_64, 0, ((PyObject *)__pyx_kp_s_63));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_63));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_64));

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":110
 *         self.f = f
 *         if not series.flags.c_contiguous:
 *             series = series.copy('C')             # <<<<<<<<<<<<<<
 *         self.arr = series
 *         self.index = series.index
 */
  __pyx_k_tuple_65 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_65)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_65);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__C));
  PyTuple_SET_ITEM(__pyx_k_tuple_65, 0, ((PyObject *)__pyx_n_s__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_65));

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":120
 *     def _check_dummy(self, dummy=None):
 *         if dummy is None:
 *             dummy = np.empty(0, dtype=self.arr.dtype)             # <<<<<<<<<<<<<<
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 */
  __pyx_k_tuple_66 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_66)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_66);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_66, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_66));

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":123
 *         else:
 *             if dummy.dtype != self.arr.dtype:
 *                 raise ValueError('Dummy array must be same dtype')             # <<<<<<<<<<<<<<
 *             if not dummy.flags.contiguous:
 *                 dummy = dummy.copy()
 */
  __pyx_k_tuple_67 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_67);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_60));
  PyTuple_SET_ITEM(__pyx_k_tuple_67, 0, ((PyObject *)__pyx_kp_s_60));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_60));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67));

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":194
 *             result = np.empty(self.ngroups, dtype='O')
 *         except Exception:
 *             raise ValueError('function does not reduce')             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_k_tuple_68 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_68)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_68);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_63));
  PyTuple_SET_ITEM(__pyx_k_tuple_68, 0, ((PyObject *)__pyx_kp_s_63));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_63));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_68));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":109
 * 
 *     if not ascending:
 *         _as = _as[::-1]             # <<<<<<<<<<<<<<
 * 
 *     sorted_data = values.take(_as)
 */
  __pyx_k_slice_70 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_k_slice_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_slice_70);
  __Pyx_GIVEREF(__pyx_k_slice_70);

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":112
 * 
 *     sorted_data = values.take(_as)
 *     argsorted = _as.astype('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_k_tuple_71 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_71);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_71, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_71));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":171
 * 
 *     if not ascending:
 *         _as = _as[::-1]             # <<<<<<<<<<<<<<
 * 
 *     sorted_data = values.take(_as)
 */
  __pyx_k_slice_73 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_k_slice_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_slice_73);
  __Pyx_GIVEREF(__pyx_k_slice_73);

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":174
 * 
 *     sorted_data = values.take(_as)
 *     argsorted = _as.astype('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_k_tuple_74 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_74);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_74, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":238
 *             tiebreak = TIEBREAK_FIRST_DESCENDING
 *     else:
 *         _as = values.argsort(1)             # <<<<<<<<<<<<<<
 * 
 *     if not ascending:
 */
  __pyx_k_tuple_76 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_76);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_76, 0, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_76));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":241
 * 
 *     if not ascending:
 *         _as = _as[:, ::-1]             # <<<<<<<<<<<<<<
 * 
 *     values = _take_2d_float64(values, _as)
 */
  __pyx_k_slice_77 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_slice_77);
  __Pyx_GIVEREF(__pyx_k_slice_77);
  __pyx_k_slice_78 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_k_slice_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_slice_78);
  __Pyx_GIVEREF(__pyx_k_slice_78);
  __pyx_k_tuple_79 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_79);
  __Pyx_INCREF(__pyx_k_slice_77);
  PyTuple_SET_ITEM(__pyx_k_tuple_79, 0, __pyx_k_slice_77);
  __Pyx_GIVEREF(__pyx_k_slice_77);
  __Pyx_INCREF(__pyx_k_slice_78);
  PyTuple_SET_ITEM(__pyx_k_tuple_79, 1, __pyx_k_slice_78);
  __Pyx_GIVEREF(__pyx_k_slice_78);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_79));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":244
 * 
 *     values = _take_2d_float64(values, _as)
 *     argsorted = _as.astype('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_k_tuple_80 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_80)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_80);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_80, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_80));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":309
 *             tiebreak = TIEBREAK_FIRST_DESCENDING
 *     else:
 *         _as = values.argsort(1)             # <<<<<<<<<<<<<<
 * 
 *     if not ascending:
 */
  __pyx_k_tuple_82 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_82)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_82);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_82, 0, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_82));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":312
 * 
 *     if not ascending:
 *         _as = _as[:, ::-1]             # <<<<<<<<<<<<<<
 * 
 *     values = _take_2d_int64(values, _as)
 */
  __pyx_k_slice_83 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_83)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_slice_83);
  __Pyx_GIVEREF(__pyx_k_slice_83);
  __pyx_k_slice_84 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_k_slice_84)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_slice_84);
  __Pyx_GIVEREF(__pyx_k_slice_84);
  __pyx_k_tuple_85 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_85)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_85);
  __Pyx_INCREF(__pyx_k_slice_83);
  PyTuple_SET_ITEM(__pyx_k_tuple_85, 0, __pyx_k_slice_83);
  __Pyx_GIVEREF(__pyx_k_slice_83);
  __Pyx_INCREF(__pyx_k_slice_84);
  PyTuple_SET_ITEM(__pyx_k_tuple_85, 1, __pyx_k_slice_84);
  __Pyx_GIVEREF(__pyx_k_slice_84);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_85));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":315
 * 
 *     values = _take_2d_int64(values, _as)
 *     argsorted = _as.astype('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_k_tuple_86 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_86)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_86);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_86, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_86));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":366
 * 
 *     if values.dtype != np.object_:
 *         values = values.astype('O')             # <<<<<<<<<<<<<<
 * 
 *     if ascending:
 */
  __pyx_k_tuple_88 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_88)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_88);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__O));
  PyTuple_SET_ITEM(__pyx_k_tuple_88, 0, ((PyObject *)__pyx_n_s__O));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__O));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_88));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":395
 * 
 *     if not ascending:
 *         _as = _as[::-1]             # <<<<<<<<<<<<<<
 * 
 *     sorted_data = values.take(_as)
 */
  __pyx_k_slice_89 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_k_slice_89)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_slice_89);
  __Pyx_GIVEREF(__pyx_k_slice_89);

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":398
 * 
 *     sorted_data = values.take(_as)
 *     argsorted = _as.astype('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_k_tuple_90 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_90)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_90);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_90, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_90));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":419
 *                     ranks[argsorted[j]] = i + 1
 *             elif tiebreak == TIEBREAK_FIRST:
 *                 raise ValueError('first not supported for non-numeric data')             # <<<<<<<<<<<<<<
 *             sum_ranks = dups = 0
 *     return ranks
 */
  __pyx_k_tuple_92 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_92)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_92);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_91));
  PyTuple_SET_ITEM(__pyx_k_tuple_92, 0, ((PyObject *)__pyx_kp_s_91));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_91));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_92));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":476
 * 
 *     if values.dtype != np.object_:
 *         values = values.astype('O')             # <<<<<<<<<<<<<<
 * 
 *     if ascending:
 */
  __pyx_k_tuple_94 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_94)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_94);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__O));
  PyTuple_SET_ITEM(__pyx_k_tuple_94, 0, ((PyObject *)__pyx_n_s__O));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__O));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_94));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":491
 * 
 *     try:
 *         _as = values.argsort(1)             # <<<<<<<<<<<<<<
 *     except TypeError:
 *         values = in_arr
 */
  __pyx_k_tuple_95 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_95)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_95);
  __Pyx_INCREF(__pyx_int_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_95, 0, __pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_95));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":504
 * 
 *     if not ascending:
 *         _as = _as[:, ::-1]             # <<<<<<<<<<<<<<
 * 
 *     values = _take_2d_object(values, _as)
 */
  __pyx_k_slice_96 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_slice_96)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_slice_96);
  __Pyx_GIVEREF(__pyx_k_slice_96);
  __pyx_k_slice_97 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_k_slice_97)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_slice_97);
  __Pyx_GIVEREF(__pyx_k_slice_97);
  __pyx_k_tuple_98 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_98)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_98);
  __Pyx_INCREF(__pyx_k_slice_96);
  PyTuple_SET_ITEM(__pyx_k_tuple_98, 0, __pyx_k_slice_96);
  __Pyx_GIVEREF(__pyx_k_slice_96);
  __Pyx_INCREF(__pyx_k_slice_97);
  PyTuple_SET_ITEM(__pyx_k_tuple_98, 1, __pyx_k_slice_97);
  __Pyx_GIVEREF(__pyx_k_slice_97);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_98));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":507
 * 
 *     values = _take_2d_object(values, _as)
 *     argsorted = _as.astype('i8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_k_tuple_99 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_99)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_99);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i8));
  PyTuple_SET_ITEM(__pyx_k_tuple_99, 0, ((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i8));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_99));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":530
 *                         ranks[i, argsorted[i, z]] = j + 1
 *                 elif tiebreak == TIEBREAK_FIRST:
 *                     raise ValueError('first not supported for '             # <<<<<<<<<<<<<<
 *                                      'non-numeric data')
 *                 sum_ranks = dups = 0
 */
  __pyx_k_tuple_100 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_100);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_91));
  PyTuple_SET_ITEM(__pyx_k_tuple_100, 0, ((PyObject *)__pyx_kp_s_91));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_91));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_100));

  /* "/home/wesm/code/pandas/pandas/src/properties.pyx":58
 *     def __set__(self, obj, value):
 *         if len(obj) != len(value):
 *             raise AssertionError('Index length did not match values')             # <<<<<<<<<<<<<<
 *         obj._index = self._check_type(value)
 * 
 */
  __pyx_k_tuple_103 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_103)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_103);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_102));
  PyTuple_SET_ITEM(__pyx_k_tuple_103, 0, ((PyObject *)__pyx_kp_s_102));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_102));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_103));

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":51
 * 
 *     if values.dtype != np.object_:
 *         values = values.astype('O')             # <<<<<<<<<<<<<<
 * 
 *     val = util.get_value_1d(values, 0)
 */
  __pyx_k_tuple_105 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_105)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_105);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__O));
  PyTuple_SET_ITEM(__pyx_k_tuple_105, 0, ((PyObject *)__pyx_n_s__O));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__O));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_105));

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":350
 *             parse_date = parser.parse
 *         except ImportError: # pragma: no cover
 *             def parse_date(s):             # <<<<<<<<<<<<<<
 *                 try:
 *                     return datetime.strptime(s, '%m/%d/%Y')
 */
  __pyx_k_tuple_109 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_109)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_109);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__s));
  PyTuple_SET_ITEM(__pyx_k_tuple_109, 0, ((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__s));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_109));
  __pyx_k_codeobj_110 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s__parse_date, 350, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_110)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":534
 *     if n == 0:
 *         # kludge, for Series
 *         return np.empty(0, dtype='f8')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(n):
 */
  __pyx_k_tuple_115 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_115)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_115);
  __Pyx_INCREF(__pyx_int_0);
  PyTuple_SET_ITEM(__pyx_k_tuple_115, 0, __pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_115));

  /* "/home/wesm/code/pandas/pandas/src/internals.pyx":8
 * 
 *     rev_indexer = np.empty(length, dtype='i4')
 *     rev_indexer.fill(-1)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         idx = indexer[i]
 */
  __pyx_k_tuple_116 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_116)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_116);
  __Pyx_INCREF(__pyx_int_neg_1);
  PyTuple_SET_ITEM(__pyx_k_tuple_116, 0, __pyx_int_neg_1);
  __Pyx_GIVEREF(__pyx_int_neg_1);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_116));

  /* "numpy.pxd":214
 *             if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not C contiguous")             # <<<<<<<<<<<<<<
 * 
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 */
  __pyx_k_tuple_122 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_122)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_122);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_121));
  PyTuple_SET_ITEM(__pyx_k_tuple_122, 0, ((PyObject *)__pyx_kp_u_121));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_121));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_122));

  /* "numpy.pxd":218
 *             if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
 *                 and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
 *                 raise ValueError(u"ndarray is not Fortran contiguous")             # <<<<<<<<<<<<<<
 * 
 *             info.buf = PyArray_DATA(self)
 */
  __pyx_k_tuple_124 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_124)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_124);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_123));
  PyTuple_SET_ITEM(__pyx_k_tuple_124, 0, ((PyObject *)__pyx_kp_u_123));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_123));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_124));

  /* "numpy.pxd":256
 *                 if ((descr.byteorder == '>' and little_endian) or
 *                     (descr.byteorder == '<' and not little_endian)):
 *                     raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *                 if   t == NPY_BYTE:        f = "b"
 *                 elif t == NPY_UBYTE:       f = "B"
 */
  __pyx_k_tuple_126 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_126)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_126);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_125));
  PyTuple_SET_ITEM(__pyx_k_tuple_126, 0, ((PyObject *)__pyx_kp_u_125));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_125));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_126));

  /* "numpy.pxd":798
 * 
 *         if (end - f) - (new_offset - offset[0]) < 15:
 *             raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")             # <<<<<<<<<<<<<<
 * 
 *         if ((child.byteorder == '>' and little_endian) or
 */
  __pyx_k_tuple_129 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_129)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_129);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_128));
  PyTuple_SET_ITEM(__pyx_k_tuple_129, 0, ((PyObject *)__pyx_kp_u_128));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_128));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_129));

  /* "numpy.pxd":802
 *         if ((child.byteorder == '>' and little_endian) or
 *             (child.byteorder == '<' and not little_endian)):
 *             raise ValueError(u"Non-native byte order not supported")             # <<<<<<<<<<<<<<
 *             # One could encode it in the format string and have Cython
 *             # complain instead, BUT: < and > in format strings also imply
 */
  __pyx_k_tuple_130 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_130)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_130);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_125));
  PyTuple_SET_ITEM(__pyx_k_tuple_130, 0, ((PyObject *)__pyx_kp_u_125));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_125));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_130));

  /* "numpy.pxd":822
 *             t = child.type_num
 *             if end - f < 5:
 *                 raise RuntimeError(u"Format string allocated too short.")             # <<<<<<<<<<<<<<
 * 
 *             # Until ticket #99 is fixed, use integers to avoid warnings
 */
  __pyx_k_tuple_132 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_132)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_132);
  __Pyx_INCREF(((PyObject *)__pyx_kp_u_131));
  PyTuple_SET_ITEM(__pyx_k_tuple_132, 0, ((PyObject *)__pyx_kp_u_131));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_131));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_132));

  /* "util.pxd":28
 *         i += sz
 *     elif i >= sz or sz == 0:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     return get_value_1d(arr, i)
 */
  __pyx_k_tuple_134 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_134)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_134);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_133));
  PyTuple_SET_ITEM(__pyx_k_tuple_134, 0, ((PyObject *)__pyx_kp_s_133));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_133));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_134));

  /* "util.pxd":45
 *         i += sz
 *     elif i >= sz:
 *         raise IndexError('index out of bounds')             # <<<<<<<<<<<<<<
 * 
 *     assign_value_1d(arr, i, value)
 */
  __pyx_k_tuple_135 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_135)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_135);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_133));
  PyTuple_SET_ITEM(__pyx_k_tuple_135, 0, ((PyObject *)__pyx_kp_s_133));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_133));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_135));

  /* "pandas/src/tseries.pyx":133
 * 
 * 
 * def ismember(ndarray arr, set values):             # <<<<<<<<<<<<<<
 *     '''
 *     Checks whether
 */
  __pyx_k_tuple_136 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_136)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_136);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_136, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_136, 1, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_136, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_136, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__it));
  PyTuple_SET_ITEM(__pyx_k_tuple_136, 4, ((PyObject *)__pyx_n_s__it));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__it));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_136, 5, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_136, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_136));
  __pyx_k_codeobj_137 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s__ismember, 133, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_137)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":191
 *     return gmtime(dt)
 * 
 * def array_to_timestamp(ndarray[object, ndim=1] arr):             # <<<<<<<<<<<<<<
 *     cdef int i, n
 *     cdef ndarray[int64_t, ndim=1] result
 */
  __pyx_k_tuple_139 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_139)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_139);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_139, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_139, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_139, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_139, 3, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_139));
  __pyx_k_codeobj_140 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s__array_to_timestamp, 191, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_140)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":203
 *     return result
 * 
 * def array_to_datetime(ndarray[int64_t, ndim=1] arr):             # <<<<<<<<<<<<<<
 *     cdef int i, n
 *     cdef ndarray[object, ndim=1] result
 */
  __pyx_k_tuple_141 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_141)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_141);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_141, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_141, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_141, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_141, 3, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_141));
  __pyx_k_codeobj_142 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s__array_to_datetime, 203, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_142)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":237
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def isnullobj(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, n
 *     cdef object val
 */
  __pyx_k_tuple_143 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_143)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_143);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_143, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_143, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_143, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_143, 3, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_143, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_143));
  __pyx_k_codeobj_144 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s__isnullobj, 237, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_144)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":250
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def isnullobj2d(ndarray[object, ndim=2] arr):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, n, m
 *     cdef object val
 */
  __pyx_k_tuple_145 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_145)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_145);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_145, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_145, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_145, 2, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_145, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__m));
  PyTuple_SET_ITEM(__pyx_k_tuple_145, 4, ((PyObject *)__pyx_n_s__m));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__m));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_145, 5, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_145, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_145));
  __pyx_k_codeobj_146 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s__isnullobj2d, 250, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_146)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":264
 *     return result.view(np.bool_)
 * 
 * def list_to_object_array(list obj):             # <<<<<<<<<<<<<<
 *     '''
 *     Convert list to object ndarray. Seriously can't believe I had to write this
 */
  __pyx_k_tuple_147 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_147)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_147);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_147, 0, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_147, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_147, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_147, 3, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_147));
  __pyx_k_codeobj_148 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s_104, 264, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_148)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":284
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_149 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_149)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_149);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__uniques));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 3, ((PyObject *)__pyx_n_s__uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__uniques));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__table));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 4, ((PyObject *)__pyx_n_s__table));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__table));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 5, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__stub));
  PyTuple_SET_ITEM(__pyx_k_tuple_149, 6, ((PyObject *)__pyx_n_s__stub));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stub));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_149));
  __pyx_k_codeobj_150 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s__fast_unique, 284, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_150)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":305
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique_multiple(list arrays):             # <<<<<<<<<<<<<<
 *     cdef:
 *         ndarray[object] buf
 */
  __pyx_k_tuple_151 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_151)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_151);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arrays));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 0, ((PyObject *)__pyx_n_s__arrays));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arrays));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__buf));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 1, ((PyObject *)__pyx_n_s__buf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__buf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 2, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 4, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__uniques));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 6, ((PyObject *)__pyx_n_s__uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__uniques));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__table));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 7, ((PyObject *)__pyx_n_s__table));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__table));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 8, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__stub));
  PyTuple_SET_ITEM(__pyx_k_tuple_151, 9, ((PyObject *)__pyx_n_s__stub));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stub));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_151));
  __pyx_k_codeobj_152 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s_153, 305, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_152)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":331
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique_multiple_list(list lists):             # <<<<<<<<<<<<<<
 *     cdef:
 *         list buf
 */
  __pyx_k_tuple_154 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_154)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_154);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lists));
  PyTuple_SET_ITEM(__pyx_k_tuple_154, 0, ((PyObject *)__pyx_n_s__lists));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lists));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__buf));
  PyTuple_SET_ITEM(__pyx_k_tuple_154, 1, ((PyObject *)__pyx_n_s__buf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__buf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_154, 2, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_154, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_154, 4, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_154, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__uniques));
  PyTuple_SET_ITEM(__pyx_k_tuple_154, 6, ((PyObject *)__pyx_n_s__uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__uniques));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__table));
  PyTuple_SET_ITEM(__pyx_k_tuple_154, 7, ((PyObject *)__pyx_n_s__table));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__table));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_154, 8, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__stub));
  PyTuple_SET_ITEM(__pyx_k_tuple_154, 9, ((PyObject *)__pyx_n_s__stub));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stub));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_154));
  __pyx_k_codeobj_155 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s_156, 331, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_155)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":357
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique_multiple_list_gen(object gen):             # <<<<<<<<<<<<<<
 *     cdef:
 *         list buf
 */
  __pyx_k_tuple_157 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_157)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_157);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__gen));
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 0, ((PyObject *)__pyx_n_s__gen));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__gen));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__buf));
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 1, ((PyObject *)__pyx_n_s__buf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__buf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 2, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__uniques));
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 4, ((PyObject *)__pyx_n_s__uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__uniques));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__table));
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 5, ((PyObject *)__pyx_n_s__table));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__table));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__stub));
  PyTuple_SET_ITEM(__pyx_k_tuple_157, 7, ((PyObject *)__pyx_n_s__stub));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stub));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_157));
  __pyx_k_codeobj_158 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s_159, 357, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_158)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":382
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def dicts_to_array(list dicts, list columns):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n
 */
  __pyx_k_tuple_160 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_160)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_160);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dicts));
  PyTuple_SET_ITEM(__pyx_k_tuple_160, 0, ((PyObject *)__pyx_n_s__dicts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dicts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__columns));
  PyTuple_SET_ITEM(__pyx_k_tuple_160, 1, ((PyObject *)__pyx_n_s__columns));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__columns));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_160, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_160, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_160, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_160, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_160, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__row));
  PyTuple_SET_ITEM(__pyx_k_tuple_160, 7, ((PyObject *)__pyx_n_s__row));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__row));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__col));
  PyTuple_SET_ITEM(__pyx_k_tuple_160, 8, ((PyObject *)__pyx_n_s__col));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__col));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__onan));
  PyTuple_SET_ITEM(__pyx_k_tuple_160, 9, ((PyObject *)__pyx_n_s__onan));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__onan));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_160));
  __pyx_k_codeobj_161 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s__dicts_to_array, 382, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_161)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":406
 * 
 * 
 * def fast_zip(list ndarrays):             # <<<<<<<<<<<<<<
 *     '''
 *     For zipping multiple ndarrays into an ndarray of tuples
 */
  __pyx_k_tuple_162 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_162)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_162);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ndarrays));
  PyTuple_SET_ITEM(__pyx_k_tuple_162, 0, ((PyObject *)__pyx_n_s__ndarrays));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ndarrays));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_162, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_162, 2, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_162, 3, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_162, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_162, 5, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__it));
  PyTuple_SET_ITEM(__pyx_k_tuple_162, 6, ((PyObject *)__pyx_n_s__it));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__it));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_162, 7, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tup));
  PyTuple_SET_ITEM(__pyx_k_tuple_162, 8, ((PyObject *)__pyx_n_s__tup));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tup));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_162, 9, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_162));
  __pyx_k_codeobj_163 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_162, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s__fast_zip, 406, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_163)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":447
 *     return result
 * 
 * def has_infs_f4(ndarray[float32_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_k_tuple_164 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_164)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_164);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_164, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_164, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_164, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__inf));
  PyTuple_SET_ITEM(__pyx_k_tuple_164, 3, ((PyObject *)__pyx_n_s__inf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__inf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__neginf));
  PyTuple_SET_ITEM(__pyx_k_tuple_164, 4, ((PyObject *)__pyx_n_s__neginf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__neginf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_164, 5, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_164));
  __pyx_k_codeobj_165 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s__has_infs_f4, 447, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_165)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":461
 *     return False
 * 
 * def has_infs_f8(ndarray[float64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_k_tuple_166 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_166)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_166);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_166, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_166, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_166, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__inf));
  PyTuple_SET_ITEM(__pyx_k_tuple_166, 3, ((PyObject *)__pyx_n_s__inf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__inf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__neginf));
  PyTuple_SET_ITEM(__pyx_k_tuple_166, 4, ((PyObject *)__pyx_n_s__neginf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__neginf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_166, 5, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_166));
  __pyx_k_codeobj_167 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s__has_infs_f8, 461, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_167)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":475
 *     return False
 * 
 * def convert_timestamps(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         object val, f, result
 */
  __pyx_k_tuple_168 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_168)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_168);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_168, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_168, 1, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
  PyTuple_SET_ITEM(__pyx_k_tuple_168, 2, ((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_168, 3, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cache));
  PyTuple_SET_ITEM(__pyx_k_tuple_168, 4, ((PyObject *)__pyx_n_s__cache));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cache));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_168, 5, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_168, 6, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_168, 7, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
  PyTuple_SET_ITEM(__pyx_k_tuple_168, 8, ((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_168));
  __pyx_k_codeobj_169 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s__convert_timestamps, 475, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_169)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":500
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def scalar_compare(ndarray[object] values, object val, object op):             # <<<<<<<<<<<<<<
 *     import operator
 *     cdef:
 */
  __pyx_k_tuple_170 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_170)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_170);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_170, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_170, 1, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__op));
  PyTuple_SET_ITEM(__pyx_k_tuple_170, 2, ((PyObject *)__pyx_n_s__op));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__op));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__operator));
  PyTuple_SET_ITEM(__pyx_k_tuple_170, 3, ((PyObject *)__pyx_n_s__operator));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__operator));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_170, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_170, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__flag));
  PyTuple_SET_ITEM(__pyx_k_tuple_170, 6, ((PyObject *)__pyx_n_s__flag));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__flag));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_170, 7, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_170, 8, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_170));
  __pyx_k_codeobj_171 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s__scalar_compare, 500, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_171)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":535
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def vec_compare(ndarray[object] left, ndarray[object] right, object op):             # <<<<<<<<<<<<<<
 *     import operator
 *     cdef:
 */
  __pyx_k_tuple_172 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_172)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_172);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_172, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_172, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__op));
  PyTuple_SET_ITEM(__pyx_k_tuple_172, 2, ((PyObject *)__pyx_n_s__op));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__op));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__operator));
  PyTuple_SET_ITEM(__pyx_k_tuple_172, 3, ((PyObject *)__pyx_n_s__operator));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__operator));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_172, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_172, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__flag));
  PyTuple_SET_ITEM(__pyx_k_tuple_172, 6, ((PyObject *)__pyx_n_s__flag));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__flag));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_172, 7, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_172, 8, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__y));
  PyTuple_SET_ITEM(__pyx_k_tuple_172, 9, ((PyObject *)__pyx_n_s__y));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__y));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_172));
  __pyx_k_codeobj_173 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_172, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s__vec_compare, 535, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_173)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":576
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def scalar_binop(ndarray[object] values, object val, object op):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_174 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_174)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_174);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_174, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_174, 1, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__op));
  PyTuple_SET_ITEM(__pyx_k_tuple_174, 2, ((PyObject *)__pyx_n_s__op));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__op));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_174, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_174, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_174, 5, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_174, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_174));
  __pyx_k_codeobj_175 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s__scalar_binop, 576, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_175)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pandas/src/tseries.pyx":594
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def vec_binop(ndarray[object] left, ndarray[object] right, object op):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(left)
 */
  __pyx_k_tuple_176 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_176)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_176);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_176, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_176, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__op));
  PyTuple_SET_ITEM(__pyx_k_tuple_176, 2, ((PyObject *)__pyx_n_s__op));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__op));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_176, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_176, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_176, 5, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_176, 6, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__y));
  PyTuple_SET_ITEM(__pyx_k_tuple_176, 7, ((PyObject *)__pyx_n_s__y));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__y));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_176));
  __pyx_k_codeobj_177 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_138, __pyx_n_s__vec_binop, 594, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_177)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":5
 * 
 * @cython.boundscheck(False)
 * def arrmap(ndarray[object] index, object func):             # <<<<<<<<<<<<<<
 *     cdef int length = index.shape[0]
 *     cdef int i = 0
 */
  __pyx_k_tuple_178 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_178)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_178);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_178, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__func));
  PyTuple_SET_ITEM(__pyx_k_tuple_178, 1, ((PyObject *)__pyx_n_s__func));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__func));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_178, 2, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_178, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_178, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_178));
  __pyx_k_codeobj_179 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__arrmap, 5, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_179)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":17
 * 
 * @cython.boundscheck(False)
 * def groupby_func(object index, object mapper):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef ndarray[object] mapped_index
 */
  __pyx_k_tuple_181 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_181)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_181);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mapper));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 1, ((PyObject *)__pyx_n_s__mapper));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mapper));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 2, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mapped_index));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 3, ((PyObject *)__pyx_n_s__mapped_index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mapped_index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index_buf));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 4, ((PyObject *)__pyx_n_s__index_buf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index_buf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 5, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 6, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 7, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__members));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 8, ((PyObject *)__pyx_n_s__members));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__members));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 9, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__key));
  PyTuple_SET_ITEM(__pyx_k_tuple_181, 10, ((PyObject *)__pyx_n_s__key));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__key));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_181));
  __pyx_k_codeobj_182 = (PyObject*)__Pyx_PyCode_New(2, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__groupby_func, 17, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_182)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":47
 * 
 * 
 * def func_groupby_indices(object index, object mapper):             # <<<<<<<<<<<<<<
 *     return groupby_indices_naive(arrmap(index, mapper))
 * 
 */
  __pyx_k_tuple_183 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_183)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_183);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_183, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mapper));
  PyTuple_SET_ITEM(__pyx_k_tuple_183, 1, ((PyObject *)__pyx_n_s__mapper));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mapper));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_183));
  __pyx_k_codeobj_184 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s_185, 47, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_184)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":72
 * 
 * @cython.boundscheck(False)
 * def groupby_indices(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_186 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_186)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_186);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 3, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__counts));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 4, ((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 5, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 6, ((PyObject *)__pyx_n_s__seen));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__loc));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 7, ((PyObject *)__pyx_n_s__loc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__loc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ids));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 8, ((PyObject *)__pyx_n_s__ids));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ids));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 9, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 10, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__vecs));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 11, ((PyObject *)__pyx_n_s__vecs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__vecs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_186, 12, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_186));
  __pyx_k_codeobj_187 = (PyObject*)__Pyx_PyCode_New(1, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_186, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__groupby_indices, 72, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_187)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":109
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def is_lexsorted(list list_of_arrays):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int i
 */
  __pyx_k_tuple_188 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_188)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_188);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__list_of_arrays));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 0, ((PyObject *)__pyx_n_s__list_of_arrays));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__list_of_arrays));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nlevels));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 3, ((PyObject *)__pyx_n_s__nlevels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nlevels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cur));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 5, ((PyObject *)__pyx_n_s__cur));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cur));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__pre));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 6, ((PyObject *)__pyx_n_s__pre));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__pre));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__vecs));
  PyTuple_SET_ITEM(__pyx_k_tuple_188, 7, ((PyObject *)__pyx_n_s__vecs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__vecs));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_188));
  __pyx_k_codeobj_189 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_188, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__is_lexsorted, 109, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_189)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":138
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def group_labels(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     '''
 *     Compute label vector from input values and associated useful data
 */
  __pyx_k_tuple_190 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_190)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_190);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 3, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__counts));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 4, ((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ids));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 5, ((PyObject *)__pyx_n_s__ids));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ids));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__reverse));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 6, ((PyObject *)__pyx_n_s__reverse));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__reverse));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 7, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 8, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__count));
  PyTuple_SET_ITEM(__pyx_k_tuple_190, 9, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_190));
  __pyx_k_codeobj_191 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__group_labels, 138, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_191)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":180
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def get_unique_labels(ndarray[object] values, dict idMap):             # <<<<<<<<<<<<<<
 *     cdef int i, length
 *     cdef object idx
 */
  __pyx_k_tuple_192 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_192)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_192);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 1, ((PyObject *)__pyx_n_s__idMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 3, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 4, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fillVec));
  PyTuple_SET_ITEM(__pyx_k_tuple_192, 5, ((PyObject *)__pyx_n_s__fillVec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fillVec));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_192));
  __pyx_k_codeobj_193 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__get_unique_labels, 180, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_193)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":194
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def groupsort_indexer(ndarray[int32_t] index, Py_ssize_t ngroups):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, loc, label, n
 */
  __pyx_k_tuple_194 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_194)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_194);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ngroups));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 1, ((PyObject *)__pyx_n_s__ngroups));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ngroups));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__loc));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 3, ((PyObject *)__pyx_n_s__loc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__loc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__label));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 4, ((PyObject *)__pyx_n_s__label));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__label));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__counts));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 6, ((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__where));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 7, ((PyObject *)__pyx_n_s__where));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__where));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_194, 8, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_194));
  __pyx_k_codeobj_195 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__groupsort_indexer, 194, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_195)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":224
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def group_add(ndarray[float64_t, ndim=2] out,             # <<<<<<<<<<<<<<
 *               ndarray[int32_t] counts,
 *               ndarray[float64_t, ndim=2] values,
 */
  __pyx_k_tuple_196 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_196)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_196);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_196, 0, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__counts));
  PyTuple_SET_ITEM(__pyx_k_tuple_196, 1, ((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_196, 2, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_196, 3, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_196, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_196, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_196, 6, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__K));
  PyTuple_SET_ITEM(__pyx_k_tuple_196, 7, ((PyObject *)__pyx_n_s__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__K));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lab));
  PyTuple_SET_ITEM(__pyx_k_tuple_196, 8, ((PyObject *)__pyx_n_s__lab));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lab));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_196, 9, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__count));
  PyTuple_SET_ITEM(__pyx_k_tuple_196, 10, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sumx));
  PyTuple_SET_ITEM(__pyx_k_tuple_196, 11, ((PyObject *)__pyx_n_s__sumx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sumx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nobs));
  PyTuple_SET_ITEM(__pyx_k_tuple_196, 12, ((PyObject *)__pyx_n_s__nobs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nobs));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_196));
  __pyx_k_codeobj_197 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__group_add, 224, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_197)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":278
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def group_mean(ndarray[float64_t, ndim=2] out,             # <<<<<<<<<<<<<<
 *                ndarray[int32_t] counts,
 *                ndarray[float64_t, ndim=2] values,
 */
  __pyx_k_tuple_198 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_198)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_198);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_198, 0, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__counts));
  PyTuple_SET_ITEM(__pyx_k_tuple_198, 1, ((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_198, 2, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_198, 3, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_198, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_198, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_198, 6, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__K));
  PyTuple_SET_ITEM(__pyx_k_tuple_198, 7, ((PyObject *)__pyx_n_s__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__K));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lab));
  PyTuple_SET_ITEM(__pyx_k_tuple_198, 8, ((PyObject *)__pyx_n_s__lab));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lab));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_198, 9, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__count));
  PyTuple_SET_ITEM(__pyx_k_tuple_198, 10, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sumx));
  PyTuple_SET_ITEM(__pyx_k_tuple_198, 11, ((PyObject *)__pyx_n_s__sumx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sumx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nobs));
  PyTuple_SET_ITEM(__pyx_k_tuple_198, 12, ((PyObject *)__pyx_n_s__nobs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nobs));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_198));
  __pyx_k_codeobj_199 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_198, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__group_mean, 278, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_199)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":328
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def group_var(ndarray[float64_t, ndim=2] out,             # <<<<<<<<<<<<<<
 *               ndarray[int32_t] counts,
 *               ndarray[float64_t, ndim=2] values,
 */
  __pyx_k_tuple_200 = PyTuple_New(14); if (unlikely(!__pyx_k_tuple_200)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_200);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 0, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__counts));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 1, ((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 2, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 3, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 6, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__K));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 7, ((PyObject *)__pyx_n_s__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__K));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lab));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 8, ((PyObject *)__pyx_n_s__lab));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lab));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 9, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ct));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 10, ((PyObject *)__pyx_n_s__ct));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ct));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nobs));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 11, ((PyObject *)__pyx_n_s__nobs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nobs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sumx));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 12, ((PyObject *)__pyx_n_s__sumx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sumx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sumxx));
  PyTuple_SET_ITEM(__pyx_k_tuple_200, 13, ((PyObject *)__pyx_n_s__sumxx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sumxx));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_200));
  __pyx_k_codeobj_201 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_200, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__group_var, 328, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_201)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":385
 *                              (ct * ct - ct))
 * 
 * def group_count(ndarray[int32_t] values, Py_ssize_t size):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_202 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_202)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_202);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_202, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__size));
  PyTuple_SET_ITEM(__pyx_k_tuple_202, 1, ((PyObject *)__pyx_n_s__size));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__size));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_202, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_202, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__counts));
  PyTuple_SET_ITEM(__pyx_k_tuple_202, 4, ((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_202));
  __pyx_k_codeobj_203 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__group_count, 385, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_203)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":395
 *     return counts
 * 
 * def lookup_values(ndarray[object] values, dict mapping):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_204 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_204)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_204);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_204, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mapping));
  PyTuple_SET_ITEM(__pyx_k_tuple_204, 1, ((PyObject *)__pyx_n_s__mapping));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mapping));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_204, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_204, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_204, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_204));
  __pyx_k_codeobj_205 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__lookup_values, 395, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_205)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":404
 *     return maybe_convert_objects(result)
 * 
 * def reduce_mean(ndarray[object] indices,             # <<<<<<<<<<<<<<
 *                 ndarray[object] buckets,
 *                 ndarray[float64_t] values,
 */
  __pyx_k_tuple_206 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_206)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_206);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indices));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 0, ((PyObject *)__pyx_n_s__indices));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indices));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__buckets));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 1, ((PyObject *)__pyx_n_s__buckets));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__buckets));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 2, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__inclusive));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 3, ((PyObject *)__pyx_n_s__inclusive));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__inclusive));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nbuckets));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 6, ((PyObject *)__pyx_n_s__nbuckets));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nbuckets));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nvalues));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 7, ((PyObject *)__pyx_n_s__nvalues));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nvalues));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__output));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 8, ((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__the_sum));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 9, ((PyObject *)__pyx_n_s__the_sum));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__the_sum));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 10, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nobs));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 11, ((PyObject *)__pyx_n_s__nobs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nobs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__next_bound));
  PyTuple_SET_ITEM(__pyx_k_tuple_206, 12, ((PyObject *)__pyx_n_s__next_bound));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__next_bound));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_206));
  __pyx_k_codeobj_207 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_206, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__reduce_mean, 404, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_207)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":453
 *     return output
 * 
 * def _bucket_locs(index, buckets, inclusive=False):             # <<<<<<<<<<<<<<
 *     if inclusive:
 *         locs = index.searchsorted(buckets, side='left')
 */
  __pyx_k_tuple_208 = PyTuple_New(4); if (unlikely(!__pyx_k_tuple_208)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_208);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__buckets));
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 1, ((PyObject *)__pyx_n_s__buckets));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__buckets));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__inclusive));
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 2, ((PyObject *)__pyx_n_s__inclusive));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__inclusive));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__locs));
  PyTuple_SET_ITEM(__pyx_k_tuple_208, 3, ((PyObject *)__pyx_n_s__locs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__locs));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_208));
  __pyx_k_codeobj_209 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s___bucket_locs, 453, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_209)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":461
 *     return locs
 * 
 * def count_level_1d(ndarray[uint8_t, cast=True] mask,             # <<<<<<<<<<<<<<
 *                    ndarray[int32_t] labels, Py_ssize_t max_bin):
 *     cdef:
 */
  __pyx_k_tuple_210 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_210)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_210);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_210, 0, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_210, 1, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__max_bin));
  PyTuple_SET_ITEM(__pyx_k_tuple_210, 2, ((PyObject *)__pyx_n_s__max_bin));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__max_bin));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_210, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_210, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__counts));
  PyTuple_SET_ITEM(__pyx_k_tuple_210, 5, ((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_210));
  __pyx_k_codeobj_211 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__count_level_1d, 461, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_211)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":477
 *     return counts
 * 
 * def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask,             # <<<<<<<<<<<<<<
 *                    ndarray[int32_t] labels, Py_ssize_t max_bin):
 *     cdef:
 */
  __pyx_k_tuple_212 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_212)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_212);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_212, 0, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_212, 1, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__max_bin));
  PyTuple_SET_ITEM(__pyx_k_tuple_212, 2, ((PyObject *)__pyx_n_s__max_bin));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__max_bin));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_212, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_212, 4, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_212, 5, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_212, 6, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__counts));
  PyTuple_SET_ITEM(__pyx_k_tuple_212, 7, ((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_212));
  __pyx_k_codeobj_213 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__count_level_2d, 477, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_213)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":493
 *     return counts
 * 
 * def duplicated(list values, take_last=False):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_k_tuple_214 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_214)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_214);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_214, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__take_last));
  PyTuple_SET_ITEM(__pyx_k_tuple_214, 1, ((PyObject *)__pyx_n_s__take_last));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__take_last));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_214, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_214, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen));
  PyTuple_SET_ITEM(__pyx_k_tuple_214, 4, ((PyObject *)__pyx_n_s__seen));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__row));
  PyTuple_SET_ITEM(__pyx_k_tuple_214, 5, ((PyObject *)__pyx_n_s__row));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__row));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_214, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_214));
  __pyx_k_codeobj_215 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__duplicated, 493, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_215)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":522
 * 
 * 
 * def generate_slices(ndarray[int32_t] labels, Py_ssize_t ngroups):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, group_size, n, lab, start
 */
  __pyx_k_tuple_216 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_216)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_216);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_216, 0, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ngroups));
  PyTuple_SET_ITEM(__pyx_k_tuple_216, 1, ((PyObject *)__pyx_n_s__ngroups));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ngroups));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_216, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__group_size));
  PyTuple_SET_ITEM(__pyx_k_tuple_216, 3, ((PyObject *)__pyx_n_s__group_size));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__group_size));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_216, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lab));
  PyTuple_SET_ITEM(__pyx_k_tuple_216, 5, ((PyObject *)__pyx_n_s__lab));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lab));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__start));
  PyTuple_SET_ITEM(__pyx_k_tuple_216, 6, ((PyObject *)__pyx_n_s__start));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__start));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__slobj));
  PyTuple_SET_ITEM(__pyx_k_tuple_216, 7, ((PyObject *)__pyx_n_s__slobj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__slobj));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__starts));
  PyTuple_SET_ITEM(__pyx_k_tuple_216, 8, ((PyObject *)__pyx_n_s__starts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__starts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ends));
  PyTuple_SET_ITEM(__pyx_k_tuple_216, 9, ((PyObject *)__pyx_n_s__ends));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ends));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_216));
  __pyx_k_codeobj_217 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__generate_slices, 522, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_217)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":641
 * '''
 * 
 * def ts_upsample_generic(ndarray[object] indices,             # <<<<<<<<<<<<<<
 *                         ndarray[object] buckets,
 *                         ndarray[float64_t] values,
 */
  __pyx_k_tuple_218 = PyTuple_New(15); if (unlikely(!__pyx_k_tuple_218)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_218);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indices));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 0, ((PyObject *)__pyx_n_s__indices));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indices));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__buckets));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 1, ((PyObject *)__pyx_n_s__buckets));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__buckets));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 2, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__aggfunc));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 3, ((PyObject *)__pyx_n_s__aggfunc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__aggfunc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__inclusive));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 4, ((PyObject *)__pyx_n_s__inclusive));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__inclusive));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 5, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 6, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__jstart));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 7, ((PyObject *)__pyx_n_s__jstart));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__jstart));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nbuckets));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 8, ((PyObject *)__pyx_n_s__nbuckets));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nbuckets));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nvalues));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 9, ((PyObject *)__pyx_n_s__nvalues));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nvalues));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__output));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 10, ((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__next_bound));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 11, ((PyObject *)__pyx_n_s__next_bound));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__next_bound));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__the_sum));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 12, ((PyObject *)__pyx_n_s__the_sum));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__the_sum));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 13, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nobs));
  PyTuple_SET_ITEM(__pyx_k_tuple_218, 14, ((PyObject *)__pyx_n_s__nobs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nobs));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_218));
  __pyx_k_codeobj_219 = (PyObject*)__Pyx_PyCode_New(5, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_218, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_180, __pyx_n_s__ts_upsample_generic, 641, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_219)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":28
 * 
 * 
 * def kth_smallest(ndarray[double_t] a, Py_ssize_t k):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i,j,l,m,n
 */
  __pyx_k_tuple_220 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_220)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_220);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__a));
  PyTuple_SET_ITEM(__pyx_k_tuple_220, 0, ((PyObject *)__pyx_n_s__a));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__a));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_220, 1, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_220, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_220, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__l));
  PyTuple_SET_ITEM(__pyx_k_tuple_220, 4, ((PyObject *)__pyx_n_s__l));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__l));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__m));
  PyTuple_SET_ITEM(__pyx_k_tuple_220, 5, ((PyObject *)__pyx_n_s__m));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__m));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_220, 6, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_220, 7, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__t));
  PyTuple_SET_ITEM(__pyx_k_tuple_220, 8, ((PyObject *)__pyx_n_s__t));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__t));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_220));
  __pyx_k_codeobj_221 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_222, __pyx_n_s__kth_smallest, 28, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_221)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":58
 * 
 * 
 * def median(ndarray arr):             # <<<<<<<<<<<<<<
 *     '''
 *     A faster median
 */
  __pyx_k_tuple_223 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_223)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_223);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_223, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_223, 1, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_223));
  __pyx_k_codeobj_224 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_222, __pyx_n_s__median, 58, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_224)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":78
 * # Rolling sum
 * 
 * def roll_sum(ndarray[double_t] input, int win, int minp):             # <<<<<<<<<<<<<<
 *     cdef double val, prev, sum_x = 0
 *     cdef int nobs = 0, i
 */
  __pyx_k_tuple_225 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_225)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_225);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__input));
  PyTuple_SET_ITEM(__pyx_k_tuple_225, 0, ((PyObject *)__pyx_n_s__input));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__input));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__win));
  PyTuple_SET_ITEM(__pyx_k_tuple_225, 1, ((PyObject *)__pyx_n_s__win));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__win));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minp));
  PyTuple_SET_ITEM(__pyx_k_tuple_225, 2, ((PyObject *)__pyx_n_s__minp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_225, 3, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prev));
  PyTuple_SET_ITEM(__pyx_k_tuple_225, 4, ((PyObject *)__pyx_n_s__prev));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prev));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sum_x));
  PyTuple_SET_ITEM(__pyx_k_tuple_225, 5, ((PyObject *)__pyx_n_s__sum_x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sum_x));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nobs));
  PyTuple_SET_ITEM(__pyx_k_tuple_225, 6, ((PyObject *)__pyx_n_s__nobs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nobs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_225, 7, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_225, 8, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__output));
  PyTuple_SET_ITEM(__pyx_k_tuple_225, 9, ((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_225));
  __pyx_k_codeobj_226 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_225, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_222, __pyx_n_s__roll_sum, 78, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_226)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":120
 * # Rolling mean
 * 
 * def roll_mean(ndarray[double_t] input,             # <<<<<<<<<<<<<<
 *                int win, int minp):
 *     cdef double val, prev, sum_x = 0
 */
  __pyx_k_tuple_227 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_227)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_227);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__input));
  PyTuple_SET_ITEM(__pyx_k_tuple_227, 0, ((PyObject *)__pyx_n_s__input));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__input));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__win));
  PyTuple_SET_ITEM(__pyx_k_tuple_227, 1, ((PyObject *)__pyx_n_s__win));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__win));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minp));
  PyTuple_SET_ITEM(__pyx_k_tuple_227, 2, ((PyObject *)__pyx_n_s__minp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_227, 3, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prev));
  PyTuple_SET_ITEM(__pyx_k_tuple_227, 4, ((PyObject *)__pyx_n_s__prev));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prev));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sum_x));
  PyTuple_SET_ITEM(__pyx_k_tuple_227, 5, ((PyObject *)__pyx_n_s__sum_x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sum_x));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nobs));
  PyTuple_SET_ITEM(__pyx_k_tuple_227, 6, ((PyObject *)__pyx_n_s__nobs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nobs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_227, 7, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_227, 8, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__output));
  PyTuple_SET_ITEM(__pyx_k_tuple_227, 9, ((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_227));
  __pyx_k_codeobj_228 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_227, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_222, __pyx_n_s__roll_mean, 120, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_228)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":163
 * # Exponentially weighted moving average
 * 
 * def ewma(ndarray[double_t] input, double_t com):             # <<<<<<<<<<<<<<
 *     '''
 *     Compute exponentially-weighted moving average using center-of-mass.
 */
  __pyx_k_tuple_229 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_229)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_229);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__input));
  PyTuple_SET_ITEM(__pyx_k_tuple_229, 0, ((PyObject *)__pyx_n_s__input));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__input));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__com));
  PyTuple_SET_ITEM(__pyx_k_tuple_229, 1, ((PyObject *)__pyx_n_s__com));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__com));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cur));
  PyTuple_SET_ITEM(__pyx_k_tuple_229, 2, ((PyObject *)__pyx_n_s__cur));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cur));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prev));
  PyTuple_SET_ITEM(__pyx_k_tuple_229, 3, ((PyObject *)__pyx_n_s__prev));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prev));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__neww));
  PyTuple_SET_ITEM(__pyx_k_tuple_229, 4, ((PyObject *)__pyx_n_s__neww));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__neww));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldw));
  PyTuple_SET_ITEM(__pyx_k_tuple_229, 5, ((PyObject *)__pyx_n_s__oldw));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldw));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__adj));
  PyTuple_SET_ITEM(__pyx_k_tuple_229, 6, ((PyObject *)__pyx_n_s__adj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__adj));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_229, 7, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_229, 8, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__output));
  PyTuple_SET_ITEM(__pyx_k_tuple_229, 9, ((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_229));
  __pyx_k_codeobj_230 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_222, __pyx_n_s__ewma, 163, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_230)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":214
 * # Rolling variance
 * 
 * def _check_minp(minp, N):             # <<<<<<<<<<<<<<
 *     if minp > N:
 *         minp = N + 1
 */
  __pyx_k_tuple_231 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_231)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_231);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minp));
  PyTuple_SET_ITEM(__pyx_k_tuple_231, 0, ((PyObject *)__pyx_n_s__minp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_231, 1, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_231));
  __pyx_k_codeobj_232 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_222, __pyx_n_s___check_minp, 214, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_232)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":223
 *     return minp
 * 
 * def roll_var(ndarray[double_t] input, int win, int minp):             # <<<<<<<<<<<<<<
 *     cdef double val, prev, sum_x = 0, sum_xx = 0, nobs = 0
 *     cdef Py_ssize_t i
 */
  __pyx_k_tuple_233 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_233)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_233);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__input));
  PyTuple_SET_ITEM(__pyx_k_tuple_233, 0, ((PyObject *)__pyx_n_s__input));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__input));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__win));
  PyTuple_SET_ITEM(__pyx_k_tuple_233, 1, ((PyObject *)__pyx_n_s__win));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__win));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minp));
  PyTuple_SET_ITEM(__pyx_k_tuple_233, 2, ((PyObject *)__pyx_n_s__minp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_233, 3, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prev));
  PyTuple_SET_ITEM(__pyx_k_tuple_233, 4, ((PyObject *)__pyx_n_s__prev));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prev));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sum_x));
  PyTuple_SET_ITEM(__pyx_k_tuple_233, 5, ((PyObject *)__pyx_n_s__sum_x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sum_x));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sum_xx));
  PyTuple_SET_ITEM(__pyx_k_tuple_233, 6, ((PyObject *)__pyx_n_s__sum_xx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sum_xx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nobs));
  PyTuple_SET_ITEM(__pyx_k_tuple_233, 7, ((PyObject *)__pyx_n_s__nobs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nobs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_233, 8, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_233, 9, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__output));
  PyTuple_SET_ITEM(__pyx_k_tuple_233, 10, ((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_233));
  __pyx_k_codeobj_234 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_222, __pyx_n_s__roll_var, 223, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_234)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":268
 * # Rolling skewness
 * 
 * def roll_skew(ndarray[double_t] input, int win, int minp):             # <<<<<<<<<<<<<<
 *     cdef double val, prev
 *     cdef double x = 0, xx = 0, xxx = 0
 */
  __pyx_k_tuple_235 = PyTuple_New(16); if (unlikely(!__pyx_k_tuple_235)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_235);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__input));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 0, ((PyObject *)__pyx_n_s__input));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__input));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__win));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 1, ((PyObject *)__pyx_n_s__win));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__win));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minp));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 2, ((PyObject *)__pyx_n_s__minp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 3, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prev));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 4, ((PyObject *)__pyx_n_s__prev));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prev));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 5, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__xx));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 6, ((PyObject *)__pyx_n_s__xx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__xx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__xxx));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 7, ((PyObject *)__pyx_n_s__xxx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__xxx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nobs));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 8, ((PyObject *)__pyx_n_s__nobs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nobs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 9, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 10, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__output));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 11, ((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__A));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 12, ((PyObject *)__pyx_n_s__A));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__A));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__B));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 13, ((PyObject *)__pyx_n_s__B));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__B));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__C));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 14, ((PyObject *)__pyx_n_s__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__C));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__R));
  PyTuple_SET_ITEM(__pyx_k_tuple_235, 15, ((PyObject *)__pyx_n_s__R));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__R));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_235));
  __pyx_k_codeobj_236 = (PyObject*)__Pyx_PyCode_New(3, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_222, __pyx_n_s__roll_skew, 268, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_236)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":329
 * 
 * 
 * def roll_kurt(ndarray[double_t] input,             # <<<<<<<<<<<<<<
 *                int win, int minp):
 *     cdef double val, prev
 */
  __pyx_k_tuple_237 = PyTuple_New(19); if (unlikely(!__pyx_k_tuple_237)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_237);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__input));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 0, ((PyObject *)__pyx_n_s__input));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__input));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__win));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 1, ((PyObject *)__pyx_n_s__win));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__win));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minp));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 2, ((PyObject *)__pyx_n_s__minp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 3, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prev));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 4, ((PyObject *)__pyx_n_s__prev));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prev));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 5, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__xx));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 6, ((PyObject *)__pyx_n_s__xx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__xx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__xxx));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 7, ((PyObject *)__pyx_n_s__xxx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__xxx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__xxxx));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 8, ((PyObject *)__pyx_n_s__xxxx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__xxxx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nobs));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 9, ((PyObject *)__pyx_n_s__nobs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nobs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 10, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 11, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__output));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 12, ((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__A));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 13, ((PyObject *)__pyx_n_s__A));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__A));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__B));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 14, ((PyObject *)__pyx_n_s__B));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__B));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__C));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 15, ((PyObject *)__pyx_n_s__C));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__C));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__D));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 16, ((PyObject *)__pyx_n_s__D));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__D));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__R));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 17, ((PyObject *)__pyx_n_s__R));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__R));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__K));
  PyTuple_SET_ITEM(__pyx_k_tuple_237, 18, ((PyObject *)__pyx_n_s__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_237));
  __pyx_k_codeobj_238 = (PyObject*)__Pyx_PyCode_New(3, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_222, __pyx_n_s__roll_kurt, 329, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_238)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":444
 * from skiplist cimport *
 * 
 * def roll_median_c(ndarray[float64_t] arg, int win, int minp):             # <<<<<<<<<<<<<<
 *     cdef double val, res, prev
 *     cdef:
 */
  __pyx_k_tuple_239 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_239)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_239);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arg));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 0, ((PyObject *)__pyx_n_s__arg));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arg));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__win));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 1, ((PyObject *)__pyx_n_s__win));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__win));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minp));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 2, ((PyObject *)__pyx_n_s__minp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 3, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__res));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 4, ((PyObject *)__pyx_n_s__res));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__res));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prev));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 5, ((PyObject *)__pyx_n_s__prev));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prev));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ret));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 6, ((PyObject *)__pyx_n_s__ret));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ret));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sl));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 7, ((PyObject *)__pyx_n_s__sl));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sl));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__midpoint));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 8, ((PyObject *)__pyx_n_s__midpoint));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__midpoint));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nobs));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 9, ((PyObject *)__pyx_n_s__nobs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nobs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 10, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 11, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__output));
  PyTuple_SET_ITEM(__pyx_k_tuple_239, 12, ((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_239));
  __pyx_k_codeobj_240 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_222, __pyx_n_s__roll_median_c, 444, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_240)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":499
 *     return output
 * 
 * def roll_median_cython(ndarray input, int win, int minp):             # <<<<<<<<<<<<<<
 *     '''
 *     O(N log(window)) implementation using skip list
 */
  __pyx_k_tuple_241 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_241)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_241);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__input));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 0, ((PyObject *)__pyx_n_s__input));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__input));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__win));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 1, ((PyObject *)__pyx_n_s__win));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__win));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minp));
  PyTuple_SET_ITEM(__pyx_k_tuple_241, 2, ((PyObject *)__pyx_n_s__minp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minp));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_241));
  __pyx_k_codeobj_242 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_222, __pyx_n_s__roll_median_cython, 499, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_242)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":521
 *         return NaN
 * 
 * def roll_max(ndarray input, int win, int minp):             # <<<<<<<<<<<<<<
 *     '''
 *     O(N log(window)) implementation using skip list
 */
  __pyx_k_tuple_243 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_243)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_243);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__input));
  PyTuple_SET_ITEM(__pyx_k_tuple_243, 0, ((PyObject *)__pyx_n_s__input));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__input));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__win));
  PyTuple_SET_ITEM(__pyx_k_tuple_243, 1, ((PyObject *)__pyx_n_s__win));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__win));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minp));
  PyTuple_SET_ITEM(__pyx_k_tuple_243, 2, ((PyObject *)__pyx_n_s__minp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minp));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_243));
  __pyx_k_codeobj_244 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_243, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_222, __pyx_n_s__roll_max, 521, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_244)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":533
 *         return NaN
 * 
 * def roll_min(ndarray input, int win, int minp):             # <<<<<<<<<<<<<<
 *     '''
 *     O(N log(window)) implementation using skip list
 */
  __pyx_k_tuple_245 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_245)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_245);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__input));
  PyTuple_SET_ITEM(__pyx_k_tuple_245, 0, ((PyObject *)__pyx_n_s__input));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__input));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__win));
  PyTuple_SET_ITEM(__pyx_k_tuple_245, 1, ((PyObject *)__pyx_n_s__win));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__win));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minp));
  PyTuple_SET_ITEM(__pyx_k_tuple_245, 2, ((PyObject *)__pyx_n_s__minp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minp));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_245));
  __pyx_k_codeobj_246 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_222, __pyx_n_s__roll_min, 533, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_246)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":545
 *         return NaN
 * 
 * def roll_quantile(ndarray[float64_t, cast=True] input, int win,             # <<<<<<<<<<<<<<
 *                   int minp, double quantile):
 *     '''
 */
  __pyx_k_tuple_247 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_247)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_247);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__input));
  PyTuple_SET_ITEM(__pyx_k_tuple_247, 0, ((PyObject *)__pyx_n_s__input));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__input));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__win));
  PyTuple_SET_ITEM(__pyx_k_tuple_247, 1, ((PyObject *)__pyx_n_s__win));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__win));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minp));
  PyTuple_SET_ITEM(__pyx_k_tuple_247, 2, ((PyObject *)__pyx_n_s__minp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__quantile));
  PyTuple_SET_ITEM(__pyx_k_tuple_247, 3, ((PyObject *)__pyx_n_s__quantile));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__quantile));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_247, 4, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prev));
  PyTuple_SET_ITEM(__pyx_k_tuple_247, 5, ((PyObject *)__pyx_n_s__prev));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prev));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__midpoint));
  PyTuple_SET_ITEM(__pyx_k_tuple_247, 6, ((PyObject *)__pyx_n_s__midpoint));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__midpoint));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__skiplist));
  PyTuple_SET_ITEM(__pyx_k_tuple_247, 7, ((PyObject *)__pyx_n_s__skiplist));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__skiplist));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nobs));
  PyTuple_SET_ITEM(__pyx_k_tuple_247, 8, ((PyObject *)__pyx_n_s__nobs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nobs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_247, 9, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_247, 10, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__output));
  PyTuple_SET_ITEM(__pyx_k_tuple_247, 11, ((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_247, 12, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_247));
  __pyx_k_codeobj_248 = (PyObject*)__Pyx_PyCode_New(4, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_247, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_222, __pyx_n_s__roll_quantile, 545, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_248)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":592
 *     return output
 * 
 * def roll_generic(ndarray[float64_t, cast=True] input, int win,             # <<<<<<<<<<<<<<
 *                  int minp, object func):
 *     cdef ndarray[double_t] output, counts, bufarr
 */
  __pyx_k_tuple_249 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_249)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_249);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__input));
  PyTuple_SET_ITEM(__pyx_k_tuple_249, 0, ((PyObject *)__pyx_n_s__input));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__input));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__win));
  PyTuple_SET_ITEM(__pyx_k_tuple_249, 1, ((PyObject *)__pyx_n_s__win));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__win));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__minp));
  PyTuple_SET_ITEM(__pyx_k_tuple_249, 2, ((PyObject *)__pyx_n_s__minp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__minp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__func));
  PyTuple_SET_ITEM(__pyx_k_tuple_249, 3, ((PyObject *)__pyx_n_s__func));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__func));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__output));
  PyTuple_SET_ITEM(__pyx_k_tuple_249, 4, ((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__counts));
  PyTuple_SET_ITEM(__pyx_k_tuple_249, 5, ((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__bufarr));
  PyTuple_SET_ITEM(__pyx_k_tuple_249, 6, ((PyObject *)__pyx_n_s__bufarr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bufarr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_249, 7, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_249, 8, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__buf));
  PyTuple_SET_ITEM(__pyx_k_tuple_249, 9, ((PyObject *)__pyx_n_s__buf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__buf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_249, 10, ((PyObject *)__pyx_n_s__oldbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_249));
  __pyx_k_codeobj_250 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_249, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_222, __pyx_n_s__roll_generic, 592, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_250)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":1
 * def pad_inplace_float64(ndarray[float64_t] values,             # <<<<<<<<<<<<<<
 *                         ndarray[np.uint8_t, cast=True] mask):
 *     '''
 */
  __pyx_k_tuple_251 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_251)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_251);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_251, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_251, 1, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_251, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_251, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_251, 4, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_251));
  __pyx_k_codeobj_252 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_251, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_253, __pyx_n_s__pad_inplace_float64, 1, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_252)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":21
 *             val = values[i]
 * 
 * def get_pad_indexer(ndarray[np.uint8_t, cast=True] mask):             # <<<<<<<<<<<<<<
 *     '''
 *     mask: True if needs to be padded otherwise False
 */
  __pyx_k_tuple_254 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_254)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_254);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_254, 0, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_254, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_254, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_254, 3, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_254, 4, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_254));
  __pyx_k_codeobj_255 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_253, __pyx_n_s__get_pad_indexer, 21, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_255)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":44
 *     return indexer
 * 
 * def get_backfill_indexer(ndarray[np.uint8_t, cast=True] mask):             # <<<<<<<<<<<<<<
 *     '''
 *     mask: True if needs to be padded otherwise False
 */
  __pyx_k_tuple_256 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_256)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_256);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 0, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 3, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_256, 4, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_256));
  __pyx_k_codeobj_257 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_253, __pyx_n_s_258, 44, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_257)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":69
 *     return indexer
 * 
 * def backfill_inplace_float64(ndarray[float64_t] values,             # <<<<<<<<<<<<<<
 *                              ndarray[np.uint8_t, cast=True] mask):
 *     '''
 */
  __pyx_k_tuple_259 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_259)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_259);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_259, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_259, 1, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_259, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_259, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_259, 4, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_259));
  __pyx_k_codeobj_260 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_259, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_253, __pyx_n_s_261, 69, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_260)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":88
 *         i -= 1
 * 
 * def ordered_left_join(ndarray[object] left, ndarray[object] right):             # <<<<<<<<<<<<<<
 *     # cdef dict right_map = map_indices_buf(right)
 *     # return merge_indexer(left, right_map)
 */
  __pyx_k_tuple_262 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_262)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_262);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_262, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_262, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_262, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_262, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_262, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_262, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_262, 6, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_262, 7, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_262, 8, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_262));
  __pyx_k_codeobj_263 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_262, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_253, __pyx_n_s__ordered_left_join, 88, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_263)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":122
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_2d(ndarray[int64_t] left, ndarray[int64_t] right,             # <<<<<<<<<<<<<<
 *                  ndarray[float64_t, ndim=2] lvalues,
 *                  ndarray[float64_t, ndim=2] rvalues,
 */
  __pyx_k_tuple_264 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_264)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_264);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_264, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_264, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lvalues));
  PyTuple_SET_ITEM(__pyx_k_tuple_264, 2, ((PyObject *)__pyx_n_s__lvalues));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lvalues));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rvalues));
  PyTuple_SET_ITEM(__pyx_k_tuple_264, 3, ((PyObject *)__pyx_n_s__rvalues));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rvalues));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_264, 4, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_264, 5, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_264, 6, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_264, 7, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nright));
  PyTuple_SET_ITEM(__pyx_k_tuple_264, 8, ((PyObject *)__pyx_n_s__nright));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nright));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nleft));
  PyTuple_SET_ITEM(__pyx_k_tuple_264, 9, ((PyObject *)__pyx_n_s__nleft));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nleft));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__kright));
  PyTuple_SET_ITEM(__pyx_k_tuple_264, 10, ((PyObject *)__pyx_n_s__kright));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__kright));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__kleft));
  PyTuple_SET_ITEM(__pyx_k_tuple_264, 11, ((PyObject *)__pyx_n_s__kleft));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__kleft));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_264, 12, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_264));
  __pyx_k_codeobj_265 = (PyObject*)__Pyx_PyCode_New(5, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_264, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_253, __pyx_n_s__left_join_2d, 122, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_265)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":157
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_1d(ndarray[int64_t] left, ndarray[int64_t] right,             # <<<<<<<<<<<<<<
 *                  ndarray[float64_t] lvalues,
 *                  ndarray[float64_t] rvalues,
 */
  __pyx_k_tuple_266 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_266)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_266);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_266, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_266, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lvalues));
  PyTuple_SET_ITEM(__pyx_k_tuple_266, 2, ((PyObject *)__pyx_n_s__lvalues));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lvalues));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rvalues));
  PyTuple_SET_ITEM(__pyx_k_tuple_266, 3, ((PyObject *)__pyx_n_s__rvalues));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rvalues));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_266, 4, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_266, 5, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_266, 6, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nright));
  PyTuple_SET_ITEM(__pyx_k_tuple_266, 7, ((PyObject *)__pyx_n_s__nright));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nright));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nleft));
  PyTuple_SET_ITEM(__pyx_k_tuple_266, 8, ((PyObject *)__pyx_n_s__nleft));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nleft));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_266, 9, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_266));
  __pyx_k_codeobj_267 = (PyObject*)__Pyx_PyCode_New(5, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_266, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_253, __pyx_n_s__left_join_1d, 157, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_267)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":189
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_join_contiguous(ndarray[float64_t, ndim=2] lvalues,             # <<<<<<<<<<<<<<
 *                          ndarray[float64_t, ndim=2] rvalues,
 *                          ndarray[int32_t] lindexer,
 */
  __pyx_k_tuple_268 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_268)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_268);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lvalues));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 0, ((PyObject *)__pyx_n_s__lvalues));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lvalues));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rvalues));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 1, ((PyObject *)__pyx_n_s__rvalues));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rvalues));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 2, ((PyObject *)__pyx_n_s__lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 3, ((PyObject *)__pyx_n_s__rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 4, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 5, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 6, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rk));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 7, ((PyObject *)__pyx_n_s__rk));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rk));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lk));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 8, ((PyObject *)__pyx_n_s__lk));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lk));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 9, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lidx));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 10, ((PyObject *)__pyx_n_s__lidx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lidx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ridx));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 11, ((PyObject *)__pyx_n_s__ridx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ridx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__outbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_268, 12, ((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_268));
  __pyx_k_codeobj_269 = (PyObject*)__Pyx_PyCode_New(5, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_253, __pyx_n_s_270, 189, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_269)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":230
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_list(list values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef int i, j, length, newLength
 *     cdef object idx
 */
  __pyx_k_tuple_271 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_271)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_271);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_271, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_271, 1, ((PyObject *)__pyx_n_s__oldMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_271, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_271, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_271, 4, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_271, 5, ((PyObject *)__pyx_n_s__newLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_271, 6, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_vec));
  PyTuple_SET_ITEM(__pyx_k_tuple_271, 7, ((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_271));
  __pyx_k_codeobj_272 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_253, __pyx_n_s__merge_indexer_list, 230, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_272)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":114
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_float64(ndarray[float64_t] values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, length, newLength
 *     cdef float64_t idx
 */
  __pyx_k_tuple_273 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_273)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_273);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_273, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_273, 1, ((PyObject *)__pyx_n_s__oldMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_273, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_273, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_273, 4, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_273, 5, ((PyObject *)__pyx_n_s__newLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_273, 6, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_vec));
  PyTuple_SET_ITEM(__pyx_k_tuple_273, 7, ((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_273));
  __pyx_k_codeobj_274 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_275, 114, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_274)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":132
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_object(ndarray[object] values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, length, newLength
 *     cdef object idx
 */
  __pyx_k_tuple_277 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_277)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_277);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_277, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_277, 1, ((PyObject *)__pyx_n_s__oldMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_277, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_277, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_277, 4, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_277, 5, ((PyObject *)__pyx_n_s__newLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_277, 6, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_vec));
  PyTuple_SET_ITEM(__pyx_k_tuple_277, 7, ((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_277));
  __pyx_k_codeobj_278 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_277, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_279, 132, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_278)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":150
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_int32(ndarray[int32_t] values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, length, newLength
 *     cdef int32_t idx
 */
  __pyx_k_tuple_280 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_280)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_280);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_280, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_280, 1, ((PyObject *)__pyx_n_s__oldMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_280, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_280, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_280, 4, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_280, 5, ((PyObject *)__pyx_n_s__newLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_280, 6, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_vec));
  PyTuple_SET_ITEM(__pyx_k_tuple_280, 7, ((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_280));
  __pyx_k_codeobj_281 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__merge_indexer_int32, 150, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_281)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":168
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_int64(ndarray[int64_t] values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, length, newLength
 *     cdef int64_t idx
 */
  __pyx_k_tuple_282 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_282)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_282);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_282, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_282, 1, ((PyObject *)__pyx_n_s__oldMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_282, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_282, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_282, 4, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_282, 5, ((PyObject *)__pyx_n_s__newLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_282, 6, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_vec));
  PyTuple_SET_ITEM(__pyx_k_tuple_282, 7, ((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_282));
  __pyx_k_codeobj_283 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__merge_indexer_int64, 168, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_283)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":186
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_bool(ndarray[uint8_t] values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, length, newLength
 *     cdef uint8_t idx
 */
  __pyx_k_tuple_284 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_284)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_284);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_284, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_284, 1, ((PyObject *)__pyx_n_s__oldMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_284, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_284, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_284, 4, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_284, 5, ((PyObject *)__pyx_n_s__newLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_284, 6, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_vec));
  PyTuple_SET_ITEM(__pyx_k_tuple_284, 7, ((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_284));
  __pyx_k_codeobj_285 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_284, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__merge_indexer_bool, 186, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_285)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":205
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_float64(ndarray[float64_t] oldIndex,             # <<<<<<<<<<<<<<
 *                  ndarray[float64_t] newIndex,
 *                  dict oldMap, dict newMap):
 */
  __pyx_k_tuple_286 = PyTuple_New(16); if (unlikely(!__pyx_k_tuple_286)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_286);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 0, ((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 1, ((PyObject *)__pyx_n_s__newIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 2, ((PyObject *)__pyx_n_s__oldMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 3, ((PyObject *)__pyx_n_s__newMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 6, ((PyObject *)__pyx_n_s__oldLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 7, ((PyObject *)__pyx_n_s__newLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curLoc));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 8, ((PyObject *)__pyx_n_s__curLoc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curLoc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_vec));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 9, ((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 10, ((PyObject *)__pyx_n_s__newPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 11, ((PyObject *)__pyx_n_s__oldPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prevOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 12, ((PyObject *)__pyx_n_s__prevOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prevOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 13, ((PyObject *)__pyx_n_s__curOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nextOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 14, ((PyObject *)__pyx_n_s__nextOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nextOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__done));
  PyTuple_SET_ITEM(__pyx_k_tuple_286, 15, ((PyObject *)__pyx_n_s__done));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__done));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_286));
  __pyx_k_codeobj_287 = (PyObject*)__Pyx_PyCode_New(4, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__pad_float64, 205, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_287)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":263
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_object(ndarray[object] oldIndex,             # <<<<<<<<<<<<<<
 *                  ndarray[object] newIndex,
 *                  dict oldMap, dict newMap):
 */
  __pyx_k_tuple_288 = PyTuple_New(16); if (unlikely(!__pyx_k_tuple_288)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_288);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 0, ((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 1, ((PyObject *)__pyx_n_s__newIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 2, ((PyObject *)__pyx_n_s__oldMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 3, ((PyObject *)__pyx_n_s__newMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 6, ((PyObject *)__pyx_n_s__oldLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 7, ((PyObject *)__pyx_n_s__newLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curLoc));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 8, ((PyObject *)__pyx_n_s__curLoc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curLoc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_vec));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 9, ((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 10, ((PyObject *)__pyx_n_s__newPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 11, ((PyObject *)__pyx_n_s__oldPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prevOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 12, ((PyObject *)__pyx_n_s__prevOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prevOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 13, ((PyObject *)__pyx_n_s__curOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nextOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 14, ((PyObject *)__pyx_n_s__nextOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nextOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__done));
  PyTuple_SET_ITEM(__pyx_k_tuple_288, 15, ((PyObject *)__pyx_n_s__done));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__done));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_288));
  __pyx_k_codeobj_289 = (PyObject*)__Pyx_PyCode_New(4, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__pad_object, 263, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_289)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":321
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_int32(ndarray[int32_t] oldIndex,             # <<<<<<<<<<<<<<
 *                  ndarray[int32_t] newIndex,
 *                  dict oldMap, dict newMap):
 */
  __pyx_k_tuple_290 = PyTuple_New(16); if (unlikely(!__pyx_k_tuple_290)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_290);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 0, ((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 1, ((PyObject *)__pyx_n_s__newIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 2, ((PyObject *)__pyx_n_s__oldMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 3, ((PyObject *)__pyx_n_s__newMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 6, ((PyObject *)__pyx_n_s__oldLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 7, ((PyObject *)__pyx_n_s__newLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curLoc));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 8, ((PyObject *)__pyx_n_s__curLoc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curLoc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_vec));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 9, ((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 10, ((PyObject *)__pyx_n_s__newPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 11, ((PyObject *)__pyx_n_s__oldPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prevOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 12, ((PyObject *)__pyx_n_s__prevOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prevOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 13, ((PyObject *)__pyx_n_s__curOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nextOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 14, ((PyObject *)__pyx_n_s__nextOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nextOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__done));
  PyTuple_SET_ITEM(__pyx_k_tuple_290, 15, ((PyObject *)__pyx_n_s__done));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__done));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_290));
  __pyx_k_codeobj_291 = (PyObject*)__Pyx_PyCode_New(4, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__pad_int32, 321, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_291)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":379
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_int64(ndarray[int64_t] oldIndex,             # <<<<<<<<<<<<<<
 *                  ndarray[int64_t] newIndex,
 *                  dict oldMap, dict newMap):
 */
  __pyx_k_tuple_292 = PyTuple_New(16); if (unlikely(!__pyx_k_tuple_292)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_292);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 0, ((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 1, ((PyObject *)__pyx_n_s__newIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 2, ((PyObject *)__pyx_n_s__oldMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 3, ((PyObject *)__pyx_n_s__newMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 6, ((PyObject *)__pyx_n_s__oldLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 7, ((PyObject *)__pyx_n_s__newLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curLoc));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 8, ((PyObject *)__pyx_n_s__curLoc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curLoc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_vec));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 9, ((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 10, ((PyObject *)__pyx_n_s__newPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 11, ((PyObject *)__pyx_n_s__oldPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prevOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 12, ((PyObject *)__pyx_n_s__prevOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prevOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 13, ((PyObject *)__pyx_n_s__curOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nextOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 14, ((PyObject *)__pyx_n_s__nextOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nextOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__done));
  PyTuple_SET_ITEM(__pyx_k_tuple_292, 15, ((PyObject *)__pyx_n_s__done));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__done));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_292));
  __pyx_k_codeobj_293 = (PyObject*)__Pyx_PyCode_New(4, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__pad_int64, 379, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_293)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":437
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_bool(ndarray[uint8_t] oldIndex,             # <<<<<<<<<<<<<<
 *                  ndarray[uint8_t] newIndex,
 *                  dict oldMap, dict newMap):
 */
  __pyx_k_tuple_294 = PyTuple_New(16); if (unlikely(!__pyx_k_tuple_294)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_294);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 0, ((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 1, ((PyObject *)__pyx_n_s__newIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 2, ((PyObject *)__pyx_n_s__oldMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 3, ((PyObject *)__pyx_n_s__newMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 6, ((PyObject *)__pyx_n_s__oldLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 7, ((PyObject *)__pyx_n_s__newLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curLoc));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 8, ((PyObject *)__pyx_n_s__curLoc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curLoc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_vec));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 9, ((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 10, ((PyObject *)__pyx_n_s__newPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 11, ((PyObject *)__pyx_n_s__oldPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prevOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 12, ((PyObject *)__pyx_n_s__prevOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prevOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 13, ((PyObject *)__pyx_n_s__curOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nextOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 14, ((PyObject *)__pyx_n_s__nextOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nextOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__done));
  PyTuple_SET_ITEM(__pyx_k_tuple_294, 15, ((PyObject *)__pyx_n_s__done));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__done));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_294));
  __pyx_k_codeobj_295 = (PyObject*)__Pyx_PyCode_New(4, 0, 16, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__pad_bool, 437, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_295)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":496
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_float64(ndarray[float64_t] oldIndex,             # <<<<<<<<<<<<<<
 *                       ndarray[float64_t] newIndex,
 *                       dict oldMap, dict newMap):
 */
  __pyx_k_tuple_296 = PyTuple_New(14); if (unlikely(!__pyx_k_tuple_296)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_296);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_296, 0, ((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_296, 1, ((PyObject *)__pyx_n_s__newIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_296, 2, ((PyObject *)__pyx_n_s__oldMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_296, 3, ((PyObject *)__pyx_n_s__newMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_296, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_296, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_296, 6, ((PyObject *)__pyx_n_s__oldLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_296, 7, ((PyObject *)__pyx_n_s__newLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curLoc));
  PyTuple_SET_ITEM(__pyx_k_tuple_296, 8, ((PyObject *)__pyx_n_s__curLoc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curLoc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_vec));
  PyTuple_SET_ITEM(__pyx_k_tuple_296, 9, ((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_296, 10, ((PyObject *)__pyx_n_s__newPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_296, 11, ((PyObject *)__pyx_n_s__oldPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prevOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_296, 12, ((PyObject *)__pyx_n_s__prevOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prevOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_296, 13, ((PyObject *)__pyx_n_s__curOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_296));
  __pyx_k_codeobj_297 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_296, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__backfill_float64, 496, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_297)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":548
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_object(ndarray[object] oldIndex,             # <<<<<<<<<<<<<<
 *                       ndarray[object] newIndex,
 *                       dict oldMap, dict newMap):
 */
  __pyx_k_tuple_298 = PyTuple_New(14); if (unlikely(!__pyx_k_tuple_298)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_298);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_298, 0, ((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_298, 1, ((PyObject *)__pyx_n_s__newIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_298, 2, ((PyObject *)__pyx_n_s__oldMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_298, 3, ((PyObject *)__pyx_n_s__newMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_298, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_298, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_298, 6, ((PyObject *)__pyx_n_s__oldLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_298, 7, ((PyObject *)__pyx_n_s__newLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curLoc));
  PyTuple_SET_ITEM(__pyx_k_tuple_298, 8, ((PyObject *)__pyx_n_s__curLoc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curLoc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_vec));
  PyTuple_SET_ITEM(__pyx_k_tuple_298, 9, ((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_298, 10, ((PyObject *)__pyx_n_s__newPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_298, 11, ((PyObject *)__pyx_n_s__oldPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prevOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_298, 12, ((PyObject *)__pyx_n_s__prevOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prevOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_298, 13, ((PyObject *)__pyx_n_s__curOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_298));
  __pyx_k_codeobj_299 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_298, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__backfill_object, 548, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_299)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":600
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_int32(ndarray[int32_t] oldIndex,             # <<<<<<<<<<<<<<
 *                       ndarray[int32_t] newIndex,
 *                       dict oldMap, dict newMap):
 */
  __pyx_k_tuple_300 = PyTuple_New(14); if (unlikely(!__pyx_k_tuple_300)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_300);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_300, 0, ((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_300, 1, ((PyObject *)__pyx_n_s__newIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_300, 2, ((PyObject *)__pyx_n_s__oldMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_300, 3, ((PyObject *)__pyx_n_s__newMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_300, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_300, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_300, 6, ((PyObject *)__pyx_n_s__oldLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_300, 7, ((PyObject *)__pyx_n_s__newLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curLoc));
  PyTuple_SET_ITEM(__pyx_k_tuple_300, 8, ((PyObject *)__pyx_n_s__curLoc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curLoc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_vec));
  PyTuple_SET_ITEM(__pyx_k_tuple_300, 9, ((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_300, 10, ((PyObject *)__pyx_n_s__newPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_300, 11, ((PyObject *)__pyx_n_s__oldPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prevOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_300, 12, ((PyObject *)__pyx_n_s__prevOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prevOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_300, 13, ((PyObject *)__pyx_n_s__curOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_300));
  __pyx_k_codeobj_301 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_300, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__backfill_int32, 600, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_301)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":652
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_int64(ndarray[int64_t] oldIndex,             # <<<<<<<<<<<<<<
 *                       ndarray[int64_t] newIndex,
 *                       dict oldMap, dict newMap):
 */
  __pyx_k_tuple_302 = PyTuple_New(14); if (unlikely(!__pyx_k_tuple_302)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_302);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_302, 0, ((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_302, 1, ((PyObject *)__pyx_n_s__newIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_302, 2, ((PyObject *)__pyx_n_s__oldMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_302, 3, ((PyObject *)__pyx_n_s__newMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_302, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_302, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_302, 6, ((PyObject *)__pyx_n_s__oldLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_302, 7, ((PyObject *)__pyx_n_s__newLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curLoc));
  PyTuple_SET_ITEM(__pyx_k_tuple_302, 8, ((PyObject *)__pyx_n_s__curLoc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curLoc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_vec));
  PyTuple_SET_ITEM(__pyx_k_tuple_302, 9, ((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_302, 10, ((PyObject *)__pyx_n_s__newPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_302, 11, ((PyObject *)__pyx_n_s__oldPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prevOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_302, 12, ((PyObject *)__pyx_n_s__prevOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prevOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_302, 13, ((PyObject *)__pyx_n_s__curOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_302));
  __pyx_k_codeobj_303 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_302, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__backfill_int64, 652, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_303)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":704
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_bool(ndarray[uint8_t] oldIndex,             # <<<<<<<<<<<<<<
 *                       ndarray[uint8_t] newIndex,
 *                       dict oldMap, dict newMap):
 */
  __pyx_k_tuple_304 = PyTuple_New(14); if (unlikely(!__pyx_k_tuple_304)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_304);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_304, 0, ((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newIndex));
  PyTuple_SET_ITEM(__pyx_k_tuple_304, 1, ((PyObject *)__pyx_n_s__newIndex));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newIndex));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_304, 2, ((PyObject *)__pyx_n_s__oldMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newMap));
  PyTuple_SET_ITEM(__pyx_k_tuple_304, 3, ((PyObject *)__pyx_n_s__newMap));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newMap));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_304, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_304, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_304, 6, ((PyObject *)__pyx_n_s__oldLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newLength));
  PyTuple_SET_ITEM(__pyx_k_tuple_304, 7, ((PyObject *)__pyx_n_s__newLength));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newLength));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curLoc));
  PyTuple_SET_ITEM(__pyx_k_tuple_304, 8, ((PyObject *)__pyx_n_s__curLoc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curLoc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_vec));
  PyTuple_SET_ITEM(__pyx_k_tuple_304, 9, ((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_vec));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__newPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_304, 10, ((PyObject *)__pyx_n_s__newPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__newPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__oldPos));
  PyTuple_SET_ITEM(__pyx_k_tuple_304, 11, ((PyObject *)__pyx_n_s__oldPos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__oldPos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prevOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_304, 12, ((PyObject *)__pyx_n_s__prevOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prevOld));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__curOld));
  PyTuple_SET_ITEM(__pyx_k_tuple_304, 13, ((PyObject *)__pyx_n_s__curOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__curOld));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_304));
  __pyx_k_codeobj_305 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_304, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__backfill_bool, 704, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_305)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":757
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_2d_inplace_float64(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                             ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_k_tuple_306 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_306)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_306);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_306, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_306, 1, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_306, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_306, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_306, 4, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__K));
  PyTuple_SET_ITEM(__pyx_k_tuple_306, 5, ((PyObject *)__pyx_n_s__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__K));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_306, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_306));
  __pyx_k_codeobj_307 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_306, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_308, 757, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_307)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":775
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_2d_inplace_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
 *                             ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_k_tuple_309 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_309)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_309);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_309, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_309, 1, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_309, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_309, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_309, 4, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__K));
  PyTuple_SET_ITEM(__pyx_k_tuple_309, 5, ((PyObject *)__pyx_n_s__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__K));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_309, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_309));
  __pyx_k_codeobj_310 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_309, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_311, 775, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_310)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":793
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_2d_inplace_int32(ndarray[int32_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                             ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_k_tuple_312 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_312)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_312);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_312, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_312, 1, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_312, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_312, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_312, 4, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__K));
  PyTuple_SET_ITEM(__pyx_k_tuple_312, 5, ((PyObject *)__pyx_n_s__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__K));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_312, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_312));
  __pyx_k_codeobj_313 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_312, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_314, 793, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_313)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":811
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_2d_inplace_int64(ndarray[int64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                             ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_k_tuple_315 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_315)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_315);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_315, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_315, 1, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_315, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_315, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_315, 4, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__K));
  PyTuple_SET_ITEM(__pyx_k_tuple_315, 5, ((PyObject *)__pyx_n_s__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__K));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_315, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_315));
  __pyx_k_codeobj_316 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_315, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_317, 811, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_316)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":829
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_2d_inplace_bool(ndarray[uint8_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                             ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_k_tuple_318 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_318)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_318);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_318, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_318, 1, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_318, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_318, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_318, 4, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__K));
  PyTuple_SET_ITEM(__pyx_k_tuple_318, 5, ((PyObject *)__pyx_n_s__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__K));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_318, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_318));
  __pyx_k_codeobj_319 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_318, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__pad_2d_inplace_bool, 829, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_319)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":848
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_2d_inplace_float64(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                                  ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_k_tuple_320 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_320)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_320);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_320, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_320, 1, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_320, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_320, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_320, 4, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__K));
  PyTuple_SET_ITEM(__pyx_k_tuple_320, 5, ((PyObject *)__pyx_n_s__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__K));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_320, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_320));
  __pyx_k_codeobj_321 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_320, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_322, 848, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_321)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":864
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_2d_inplace_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
 *                                  ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_k_tuple_323 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_323)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_323);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_323, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_323, 1, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_323, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_323, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_323, 4, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__K));
  PyTuple_SET_ITEM(__pyx_k_tuple_323, 5, ((PyObject *)__pyx_n_s__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__K));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_323, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_323));
  __pyx_k_codeobj_324 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_323, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_325, 864, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_324)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":880
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_2d_inplace_int32(ndarray[int32_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                                  ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_k_tuple_326 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_326)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_326);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_326, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_326, 1, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_326, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_326, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_326, 4, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__K));
  PyTuple_SET_ITEM(__pyx_k_tuple_326, 5, ((PyObject *)__pyx_n_s__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__K));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_326, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_326));
  __pyx_k_codeobj_327 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_326, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_328, 880, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_327)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":896
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_2d_inplace_int64(ndarray[int64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                                  ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_k_tuple_329 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_329)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_329);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_329, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_329, 1, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_329, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_329, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_329, 4, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__K));
  PyTuple_SET_ITEM(__pyx_k_tuple_329, 5, ((PyObject *)__pyx_n_s__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__K));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_329, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_329));
  __pyx_k_codeobj_330 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_331, 896, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_330)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":912
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_2d_inplace_bool(ndarray[uint8_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                                  ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_k_tuple_332 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_332)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_332);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_332, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_332, 1, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_332, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_332, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__N));
  PyTuple_SET_ITEM(__pyx_k_tuple_332, 4, ((PyObject *)__pyx_n_s__N));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__N));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__K));
  PyTuple_SET_ITEM(__pyx_k_tuple_332, 5, ((PyObject *)__pyx_n_s__K));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__K));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_332, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_332));
  __pyx_k_codeobj_333 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_332, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_334, 912, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_333)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":929
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_1d_float64(ndarray[float64_t] values, ndarray[int32_t] indexer,             # <<<<<<<<<<<<<<
 *                      out=None, fill_value=np.nan):
 *     cdef:
 */
  __pyx_k_tuple_335 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_335)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_335);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_335, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_335, 1, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_335, 2, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_335, 3, ((PyObject *)__pyx_n_s__fill_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_335, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_335, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_335, 6, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__outbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_335, 7, ((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fv));
  PyTuple_SET_ITEM(__pyx_k_tuple_335, 8, ((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_335));
  __pyx_k_codeobj_336 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_335, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__take_1d_float64, 929, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_336)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":961
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_1d_object(ndarray[object] values, ndarray[int32_t] indexer,             # <<<<<<<<<<<<<<
 *                      out=None, fill_value=np.nan):
 *     cdef:
 */
  __pyx_k_tuple_337 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_337)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_337);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_337, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_337, 1, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_337, 2, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_337, 3, ((PyObject *)__pyx_n_s__fill_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_337, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_337, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_337, 6, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__outbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_337, 7, ((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fv));
  PyTuple_SET_ITEM(__pyx_k_tuple_337, 8, ((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_337));
  __pyx_k_codeobj_338 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_337, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__take_1d_object, 961, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_338)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":993
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_1d_int32(ndarray[int32_t] values, ndarray[int32_t] indexer,             # <<<<<<<<<<<<<<
 *                      out=None, fill_value=np.nan):
 *     cdef:
 */
  __pyx_k_tuple_339 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_339)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_339);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_339, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_339, 1, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_339, 2, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_339, 3, ((PyObject *)__pyx_n_s__fill_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_339, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_339, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_339, 6, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__outbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_339, 7, ((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fv));
  PyTuple_SET_ITEM(__pyx_k_tuple_339, 8, ((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_339));
  __pyx_k_codeobj_340 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_339, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__take_1d_int32, 993, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_340)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1025
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_1d_int64(ndarray[int64_t] values, ndarray[int32_t] indexer,             # <<<<<<<<<<<<<<
 *                      out=None, fill_value=np.nan):
 *     cdef:
 */
  __pyx_k_tuple_341 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_341)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_341);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_341, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_341, 1, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_341, 2, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_341, 3, ((PyObject *)__pyx_n_s__fill_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_341, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_341, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_341, 6, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__outbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_341, 7, ((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fv));
  PyTuple_SET_ITEM(__pyx_k_tuple_341, 8, ((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_341));
  __pyx_k_codeobj_342 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_341, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__take_1d_int64, 1025, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_342)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1057
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_1d_bool(ndarray[uint8_t] values, ndarray[int32_t] indexer,             # <<<<<<<<<<<<<<
 *                      out=None, fill_value=np.nan):
 *     cdef:
 */
  __pyx_k_tuple_343 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_343)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_343);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 1, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 2, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 3, ((PyObject *)__pyx_n_s__fill_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 6, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__outbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 7, ((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fv));
  PyTuple_SET_ITEM(__pyx_k_tuple_343, 8, ((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_343));
  __pyx_k_codeobj_344 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_343, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__take_1d_bool, 1057, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_344)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1090
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def is_monotonic_float64(ndarray[float64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_k_tuple_345 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_345)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_345);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_345, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_345, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_345, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prev));
  PyTuple_SET_ITEM(__pyx_k_tuple_345, 3, ((PyObject *)__pyx_n_s__prev));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prev));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cur));
  PyTuple_SET_ITEM(__pyx_k_tuple_345, 4, ((PyObject *)__pyx_n_s__cur));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cur));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_345));
  __pyx_k_codeobj_346 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_345, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_347, 1090, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_346)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1110
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def is_monotonic_object(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_k_tuple_348 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_348)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_348);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_348, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_348, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_348, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prev));
  PyTuple_SET_ITEM(__pyx_k_tuple_348, 3, ((PyObject *)__pyx_n_s__prev));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prev));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cur));
  PyTuple_SET_ITEM(__pyx_k_tuple_348, 4, ((PyObject *)__pyx_n_s__cur));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cur));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_348));
  __pyx_k_codeobj_349 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_348, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__is_monotonic_object, 1110, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_349)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1130
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def is_monotonic_int32(ndarray[int32_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_k_tuple_350 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_350)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_350);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_350, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_350, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_350, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prev));
  PyTuple_SET_ITEM(__pyx_k_tuple_350, 3, ((PyObject *)__pyx_n_s__prev));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prev));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cur));
  PyTuple_SET_ITEM(__pyx_k_tuple_350, 4, ((PyObject *)__pyx_n_s__cur));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cur));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_350));
  __pyx_k_codeobj_351 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_350, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__is_monotonic_int32, 1130, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_351)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1150
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def is_monotonic_int64(ndarray[int64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_k_tuple_352 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_352)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_352);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_352, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_352, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_352, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prev));
  PyTuple_SET_ITEM(__pyx_k_tuple_352, 3, ((PyObject *)__pyx_n_s__prev));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prev));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cur));
  PyTuple_SET_ITEM(__pyx_k_tuple_352, 4, ((PyObject *)__pyx_n_s__cur));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cur));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_352));
  __pyx_k_codeobj_353 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_352, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__is_monotonic_int64, 1150, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_353)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1170
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def is_monotonic_bool(ndarray[uint8_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_k_tuple_354 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_354)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_354);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_354, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_354, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_354, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__prev));
  PyTuple_SET_ITEM(__pyx_k_tuple_354, 3, ((PyObject *)__pyx_n_s__prev));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__prev));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__cur));
  PyTuple_SET_ITEM(__pyx_k_tuple_354, 4, ((PyObject *)__pyx_n_s__cur));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cur));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_354));
  __pyx_k_codeobj_355 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__is_monotonic_bool, 1170, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_355)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1191
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def groupby_float64(ndarray[float64_t] index, ndarray labels):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef Py_ssize_t i, length
 */
  __pyx_k_tuple_356 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_356)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_356);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_356, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_356, 1, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_356, 2, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_356, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_356, 4, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__members));
  PyTuple_SET_ITEM(__pyx_k_tuple_356, 5, ((PyObject *)__pyx_n_s__members));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__members));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_356, 6, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__key));
  PyTuple_SET_ITEM(__pyx_k_tuple_356, 7, ((PyObject *)__pyx_n_s__key));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__key));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_356));
  __pyx_k_codeobj_357 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_356, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__groupby_float64, 1191, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_357)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1216
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def groupby_object(ndarray[object] index, ndarray labels):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef Py_ssize_t i, length
 */
  __pyx_k_tuple_358 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_358)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_358);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_358, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_358, 1, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_358, 2, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_358, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_358, 4, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__members));
  PyTuple_SET_ITEM(__pyx_k_tuple_358, 5, ((PyObject *)__pyx_n_s__members));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__members));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_358, 6, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__key));
  PyTuple_SET_ITEM(__pyx_k_tuple_358, 7, ((PyObject *)__pyx_n_s__key));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__key));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_358));
  __pyx_k_codeobj_359 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_358, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__groupby_object, 1216, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_359)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1241
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def groupby_int32(ndarray[int32_t] index, ndarray labels):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef Py_ssize_t i, length
 */
  __pyx_k_tuple_360 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_360)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_360);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_360, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_360, 1, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_360, 2, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_360, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_360, 4, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__members));
  PyTuple_SET_ITEM(__pyx_k_tuple_360, 5, ((PyObject *)__pyx_n_s__members));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__members));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_360, 6, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__key));
  PyTuple_SET_ITEM(__pyx_k_tuple_360, 7, ((PyObject *)__pyx_n_s__key));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__key));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_360));
  __pyx_k_codeobj_361 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_360, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__groupby_int32, 1241, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_361)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1266
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def groupby_int64(ndarray[int64_t] index, ndarray labels):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef Py_ssize_t i, length
 */
  __pyx_k_tuple_362 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_362)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_362);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_362, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_362, 1, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_362, 2, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_362, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_362, 4, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__members));
  PyTuple_SET_ITEM(__pyx_k_tuple_362, 5, ((PyObject *)__pyx_n_s__members));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__members));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_362, 6, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__key));
  PyTuple_SET_ITEM(__pyx_k_tuple_362, 7, ((PyObject *)__pyx_n_s__key));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__key));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_362));
  __pyx_k_codeobj_363 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_362, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__groupby_int64, 1266, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_363)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1291
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def groupby_bool(ndarray[uint8_t] index, ndarray labels):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef Py_ssize_t i, length
 */
  __pyx_k_tuple_364 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_364)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_364);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_364, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__labels));
  PyTuple_SET_ITEM(__pyx_k_tuple_364, 1, ((PyObject *)__pyx_n_s__labels));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__labels));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_364, 2, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_364, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_364, 4, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__members));
  PyTuple_SET_ITEM(__pyx_k_tuple_364, 5, ((PyObject *)__pyx_n_s__members));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__members));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_364, 6, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__key));
  PyTuple_SET_ITEM(__pyx_k_tuple_364, 7, ((PyObject *)__pyx_n_s__key));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__key));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_364));
  __pyx_k_codeobj_365 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_364, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__groupby_bool, 1291, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_365)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1317
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def arrmap_float64(ndarray[float64_t] index, object func):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0
 */
  __pyx_k_tuple_366 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_366)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_366);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_366, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__func));
  PyTuple_SET_ITEM(__pyx_k_tuple_366, 1, ((PyObject *)__pyx_n_s__func));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__func));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_366, 2, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_366, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_366, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_366));
  __pyx_k_codeobj_367 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_366, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__arrmap_float64, 1317, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_367)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1330
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def arrmap_object(ndarray[object] index, object func):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0
 */
  __pyx_k_tuple_368 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_368)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_368);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_368, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__func));
  PyTuple_SET_ITEM(__pyx_k_tuple_368, 1, ((PyObject *)__pyx_n_s__func));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__func));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_368, 2, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_368, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_368, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_368));
  __pyx_k_codeobj_369 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_368, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__arrmap_object, 1330, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_369)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1343
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def arrmap_int32(ndarray[int32_t] index, object func):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0
 */
  __pyx_k_tuple_370 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_370)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_370);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_370, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__func));
  PyTuple_SET_ITEM(__pyx_k_tuple_370, 1, ((PyObject *)__pyx_n_s__func));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__func));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_370, 2, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_370, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_370, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_370));
  __pyx_k_codeobj_371 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_370, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__arrmap_int32, 1343, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_371)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1356
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def arrmap_int64(ndarray[int64_t] index, object func):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0
 */
  __pyx_k_tuple_372 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_372)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_372);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_372, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__func));
  PyTuple_SET_ITEM(__pyx_k_tuple_372, 1, ((PyObject *)__pyx_n_s__func));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__func));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_372, 2, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_372, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_372, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_372));
  __pyx_k_codeobj_373 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_372, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__arrmap_int64, 1356, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_373)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1369
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def arrmap_bool(ndarray[uint8_t] index, object func):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0
 */
  __pyx_k_tuple_374 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_374)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_374);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_374, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__func));
  PyTuple_SET_ITEM(__pyx_k_tuple_374, 1, ((PyObject *)__pyx_n_s__func));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__func));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_374, 2, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_374, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_374, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_374));
  __pyx_k_codeobj_375 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_374, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__arrmap_bool, 1369, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_375)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1383
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis0_float64(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_k_tuple_376 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_376)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_376);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_376, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_376, 1, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_376, 2, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_376, 3, ((PyObject *)__pyx_n_s__fill_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_376, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_376, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_376, 6, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_376, 7, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_376, 8, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__outbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_376, 9, ((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fv));
  PyTuple_SET_ITEM(__pyx_k_tuple_376, 10, ((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_376));
  __pyx_k_codeobj_377 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_376, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_378, 1383, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_377)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1421
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis0_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_k_tuple_379 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_379)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_379);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 1, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 2, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 3, ((PyObject *)__pyx_n_s__fill_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 6, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 7, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 8, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__outbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 9, ((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fv));
  PyTuple_SET_ITEM(__pyx_k_tuple_379, 10, ((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_379));
  __pyx_k_codeobj_380 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_379, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_381, 1421, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_380)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1459
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis0_int32(ndarray[int32_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_k_tuple_382 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_382)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_382);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_382, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_382, 1, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_382, 2, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_382, 3, ((PyObject *)__pyx_n_s__fill_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_382, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_382, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_382, 6, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_382, 7, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_382, 8, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__outbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_382, 9, ((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fv));
  PyTuple_SET_ITEM(__pyx_k_tuple_382, 10, ((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_382));
  __pyx_k_codeobj_383 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_382, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__take_2d_axis0_int32, 1459, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_383)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1497
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis0_int64(ndarray[int64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_k_tuple_384 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_384)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_384);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_384, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_384, 1, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_384, 2, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_384, 3, ((PyObject *)__pyx_n_s__fill_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_384, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_384, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_384, 6, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_384, 7, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_384, 8, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__outbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_384, 9, ((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fv));
  PyTuple_SET_ITEM(__pyx_k_tuple_384, 10, ((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_384));
  __pyx_k_codeobj_385 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_384, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__take_2d_axis0_int64, 1497, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_385)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1535
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis0_bool(ndarray[uint8_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_k_tuple_386 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_386)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_386);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_386, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_386, 1, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_386, 2, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_386, 3, ((PyObject *)__pyx_n_s__fill_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_386, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_386, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_386, 6, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_386, 7, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_386, 8, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__outbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_386, 9, ((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fv));
  PyTuple_SET_ITEM(__pyx_k_tuple_386, 10, ((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_386));
  __pyx_k_codeobj_387 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_386, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__take_2d_axis0_bool, 1535, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_387)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1574
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis1_float64(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_k_tuple_388 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_388)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_388);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_388, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_388, 1, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_388, 2, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_388, 3, ((PyObject *)__pyx_n_s__fill_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_388, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_388, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_388, 6, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_388, 7, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_388, 8, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__outbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_388, 9, ((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fv));
  PyTuple_SET_ITEM(__pyx_k_tuple_388, 10, ((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_388));
  __pyx_k_codeobj_389 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_388, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_390, 1574, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_389)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1614
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis1_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_k_tuple_391 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_391)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_391);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_391, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_391, 1, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_391, 2, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_391, 3, ((PyObject *)__pyx_n_s__fill_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_391, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_391, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_391, 6, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_391, 7, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_391, 8, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__outbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_391, 9, ((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fv));
  PyTuple_SET_ITEM(__pyx_k_tuple_391, 10, ((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_391));
  __pyx_k_codeobj_392 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_391, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_393, 1614, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_392)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1654
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis1_int32(ndarray[int32_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_k_tuple_394 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_394)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_394);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_394, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_394, 1, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_394, 2, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_394, 3, ((PyObject *)__pyx_n_s__fill_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_394, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_394, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_394, 6, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_394, 7, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_394, 8, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__outbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_394, 9, ((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fv));
  PyTuple_SET_ITEM(__pyx_k_tuple_394, 10, ((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_394));
  __pyx_k_codeobj_395 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_394, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__take_2d_axis1_int32, 1654, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_395)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1694
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis1_int64(ndarray[int64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_k_tuple_396 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_396)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_396);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_396, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_396, 1, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_396, 2, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_396, 3, ((PyObject *)__pyx_n_s__fill_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_396, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_396, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_396, 6, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_396, 7, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_396, 8, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__outbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_396, 9, ((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fv));
  PyTuple_SET_ITEM(__pyx_k_tuple_396, 10, ((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_396));
  __pyx_k_codeobj_397 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_396, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__take_2d_axis1_int64, 1694, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_397)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1734
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis1_bool(ndarray[uint8_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_k_tuple_398 = PyTuple_New(11); if (unlikely(!__pyx_k_tuple_398)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_398);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_398, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_398, 1, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__out));
  PyTuple_SET_ITEM(__pyx_k_tuple_398, 2, ((PyObject *)__pyx_n_s__out));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__out));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fill_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_398, 3, ((PyObject *)__pyx_n_s__fill_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fill_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_398, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_398, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_398, 6, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_398, 7, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_398, 8, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__outbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_398, 9, ((PyObject *)__pyx_n_s__outbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__outbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fv));
  PyTuple_SET_ITEM(__pyx_k_tuple_398, 10, ((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fv));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_398));
  __pyx_k_codeobj_399 = (PyObject*)__Pyx_PyCode_New(4, 0, 11, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_398, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s__take_2d_axis1_bool, 1734, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_399)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1775
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_indexer_float64(ndarray[float64_t] left,             # <<<<<<<<<<<<<<
 *                              ndarray[float64_t] right):
 *     cdef:
 */
  __pyx_k_tuple_400 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_400)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_400);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_400, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_400, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_400, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_400, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nleft));
  PyTuple_SET_ITEM(__pyx_k_tuple_400, 4, ((PyObject *)__pyx_n_s__nleft));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nleft));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nright));
  PyTuple_SET_ITEM(__pyx_k_tuple_400, 5, ((PyObject *)__pyx_n_s__nright));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nright));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_400, 6, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lval));
  PyTuple_SET_ITEM(__pyx_k_tuple_400, 7, ((PyObject *)__pyx_n_s__lval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rval));
  PyTuple_SET_ITEM(__pyx_k_tuple_400, 8, ((PyObject *)__pyx_n_s__rval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rval));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_400));
  __pyx_k_codeobj_401 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_400, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_402, 1775, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_401)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1820
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_indexer_object(ndarray[object] left,             # <<<<<<<<<<<<<<
 *                              ndarray[object] right):
 *     cdef:
 */
  __pyx_k_tuple_403 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_403)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_403);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_403, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_403, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_403, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_403, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nleft));
  PyTuple_SET_ITEM(__pyx_k_tuple_403, 4, ((PyObject *)__pyx_n_s__nleft));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nleft));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nright));
  PyTuple_SET_ITEM(__pyx_k_tuple_403, 5, ((PyObject *)__pyx_n_s__nright));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nright));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_403, 6, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lval));
  PyTuple_SET_ITEM(__pyx_k_tuple_403, 7, ((PyObject *)__pyx_n_s__lval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rval));
  PyTuple_SET_ITEM(__pyx_k_tuple_403, 8, ((PyObject *)__pyx_n_s__rval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rval));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_403));
  __pyx_k_codeobj_404 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_403, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_405, 1820, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_404)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1865
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_indexer_int32(ndarray[int32_t] left,             # <<<<<<<<<<<<<<
 *                              ndarray[int32_t] right):
 *     cdef:
 */
  __pyx_k_tuple_406 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_406)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_406);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_406, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_406, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_406, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_406, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nleft));
  PyTuple_SET_ITEM(__pyx_k_tuple_406, 4, ((PyObject *)__pyx_n_s__nleft));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nleft));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nright));
  PyTuple_SET_ITEM(__pyx_k_tuple_406, 5, ((PyObject *)__pyx_n_s__nright));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nright));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_406, 6, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lval));
  PyTuple_SET_ITEM(__pyx_k_tuple_406, 7, ((PyObject *)__pyx_n_s__lval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rval));
  PyTuple_SET_ITEM(__pyx_k_tuple_406, 8, ((PyObject *)__pyx_n_s__rval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rval));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_406));
  __pyx_k_codeobj_407 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_406, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_408, 1865, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_407)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1910
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_indexer_int64(ndarray[int64_t] left,             # <<<<<<<<<<<<<<
 *                              ndarray[int64_t] right):
 *     cdef:
 */
  __pyx_k_tuple_409 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_409)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_409);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_409, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_409, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_409, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_409, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nleft));
  PyTuple_SET_ITEM(__pyx_k_tuple_409, 4, ((PyObject *)__pyx_n_s__nleft));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nleft));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nright));
  PyTuple_SET_ITEM(__pyx_k_tuple_409, 5, ((PyObject *)__pyx_n_s__nright));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nright));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_409, 6, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lval));
  PyTuple_SET_ITEM(__pyx_k_tuple_409, 7, ((PyObject *)__pyx_n_s__lval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rval));
  PyTuple_SET_ITEM(__pyx_k_tuple_409, 8, ((PyObject *)__pyx_n_s__rval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rval));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_409));
  __pyx_k_codeobj_410 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_409, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_411, 1910, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_410)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1956
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def outer_join_indexer_float64(ndarray[float64_t] left,             # <<<<<<<<<<<<<<
 *                                 ndarray[float64_t] right):
 *     cdef:
 */
  __pyx_k_tuple_412 = PyTuple_New(12); if (unlikely(!__pyx_k_tuple_412)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_412);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_412, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_412, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_412, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_412, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nright));
  PyTuple_SET_ITEM(__pyx_k_tuple_412, 4, ((PyObject *)__pyx_n_s__nright));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nright));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nleft));
  PyTuple_SET_ITEM(__pyx_k_tuple_412, 5, ((PyObject *)__pyx_n_s__nleft));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nleft));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__count));
  PyTuple_SET_ITEM(__pyx_k_tuple_412, 6, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lval));
  PyTuple_SET_ITEM(__pyx_k_tuple_412, 7, ((PyObject *)__pyx_n_s__lval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rval));
  PyTuple_SET_ITEM(__pyx_k_tuple_412, 8, ((PyObject *)__pyx_n_s__rval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_412, 9, ((PyObject *)__pyx_n_s__lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_412, 10, ((PyObject *)__pyx_n_s__rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_412, 11, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_412));
  __pyx_k_codeobj_413 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_412, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_414, 1956, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_413)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2052
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def outer_join_indexer_object(ndarray[object] left,             # <<<<<<<<<<<<<<
 *                                 ndarray[object] right):
 *     cdef:
 */
  __pyx_k_tuple_415 = PyTuple_New(12); if (unlikely(!__pyx_k_tuple_415)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_415);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nright));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 4, ((PyObject *)__pyx_n_s__nright));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nright));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nleft));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 5, ((PyObject *)__pyx_n_s__nleft));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nleft));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__count));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 6, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lval));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 7, ((PyObject *)__pyx_n_s__lval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rval));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 8, ((PyObject *)__pyx_n_s__rval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 9, ((PyObject *)__pyx_n_s__lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 10, ((PyObject *)__pyx_n_s__rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_415, 11, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_415));
  __pyx_k_codeobj_416 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_415, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_417, 2052, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_416)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2148
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def outer_join_indexer_int32(ndarray[int32_t] left,             # <<<<<<<<<<<<<<
 *                                 ndarray[int32_t] right):
 *     cdef:
 */
  __pyx_k_tuple_418 = PyTuple_New(12); if (unlikely(!__pyx_k_tuple_418)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_418);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_418, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_418, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_418, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_418, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nright));
  PyTuple_SET_ITEM(__pyx_k_tuple_418, 4, ((PyObject *)__pyx_n_s__nright));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nright));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nleft));
  PyTuple_SET_ITEM(__pyx_k_tuple_418, 5, ((PyObject *)__pyx_n_s__nleft));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nleft));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__count));
  PyTuple_SET_ITEM(__pyx_k_tuple_418, 6, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lval));
  PyTuple_SET_ITEM(__pyx_k_tuple_418, 7, ((PyObject *)__pyx_n_s__lval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rval));
  PyTuple_SET_ITEM(__pyx_k_tuple_418, 8, ((PyObject *)__pyx_n_s__rval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_418, 9, ((PyObject *)__pyx_n_s__lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_418, 10, ((PyObject *)__pyx_n_s__rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_418, 11, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_418));
  __pyx_k_codeobj_419 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_418, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_420, 2148, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_419)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2244
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def outer_join_indexer_int64(ndarray[int64_t] left,             # <<<<<<<<<<<<<<
 *                                 ndarray[int64_t] right):
 *     cdef:
 */
  __pyx_k_tuple_421 = PyTuple_New(12); if (unlikely(!__pyx_k_tuple_421)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_421);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_421, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_421, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_421, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_421, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nright));
  PyTuple_SET_ITEM(__pyx_k_tuple_421, 4, ((PyObject *)__pyx_n_s__nright));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nright));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nleft));
  PyTuple_SET_ITEM(__pyx_k_tuple_421, 5, ((PyObject *)__pyx_n_s__nleft));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nleft));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__count));
  PyTuple_SET_ITEM(__pyx_k_tuple_421, 6, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lval));
  PyTuple_SET_ITEM(__pyx_k_tuple_421, 7, ((PyObject *)__pyx_n_s__lval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rval));
  PyTuple_SET_ITEM(__pyx_k_tuple_421, 8, ((PyObject *)__pyx_n_s__rval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_421, 9, ((PyObject *)__pyx_n_s__lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_421, 10, ((PyObject *)__pyx_n_s__rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_421, 11, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_421));
  __pyx_k_codeobj_422 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_421, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_423, 2244, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_422)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2341
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def inner_join_indexer_float64(ndarray[float64_t] left,             # <<<<<<<<<<<<<<
 *                               ndarray[float64_t] right):
 *     '''
 */
  __pyx_k_tuple_424 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_424)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_424);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_424, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_424, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_424, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_424, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_424, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nright));
  PyTuple_SET_ITEM(__pyx_k_tuple_424, 5, ((PyObject *)__pyx_n_s__nright));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nright));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nleft));
  PyTuple_SET_ITEM(__pyx_k_tuple_424, 6, ((PyObject *)__pyx_n_s__nleft));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nleft));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__count));
  PyTuple_SET_ITEM(__pyx_k_tuple_424, 7, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lval));
  PyTuple_SET_ITEM(__pyx_k_tuple_424, 8, ((PyObject *)__pyx_n_s__lval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rval));
  PyTuple_SET_ITEM(__pyx_k_tuple_424, 9, ((PyObject *)__pyx_n_s__rval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_424, 10, ((PyObject *)__pyx_n_s__lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_424, 11, ((PyObject *)__pyx_n_s__rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_424, 12, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_424));
  __pyx_k_codeobj_425 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_424, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_426, 2341, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_425)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2404
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def inner_join_indexer_object(ndarray[object] left,             # <<<<<<<<<<<<<<
 *                               ndarray[object] right):
 *     '''
 */
  __pyx_k_tuple_427 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_427)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_427);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_427, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_427, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_427, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_427, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_427, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nright));
  PyTuple_SET_ITEM(__pyx_k_tuple_427, 5, ((PyObject *)__pyx_n_s__nright));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nright));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nleft));
  PyTuple_SET_ITEM(__pyx_k_tuple_427, 6, ((PyObject *)__pyx_n_s__nleft));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nleft));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__count));
  PyTuple_SET_ITEM(__pyx_k_tuple_427, 7, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lval));
  PyTuple_SET_ITEM(__pyx_k_tuple_427, 8, ((PyObject *)__pyx_n_s__lval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rval));
  PyTuple_SET_ITEM(__pyx_k_tuple_427, 9, ((PyObject *)__pyx_n_s__rval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_427, 10, ((PyObject *)__pyx_n_s__lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_427, 11, ((PyObject *)__pyx_n_s__rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_427, 12, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_427));
  __pyx_k_codeobj_428 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_427, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_429, 2404, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_428)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2467
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def inner_join_indexer_int32(ndarray[int32_t] left,             # <<<<<<<<<<<<<<
 *                               ndarray[int32_t] right):
 *     '''
 */
  __pyx_k_tuple_430 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_430)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_430);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nright));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 5, ((PyObject *)__pyx_n_s__nright));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nright));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nleft));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 6, ((PyObject *)__pyx_n_s__nleft));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nleft));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__count));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 7, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lval));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 8, ((PyObject *)__pyx_n_s__lval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rval));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 9, ((PyObject *)__pyx_n_s__rval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 10, ((PyObject *)__pyx_n_s__lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 11, ((PyObject *)__pyx_n_s__rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_430, 12, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_430));
  __pyx_k_codeobj_431 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_430, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_432, 2467, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_431)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2530
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def inner_join_indexer_int64(ndarray[int64_t] left,             # <<<<<<<<<<<<<<
 *                               ndarray[int64_t] right):
 *     '''
 */
  __pyx_k_tuple_433 = PyTuple_New(13); if (unlikely(!__pyx_k_tuple_433)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_433);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_433, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_433, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_433, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_433, 3, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_433, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nright));
  PyTuple_SET_ITEM(__pyx_k_tuple_433, 5, ((PyObject *)__pyx_n_s__nright));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nright));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nleft));
  PyTuple_SET_ITEM(__pyx_k_tuple_433, 6, ((PyObject *)__pyx_n_s__nleft));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nleft));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__count));
  PyTuple_SET_ITEM(__pyx_k_tuple_433, 7, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lval));
  PyTuple_SET_ITEM(__pyx_k_tuple_433, 8, ((PyObject *)__pyx_n_s__lval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rval));
  PyTuple_SET_ITEM(__pyx_k_tuple_433, 9, ((PyObject *)__pyx_n_s__rval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_433, 10, ((PyObject *)__pyx_n_s__lindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rindexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_433, 11, ((PyObject *)__pyx_n_s__rindexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rindexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_433, 12, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_433));
  __pyx_k_codeobj_434 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_433, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_276, __pyx_n_s_435, 2530, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_434)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":231
 *         self.buf.data = self.orig_data
 * 
 * def reduce(arr, f, axis=0, dummy=None):             # <<<<<<<<<<<<<<
 *     reducer = Reducer(arr, f, axis=axis, dummy=dummy)
 *     return reducer.get_result()
 */
  __pyx_k_tuple_436 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_436)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_436);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 1, ((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__axis));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 2, ((PyObject *)__pyx_n_s__axis));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__axis));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dummy));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 3, ((PyObject *)__pyx_n_s__dummy));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dummy));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__reducer));
  PyTuple_SET_ITEM(__pyx_k_tuple_436, 4, ((PyObject *)__pyx_n_s__reducer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__reducer));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_436));
  __pyx_k_codeobj_437 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_436, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_438, __pyx_n_s__reduce, 231, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_437)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":73
 * 
 * 
 * def rank_1d_float64(object in_arr, ties_method='average', ascending=True):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */
  __pyx_k_tuple_439 = PyTuple_New(17); if (unlikely(!__pyx_k_tuple_439)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_439);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__in_arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 0, ((PyObject *)__pyx_n_s__in_arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__in_arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ties_method));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 1, ((PyObject *)__pyx_n_s__ties_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ties_method));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascending));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 2, ((PyObject *)__pyx_n_s__ascending));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascending));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 4, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dups));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 6, ((PyObject *)__pyx_n_s__dups));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dups));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sorted_data));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 7, ((PyObject *)__pyx_n_s__sorted_data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sorted_data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ranks));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 8, ((PyObject *)__pyx_n_s__ranks));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ranks));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 9, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__argsorted));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 10, ((PyObject *)__pyx_n_s__argsorted));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__argsorted));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 11, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nan_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 12, ((PyObject *)__pyx_n_s__nan_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nan_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sum_ranks));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 13, ((PyObject *)__pyx_n_s__sum_ranks));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sum_ranks));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tiebreak));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 14, ((PyObject *)__pyx_n_s__tiebreak));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tiebreak));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 15, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___as));
  PyTuple_SET_ITEM(__pyx_k_tuple_439, 16, ((PyObject *)__pyx_n_s___as));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___as));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_439));
  __pyx_k_codeobj_440 = (PyObject*)__Pyx_PyCode_New(3, 0, 17, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_439, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_441, __pyx_n_s__rank_1d_float64, 73, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_440)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":141
 * 
 * 
 * def rank_1d_int64(object in_arr, ties_method='average', ascending=True):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */
  __pyx_k_tuple_442 = PyTuple_New(15); if (unlikely(!__pyx_k_tuple_442)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_442);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__in_arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 0, ((PyObject *)__pyx_n_s__in_arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__in_arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ties_method));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 1, ((PyObject *)__pyx_n_s__ties_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ties_method));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascending));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 2, ((PyObject *)__pyx_n_s__ascending));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascending));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 4, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dups));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 6, ((PyObject *)__pyx_n_s__dups));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dups));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sorted_data));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 7, ((PyObject *)__pyx_n_s__sorted_data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sorted_data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 8, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ranks));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 9, ((PyObject *)__pyx_n_s__ranks));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ranks));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__argsorted));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 10, ((PyObject *)__pyx_n_s__argsorted));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__argsorted));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 11, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sum_ranks));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 12, ((PyObject *)__pyx_n_s__sum_ranks));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sum_ranks));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tiebreak));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 13, ((PyObject *)__pyx_n_s__tiebreak));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tiebreak));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___as));
  PyTuple_SET_ITEM(__pyx_k_tuple_442, 14, ((PyObject *)__pyx_n_s___as));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___as));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_442));
  __pyx_k_codeobj_443 = (PyObject*)__Pyx_PyCode_New(3, 0, 15, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_442, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_441, __pyx_n_s__rank_1d_int64, 141, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_443)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":200
 * 
 * 
 * def rank_2d_float64(object in_arr, axis=0, ties_method='average',             # <<<<<<<<<<<<<<
 *                     ascending=True):
 *     """
 */
  __pyx_k_tuple_444 = PyTuple_New(18); if (unlikely(!__pyx_k_tuple_444)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_444);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__in_arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 0, ((PyObject *)__pyx_n_s__in_arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__in_arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__axis));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 1, ((PyObject *)__pyx_n_s__axis));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__axis));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ties_method));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 2, ((PyObject *)__pyx_n_s__ties_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ties_method));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascending));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 3, ((PyObject *)__pyx_n_s__ascending));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascending));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__z));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 6, ((PyObject *)__pyx_n_s__z));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__z));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 7, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 8, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dups));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 9, ((PyObject *)__pyx_n_s__dups));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dups));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ranks));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 10, ((PyObject *)__pyx_n_s__ranks));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ranks));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 11, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__argsorted));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 12, ((PyObject *)__pyx_n_s__argsorted));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__argsorted));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 13, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nan_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 14, ((PyObject *)__pyx_n_s__nan_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nan_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sum_ranks));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 15, ((PyObject *)__pyx_n_s__sum_ranks));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sum_ranks));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tiebreak));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 16, ((PyObject *)__pyx_n_s__tiebreak));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tiebreak));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___as));
  PyTuple_SET_ITEM(__pyx_k_tuple_444, 17, ((PyObject *)__pyx_n_s___as));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___as));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_444));
  __pyx_k_codeobj_445 = (PyObject*)__Pyx_PyCode_New(4, 0, 18, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_444, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_441, __pyx_n_s__rank_2d_float64, 200, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_445)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":279
 * 
 * 
 * def rank_2d_int64(object in_arr, axis=0, ties_method='average',             # <<<<<<<<<<<<<<
 *                     ascending=True):
 *     """
 */
  __pyx_k_tuple_446 = PyTuple_New(17); if (unlikely(!__pyx_k_tuple_446)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_446);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__in_arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 0, ((PyObject *)__pyx_n_s__in_arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__in_arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__axis));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 1, ((PyObject *)__pyx_n_s__axis));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__axis));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ties_method));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 2, ((PyObject *)__pyx_n_s__ties_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ties_method));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascending));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 3, ((PyObject *)__pyx_n_s__ascending));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascending));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__z));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 6, ((PyObject *)__pyx_n_s__z));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__z));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 7, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 8, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dups));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 9, ((PyObject *)__pyx_n_s__dups));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dups));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ranks));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 10, ((PyObject *)__pyx_n_s__ranks));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ranks));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__argsorted));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 11, ((PyObject *)__pyx_n_s__argsorted));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__argsorted));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 12, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 13, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sum_ranks));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 14, ((PyObject *)__pyx_n_s__sum_ranks));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sum_ranks));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tiebreak));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 15, ((PyObject *)__pyx_n_s__tiebreak));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tiebreak));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___as));
  PyTuple_SET_ITEM(__pyx_k_tuple_446, 16, ((PyObject *)__pyx_n_s___as));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___as));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_446));
  __pyx_k_codeobj_447 = (PyObject*)__Pyx_PyCode_New(4, 0, 17, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_446, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_441, __pyx_n_s__rank_2d_int64, 279, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_447)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":347
 * 
 * 
 * def rank_1d_generic(object in_arr, bint retry=1, ties_method='average',             # <<<<<<<<<<<<<<
 *                     ascending=True):
 *     """
 */
  __pyx_k_tuple_448 = PyTuple_New(19); if (unlikely(!__pyx_k_tuple_448)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_448);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__in_arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 0, ((PyObject *)__pyx_n_s__in_arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__in_arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__retry));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 1, ((PyObject *)__pyx_n_s__retry));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__retry));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ties_method));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 2, ((PyObject *)__pyx_n_s__ties_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ties_method));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascending));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 3, ((PyObject *)__pyx_n_s__ascending));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascending));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 6, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dups));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 7, ((PyObject *)__pyx_n_s__dups));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dups));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ranks));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 8, ((PyObject *)__pyx_n_s__ranks));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ranks));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sorted_data));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 9, ((PyObject *)__pyx_n_s__sorted_data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sorted_data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 10, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__argsorted));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 11, ((PyObject *)__pyx_n_s__argsorted));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__argsorted));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 12, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nan_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 13, ((PyObject *)__pyx_n_s__nan_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nan_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sum_ranks));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 14, ((PyObject *)__pyx_n_s__sum_ranks));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sum_ranks));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tiebreak));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 15, ((PyObject *)__pyx_n_s__tiebreak));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tiebreak));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 16, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___as));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 17, ((PyObject *)__pyx_n_s___as));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___as));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__valid_locs));
  PyTuple_SET_ITEM(__pyx_k_tuple_448, 18, ((PyObject *)__pyx_n_s__valid_locs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__valid_locs));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_448));
  __pyx_k_codeobj_449 = (PyObject*)__Pyx_PyCode_New(4, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_448, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_441, __pyx_n_s__rank_1d_generic, 347, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_449)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":452
 *     __cmp__ = _return_true
 * 
 * def rank_2d_generic(object in_arr, axis=0, ties_method='average',             # <<<<<<<<<<<<<<
 *                     ascending=True):
 *     """
 */
  __pyx_k_tuple_450 = PyTuple_New(20); if (unlikely(!__pyx_k_tuple_450)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_450);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__in_arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 0, ((PyObject *)__pyx_n_s__in_arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__in_arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__axis));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 1, ((PyObject *)__pyx_n_s__axis));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__axis));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ties_method));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 2, ((PyObject *)__pyx_n_s__ties_method));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ties_method));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ascending));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 3, ((PyObject *)__pyx_n_s__ascending));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ascending));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__z));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 6, ((PyObject *)__pyx_n_s__z));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__z));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 7, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 8, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__infs));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 9, ((PyObject *)__pyx_n_s__infs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__infs));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__dups));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 10, ((PyObject *)__pyx_n_s__dups));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dups));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ranks));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 11, ((PyObject *)__pyx_n_s__ranks));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ranks));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 12, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__argsorted));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 13, ((PyObject *)__pyx_n_s__argsorted));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__argsorted));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 14, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__nan_value));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 15, ((PyObject *)__pyx_n_s__nan_value));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nan_value));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sum_ranks));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 16, ((PyObject *)__pyx_n_s__sum_ranks));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sum_ranks));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tiebreak));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 17, ((PyObject *)__pyx_n_s__tiebreak));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tiebreak));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mask));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 18, ((PyObject *)__pyx_n_s__mask));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mask));
  __Pyx_INCREF(((PyObject *)__pyx_n_s___as));
  PyTuple_SET_ITEM(__pyx_k_tuple_450, 19, ((PyObject *)__pyx_n_s___as));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___as));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_450));
  __pyx_k_codeobj_451 = (PyObject*)__Pyx_PyCode_New(4, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_450, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_441, __pyx_n_s__rank_2d_generic, 452, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_451)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":29
 *     pass
 * 
 * def infer_dtype(object _values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_k_tuple_452 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_452)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_452);
  __Pyx_INCREF(((PyObject *)__pyx_n_s___values));
  PyTuple_SET_ITEM(__pyx_k_tuple_452, 0, ((PyObject *)__pyx_n_s___values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s___values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_452, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_452, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_452, 3, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_452, 4, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val_kind));
  PyTuple_SET_ITEM(__pyx_k_tuple_452, 5, ((PyObject *)__pyx_n_s__val_kind));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val_kind));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_452));
  __pyx_k_codeobj_453 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_452, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s__infer_dtype, 29, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_453)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":83
 *     return 'mixed'
 * 
 * def infer_dtype_list(list values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_454 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_454)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_454);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_454, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_454, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_454, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_454));
  __pyx_k_codeobj_455 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_454, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s__infer_dtype_list, 83, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_455)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":91
 *     return PyDateTime_Check(o)
 * 
 * def is_bool_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_456 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_456)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_456);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_456, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_456, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_456, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__objbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_456, 3, ((PyObject *)__pyx_n_s__objbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__objbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_456, 4, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_456));
  __pyx_k_codeobj_457 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_456, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s__is_bool_array, 91, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_457)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":112
 *         return False
 * 
 * def is_integer(object o):             # <<<<<<<<<<<<<<
 *     return util.is_integer_object(o)
 * 
 */
  __pyx_k_tuple_458 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_458)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_458);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__o));
  PyTuple_SET_ITEM(__pyx_k_tuple_458, 0, ((PyObject *)__pyx_n_s__o));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__o));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_458));
  __pyx_k_codeobj_459 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_458, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s__is_integer, 112, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_459)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":115
 *     return util.is_integer_object(o)
 * 
 * def is_integer_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_460 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_460)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_460);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_460, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_460, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_460, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__objbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_460, 3, ((PyObject *)__pyx_n_s__objbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__objbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_460, 4, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_460));
  __pyx_k_codeobj_461 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_460, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s__is_integer_array, 115, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_461)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":136
 *         return False
 * 
 * def is_float_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_462 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_462)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_462);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_462, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_462, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_462, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__objbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_462, 3, ((PyObject *)__pyx_n_s__objbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__objbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_462, 4, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_462));
  __pyx_k_codeobj_463 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_462, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s__is_float_array, 136, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_463)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":157
 *         return False
 * 
 * def is_string_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_464 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_464)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_464);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_464, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_464, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_464, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__objbuf));
  PyTuple_SET_ITEM(__pyx_k_tuple_464, 3, ((PyObject *)__pyx_n_s__objbuf));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__objbuf));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_464, 4, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_464));
  __pyx_k_codeobj_465 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_464, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s__is_string_array, 157, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_465)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":178
 *         return False
 * 
 * def is_datetime_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_k_tuple_466 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_466)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_466);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_466, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_466, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_466, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_466));
  __pyx_k_codeobj_467 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_466, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s__is_datetime_array, 178, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_467)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":188
 * 
 * 
 * def maybe_convert_numeric(ndarray[object] values, set na_values):             # <<<<<<<<<<<<<<
 *     '''
 *     Type inference function-- convert strings to numeric (potentially) and
 */
  __pyx_k_tuple_468 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_468)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_468);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_468, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__na_values));
  PyTuple_SET_ITEM(__pyx_k_tuple_468, 1, ((PyObject *)__pyx_n_s__na_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__na_values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_468, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_468, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__floats));
  PyTuple_SET_ITEM(__pyx_k_tuple_468, 4, ((PyObject *)__pyx_n_s__floats));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__floats));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ints));
  PyTuple_SET_ITEM(__pyx_k_tuple_468, 5, ((PyObject *)__pyx_n_s__ints));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ints));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_float));
  PyTuple_SET_ITEM(__pyx_k_tuple_468, 6, ((PyObject *)__pyx_n_s__seen_float));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_float));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_468, 7, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fval));
  PyTuple_SET_ITEM(__pyx_k_tuple_468, 8, ((PyObject *)__pyx_n_s__fval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fval));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_468));
  __pyx_k_codeobj_469 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_468, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s_470, 188, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_469)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":235
 *         return ints
 * 
 * def maybe_convert_objects(ndarray[object] objects, bint try_float=0,             # <<<<<<<<<<<<<<
 *                           bint safe=0):
 *     '''
 */
  __pyx_k_tuple_471 = PyTuple_New(17); if (unlikely(!__pyx_k_tuple_471)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_471);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__objects));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 0, ((PyObject *)__pyx_n_s__objects));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__objects));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__try_float));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 1, ((PyObject *)__pyx_n_s__try_float));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__try_float));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__safe));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 2, ((PyObject *)__pyx_n_s__safe));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__safe));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__floats));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 5, ((PyObject *)__pyx_n_s__floats));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__floats));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ints));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 6, ((PyObject *)__pyx_n_s__ints));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ints));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__bools));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 7, ((PyObject *)__pyx_n_s__bools));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__bools));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_float));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 8, ((PyObject *)__pyx_n_s__seen_float));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_float));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_int));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 9, ((PyObject *)__pyx_n_s__seen_int));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_int));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_bool));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 10, ((PyObject *)__pyx_n_s__seen_bool));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_bool));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_object));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 11, ((PyObject *)__pyx_n_s__seen_object));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_object));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__seen_null));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 12, ((PyObject *)__pyx_n_s__seen_null));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__seen_null));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 13, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__onan));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 14, ((PyObject *)__pyx_n_s__onan));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__onan));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fval));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 15, ((PyObject *)__pyx_n_s__fval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__fnan));
  PyTuple_SET_ITEM(__pyx_k_tuple_471, 16, ((PyObject *)__pyx_n_s__fnan));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__fnan));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_471));
  __pyx_k_codeobj_472 = (PyObject*)__Pyx_PyCode_New(3, 0, 17, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_471, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s_8, 235, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_472)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":332
 * 
 * 
 * def convert_sql_column(x):             # <<<<<<<<<<<<<<
 *     return maybe_convert_objects(x, try_float=1)
 * 
 */
  __pyx_k_tuple_473 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_473)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_473);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__x));
  PyTuple_SET_ITEM(__pyx_k_tuple_473, 0, ((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_473));
  __pyx_k_codeobj_474 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_473, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s__convert_sql_column, 332, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_474)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":335
 *     return maybe_convert_objects(x, try_float=1)
 * 
 * def try_parse_dates(ndarray[object] values, parser=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_k_tuple_475 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_475)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_475);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_475, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parser));
  PyTuple_SET_ITEM(__pyx_k_tuple_475, 1, ((PyObject *)__pyx_n_s__parser));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parser));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_475, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_475, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_475, 4, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
  PyTuple_SET_ITEM(__pyx_k_tuple_475, 5, ((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parse_date));
  PyTuple_SET_ITEM(__pyx_k_tuple_475, 6, ((PyObject *)__pyx_n_s__parse_date));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse_date));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__parse_date));
  PyTuple_SET_ITEM(__pyx_k_tuple_475, 7, ((PyObject *)__pyx_n_s__parse_date));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__parse_date));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_475));
  __pyx_k_codeobj_476 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_475, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s__try_parse_dates, 335, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_476)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":374
 *     return result
 * 
 * def sanitize_objects(ndarray[object] values, set na_values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_k_tuple_477 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_477)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_477);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_477, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__na_values));
  PyTuple_SET_ITEM(__pyx_k_tuple_477, 1, ((PyObject *)__pyx_n_s__na_values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__na_values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_477, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_477, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_477, 4, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__onan));
  PyTuple_SET_ITEM(__pyx_k_tuple_477, 5, ((PyObject *)__pyx_n_s__onan));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__onan));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__na_count));
  PyTuple_SET_ITEM(__pyx_k_tuple_477, 6, ((PyObject *)__pyx_n_s__na_count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__na_count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__memo));
  PyTuple_SET_ITEM(__pyx_k_tuple_477, 7, ((PyObject *)__pyx_n_s__memo));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__memo));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_477));
  __pyx_k_codeobj_478 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_477, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s__sanitize_objects, 374, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_478)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":396
 *     return na_count
 * 
 * def maybe_convert_bool(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_k_tuple_479 = PyTuple_New(5); if (unlikely(!__pyx_k_tuple_479)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_479);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_479, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_479, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_479, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_479, 3, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_479, 4, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_479));
  __pyx_k_codeobj_480 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_479, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s__maybe_convert_bool, 396, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_480)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":418
 * 
 * 
 * def map_infer(ndarray arr, object f):             # <<<<<<<<<<<<<<
 *     '''
 *     Substitute for np.vectorize with pandas-friendly dtype inference
 */
  __pyx_k_tuple_481 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_481)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_481);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_481, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__f));
  PyTuple_SET_ITEM(__pyx_k_tuple_481, 1, ((PyObject *)__pyx_n_s__f));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__f));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_481, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_481, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__it));
  PyTuple_SET_ITEM(__pyx_k_tuple_481, 4, ((PyObject *)__pyx_n_s__it));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__it));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_481, 5, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_481, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_481));
  __pyx_k_codeobj_482 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_481, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s__map_infer, 418, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_482)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":455
 *     return maybe_convert_objects(result, try_float=0)
 * 
 * def to_object_array(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_k_tuple_483 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_483)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_483);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rows));
  PyTuple_SET_ITEM(__pyx_k_tuple_483, 0, ((PyObject *)__pyx_n_s__rows));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rows));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_483, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_483, 2, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_483, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_483, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp));
  PyTuple_SET_ITEM(__pyx_k_tuple_483, 5, ((PyObject *)__pyx_n_s__tmp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_483, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__row));
  PyTuple_SET_ITEM(__pyx_k_tuple_483, 7, ((PyObject *)__pyx_n_s__row));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__row));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_483));
  __pyx_k_codeobj_484 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_483, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s__to_object_array, 455, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_484)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":479
 *     return result
 * 
 * def tuples_to_object_array(ndarray[object] tuples):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_k_tuple_485 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_485)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_485);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tuples));
  PyTuple_SET_ITEM(__pyx_k_tuple_485, 0, ((PyObject *)__pyx_n_s__tuples));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tuples));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_485, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_485, 2, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_485, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_485, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp));
  PyTuple_SET_ITEM(__pyx_k_tuple_485, 5, ((PyObject *)__pyx_n_s__tmp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_485, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tup));
  PyTuple_SET_ITEM(__pyx_k_tuple_485, 7, ((PyObject *)__pyx_n_s__tup));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tup));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_485));
  __pyx_k_codeobj_486 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_485, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s_487, 479, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_486)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":495
 *     return result
 * 
 * def to_object_array_tuples(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_k_tuple_488 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_488)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_488);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rows));
  PyTuple_SET_ITEM(__pyx_k_tuple_488, 0, ((PyObject *)__pyx_n_s__rows));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rows));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_488, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_488, 2, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_488, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_488, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp));
  PyTuple_SET_ITEM(__pyx_k_tuple_488, 5, ((PyObject *)__pyx_n_s__tmp));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_488, 6, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__row));
  PyTuple_SET_ITEM(__pyx_k_tuple_488, 7, ((PyObject *)__pyx_n_s__row));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__row));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_488));
  __pyx_k_codeobj_489 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_488, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s_490, 495, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_489)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":526
 * 
 * 
 * def fast_multiget(dict mapping, ndarray keys, default=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(keys)
 */
  __pyx_k_tuple_491 = PyTuple_New(7); if (unlikely(!__pyx_k_tuple_491)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_491);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__mapping));
  PyTuple_SET_ITEM(__pyx_k_tuple_491, 0, ((PyObject *)__pyx_n_s__mapping));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__mapping));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__keys));
  PyTuple_SET_ITEM(__pyx_k_tuple_491, 1, ((PyObject *)__pyx_n_s__keys));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__keys));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__default));
  PyTuple_SET_ITEM(__pyx_k_tuple_491, 2, ((PyObject *)__pyx_n_s__default));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__default));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_491, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_491, 4, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_491, 5, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__output));
  PyTuple_SET_ITEM(__pyx_k_tuple_491, 6, ((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__output));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_491));
  __pyx_k_codeobj_492 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_491, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_111, __pyx_n_s__fast_multiget, 526, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_492)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/internals.pyx":1
 * def get_reverse_indexer(ndarray[int32_t] indexer, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(indexer)
 */
  __pyx_k_tuple_493 = PyTuple_New(6); if (unlikely(!__pyx_k_tuple_493)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_493);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_493, 0, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__length));
  PyTuple_SET_ITEM(__pyx_k_tuple_493, 1, ((PyObject *)__pyx_n_s__length));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__length));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_493, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_493, 3, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rev_indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_493, 4, ((PyObject *)__pyx_n_s__rev_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rev_indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__idx));
  PyTuple_SET_ITEM(__pyx_k_tuple_493, 5, ((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__idx));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_493));
  __pyx_k_codeobj_494 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_493, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_495, __pyx_n_s__get_reverse_indexer, 1, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_494)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":3
 * from khash cimport *
 * 
 * def test(ndarray arr, Py_ssize_t size_hint):             # <<<<<<<<<<<<<<
 *     cdef:
 *         kh_pymap_t *table
 */
  __pyx_k_tuple_496 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_496)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_496);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_496, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__size_hint));
  PyTuple_SET_ITEM(__pyx_k_tuple_496, 1, ((PyObject *)__pyx_n_s__size_hint));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__size_hint));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__table));
  PyTuple_SET_ITEM(__pyx_k_tuple_496, 2, ((PyObject *)__pyx_n_s__table));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__table));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ret));
  PyTuple_SET_ITEM(__pyx_k_tuple_496, 3, ((PyObject *)__pyx_n_s__ret));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ret));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_496, 4, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
  PyTuple_SET_ITEM(__pyx_k_tuple_496, 5, ((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_496, 6, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_496, 7, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_496, 8, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_496));
  __pyx_k_codeobj_497 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_496, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_498, __pyx_n_s__test, 3, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_497)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":37
 * 
 * 
 * def test_str(ndarray arr, Py_ssize_t size_hint):             # <<<<<<<<<<<<<<
 *     cdef:
 *         kh_str_t *table
 */
  __pyx_k_tuple_499 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_499)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_499);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_499, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__size_hint));
  PyTuple_SET_ITEM(__pyx_k_tuple_499, 1, ((PyObject *)__pyx_n_s__size_hint));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__size_hint));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__table));
  PyTuple_SET_ITEM(__pyx_k_tuple_499, 2, ((PyObject *)__pyx_n_s__table));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__table));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_499, 3, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ret));
  PyTuple_SET_ITEM(__pyx_k_tuple_499, 4, ((PyObject *)__pyx_n_s__ret));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ret));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_499, 5, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
  PyTuple_SET_ITEM(__pyx_k_tuple_499, 6, ((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_499, 7, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_499, 8, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_499, 9, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_499));
  __pyx_k_codeobj_500 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_499, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_498, __pyx_n_s__test_str, 37, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_500)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":90
 * #     return indexer
 * 
 * def obj_unique(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         kh_pyset_t *table
 */
  __pyx_k_tuple_501 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_501)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_501);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_501, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__table));
  PyTuple_SET_ITEM(__pyx_k_tuple_501, 1, ((PyObject *)__pyx_n_s__table));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__table));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_501, 2, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
  PyTuple_SET_ITEM(__pyx_k_tuple_501, 3, ((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ret));
  PyTuple_SET_ITEM(__pyx_k_tuple_501, 4, ((PyObject *)__pyx_n_s__ret));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ret));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_501, 5, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_501, 6, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_501, 7, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__uniques));
  PyTuple_SET_ITEM(__pyx_k_tuple_501, 8, ((PyObject *)__pyx_n_s__uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_501));
  __pyx_k_codeobj_502 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_501, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_498, __pyx_n_s__obj_unique, 90, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_502)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":124
 *     return None
 * 
 * def int64_unique(ndarray[int64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         kh_int64_t *table
 */
  __pyx_k_tuple_503 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_503)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_503);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__arr));
  PyTuple_SET_ITEM(__pyx_k_tuple_503, 0, ((PyObject *)__pyx_n_s__arr));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__arr));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__table));
  PyTuple_SET_ITEM(__pyx_k_tuple_503, 1, ((PyObject *)__pyx_n_s__table));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__table));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__obj));
  PyTuple_SET_ITEM(__pyx_k_tuple_503, 2, ((PyObject *)__pyx_n_s__obj));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__obj));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__data));
  PyTuple_SET_ITEM(__pyx_k_tuple_503, 3, ((PyObject *)__pyx_n_s__data));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__data));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ret));
  PyTuple_SET_ITEM(__pyx_k_tuple_503, 4, ((PyObject *)__pyx_n_s__ret));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ret));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_503, 5, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_503, 6, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_503, 7, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_503, 8, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__uniques));
  PyTuple_SET_ITEM(__pyx_k_tuple_503, 9, ((PyObject *)__pyx_n_s__uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_503));
  __pyx_k_codeobj_504 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_503, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_498, __pyx_n_s__int64_unique, 124, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_504)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":585
 *         return uniques
 * 
 * def value_count_int64(ndarray[int64_t] values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_505 = PyTuple_New(10); if (unlikely(!__pyx_k_tuple_505)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_505);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_505, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_505, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_505, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__table));
  PyTuple_SET_ITEM(__pyx_k_tuple_505, 3, ((PyObject *)__pyx_n_s__table));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__table));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ret));
  PyTuple_SET_ITEM(__pyx_k_tuple_505, 4, ((PyObject *)__pyx_n_s__ret));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ret));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__uniques));
  PyTuple_SET_ITEM(__pyx_k_tuple_505, 5, ((PyObject *)__pyx_n_s__uniques));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__uniques));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_505, 6, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_505, 7, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result_keys));
  PyTuple_SET_ITEM(__pyx_k_tuple_505, 8, ((PyObject *)__pyx_n_s__result_keys));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result_keys));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result_counts));
  PyTuple_SET_ITEM(__pyx_k_tuple_505, 9, ((PyObject *)__pyx_n_s__result_counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result_counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_505));
  __pyx_k_codeobj_506 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_505, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_498, __pyx_n_s__value_count_int64, 585, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_506)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1059
 *         return self.uniques
 * 
 * def lookup2(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_k_tuple_507 = PyTuple_New(8); if (unlikely(!__pyx_k_tuple_507)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_507);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__values));
  PyTuple_SET_ITEM(__pyx_k_tuple_507, 0, ((PyObject *)__pyx_n_s__values));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__values));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_507, 1, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_507, 2, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ret));
  PyTuple_SET_ITEM(__pyx_k_tuple_507, 3, ((PyObject *)__pyx_n_s__ret));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ret));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__val));
  PyTuple_SET_ITEM(__pyx_k_tuple_507, 4, ((PyObject *)__pyx_n_s__val));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__val));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_507, 5, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__hval));
  PyTuple_SET_ITEM(__pyx_k_tuple_507, 6, ((PyObject *)__pyx_n_s__hval));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__hval));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__locs));
  PyTuple_SET_ITEM(__pyx_k_tuple_507, 7, ((PyObject *)__pyx_n_s__locs));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__locs));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_507));
  __pyx_k_codeobj_508 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_507, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_498, __pyx_n_s__lookup2, 1059, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_508)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":3
 * import time
 * 
 * def inner_join(ndarray[int32_t] left, ndarray[int32_t] right,             # <<<<<<<<<<<<<<
 *                Py_ssize_t max_groups):
 *     cdef:
 */
  __pyx_k_tuple_509 = PyTuple_New(20); if (unlikely(!__pyx_k_tuple_509)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_509);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__max_groups));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 2, ((PyObject *)__pyx_n_s__max_groups));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__max_groups));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 4, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 5, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__count));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 6, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left_count));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 7, ((PyObject *)__pyx_n_s__left_count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left_count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right_count));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 8, ((PyObject *)__pyx_n_s__right_count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right_count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left_sorter));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 9, ((PyObject *)__pyx_n_s__left_sorter));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left_sorter));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right_sorter));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 10, ((PyObject *)__pyx_n_s__right_sorter));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right_sorter));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left_indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 11, ((PyObject *)__pyx_n_s__left_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left_indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right_indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 12, ((PyObject *)__pyx_n_s__right_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right_indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lc));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 13, ((PyObject *)__pyx_n_s__lc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rc));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 14, ((PyObject *)__pyx_n_s__rc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__loc));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 15, ((PyObject *)__pyx_n_s__loc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__loc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left_pos));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 16, ((PyObject *)__pyx_n_s__left_pos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left_pos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right_pos));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 17, ((PyObject *)__pyx_n_s__right_pos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right_pos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__position));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 18, ((PyObject *)__pyx_n_s__position));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__position));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__offset));
  PyTuple_SET_ITEM(__pyx_k_tuple_509, 19, ((PyObject *)__pyx_n_s__offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_509));
  __pyx_k_codeobj_510 = (PyObject*)__Pyx_PyCode_New(3, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_509, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_511, __pyx_n_s__inner_join, 3, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_510)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":53
 *             _get_result_indexer(right_sorter, right_indexer))
 * 
 * def left_outer_join(ndarray[int32_t] left, ndarray[int32_t] right,             # <<<<<<<<<<<<<<
 *                     Py_ssize_t max_groups, sort=True):
 *     cdef:
 */
  __pyx_k_tuple_512 = PyTuple_New(22); if (unlikely(!__pyx_k_tuple_512)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_512);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__max_groups));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 2, ((PyObject *)__pyx_n_s__max_groups));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__max_groups));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sort));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 3, ((PyObject *)__pyx_n_s__sort));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sort));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 4, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 5, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 6, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__count));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 7, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left_count));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 8, ((PyObject *)__pyx_n_s__left_count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left_count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right_count));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 9, ((PyObject *)__pyx_n_s__right_count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right_count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left_sorter));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 10, ((PyObject *)__pyx_n_s__left_sorter));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left_sorter));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right_sorter));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 11, ((PyObject *)__pyx_n_s__right_sorter));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right_sorter));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left_indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 12, ((PyObject *)__pyx_n_s__left_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left_indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right_indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 13, ((PyObject *)__pyx_n_s__right_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right_indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lc));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 14, ((PyObject *)__pyx_n_s__lc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rc));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 15, ((PyObject *)__pyx_n_s__rc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__loc));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 16, ((PyObject *)__pyx_n_s__loc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__loc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left_pos));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 17, ((PyObject *)__pyx_n_s__left_pos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left_pos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right_pos));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 18, ((PyObject *)__pyx_n_s__right_pos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right_pos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__position));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 19, ((PyObject *)__pyx_n_s__position));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__position));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__offset));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 20, ((PyObject *)__pyx_n_s__offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__offset));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rev));
  PyTuple_SET_ITEM(__pyx_k_tuple_512, 21, ((PyObject *)__pyx_n_s__rev));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rev));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_512));
  __pyx_k_codeobj_513 = (PyObject*)__Pyx_PyCode_New(4, 0, 22, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_512, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_511, __pyx_n_s__left_outer_join, 53, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_513)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":117
 * 
 * 
 * def full_outer_join(ndarray[int32_t] left, ndarray[int32_t] right,             # <<<<<<<<<<<<<<
 *                     Py_ssize_t max_groups):
 *     cdef:
 */
  __pyx_k_tuple_514 = PyTuple_New(20); if (unlikely(!__pyx_k_tuple_514)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_514);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 0, ((PyObject *)__pyx_n_s__left));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 1, ((PyObject *)__pyx_n_s__right));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__max_groups));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 2, ((PyObject *)__pyx_n_s__max_groups));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__max_groups));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 3, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__j));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 4, ((PyObject *)__pyx_n_s__j));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__k));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 5, ((PyObject *)__pyx_n_s__k));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__k));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__count));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 6, ((PyObject *)__pyx_n_s__count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left_count));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 7, ((PyObject *)__pyx_n_s__left_count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left_count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right_count));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 8, ((PyObject *)__pyx_n_s__right_count));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right_count));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left_sorter));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 9, ((PyObject *)__pyx_n_s__left_sorter));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left_sorter));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right_sorter));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 10, ((PyObject *)__pyx_n_s__right_sorter));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right_sorter));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left_indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 11, ((PyObject *)__pyx_n_s__left_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left_indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right_indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 12, ((PyObject *)__pyx_n_s__right_indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right_indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__lc));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 13, ((PyObject *)__pyx_n_s__lc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__rc));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 14, ((PyObject *)__pyx_n_s__rc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__rc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__loc));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 15, ((PyObject *)__pyx_n_s__loc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__loc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__left_pos));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 16, ((PyObject *)__pyx_n_s__left_pos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__left_pos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__right_pos));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 17, ((PyObject *)__pyx_n_s__right_pos));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__right_pos));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__position));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 18, ((PyObject *)__pyx_n_s__position));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__position));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__offset));
  PyTuple_SET_ITEM(__pyx_k_tuple_514, 19, ((PyObject *)__pyx_n_s__offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__offset));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_514));
  __pyx_k_codeobj_515 = (PyObject*)__Pyx_PyCode_New(3, 0, 20, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_514, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_511, __pyx_n_s__full_outer_join, 117, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_515)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":179
 *             _get_result_indexer(right_sorter, right_indexer))
 * 
 * def _get_result_indexer(sorter, indexer):             # <<<<<<<<<<<<<<
 *     res = sorter.take(indexer)
 *     np.putmask(res, indexer == -1, -1)
 */
  __pyx_k_tuple_516 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_516)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_516);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__sorter));
  PyTuple_SET_ITEM(__pyx_k_tuple_516, 0, ((PyObject *)__pyx_n_s__sorter));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__sorter));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__indexer));
  PyTuple_SET_ITEM(__pyx_k_tuple_516, 1, ((PyObject *)__pyx_n_s__indexer));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__indexer));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__res));
  PyTuple_SET_ITEM(__pyx_k_tuple_516, 2, ((PyObject *)__pyx_n_s__res));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__res));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_516));
  __pyx_k_codeobj_517 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_516, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_511, __pyx_n_s___get_result_indexer, 179, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_517)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":187
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def join_sorter(ndarray[int32_t] index, Py_ssize_t ngroups):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, loc, label, n
 */
  __pyx_k_tuple_518 = PyTuple_New(9); if (unlikely(!__pyx_k_tuple_518)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_518);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_518, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ngroups));
  PyTuple_SET_ITEM(__pyx_k_tuple_518, 1, ((PyObject *)__pyx_n_s__ngroups));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ngroups));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__i));
  PyTuple_SET_ITEM(__pyx_k_tuple_518, 2, ((PyObject *)__pyx_n_s__i));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__loc));
  PyTuple_SET_ITEM(__pyx_k_tuple_518, 3, ((PyObject *)__pyx_n_s__loc));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__loc));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__label));
  PyTuple_SET_ITEM(__pyx_k_tuple_518, 4, ((PyObject *)__pyx_n_s__label));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__label));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__n));
  PyTuple_SET_ITEM(__pyx_k_tuple_518, 5, ((PyObject *)__pyx_n_s__n));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__n));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__counts));
  PyTuple_SET_ITEM(__pyx_k_tuple_518, 6, ((PyObject *)__pyx_n_s__counts));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__counts));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__where));
  PyTuple_SET_ITEM(__pyx_k_tuple_518, 7, ((PyObject *)__pyx_n_s__where));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__where));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__result));
  PyTuple_SET_ITEM(__pyx_k_tuple_518, 8, ((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__result));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_518));
  __pyx_k_codeobj_519 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_518, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_511, __pyx_n_s__join_sorter, 187, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_519)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":212
 *     return result, counts
 * 
 * def _big_join_sorter(index):             # <<<<<<<<<<<<<<
 *     pass
 */
  __pyx_k_tuple_520 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_520)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_k_tuple_520);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__index));
  PyTuple_SET_ITEM(__pyx_k_tuple_520, 0, ((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__index));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_520));
  __pyx_k_codeobj_521 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_520, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_511, __pyx_n_s___big_join_sorter, 212, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_521)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC init_tseries(void); /*proto*/
PyMODINIT_FUNC init_tseries(void)
#else
PyMODINIT_FUNC PyInit__tseries(void); /*proto*/
PyMODINIT_FUNC PyInit__tseries(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  double __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__tseries(void)");
  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #ifdef __Pyx_CyFunction_USED
  if (__Pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("_tseries"), __pyx_methods, 0, 0, PYTHON_API_VERSION);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (!__pyx_m) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  #if PY_MAJOR_VERSION < 3
  Py_INCREF(__pyx_m);
  #endif
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
  if (!__pyx_b) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_module_is_main_pandas___tseries) {
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  __pyx_ptype_6pandas_8_tseries_datetime = __Pyx_ImportType("datetime", "datetime", sizeof(PyDateTime_DateTime), 0); if (unlikely(!__pyx_ptype_6pandas_8_tseries_datetime)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_vtabptr_6pandas_8_tseries_MultiMap = &__pyx_vtable_6pandas_8_tseries_MultiMap;
  __pyx_vtable_6pandas_8_tseries_MultiMap.populate = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_MultiMap *, __pyx_t_5numpy_int32_t **))__pyx_f_6pandas_8_tseries_8MultiMap_populate;
  __pyx_vtable_6pandas_8_tseries_MultiMap.get = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_MultiMap *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_8_tseries_8MultiMap_get;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_MultiMap) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_6pandas_8_tseries_MultiMap.tp_dict, __pyx_vtabptr_6pandas_8_tseries_MultiMap) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "MultiMap", (PyObject *)&__pyx_type_6pandas_8_tseries_MultiMap) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_MultiMap = &__pyx_type_6pandas_8_tseries_MultiMap;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_Node) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Node", (PyObject *)&__pyx_type_6pandas_8_tseries_Node) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_Node = &__pyx_type_6pandas_8_tseries_Node;
  __pyx_vtabptr_6pandas_8_tseries_IndexableSkiplist = &__pyx_vtable_6pandas_8_tseries_IndexableSkiplist;
  __pyx_vtable_6pandas_8_tseries_IndexableSkiplist.get = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_8_tseries_17IndexableSkiplist_get;
  __pyx_vtable_6pandas_8_tseries_IndexableSkiplist.insert = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *, double, int __pyx_skip_dispatch))__pyx_f_6pandas_8_tseries_17IndexableSkiplist_insert;
  __pyx_vtable_6pandas_8_tseries_IndexableSkiplist.remove = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_IndexableSkiplist *, double, int __pyx_skip_dispatch))__pyx_f_6pandas_8_tseries_17IndexableSkiplist_remove;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_IndexableSkiplist) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_6pandas_8_tseries_IndexableSkiplist.tp_dict, __pyx_vtabptr_6pandas_8_tseries_IndexableSkiplist) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "IndexableSkiplist", (PyObject *)&__pyx_type_6pandas_8_tseries_IndexableSkiplist) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_IndexableSkiplist = &__pyx_type_6pandas_8_tseries_IndexableSkiplist;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_Reducer) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Reducer", (PyObject *)&__pyx_type_6pandas_8_tseries_Reducer) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_Reducer = &__pyx_type_6pandas_8_tseries_Reducer;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_SeriesGrouper) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "SeriesGrouper", (PyObject *)&__pyx_type_6pandas_8_tseries_SeriesGrouper) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_SeriesGrouper = &__pyx_type_6pandas_8_tseries_SeriesGrouper;
  __pyx_vtabptr_6pandas_8_tseries_Slider = &__pyx_vtable_6pandas_8_tseries_Slider;
  __pyx_vtable_6pandas_8_tseries_Slider.advance = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_Slider *, Py_ssize_t))__pyx_f_6pandas_8_tseries_6Slider_advance;
  __pyx_vtable_6pandas_8_tseries_Slider.set_length = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_Slider *, Py_ssize_t))__pyx_f_6pandas_8_tseries_6Slider_set_length;
  __pyx_vtable_6pandas_8_tseries_Slider.cleanup = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_Slider *))__pyx_f_6pandas_8_tseries_6Slider_cleanup;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_Slider) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_6pandas_8_tseries_Slider.tp_dict, __pyx_vtabptr_6pandas_8_tseries_Slider) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Slider", (PyObject *)&__pyx_type_6pandas_8_tseries_Slider) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_Slider = &__pyx_type_6pandas_8_tseries_Slider;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_cache_readonly) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "cache_readonly", (PyObject *)&__pyx_type_6pandas_8_tseries_cache_readonly) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_cache_readonly = &__pyx_type_6pandas_8_tseries_cache_readonly;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_AxisProperty) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "AxisProperty", (PyObject *)&__pyx_type_6pandas_8_tseries_AxisProperty) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_AxisProperty = &__pyx_type_6pandas_8_tseries_AxisProperty;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_SeriesIndex) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "SeriesIndex", (PyObject *)&__pyx_type_6pandas_8_tseries_SeriesIndex) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_SeriesIndex = &__pyx_type_6pandas_8_tseries_SeriesIndex;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_ValuesProperty) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "ValuesProperty", (PyObject *)&__pyx_type_6pandas_8_tseries_ValuesProperty) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_ValuesProperty = &__pyx_type_6pandas_8_tseries_ValuesProperty;
  __pyx_vtabptr_6pandas_8_tseries_StringHashTable = &__pyx_vtable_6pandas_8_tseries_StringHashTable;
  __pyx_vtable_6pandas_8_tseries_StringHashTable.check_type = (int (*)(struct __pyx_obj_6pandas_8_tseries_StringHashTable *, PyObject *))__pyx_f_6pandas_8_tseries_15StringHashTable_check_type;
  __pyx_vtable_6pandas_8_tseries_StringHashTable.get_item = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_StringHashTable *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_8_tseries_15StringHashTable_get_item;
  __pyx_vtable_6pandas_8_tseries_StringHashTable.set_item = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_StringHashTable *, PyObject *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_8_tseries_15StringHashTable_set_item;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_StringHashTable) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_6pandas_8_tseries_StringHashTable.tp_dict, __pyx_vtabptr_6pandas_8_tseries_StringHashTable) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "StringHashTable", (PyObject *)&__pyx_type_6pandas_8_tseries_StringHashTable) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_StringHashTable = &__pyx_type_6pandas_8_tseries_StringHashTable;
  __pyx_vtabptr_6pandas_8_tseries_Int32HashTable = &__pyx_vtable_6pandas_8_tseries_Int32HashTable;
  __pyx_vtable_6pandas_8_tseries_Int32HashTable.check_type = (int (*)(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *, PyObject *))__pyx_f_6pandas_8_tseries_14Int32HashTable_check_type;
  __pyx_vtable_6pandas_8_tseries_Int32HashTable.get_item = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *, __pyx_t_5numpy_int32_t, int __pyx_skip_dispatch))__pyx_f_6pandas_8_tseries_14Int32HashTable_get_item;
  __pyx_vtable_6pandas_8_tseries_Int32HashTable.set_item = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_Int32HashTable *, __pyx_t_5numpy_int32_t, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_8_tseries_14Int32HashTable_set_item;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_Int32HashTable) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_6pandas_8_tseries_Int32HashTable.tp_dict, __pyx_vtabptr_6pandas_8_tseries_Int32HashTable) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Int32HashTable", (PyObject *)&__pyx_type_6pandas_8_tseries_Int32HashTable) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_Int32HashTable = &__pyx_type_6pandas_8_tseries_Int32HashTable;
  __pyx_vtabptr_6pandas_8_tseries_Int64HashTable = &__pyx_vtable_6pandas_8_tseries_Int64HashTable;
  __pyx_vtable_6pandas_8_tseries_Int64HashTable.has_key = (int (*)(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *, __pyx_t_5numpy_int64_t))__pyx_f_6pandas_8_tseries_14Int64HashTable_has_key;
  __pyx_vtable_6pandas_8_tseries_Int64HashTable.get_item = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *, __pyx_t_5numpy_int64_t, int __pyx_skip_dispatch))__pyx_f_6pandas_8_tseries_14Int64HashTable_get_item;
  __pyx_vtable_6pandas_8_tseries_Int64HashTable.set_item = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_Int64HashTable *, __pyx_t_5numpy_int64_t, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_8_tseries_14Int64HashTable_set_item;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_Int64HashTable) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_6pandas_8_tseries_Int64HashTable.tp_dict, __pyx_vtabptr_6pandas_8_tseries_Int64HashTable) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Int64HashTable", (PyObject *)&__pyx_type_6pandas_8_tseries_Int64HashTable) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_Int64HashTable = &__pyx_type_6pandas_8_tseries_Int64HashTable;
  __pyx_vtabptr_6pandas_8_tseries_Float64HashTable = &__pyx_vtable_6pandas_8_tseries_Float64HashTable;
  __pyx_vtable_6pandas_8_tseries_Float64HashTable.get_labels = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_Float64HashTable *, PyArrayObject *, PyObject *, Py_ssize_t, __pyx_t_5numpy_int32_t, int __pyx_skip_dispatch))__pyx_f_6pandas_8_tseries_16Float64HashTable_get_labels;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_Float64HashTable) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_6pandas_8_tseries_Float64HashTable.tp_dict, __pyx_vtabptr_6pandas_8_tseries_Float64HashTable) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Float64HashTable", (PyObject *)&__pyx_type_6pandas_8_tseries_Float64HashTable) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_Float64HashTable = &__pyx_type_6pandas_8_tseries_Float64HashTable;
  __pyx_vtabptr_6pandas_8_tseries_PyObjectHashTable = &__pyx_vtable_6pandas_8_tseries_PyObjectHashTable;
  __pyx_vtable_6pandas_8_tseries_PyObjectHashTable.destroy = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *, int __pyx_skip_dispatch))__pyx_f_6pandas_8_tseries_17PyObjectHashTable_destroy;
  __pyx_vtable_6pandas_8_tseries_PyObjectHashTable.get_item = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6pandas_8_tseries_17PyObjectHashTable_get_item;
  __pyx_vtable_6pandas_8_tseries_PyObjectHashTable.set_item = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *, PyObject *, Py_ssize_t, int __pyx_skip_dispatch))__pyx_f_6pandas_8_tseries_17PyObjectHashTable_set_item;
  __pyx_vtable_6pandas_8_tseries_PyObjectHashTable.get_labels = (PyObject *(*)(struct __pyx_obj_6pandas_8_tseries_PyObjectHashTable *, PyArrayObject *, PyObject *, Py_ssize_t, __pyx_t_5numpy_int32_t, int __pyx_skip_dispatch))__pyx_f_6pandas_8_tseries_17PyObjectHashTable_get_labels;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_PyObjectHashTable) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_6pandas_8_tseries_PyObjectHashTable.tp_dict, __pyx_vtabptr_6pandas_8_tseries_PyObjectHashTable) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "PyObjectHashTable", (PyObject *)&__pyx_type_6pandas_8_tseries_PyObjectHashTable) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_PyObjectHashTable = &__pyx_type_6pandas_8_tseries_PyObjectHashTable;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_Factorizer) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Factorizer", (PyObject *)&__pyx_type_6pandas_8_tseries_Factorizer) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_Factorizer = &__pyx_type_6pandas_8_tseries_Factorizer;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_Int64Factorizer) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Int64Factorizer", (PyObject *)&__pyx_type_6pandas_8_tseries_Int64Factorizer) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_Int64Factorizer = &__pyx_type_6pandas_8_tseries_Int64Factorizer;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries_DictFactorizer) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "DictFactorizer", (PyObject *)&__pyx_type_6pandas_8_tseries_DictFactorizer) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries_DictFactorizer = &__pyx_type_6pandas_8_tseries_DictFactorizer;
  if (PyType_Ready(&__pyx_type_6pandas_8_tseries___pyx_scope_struct__try_parse_dates) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_6pandas_8_tseries___pyx_scope_struct__try_parse_dates = &__pyx_type_6pandas_8_tseries___pyx_scope_struct__try_parse_dates;
  /*--- Type import code ---*/
  __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[16]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "pandas/src/tseries.pyx":14
 * cimport cpython
 * 
 * import numpy as np             # <<<<<<<<<<<<<<
 * isnan = np.isnan
 * cdef double NaN = <double> np.NaN
 */
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":15
 * 
 * import numpy as np
 * isnan = np.isnan             # <<<<<<<<<<<<<<
 * cdef double NaN = <double> np.NaN
 * cdef double nan = NaN
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__isnan); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__isnan, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":16
 * import numpy as np
 * isnan = np.isnan
 * cdef double NaN = <double> np.NaN             # <<<<<<<<<<<<<<
 * cdef double nan = NaN
 * 
 */
  __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__NaN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_6pandas_8_tseries_NaN = ((double)__pyx_t_3);

  /* "pandas/src/tseries.pyx":17
 * isnan = np.isnan
 * cdef double NaN = <double> np.NaN
 * cdef double nan = NaN             # <<<<<<<<<<<<<<
 * 
 * from datetime import datetime as pydatetime
 */
  __pyx_v_6pandas_8_tseries_nan = __pyx_v_6pandas_8_tseries_NaN;

  /* "pandas/src/tseries.pyx":19
 * cdef double nan = NaN
 * 
 * from datetime import datetime as pydatetime             # <<<<<<<<<<<<<<
 * 
 * cdef inline int int_max(int a, int b): return a if a >= b else b
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__datetime));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__datetime));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__datetime));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__datetime);
  if (__pyx_t_1 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__datetime);
    if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pydatetime, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":56
 * 
 * # import datetime C API
 * PyDateTime_IMPORT             # <<<<<<<<<<<<<<
 * 
 * # initialize numpy
 */
  PyDateTime_IMPORT;

  /* "pandas/src/tseries.pyx":59
 * 
 * # initialize numpy
 * import_array()             # <<<<<<<<<<<<<<
 * import_ufunc()
 * 
 */
  import_array();

  /* "pandas/src/tseries.pyx":60
 * # initialize numpy
 * import_array()
 * import_ufunc()             # <<<<<<<<<<<<<<
 * 
 * cpdef map_indices_list(list index):
 */
  import_ufunc();

  /* "pandas/src/tseries.pyx":133
 * 
 * 
 * def ismember(ndarray arr, set values):             # <<<<<<<<<<<<<<
 *     '''
 *     Checks whether
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_3ismember, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ismember, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":168
 * # datetime / io related
 * 
 * cdef int _EPOCH_ORD = 719163             # <<<<<<<<<<<<<<
 * 
 * from datetime import date as pydate
 */
  __pyx_v_6pandas_8_tseries__EPOCH_ORD = 719163;

  /* "pandas/src/tseries.pyx":170
 * cdef int _EPOCH_ORD = 719163
 * 
 * from datetime import date as pydate             # <<<<<<<<<<<<<<
 * 
 * cdef inline int64_t gmtime(object date):
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__date));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__date));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__date));
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__datetime), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__date);
  if (__pyx_t_2 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__date);
    if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pydate, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":191
 *     return gmtime(dt)
 * 
 * def array_to_timestamp(ndarray[object, ndim=1] arr):             # <<<<<<<<<<<<<<
 *     cdef int i, n
 *     cdef ndarray[int64_t, ndim=1] result
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_9array_to_timestamp, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__array_to_timestamp, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":203
 *     return result
 * 
 * def array_to_datetime(ndarray[int64_t, ndim=1] arr):             # <<<<<<<<<<<<<<
 *     cdef int i, n
 *     cdef ndarray[object, ndim=1] result
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_11array_to_datetime, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__array_to_datetime, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pandas/src/tseries.pyx":218
 * # isnull / notnull related
 * 
 * cdef double INF = <double> np.inf             # <<<<<<<<<<<<<<
 * cdef double NEGINF = -INF
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_6pandas_8_tseries_INF = ((double)__pyx_t_3);

  /* "pandas/src/tseries.pyx":219
 * 
 * cdef double INF = <double> np.inf
 * cdef double NEGINF = -INF             # <<<<<<<<<<<<<<
 * 
 * cdef inline bint _checknull(object val):
 */
  __pyx_v_6pandas_8_tseries_NEGINF = (-__pyx_v_6pandas_8_tseries_INF);

  /* "pandas/src/tseries.pyx":237
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def isnullobj(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, n
 *     cdef object val
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_15isnullobj, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__isnullobj, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":250
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def isnullobj2d(ndarray[object, ndim=2] arr):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, n, m
 *     cdef object val
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_17isnullobj2d, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__isnullobj2d, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":264
 *     return result.view(np.bool_)
 * 
 * def list_to_object_array(list obj):             # <<<<<<<<<<<<<<
 *     '''
 *     Convert list to object ndarray. Seriously can't believe I had to write this
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_19list_to_object_array, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_104, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":284
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_21fast_unique, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__fast_unique, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":305
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique_multiple(list arrays):             # <<<<<<<<<<<<<<
 *     cdef:
 *         ndarray[object] buf
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_23fast_unique_multiple, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_153, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":331
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique_multiple_list(list lists):             # <<<<<<<<<<<<<<
 *     cdef:
 *         list buf
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_25fast_unique_multiple_list, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_156, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":357
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def fast_unique_multiple_list_gen(object gen):             # <<<<<<<<<<<<<<
 *     cdef:
 *         list buf
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_27fast_unique_multiple_list_gen, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_159, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":382
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def dicts_to_array(list dicts, list columns):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_29dicts_to_array, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__dicts_to_array, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":406
 * 
 * 
 * def fast_zip(list ndarrays):             # <<<<<<<<<<<<<<
 *     '''
 *     For zipping multiple ndarrays into an ndarray of tuples
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_31fast_zip, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__fast_zip, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":447
 *     return result
 * 
 * def has_infs_f4(ndarray[float32_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_33has_infs_f4, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__has_infs_f4, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":461
 *     return False
 * 
 * def has_infs_f8(ndarray[float64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(arr)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_35has_infs_f8, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__has_infs_f8, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":475
 *     return False
 * 
 * def convert_timestamps(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         object val, f, result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_37convert_timestamps, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__convert_timestamps, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":500
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def scalar_compare(ndarray[object] values, object val, object op):             # <<<<<<<<<<<<<<
 *     import operator
 *     cdef:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_39scalar_compare, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__scalar_compare, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":535
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def vec_compare(ndarray[object] left, ndarray[object] right, object op):             # <<<<<<<<<<<<<<
 *     import operator
 *     cdef:
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_41vec_compare, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__vec_compare, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":576
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def scalar_binop(ndarray[object] values, object val, object op):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_43scalar_binop, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__scalar_binop, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pandas/src/tseries.pyx":594
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def vec_binop(ndarray[object] left, ndarray[object] right, object op):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(left)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_45vec_binop, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__vec_binop, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":23
 * cimport numpy as np
 * from numpy cimport *
 * import numpy as np             # <<<<<<<<<<<<<<
 * 
 * from random import random
 */
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":25
 * import numpy as np
 * 
 * from random import random             # <<<<<<<<<<<<<<
 * 
 * # initialize numpy
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_n_s__random));
  PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__random));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__random));
  __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__random), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__random);
  if (__pyx_t_2 == NULL) {
    if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__random);
    if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_GOTREF(__pyx_t_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__random, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":28
 * 
 * # initialize numpy
 * import_array()             # <<<<<<<<<<<<<<
 * 
 * # TODO: optimize this, make less messy
 */
  import_array();

  /* "/home/wesm/code/pandas/pandas/src/skiplist.pyx":44
 * 
 * # Singleton terminator node
 * NIL = Node(np.inf, [], [])             # <<<<<<<<<<<<<<
 * 
 * cdef class IndexableSkiplist:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__inf); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  PyTuple_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_t_4));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_6pandas_8_tseries_Node)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__NIL, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":5
 * 
 * @cython.boundscheck(False)
 * def arrmap(ndarray[object] index, object func):             # <<<<<<<<<<<<<<
 *     cdef int length = index.shape[0]
 *     cdef int i = 0
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_47arrmap, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__arrmap, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":17
 * 
 * @cython.boundscheck(False)
 * def groupby_func(object index, object mapper):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef ndarray[object] mapped_index
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_49groupby_func, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__groupby_func, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":47
 * 
 * 
 * def func_groupby_indices(object index, object mapper):             # <<<<<<<<<<<<<<
 *     return groupby_indices_naive(arrmap(index, mapper))
 * 
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_51func_groupby_indices, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_185, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":72
 * 
 * @cython.boundscheck(False)
 * def groupby_indices(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_55groupby_indices, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__groupby_indices, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":109
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def is_lexsorted(list list_of_arrays):             # <<<<<<<<<<<<<<
 *     cdef:
 *         int i
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_57is_lexsorted, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_lexsorted, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":138
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def group_labels(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     '''
 *     Compute label vector from input values and associated useful data
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_59group_labels, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__group_labels, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":180
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def get_unique_labels(ndarray[object] values, dict idMap):             # <<<<<<<<<<<<<<
 *     cdef int i, length
 *     cdef object idx
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_61get_unique_labels, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__get_unique_labels, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":194
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def groupsort_indexer(ndarray[int32_t] index, Py_ssize_t ngroups):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, loc, label, n
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_63groupsort_indexer, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__groupsort_indexer, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":224
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def group_add(ndarray[float64_t, ndim=2] out,             # <<<<<<<<<<<<<<
 *               ndarray[int32_t] counts,
 *               ndarray[float64_t, ndim=2] values,
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_65group_add, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__group_add, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":278
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def group_mean(ndarray[float64_t, ndim=2] out,             # <<<<<<<<<<<<<<
 *                ndarray[int32_t] counts,
 *                ndarray[float64_t, ndim=2] values,
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_67group_mean, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__group_mean, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":328
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def group_var(ndarray[float64_t, ndim=2] out,             # <<<<<<<<<<<<<<
 *               ndarray[int32_t] counts,
 *               ndarray[float64_t, ndim=2] values,
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_69group_var, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__group_var, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":385
 *                              (ct * ct - ct))
 * 
 * def group_count(ndarray[int32_t] values, Py_ssize_t size):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_71group_count, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__group_count, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":395
 *     return counts
 * 
 * def lookup_values(ndarray[object] values, dict mapping):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_73lookup_values, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__lookup_values, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":407
 *                 ndarray[object] buckets,
 *                 ndarray[float64_t] values,
 *                 inclusive=False):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, nbuckets, nvalues
 */
  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k_9 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":404
 *     return maybe_convert_objects(result)
 * 
 * def reduce_mean(ndarray[object] indices,             # <<<<<<<<<<<<<<
 *                 ndarray[object] buckets,
 *                 ndarray[float64_t] values,
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_75reduce_mean, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__reduce_mean, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":453
 *     return output
 * 
 * def _bucket_locs(index, buckets, inclusive=False):             # <<<<<<<<<<<<<<
 *     if inclusive:
 *         locs = index.searchsorted(buckets, side='left')
 */
  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k_10 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_77_bucket_locs, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___bucket_locs, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":461
 *     return locs
 * 
 * def count_level_1d(ndarray[uint8_t, cast=True] mask,             # <<<<<<<<<<<<<<
 *                    ndarray[int32_t] labels, Py_ssize_t max_bin):
 *     cdef:
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_79count_level_1d, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__count_level_1d, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":477
 *     return counts
 * 
 * def count_level_2d(ndarray[uint8_t, ndim=2, cast=True] mask,             # <<<<<<<<<<<<<<
 *                    ndarray[int32_t] labels, Py_ssize_t max_bin):
 *     cdef:
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_81count_level_2d, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__count_level_2d, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":493
 *     return counts
 * 
 * def duplicated(list values, take_last=False):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k_11 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_83duplicated, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__duplicated, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":522
 * 
 * 
 * def generate_slices(ndarray[int32_t] labels, Py_ssize_t ngroups):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, group_size, n, lab, start
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_85generate_slices, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__generate_slices, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":645
 *                         ndarray[float64_t] values,
 *                         object aggfunc,
 *                         inclusive=False):             # <<<<<<<<<<<<<<
 *     '''
 *     put something here
 */
  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k_12 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/groupby.pyx":641
 * '''
 * 
 * def ts_upsample_generic(ndarray[object] indices,             # <<<<<<<<<<<<<<
 *                         ndarray[object] buckets,
 *                         ndarray[float64_t] values,
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_87ts_upsample_generic, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ts_upsample_generic, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":28
 * 
 * 
 * def kth_smallest(ndarray[double_t] a, Py_ssize_t k):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i,j,l,m,n
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_89kth_smallest, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__kth_smallest, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":58
 * 
 * 
 * def median(ndarray arr):             # <<<<<<<<<<<<<<
 *     '''
 *     A faster median
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_91median, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__median, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":78
 * # Rolling sum
 * 
 * def roll_sum(ndarray[double_t] input, int win, int minp):             # <<<<<<<<<<<<<<
 *     cdef double val, prev, sum_x = 0
 *     cdef int nobs = 0, i
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_93roll_sum, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__roll_sum, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":120
 * # Rolling mean
 * 
 * def roll_mean(ndarray[double_t] input,             # <<<<<<<<<<<<<<
 *                int win, int minp):
 *     cdef double val, prev, sum_x = 0
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_95roll_mean, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__roll_mean, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":163
 * # Exponentially weighted moving average
 * 
 * def ewma(ndarray[double_t] input, double_t com):             # <<<<<<<<<<<<<<
 *     '''
 *     Compute exponentially-weighted moving average using center-of-mass.
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_97ewma, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ewma, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":214
 * # Rolling variance
 * 
 * def _check_minp(minp, N):             # <<<<<<<<<<<<<<
 *     if minp > N:
 *         minp = N + 1
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_99_check_minp, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___check_minp, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":223
 *     return minp
 * 
 * def roll_var(ndarray[double_t] input, int win, int minp):             # <<<<<<<<<<<<<<
 *     cdef double val, prev, sum_x = 0, sum_xx = 0, nobs = 0
 *     cdef Py_ssize_t i
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_101roll_var, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__roll_var, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":268
 * # Rolling skewness
 * 
 * def roll_skew(ndarray[double_t] input, int win, int minp):             # <<<<<<<<<<<<<<
 *     cdef double val, prev
 *     cdef double x = 0, xx = 0, xxx = 0
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_103roll_skew, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__roll_skew, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":329
 * 
 * 
 * def roll_kurt(ndarray[double_t] input,             # <<<<<<<<<<<<<<
 *                int win, int minp):
 *     cdef double val, prev
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_105roll_kurt, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__roll_kurt, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":444
 * from skiplist cimport *
 * 
 * def roll_median_c(ndarray[float64_t] arg, int win, int minp):             # <<<<<<<<<<<<<<
 *     cdef double val, res, prev
 *     cdef:
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_107roll_median_c, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__roll_median_c, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":499
 *     return output
 * 
 * def roll_median_cython(ndarray input, int win, int minp):             # <<<<<<<<<<<<<<
 *     '''
 *     O(N log(window)) implementation using skip list
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_109roll_median_cython, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__roll_median_cython, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":521
 *         return NaN
 * 
 * def roll_max(ndarray input, int win, int minp):             # <<<<<<<<<<<<<<
 *     '''
 *     O(N log(window)) implementation using skip list
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_111roll_max, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__roll_max, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":533
 *         return NaN
 * 
 * def roll_min(ndarray input, int win, int minp):             # <<<<<<<<<<<<<<
 *     '''
 *     O(N log(window)) implementation using skip list
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_113roll_min, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__roll_min, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":545
 *         return NaN
 * 
 * def roll_quantile(ndarray[float64_t, cast=True] input, int win,             # <<<<<<<<<<<<<<
 *                   int minp, double quantile):
 *     '''
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_115roll_quantile, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__roll_quantile, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/moments.pyx":592
 *     return output
 * 
 * def roll_generic(ndarray[float64_t, cast=True] input, int win,             # <<<<<<<<<<<<<<
 *                  int minp, object func):
 *     cdef ndarray[double_t] output, counts, bufarr
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_117roll_generic, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__roll_generic, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":1
 * def pad_inplace_float64(ndarray[float64_t] values,             # <<<<<<<<<<<<<<
 *                         ndarray[np.uint8_t, cast=True] mask):
 *     '''
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_119pad_inplace_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pad_inplace_float64, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":21
 *             val = values[i]
 * 
 * def get_pad_indexer(ndarray[np.uint8_t, cast=True] mask):             # <<<<<<<<<<<<<<
 *     '''
 *     mask: True if needs to be padded otherwise False
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_121get_pad_indexer, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__get_pad_indexer, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":44
 *     return indexer
 * 
 * def get_backfill_indexer(ndarray[np.uint8_t, cast=True] mask):             # <<<<<<<<<<<<<<
 *     '''
 *     mask: True if needs to be padded otherwise False
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_123get_backfill_indexer, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_258, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":69
 *     return indexer
 * 
 * def backfill_inplace_float64(ndarray[float64_t] values,             # <<<<<<<<<<<<<<
 *                              ndarray[np.uint8_t, cast=True] mask):
 *     '''
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_125backfill_inplace_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_261, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":88
 *         i -= 1
 * 
 * def ordered_left_join(ndarray[object] left, ndarray[object] right):             # <<<<<<<<<<<<<<
 *     # cdef dict right_map = map_indices_buf(right)
 *     # return merge_indexer(left, right_map)
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_127ordered_left_join, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ordered_left_join, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":122
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_2d(ndarray[int64_t] left, ndarray[int64_t] right,             # <<<<<<<<<<<<<<
 *                  ndarray[float64_t, ndim=2] lvalues,
 *                  ndarray[float64_t, ndim=2] rvalues,
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_129left_join_2d, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__left_join_2d, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":157
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_1d(ndarray[int64_t] left, ndarray[int64_t] right,             # <<<<<<<<<<<<<<
 *                  ndarray[float64_t] lvalues,
 *                  ndarray[float64_t] rvalues,
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_131left_join_1d, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__left_join_1d, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":189
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_join_contiguous(ndarray[float64_t, ndim=2] lvalues,             # <<<<<<<<<<<<<<
 *                          ndarray[float64_t, ndim=2] rvalues,
 *                          ndarray[int32_t] lindexer,
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_133take_join_contiguous, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_270, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reindex.pyx":230
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_list(list values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef int i, j, length, newLength
 *     cdef object idx
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_135merge_indexer_list, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__merge_indexer_list, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":114
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_float64(ndarray[float64_t] values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, length, newLength
 *     cdef float64_t idx
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_147merge_indexer_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_275, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":132
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_object(ndarray[object] values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, length, newLength
 *     cdef object idx
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_149merge_indexer_object, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_279, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":150
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_int32(ndarray[int32_t] values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, length, newLength
 *     cdef int32_t idx
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_151merge_indexer_int32, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__merge_indexer_int32, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":168
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_int64(ndarray[int64_t] values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, length, newLength
 *     cdef int64_t idx
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_153merge_indexer_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__merge_indexer_int64, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":186
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def merge_indexer_bool(ndarray[uint8_t] values, dict oldMap):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t i, j, length, newLength
 *     cdef uint8_t idx
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_155merge_indexer_bool, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__merge_indexer_bool, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":205
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_float64(ndarray[float64_t] oldIndex,             # <<<<<<<<<<<<<<
 *                  ndarray[float64_t] newIndex,
 *                  dict oldMap, dict newMap):
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_157pad_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pad_float64, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":263
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_object(ndarray[object] oldIndex,             # <<<<<<<<<<<<<<
 *                  ndarray[object] newIndex,
 *                  dict oldMap, dict newMap):
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_159pad_object, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pad_object, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":321
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_int32(ndarray[int32_t] oldIndex,             # <<<<<<<<<<<<<<
 *                  ndarray[int32_t] newIndex,
 *                  dict oldMap, dict newMap):
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_161pad_int32, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pad_int32, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":379
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_int64(ndarray[int64_t] oldIndex,             # <<<<<<<<<<<<<<
 *                  ndarray[int64_t] newIndex,
 *                  dict oldMap, dict newMap):
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_163pad_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pad_int64, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":437
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_bool(ndarray[uint8_t] oldIndex,             # <<<<<<<<<<<<<<
 *                  ndarray[uint8_t] newIndex,
 *                  dict oldMap, dict newMap):
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_165pad_bool, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pad_bool, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":496
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_float64(ndarray[float64_t] oldIndex,             # <<<<<<<<<<<<<<
 *                       ndarray[float64_t] newIndex,
 *                       dict oldMap, dict newMap):
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_167backfill_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__backfill_float64, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":548
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_object(ndarray[object] oldIndex,             # <<<<<<<<<<<<<<
 *                       ndarray[object] newIndex,
 *                       dict oldMap, dict newMap):
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_169backfill_object, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__backfill_object, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":600
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_int32(ndarray[int32_t] oldIndex,             # <<<<<<<<<<<<<<
 *                       ndarray[int32_t] newIndex,
 *                       dict oldMap, dict newMap):
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_171backfill_int32, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__backfill_int32, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":652
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_int64(ndarray[int64_t] oldIndex,             # <<<<<<<<<<<<<<
 *                       ndarray[int64_t] newIndex,
 *                       dict oldMap, dict newMap):
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_173backfill_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__backfill_int64, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":704
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_bool(ndarray[uint8_t] oldIndex,             # <<<<<<<<<<<<<<
 *                       ndarray[uint8_t] newIndex,
 *                       dict oldMap, dict newMap):
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_175backfill_bool, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__backfill_bool, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":757
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_2d_inplace_float64(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                             ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_177pad_2d_inplace_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_308, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":775
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_2d_inplace_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
 *                             ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_179pad_2d_inplace_object, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_311, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":793
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_2d_inplace_int32(ndarray[int32_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                             ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_181pad_2d_inplace_int32, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_314, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":811
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_2d_inplace_int64(ndarray[int64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                             ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_183pad_2d_inplace_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_317, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":829
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def pad_2d_inplace_bool(ndarray[uint8_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                             ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_185pad_2d_inplace_bool, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__pad_2d_inplace_bool, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":848
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_2d_inplace_float64(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                                  ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_187backfill_2d_inplace_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_322, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":864
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_2d_inplace_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
 *                                  ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_189backfill_2d_inplace_object, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_325, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":880
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_2d_inplace_int32(ndarray[int32_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                                  ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_191backfill_2d_inplace_int32, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_328, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":896
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_2d_inplace_int64(ndarray[int64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                                  ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_193backfill_2d_inplace_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_331, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":912
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def backfill_2d_inplace_bool(ndarray[uint8_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                                  ndarray[uint8_t, ndim=2] mask):
 *     cdef Py_ssize_t i, j, N, K
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_195backfill_2d_inplace_bool, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_334, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":930
 * @cython.boundscheck(False)
 * def take_1d_float64(ndarray[float64_t] values, ndarray[int32_t] indexer,
 *                      out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n, idx
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_k_27 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":929
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_1d_float64(ndarray[float64_t] values, ndarray[int32_t] indexer,             # <<<<<<<<<<<<<<
 *                      out=None, fill_value=np.nan):
 *     cdef:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_197take_1d_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__take_1d_float64, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":962
 * @cython.boundscheck(False)
 * def take_1d_object(ndarray[object] values, ndarray[int32_t] indexer,
 *                      out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n, idx
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k_30 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":961
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_1d_object(ndarray[object] values, ndarray[int32_t] indexer,             # <<<<<<<<<<<<<<
 *                      out=None, fill_value=np.nan):
 *     cdef:
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_199take_1d_object, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__take_1d_object, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":994
 * @cython.boundscheck(False)
 * def take_1d_int32(ndarray[int32_t] values, ndarray[int32_t] indexer,
 *                      out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n, idx
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_k_32 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":993
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_1d_int32(ndarray[int32_t] values, ndarray[int32_t] indexer,             # <<<<<<<<<<<<<<
 *                      out=None, fill_value=np.nan):
 *     cdef:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_201take_1d_int32, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__take_1d_int32, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1026
 * @cython.boundscheck(False)
 * def take_1d_int64(ndarray[int64_t] values, ndarray[int32_t] indexer,
 *                      out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n, idx
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k_34 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1025
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_1d_int64(ndarray[int64_t] values, ndarray[int32_t] indexer,             # <<<<<<<<<<<<<<
 *                      out=None, fill_value=np.nan):
 *     cdef:
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_203take_1d_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__take_1d_int64, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1058
 * @cython.boundscheck(False)
 * def take_1d_bool(ndarray[uint8_t] values, ndarray[int32_t] indexer,
 *                      out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n, idx
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_k_36 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1057
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_1d_bool(ndarray[uint8_t] values, ndarray[int32_t] indexer,             # <<<<<<<<<<<<<<
 *                      out=None, fill_value=np.nan):
 *     cdef:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_205take_1d_bool, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__take_1d_bool, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1090
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def is_monotonic_float64(ndarray[float64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_207is_monotonic_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_347, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1110
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def is_monotonic_object(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_209is_monotonic_object, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_monotonic_object, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1130
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def is_monotonic_int32(ndarray[int32_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_211is_monotonic_int32, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_monotonic_int32, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1150
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def is_monotonic_int64(ndarray[int64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_213is_monotonic_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_monotonic_int64, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1170
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def is_monotonic_bool(ndarray[uint8_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_215is_monotonic_bool, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_monotonic_bool, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1191
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def groupby_float64(ndarray[float64_t] index, ndarray labels):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef Py_ssize_t i, length
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_217groupby_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__groupby_float64, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1216
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def groupby_object(ndarray[object] index, ndarray labels):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef Py_ssize_t i, length
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_219groupby_object, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__groupby_object, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1241
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def groupby_int32(ndarray[int32_t] index, ndarray labels):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef Py_ssize_t i, length
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_221groupby_int32, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__groupby_int32, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1266
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def groupby_int64(ndarray[int64_t] index, ndarray labels):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef Py_ssize_t i, length
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_223groupby_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__groupby_int64, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1291
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def groupby_bool(ndarray[uint8_t] index, ndarray labels):             # <<<<<<<<<<<<<<
 *     cdef dict result = {}
 *     cdef Py_ssize_t i, length
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_225groupby_bool, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__groupby_bool, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1317
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def arrmap_float64(ndarray[float64_t] index, object func):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_227arrmap_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__arrmap_float64, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1330
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def arrmap_object(ndarray[object] index, object func):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_229arrmap_object, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__arrmap_object, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1343
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def arrmap_int32(ndarray[int32_t] index, object func):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_231arrmap_int32, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__arrmap_int32, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1356
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def arrmap_int64(ndarray[int64_t] index, object func):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_233arrmap_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__arrmap_int64, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1369
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def arrmap_bool(ndarray[uint8_t] index, object func):             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t length = index.shape[0]
 *     cdef Py_ssize_t i = 0
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_235arrmap_bool, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__arrmap_bool, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1385
 * def take_2d_axis0_float64(ndarray[float64_t, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k_38 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1383
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis0_float64(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_237take_2d_axis0_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_378, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1423
 * def take_2d_axis0_object(ndarray[object, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_k_40 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1421
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis0_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_239take_2d_axis0_object, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_381, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1461
 * def take_2d_axis0_int32(ndarray[int32_t, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k_42 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1459
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis0_int32(ndarray[int32_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_241take_2d_axis0_int32, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__take_2d_axis0_int32, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1499
 * def take_2d_axis0_int64(ndarray[int64_t, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1499; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_k_44 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1497
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis0_int64(ndarray[int64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_243take_2d_axis0_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__take_2d_axis0_int64, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1537
 * def take_2d_axis0_bool(ndarray[uint8_t, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k_46 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1535
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis0_bool(ndarray[uint8_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_245take_2d_axis0_bool, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__take_2d_axis0_bool, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1576
 * def take_2d_axis1_float64(ndarray[float64_t, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_k_48 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1574
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis1_float64(ndarray[float64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_247take_2d_axis1_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_390, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1616
 * def take_2d_axis1_object(ndarray[object, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k_50 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1614
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis1_object(ndarray[object, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_249take_2d_axis1_object, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_393, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1656
 * def take_2d_axis1_int32(ndarray[int32_t, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_k_52 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1654
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis1_int32(ndarray[int32_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_251take_2d_axis1_int32, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__take_2d_axis1_int32, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1696
 * def take_2d_axis1_int64(ndarray[int64_t, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_k_54 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1694
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis1_int64(ndarray[int64_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_253take_2d_axis1_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__take_2d_axis1_int64, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1736
 * def take_2d_axis1_bool(ndarray[uint8_t, ndim=2] values,
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, n, idx
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_k_56 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1734
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def take_2d_axis1_bool(ndarray[uint8_t, ndim=2] values,             # <<<<<<<<<<<<<<
 *                            ndarray[int32_t] indexer,
 *                            out=None, fill_value=np.nan):
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_255take_2d_axis1_bool, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__take_2d_axis1_bool, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1775
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_indexer_float64(ndarray[float64_t] left,             # <<<<<<<<<<<<<<
 *                              ndarray[float64_t] right):
 *     cdef:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_257left_join_indexer_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_402, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1820
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_indexer_object(ndarray[object] left,             # <<<<<<<<<<<<<<
 *                              ndarray[object] right):
 *     cdef:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_259left_join_indexer_object, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_405, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1865
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_indexer_int32(ndarray[int32_t] left,             # <<<<<<<<<<<<<<
 *                              ndarray[int32_t] right):
 *     cdef:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_261left_join_indexer_int32, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_408, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1910
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def left_join_indexer_int64(ndarray[int64_t] left,             # <<<<<<<<<<<<<<
 *                              ndarray[int64_t] right):
 *     cdef:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_263left_join_indexer_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_411, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":1956
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def outer_join_indexer_float64(ndarray[float64_t] left,             # <<<<<<<<<<<<<<
 *                                 ndarray[float64_t] right):
 *     cdef:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_265outer_join_indexer_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_414, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2052
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def outer_join_indexer_object(ndarray[object] left,             # <<<<<<<<<<<<<<
 *                                 ndarray[object] right):
 *     cdef:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_267outer_join_indexer_object, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_417, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2148
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def outer_join_indexer_int32(ndarray[int32_t] left,             # <<<<<<<<<<<<<<
 *                                 ndarray[int32_t] right):
 *     cdef:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_269outer_join_indexer_int32, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_420, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2244
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def outer_join_indexer_int64(ndarray[int64_t] left,             # <<<<<<<<<<<<<<
 *                                 ndarray[int64_t] right):
 *     cdef:
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_271outer_join_indexer_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_423, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2341
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def inner_join_indexer_float64(ndarray[float64_t] left,             # <<<<<<<<<<<<<<
 *                               ndarray[float64_t] right):
 *     '''
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_273inner_join_indexer_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_426, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2404
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def inner_join_indexer_object(ndarray[object] left,             # <<<<<<<<<<<<<<
 *                               ndarray[object] right):
 *     '''
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_275inner_join_indexer_object, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_429, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2467
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def inner_join_indexer_int32(ndarray[int32_t] left,             # <<<<<<<<<<<<<<
 *                               ndarray[int32_t] right):
 *     '''
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_277inner_join_indexer_int32, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_432, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/generated.pyx":2530
 * @cython.wraparound(False)
 * @cython.boundscheck(False)
 * def inner_join_indexer_int64(ndarray[int64_t] left,             # <<<<<<<<<<<<<<
 *                               ndarray[int64_t] right):
 *     '''
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_279inner_join_indexer_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_435, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":2
 * from numpy cimport *
 * import numpy as np             # <<<<<<<<<<<<<<
 * 
 * cdef class Reducer:
 */
  __pyx_t_5 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__np, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 2; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/reduce.pyx":231
 *         self.buf.data = self.orig_data
 * 
 * def reduce(arr, f, axis=0, dummy=None):             # <<<<<<<<<<<<<<
 *     reducer = Reducer(arr, f, axis=axis, dummy=dummy)
 *     return reducer.get_result()
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_281reduce, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__reduce, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":1
 * cdef float64_t FP_ERR = 1e-13             # <<<<<<<<<<<<<<
 * 
 * cimport util
 */
  __pyx_v_6pandas_8_tseries_FP_ERR = 1e-13;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":6
 * 
 * cdef:
 *     int TIEBREAK_AVERAGE = 0             # <<<<<<<<<<<<<<
 *     int TIEBREAK_MIN = 1
 *     int TIEBREAK_MAX = 2
 */
  __pyx_v_6pandas_8_tseries_TIEBREAK_AVERAGE = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":7
 * cdef:
 *     int TIEBREAK_AVERAGE = 0
 *     int TIEBREAK_MIN = 1             # <<<<<<<<<<<<<<
 *     int TIEBREAK_MAX = 2
 *     int TIEBREAK_FIRST = 3
 */
  __pyx_v_6pandas_8_tseries_TIEBREAK_MIN = 1;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":8
 *     int TIEBREAK_AVERAGE = 0
 *     int TIEBREAK_MIN = 1
 *     int TIEBREAK_MAX = 2             # <<<<<<<<<<<<<<
 *     int TIEBREAK_FIRST = 3
 *     int TIEBREAK_FIRST_DESCENDING = 4
 */
  __pyx_v_6pandas_8_tseries_TIEBREAK_MAX = 2;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":9
 *     int TIEBREAK_MIN = 1
 *     int TIEBREAK_MAX = 2
 *     int TIEBREAK_FIRST = 3             # <<<<<<<<<<<<<<
 *     int TIEBREAK_FIRST_DESCENDING = 4
 * 
 */
  __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST = 3;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":10
 *     int TIEBREAK_MAX = 2
 *     int TIEBREAK_FIRST = 3
 *     int TIEBREAK_FIRST_DESCENDING = 4             # <<<<<<<<<<<<<<
 * 
 * tiebreakers = {
 */
  __pyx_v_6pandas_8_tseries_TIEBREAK_FIRST_DESCENDING = 4;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":12
 *     int TIEBREAK_FIRST_DESCENDING = 4
 * 
 * tiebreakers = {             # <<<<<<<<<<<<<<
 *     'average' : TIEBREAK_AVERAGE,
 *     'min' : TIEBREAK_MIN,
 */
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":13
 * 
 * tiebreakers = {
 *     'average' : TIEBREAK_AVERAGE,             # <<<<<<<<<<<<<<
 *     'min' : TIEBREAK_MIN,
 *     'max' : TIEBREAK_MAX,
 */
  __pyx_t_4 = PyInt_FromLong(__pyx_v_6pandas_8_tseries_TIEBREAK_AVERAGE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__average), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":14
 * tiebreakers = {
 *     'average' : TIEBREAK_AVERAGE,
 *     'min' : TIEBREAK_MIN,             # <<<<<<<<<<<<<<
 *     'max' : TIEBREAK_MAX,
 *     'first' : TIEBREAK_FIRST
 */
  __pyx_t_4 = PyInt_FromLong(__pyx_v_6pandas_8_tseries_TIEBREAK_MIN); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__min), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":15
 *     'average' : TIEBREAK_AVERAGE,
 *     'min' : TIEBREAK_MIN,
 *     'max' : TIEBREAK_MAX,             # <<<<<<<<<<<<<<
 *     'first' : TIEBREAK_FIRST
 * }
 */
  __pyx_t_4 = PyInt_FromLong(__pyx_v_6pandas_8_tseries_TIEBREAK_MAX); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__max), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":17
 *     'max' : TIEBREAK_MAX,
 *     'first' : TIEBREAK_FIRST
 * }             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_4 = PyInt_FromLong(__pyx_v_6pandas_8_tseries_TIEBREAK_FIRST); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__first), __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__tiebreakers, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":73
 * 
 * 
 * def rank_1d_float64(object in_arr, ties_method='average', ascending=True):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */
  __pyx_t_5 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k_69 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_283rank_1d_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__rank_1d_float64, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":141
 * 
 * 
 * def rank_1d_int64(object in_arr, ties_method='average', ascending=True):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */
  __pyx_t_5 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k_72 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_285rank_1d_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__rank_1d_int64, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":201
 * 
 * def rank_2d_float64(object in_arr, axis=0, ties_method='average',
 *                     ascending=True):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */
  __pyx_t_5 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k_75 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":200
 * 
 * 
 * def rank_2d_float64(object in_arr, axis=0, ties_method='average',             # <<<<<<<<<<<<<<
 *                     ascending=True):
 *     """
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_287rank_2d_float64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__rank_2d_float64, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":280
 * 
 * def rank_2d_int64(object in_arr, axis=0, ties_method='average',
 *                     ascending=True):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */
  __pyx_t_5 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k_81 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":279
 * 
 * 
 * def rank_2d_int64(object in_arr, axis=0, ties_method='average',             # <<<<<<<<<<<<<<
 *                     ascending=True):
 *     """
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_289rank_2d_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__rank_2d_int64, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":348
 * 
 * def rank_1d_generic(object in_arr, bint retry=1, ties_method='average',
 *                     ascending=True):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */
  __pyx_t_5 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k_87 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":347
 * 
 * 
 * def rank_1d_generic(object in_arr, bint retry=1, ties_method='average',             # <<<<<<<<<<<<<<
 *                     ascending=True):
 *     """
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_291rank_1d_generic, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__rank_1d_generic, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":429
 *         return left != right
 * 
 * _return_false = lambda self, other: False             # <<<<<<<<<<<<<<
 * _return_true = lambda self, other: True
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_358lambda1, 0, NULL, __pyx_n_s_112, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___return_false, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":430
 * 
 * _return_false = lambda self, other: False
 * _return_true = lambda self, other: True             # <<<<<<<<<<<<<<
 * 
 * class Infinity(object):
 */
  __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_359lambda2, 0, NULL, __pyx_n_s_112, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___return_true, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":432
 * _return_true = lambda self, other: True
 * 
 * class Infinity(object):             # <<<<<<<<<<<<<<
 * 
 *     __lt__ = _return_false
 */
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":434
 * class Infinity(object):
 * 
 *     __lt__ = _return_false             # <<<<<<<<<<<<<<
 *     __le__ = _return_false
 *     __eq__ = _return_false
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___return_false); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s____lt__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":435
 * 
 *     __lt__ = _return_false
 *     __le__ = _return_false             # <<<<<<<<<<<<<<
 *     __eq__ = _return_false
 *     __ne__ = _return_true
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___return_false); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s____le__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":436
 *     __lt__ = _return_false
 *     __le__ = _return_false
 *     __eq__ = _return_false             # <<<<<<<<<<<<<<
 *     __ne__ = _return_true
 *     __gt__ = _return_true
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___return_false); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s____eq__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":437
 *     __le__ = _return_false
 *     __eq__ = _return_false
 *     __ne__ = _return_true             # <<<<<<<<<<<<<<
 *     __gt__ = _return_true
 *     __ge__ = _return_true
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___return_true); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s____ne__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":438
 *     __eq__ = _return_false
 *     __ne__ = _return_true
 *     __gt__ = _return_true             # <<<<<<<<<<<<<<
 *     __ge__ = _return_true
 *     __cmp__ = _return_false
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___return_true); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s____gt__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":439
 *     __ne__ = _return_true
 *     __gt__ = _return_true
 *     __ge__ = _return_true             # <<<<<<<<<<<<<<
 *     __cmp__ = _return_false
 * 
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___return_true); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s____ge__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":440
 *     __gt__ = _return_true
 *     __ge__ = _return_true
 *     __cmp__ = _return_false             # <<<<<<<<<<<<<<
 * 
 * class NegInfinity(object):
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___return_false); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s____cmp__, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":432
 * _return_true = lambda self, other: True
 * 
 * class Infinity(object):             # <<<<<<<<<<<<<<
 * 
 *     __lt__ = _return_false
 */
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_5), __pyx_n_s__Infinity, __pyx_n_s_112); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Infinity, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":442
 *     __cmp__ = _return_false
 * 
 * class NegInfinity(object):             # <<<<<<<<<<<<<<
 * 
 *     __lt__ = _return_true
 */
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":444
 * class NegInfinity(object):
 * 
 *     __lt__ = _return_true             # <<<<<<<<<<<<<<
 *     __le__ = _return_true
 *     __eq__ = _return_false
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___return_true); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s____lt__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":445
 * 
 *     __lt__ = _return_true
 *     __le__ = _return_true             # <<<<<<<<<<<<<<
 *     __eq__ = _return_false
 *     __ne__ = _return_true
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___return_true); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s____le__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":446
 *     __lt__ = _return_true
 *     __le__ = _return_true
 *     __eq__ = _return_false             # <<<<<<<<<<<<<<
 *     __ne__ = _return_true
 *     __gt__ = _return_false
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___return_false); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s____eq__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":447
 *     __le__ = _return_true
 *     __eq__ = _return_false
 *     __ne__ = _return_true             # <<<<<<<<<<<<<<
 *     __gt__ = _return_false
 *     __ge__ = _return_false
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___return_true); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s____ne__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":448
 *     __eq__ = _return_false
 *     __ne__ = _return_true
 *     __gt__ = _return_false             # <<<<<<<<<<<<<<
 *     __ge__ = _return_false
 *     __cmp__ = _return_true
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___return_false); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s____gt__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":449
 *     __ne__ = _return_true
 *     __gt__ = _return_false
 *     __ge__ = _return_false             # <<<<<<<<<<<<<<
 *     __cmp__ = _return_true
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___return_false); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s____ge__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":450
 *     __gt__ = _return_false
 *     __ge__ = _return_false
 *     __cmp__ = _return_true             # <<<<<<<<<<<<<<
 * 
 * def rank_2d_generic(object in_arr, axis=0, ties_method='average',
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___return_true); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_5, __pyx_n_s____cmp__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":442
 *     __cmp__ = _return_false
 * 
 * class NegInfinity(object):             # <<<<<<<<<<<<<<
 * 
 *     __lt__ = _return_true
 */
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_builtin_object);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_builtin_object);
  __Pyx_GIVEREF(__pyx_builtin_object);
  __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_5), __pyx_n_s__NegInfinity, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__NegInfinity, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":453
 * 
 * def rank_2d_generic(object in_arr, axis=0, ties_method='average',
 *                     ascending=True):             # <<<<<<<<<<<<<<
 *     """
 *     Fast NaN-friendly version of scipy.stats.rankdata
 */
  __pyx_t_5 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_k_93 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/stats.pyx":452
 *     __cmp__ = _return_true
 * 
 * def rank_2d_generic(object in_arr, axis=0, ties_method='average',             # <<<<<<<<<<<<<<
 *                     ascending=True):
 *     """
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_293rank_2d_generic, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__rank_2d_generic, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":3
 * cimport util
 * 
 * _TYPE_MAP = {             # <<<<<<<<<<<<<<
 *     np.int8: 'integer',
 *     np.int16: 'integer',
 */
  __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":4
 * 
 * _TYPE_MAP = {
 *     np.int8: 'integer',             # <<<<<<<<<<<<<<
 *     np.int16: 'integer',
 *     np.int32: 'integer',
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__int8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_1, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":5
 * _TYPE_MAP = {
 *     np.int8: 'integer',
 *     np.int16: 'integer',             # <<<<<<<<<<<<<<
 *     np.int32: 'integer',
 *     np.int64: 'integer',
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__int16); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":6
 *     np.int8: 'integer',
 *     np.int16: 'integer',
 *     np.int32: 'integer',             # <<<<<<<<<<<<<<
 *     np.int64: 'integer',
 *     np.uint8: 'integer',
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__int32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_1, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":7
 *     np.int16: 'integer',
 *     np.int32: 'integer',
 *     np.int64: 'integer',             # <<<<<<<<<<<<<<
 *     np.uint8: 'integer',
 *     np.uint16: 'integer',
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__int64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":8
 *     np.int32: 'integer',
 *     np.int64: 'integer',
 *     np.uint8: 'integer',             # <<<<<<<<<<<<<<
 *     np.uint16: 'integer',
 *     np.uint32: 'integer',
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__uint8); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_1, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":9
 *     np.int64: 'integer',
 *     np.uint8: 'integer',
 *     np.uint16: 'integer',             # <<<<<<<<<<<<<<
 *     np.uint32: 'integer',
 *     np.uint64: 'integer',
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__uint16); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":10
 *     np.uint8: 'integer',
 *     np.uint16: 'integer',
 *     np.uint32: 'integer',             # <<<<<<<<<<<<<<
 *     np.uint64: 'integer',
 *     np.float32: 'floating',
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__uint32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_1, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":11
 *     np.uint16: 'integer',
 *     np.uint32: 'integer',
 *     np.uint64: 'integer',             # <<<<<<<<<<<<<<
 *     np.float32: 'floating',
 *     np.float64: 'floating',
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__uint64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_n_s__integer)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":12
 *     np.uint32: 'integer',
 *     np.uint64: 'integer',
 *     np.float32: 'floating',             # <<<<<<<<<<<<<<
 *     np.float64: 'floating',
 *     np.complex64: 'complex',
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_1, ((PyObject *)__pyx_n_s__floating)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":13
 *     np.uint64: 'integer',
 *     np.float32: 'floating',
 *     np.float64: 'floating',             # <<<<<<<<<<<<<<
 *     np.complex64: 'complex',
 *     np.complex128: 'complex',
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_n_s__floating)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":14
 *     np.float32: 'floating',
 *     np.float64: 'floating',
 *     np.complex64: 'complex',             # <<<<<<<<<<<<<<
 *     np.complex128: 'complex',
 *     np.string_: 'string',
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__complex64); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_1, ((PyObject *)__pyx_n_s__complex)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":15
 *     np.float64: 'floating',
 *     np.complex64: 'complex',
 *     np.complex128: 'complex',             # <<<<<<<<<<<<<<
 *     np.string_: 'string',
 *     np.unicode_: 'unicode',
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__complex128); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_n_s__complex)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":16
 *     np.complex64: 'complex',
 *     np.complex128: 'complex',
 *     np.string_: 'string',             # <<<<<<<<<<<<<<
 *     np.unicode_: 'unicode',
 *     np.bool_: 'boolean'
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__string_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_1, ((PyObject *)__pyx_n_s__string)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":17
 *     np.complex128: 'complex',
 *     np.string_: 'string',
 *     np.unicode_: 'unicode',             # <<<<<<<<<<<<<<
 *     np.bool_: 'boolean'
 * }
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__unicode_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_n_s__unicode)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":18
 *     np.string_: 'string',
 *     np.unicode_: 'unicode',
 *     np.bool_: 'boolean'             # <<<<<<<<<<<<<<
 * }
 * 
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__bool_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_5, __pyx_t_1, ((PyObject *)__pyx_n_s__boolean)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___TYPE_MAP, ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":21
 * }
 * 
 * try:             # <<<<<<<<<<<<<<
 *     _TYPE_MAP[np.float128] = 'floating'
 *     _TYPE_MAP[np.complex256] = 'complex'
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":22
 * 
 * try:
 *     _TYPE_MAP[np.float128] = 'floating'             # <<<<<<<<<<<<<<
 *     _TYPE_MAP[np.complex256] = 'complex'
 *     _TYPE_MAP[np.float16] = 'floating'
 */
      __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__float128); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (PyObject_SetItem(__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_n_s__floating)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":23
 * try:
 *     _TYPE_MAP[np.float128] = 'floating'
 *     _TYPE_MAP[np.complex256] = 'complex'             # <<<<<<<<<<<<<<
 *     _TYPE_MAP[np.float16] = 'floating'
 *     _TYPE_MAP[np.datetime64] = 'datetime64'
 */
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__complex256); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (PyObject_SetItem(__pyx_t_4, __pyx_t_1, ((PyObject *)__pyx_n_s__complex)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":24
 *     _TYPE_MAP[np.float128] = 'floating'
 *     _TYPE_MAP[np.complex256] = 'complex'
 *     _TYPE_MAP[np.float16] = 'floating'             # <<<<<<<<<<<<<<
 *     _TYPE_MAP[np.datetime64] = 'datetime64'
 * except AttributeError:
 */
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__float16); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (PyObject_SetItem(__pyx_t_1, __pyx_t_5, ((PyObject *)__pyx_n_s__floating)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "/home/wesm/code/pandas/pandas/src/inference.pyx":25
 *     _TYPE_MAP[np.complex256] = 'complex'
 *     _TYPE_MAP[np.float16] = 'floating'
 *     _TYPE_MAP[np.datetime64] = 'datetime64'             # <<<<<<<<<<<<<<
 * except AttributeError:
 *     pass
 */
      __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s___TYPE_MAP); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__datetime64); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (PyObject_SetItem(__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_n_s__datetime64)) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L2_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L9_try_end;
    __pyx_L2_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "/home/wesm/code/pandas/pandas/src/inference.pyx":26
 *     _TYPE_MAP[np.float16] = 'floating'
 *     _TYPE_MAP[np.datetime64] = 'datetime64'
 * except AttributeError:             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
    __pyx_t_9 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
    if (__pyx_t_9) {
      PyErr_Restore(0,0,0);
      goto __pyx_L3_exception_handled;
    }
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L3_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    __pyx_L9_try_end:;
  }

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":29
 *     pass
 * 
 * def infer_dtype(object _values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_295infer_dtype, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__infer_dtype, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":83
 *     return 'mixed'
 * 
 * def infer_dtype_list(list values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_297infer_dtype_list, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__infer_dtype_list, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":91
 *     return PyDateTime_Check(o)
 * 
 * def is_bool_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_299is_bool_array, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_bool_array, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":112
 *         return False
 * 
 * def is_integer(object o):             # <<<<<<<<<<<<<<
 *     return util.is_integer_object(o)
 * 
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_301is_integer, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_integer, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":115
 *     return util.is_integer_object(o)
 * 
 * def is_integer_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_303is_integer_array, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_integer_array, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":136
 *         return False
 * 
 * def is_float_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_305is_float_array, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_float_array, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":157
 *         return False
 * 
 * def is_string_array(ndarray values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_307is_string_array, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_string_array, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":178
 *         return False
 * 
 * def is_datetime_array(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef int i, n = len(values)
 *     if n == 0:
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_309is_datetime_array, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__is_datetime_array, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":188
 * 
 * 
 * def maybe_convert_numeric(ndarray[object] values, set na_values):             # <<<<<<<<<<<<<<
 *     '''
 *     Type inference function-- convert strings to numeric (potentially) and
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_311maybe_convert_numeric, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_470, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":235
 *         return ints
 * 
 * def maybe_convert_objects(ndarray[object] objects, bint try_float=0,             # <<<<<<<<<<<<<<
 *                           bint safe=0):
 *     '''
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_313maybe_convert_objects, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_8, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":332
 * 
 * 
 * def convert_sql_column(x):             # <<<<<<<<<<<<<<
 *     return maybe_convert_objects(x, try_float=1)
 * 
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_315convert_sql_column, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__convert_sql_column, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":335
 *     return maybe_convert_objects(x, try_float=1)
 * 
 * def try_parse_dates(ndarray[object] values, parser=None):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_317try_parse_dates, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__try_parse_dates, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":374
 *     return result
 * 
 * def sanitize_objects(ndarray[object] values, set na_values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_319sanitize_objects, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__sanitize_objects, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":396
 *     return na_count
 * 
 * def maybe_convert_bool(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_321maybe_convert_bool, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__maybe_convert_bool, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":418
 * 
 * 
 * def map_infer(ndarray arr, object f):             # <<<<<<<<<<<<<<
 *     '''
 *     Substitute for np.vectorize with pandas-friendly dtype inference
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_323map_infer, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__map_infer, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":455
 *     return maybe_convert_objects(result, try_float=0)
 * 
 * def to_object_array(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_325to_object_array, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__to_object_array, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":479
 *     return result
 * 
 * def tuples_to_object_array(ndarray[object] tuples):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_327tuples_to_object_array, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_487, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":495
 *     return result
 * 
 * def to_object_array_tuples(list rows):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, n, k, tmp
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_329to_object_array_tuples, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_490, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/inference.pyx":526
 * 
 * 
 * def fast_multiget(dict mapping, ndarray keys, default=np.nan):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(keys)
 */
  __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_GetAttr(__pyx_t_4, __pyx_n_s__nan); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_k_114 = __pyx_t_5;
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_t_5 = 0;
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_331fast_multiget, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__fast_multiget, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/internals.pyx":1
 * def get_reverse_indexer(ndarray[int32_t] indexer, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(indexer)
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_333get_reverse_indexer, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__get_reverse_indexer, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":3
 * from khash cimport *
 * 
 * def test(ndarray arr, Py_ssize_t size_hint):             # <<<<<<<<<<<<<<
 *     cdef:
 *         kh_pymap_t *table
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_335test, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__test, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":37
 * 
 * 
 * def test_str(ndarray arr, Py_ssize_t size_hint):             # <<<<<<<<<<<<<<
 *     cdef:
 *         kh_str_t *table
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_337test_str, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__test_str, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":90
 * #     return indexer
 * 
 * def obj_unique(ndarray[object] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         kh_pyset_t *table
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_339obj_unique, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__obj_unique, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":124
 *     return None
 * 
 * def int64_unique(ndarray[int64_t] arr):             # <<<<<<<<<<<<<<
 *     cdef:
 *         kh_int64_t *table
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_341int64_unique, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__int64_unique, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":585
 *         return uniques
 * 
 * def value_count_int64(ndarray[int64_t] values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_5 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_343value_count_int64, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__value_count_int64, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":618
 *     return result_keys, result_counts
 * 
 * ONAN = np.nan             # <<<<<<<<<<<<<<
 * 
 * cdef class Float64HashTable:
 */
  __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__nan); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__ONAN, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":913
 *         return self.count
 * 
 *     def factorize(self, ndarray[object] values, sort=False, na_sentinel=-1):             # <<<<<<<<<<<<<<
 *         labels, counts = self.table.get_labels(values, self.uniques,
 *                                                self.count, na_sentinel)
 */
  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k_117 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":948
 *         return self.count
 * 
 *     def factorize(self, ndarray[int64_t] values, sort=False):             # <<<<<<<<<<<<<<
 *         labels, counts = self.table.get_labels(values, self.uniques,
 *                                                self.count, -1)
 */
  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k_118 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1015
 *         return labels, counts[:count].copy()
 * 
 *     def factorize(self, ndarray[object] values, sort=False):             # <<<<<<<<<<<<<<
 *         labels, counts = self.get_labels(values)
 * 
 */
  __pyx_t_4 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k_119 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/hashtable.pyx":1059
 *         return self.uniques
 * 
 * def lookup2(ndarray[object] values):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, n = len(values)
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_345lookup2, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__lookup2, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 1059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":1
 * import time             # <<<<<<<<<<<<<<
 * 
 * def inner_join(ndarray[int32_t] left, ndarray[int32_t] right,
 */
  __pyx_t_4 = __Pyx_Import(((PyObject *)__pyx_n_s__time), 0, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__time, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":3
 * import time
 * 
 * def inner_join(ndarray[int32_t] left, ndarray[int32_t] right,             # <<<<<<<<<<<<<<
 *                Py_ssize_t max_groups):
 *     cdef:
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_347inner_join, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__inner_join, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":54
 * 
 * def left_outer_join(ndarray[int32_t] left, ndarray[int32_t] right,
 *                     Py_ssize_t max_groups, sort=True):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, j, k, count = 0
 */
  __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_k_120 = __pyx_t_4;
  __Pyx_GIVEREF(__pyx_t_4);
  __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":53
 *             _get_result_indexer(right_sorter, right_indexer))
 * 
 * def left_outer_join(ndarray[int32_t] left, ndarray[int32_t] right,             # <<<<<<<<<<<<<<
 *                     Py_ssize_t max_groups, sort=True):
 *     cdef:
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_349left_outer_join, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__left_outer_join, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":117
 * 
 * 
 * def full_outer_join(ndarray[int32_t] left, ndarray[int32_t] right,             # <<<<<<<<<<<<<<
 *                     Py_ssize_t max_groups):
 *     cdef:
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_351full_outer_join, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__full_outer_join, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":179
 *             _get_result_indexer(right_sorter, right_indexer))
 * 
 * def _get_result_indexer(sorter, indexer):             # <<<<<<<<<<<<<<
 *     res = sorter.take(indexer)
 *     np.putmask(res, indexer == -1, -1)
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_353_get_result_indexer, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___get_result_indexer, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":187
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
 * def join_sorter(ndarray[int32_t] index, Py_ssize_t ngroups):             # <<<<<<<<<<<<<<
 *     cdef:
 *         Py_ssize_t i, loc, label, n
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_355join_sorter, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__join_sorter, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "/home/wesm/code/pandas/pandas/src/join.pyx":212
 *     return result, counts
 * 
 * def _big_join_sorter(index):             # <<<<<<<<<<<<<<
 *     pass
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_6pandas_8_tseries_357_big_join_sorter, NULL, __pyx_n_s_112); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s___big_join_sorter, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "pandas/src/tseries.pyx":1
 * cimport numpy as np             # <<<<<<<<<<<<<<
 * cimport cython
 * 
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "util.pxd":52
 *     return cnp.PyArray_CHKFLAGS(arr, cnp.NPY_C_CONTIGUOUS)
 * 
 * cdef inline is_array(object o):             # <<<<<<<<<<<<<<
 *     return cnp.PyArray_Check(o)
 */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  if (__pyx_m) {
    __Pyx_AddTraceback("init pandas._tseries", __pyx_clineno, __pyx_lineno, __pyx_filename);
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init pandas._tseries");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* Runtime support code */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result) {
        if (dict != __pyx_b) {
            PyErr_Clear();
            result = PyObject_GetAttr(__pyx_b, name);
        }
        if (!result) {
            PyErr_SetObject(PyExc_NameError, name);
        }
    }
    return result;
}

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%s() takes %s %"PY_FORMAT_SIZE_T"d positional argument%s (%"PY_FORMAT_SIZE_T"d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AS_STRING(kw_name));
        #endif
}

static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
        } else {
            #if PY_MAJOR_VERSION < 3
            if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
            #else
            if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
            #endif
                goto invalid_keyword_type;
            } else {
                for (name = first_kw_arg; *name; name++) {
                    #if PY_MAJOR_VERSION >= 3
                    if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
                        PyUnicode_Compare(**name, key) == 0) break;
                    #else
                    if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
                        _PyString_Eq(**name, key)) break;
                    #endif
                }
                if (*name) {
                    values[name-argnames] = value;
                } else {
                    for (name=argnames; name != first_kw_arg; name++) {
                        if (**name == key) goto arg_passed_twice;
                        #if PY_MAJOR_VERSION >= 3
                        if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
                            PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
                        #else
                        if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
                            _PyString_Eq(**name, key)) goto arg_passed_twice;
                        #endif
                    }
                    if (kwds2) {
                        if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                    } else {
                        goto invalid_keyword;
                    }
                }
            }
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, **name);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}



static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (!type) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (Py_TYPE(obj) == type) return 1;
    }
    else {
        if (PyObject_TypeCheck(obj, type)) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%s' has incorrect type (expected %s, got %s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}

#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    /* cause is unused */
    Py_XINCREF(type);
    Py_XINCREF(value);
    Py_XINCREF(tb);
    /* First, check the traceback argument, replacing None with NULL. */
    if (tb == Py_None) {
        Py_DECREF(tb);
        tb = 0;
    }
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto raise_error;
    }
    /* Next, replace a missing value with None */
    if (value == NULL) {
        value = Py_None;
        Py_INCREF(value);
    }
    #if PY_VERSION_HEX < 0x02050000
    if (!PyClass_Check(type))
    #else
    if (!PyType_Check(type))
    #endif
    {
        /* Raising an instance.  The value should be a dummy. */
        if (value != Py_None) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        /* Normalize to raise <class>, <instance> */
        Py_DECREF(value);
        value = type;
        #if PY_VERSION_HEX < 0x02050000
            if (PyInstance_Check(type)) {
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
                Py_INCREF(type);
            }
            else {
                type = 0;
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception must be an old-style class or instance");
                goto raise_error;
            }
        #else
            type = (PyObject*) Py_TYPE(type);
            Py_INCREF(type);
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception class must be a subclass of BaseException");
                goto raise_error;
            }
        #endif
    }
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else /* Python 3+ */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (!PyExceptionClass_Check(type)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        }
        else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        }
        else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        if (!value) {
            value = PyObject_CallObject(type, NULL);
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
    }
bad:
    return;
}
#endif

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(PyObject_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

static CYTHON_INLINE int __Pyx_IsLittleEndian(void) {
  unsigned int n = 1;
  return *(unsigned char*)(&n) != 0;
}
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
                              __Pyx_BufFmt_StackElem* stack,
                              __Pyx_TypeInfo* type) {
  stack[0].field = &ctx->root;
  stack[0].parent_offset = 0;
  ctx->root.type = type;
  ctx->root.name = "buffer dtype";
  ctx->root.offset = 0;
  ctx->head = stack;
  ctx->head->field = &ctx->root;
  ctx->fmt_offset = 0;
  ctx->head->parent_offset = 0;
  ctx->new_packmode = '@';
  ctx->enc_packmode = '@';
  ctx->new_count = 1;
  ctx->enc_count = 0;
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  ctx->is_valid_array = 0;
  ctx->struct_alignment = 0;
  while (type->typegroup == 'S') {
    ++ctx->head;
    ctx->head->field = type->fields;
    ctx->head->parent_offset = 0;
    type = type->fields->type;
  }
}
static int __Pyx_BufFmt_ParseNumber(const char** ts) {
    int count;
    const char* t = *ts;
    if (*t < '0' || *t > '9') {
      return -1;
    } else {
        count = *t++ - '0';
        while (*t >= '0' && *t < '9') {
            count *= 10;
            count += *t++ - '0';
        }
    }
    *ts = t;
    return count;
}
static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
    int number = __Pyx_BufFmt_ParseNumber(ts);
    if (number == -1) /* First char was not a digit */
        PyErr_Format(PyExc_ValueError,\
                     "Does not understand character buffer dtype format string ('%c')", **ts);
    return number;
}
static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
  PyErr_Format(PyExc_ValueError,
               "Unexpected format string character: '%c'", ch);
}
static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
  switch (ch) {
    case 'b': return "'char'";
    case 'B': return "'unsigned char'";
    case 'h': return "'short'";
    case 'H': return "'unsigned short'";
    case 'i': return "'int'";
    case 'I': return "'unsigned int'";
    case 'l': return "'long'";
    case 'L': return "'unsigned long'";
    case 'q': return "'long long'";
    case 'Q': return "'unsigned long long'";
    case 'f': return (is_complex ? "'complex float'" : "'float'");
    case 'd': return (is_complex ? "'complex double'" : "'double'");
    case 'g': return (is_complex ? "'complex long double'" : "'long double'");
    case 'T': return "a struct";
    case 'O': return "Python object";
    case 'P': return "a pointer";
    case 's': case 'p': return "a string";
    case 0: return "end";
    default: return "unparseable format string";
  }
}
static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return 2;
    case 'i': case 'I': case 'l': case 'L': return 4;
    case 'q': case 'Q': return 8;
    case 'f': return (is_complex ? 8 : 4);
    case 'd': return (is_complex ? 16 : 8);
    case 'g': {
      PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
      return 0;
    }
    case 'O': case 'P': return sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
  switch (ch) {
    case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(short);
    case 'i': case 'I': return sizeof(int);
    case 'l': case 'L': return sizeof(long);
    #ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(PY_LONG_LONG);
    #endif
    case 'f': return sizeof(float) * (is_complex ? 2 : 1);
    case 'd': return sizeof(double) * (is_complex ? 2 : 1);
    case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
    case 'O': case 'P': return sizeof(void*);
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
typedef struct { char c; short x; } __Pyx_st_short;
typedef struct { char c; int x; } __Pyx_st_int;
typedef struct { char c; long x; } __Pyx_st_long;
typedef struct { char c; float x; } __Pyx_st_float;
typedef struct { char c; double x; } __Pyx_st_double;
typedef struct { char c; long double x; } __Pyx_st_longdouble;
typedef struct { char c; void *x; } __Pyx_st_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
/* These are for computing the padding at the end of the struct to align
   on the first member of the struct. This will probably the same as above,
   but we don't have any guarantees.
 */
typedef struct { short x; char c; } __Pyx_pad_short;
typedef struct { int x; char c; } __Pyx_pad_int;
typedef struct { long x; char c; } __Pyx_pad_long;
typedef struct { float x; char c; } __Pyx_pad_float;
typedef struct { double x; char c; } __Pyx_pad_double;
typedef struct { long double x; char c; } __Pyx_pad_longdouble;
typedef struct { void *x; char c; } __Pyx_pad_void_p;
#ifdef HAVE_LONG_LONG
typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
#endif
static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, int is_complex) {
  switch (ch) {
    case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
    case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
    case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
    case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
#ifdef HAVE_LONG_LONG
    case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
#endif
    case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
    case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
    case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
    case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
    default:
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
}
static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
  switch (ch) {
    case 'c': case 'b': case 'h': case 'i':
    case 'l': case 'q': case 's': case 'p':
        return 'I';
    case 'B': case 'H': case 'I': case 'L': case 'Q':
        return 'U';
    case 'f': case 'd': case 'g':
        return (is_complex ? 'C' : 'R');
    case 'O':
        return 'O';
    case 'P':
        return 'P';
    default: {
      __Pyx_BufFmt_RaiseUnexpectedChar(ch);
      return 0;
    }
  }
}
static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
  if (ctx->head == NULL || ctx->head->field == &ctx->root) {
    const char* expected;
    const char* quote;
    if (ctx->head == NULL) {
      expected = "end";
      quote = "";
    } else {
      expected = ctx->head->field->type->name;
      quote = "'";
    }
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected %s%s%s but got %s",
                 quote, expected, quote,
                 __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
  } else {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_StructField* parent = (ctx->head - 1)->field;
    PyErr_Format(PyExc_ValueError,
                 "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
                 field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
                 parent->type->name, field->name);
  }
}
static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
  char group;
  size_t size, offset, arraysize = 1;
  if (ctx->enc_type == 0) return 0;
  if (ctx->head->field->type->arraysize[0]) {
    int i, ndim = 0;
    if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
        ctx->is_valid_array = ctx->head->field->type->ndim == 1;
        ndim = 1;
        if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
            PyErr_Format(PyExc_ValueError,
                         "Expected a dimension of size %zu, got %zu",
                         ctx->head->field->type->arraysize[0], ctx->enc_count);
            return -1;
        }
    }
    if (!ctx->is_valid_array) {
      PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
                   ctx->head->field->type->ndim, ndim);
      return -1;
    }
    for (i = 0; i < ctx->head->field->type->ndim; i++) {
      arraysize *= ctx->head->field->type->arraysize[i];
    }
    ctx->is_valid_array = 0;
    ctx->enc_count = 1;
  }
  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
  do {
    __Pyx_StructField* field = ctx->head->field;
    __Pyx_TypeInfo* type = field->type;
    if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
      size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
    } else {
      size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
    }
    if (ctx->enc_packmode == '@') {
      size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
      size_t align_mod_offset;
      if (align_at == 0) return -1;
      align_mod_offset = ctx->fmt_offset % align_at;
      if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
      if (ctx->struct_alignment == 0)
          ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
                                                                 ctx->is_complex);
    }
    if (type->size != size || type->typegroup != group) {
      if (type->typegroup == 'C' && type->fields != NULL) {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        ++ctx->head;
        ctx->head->field = type->fields;
        ctx->head->parent_offset = parent_offset;
        continue;
      }
      __Pyx_BufFmt_RaiseExpected(ctx);
      return -1;
    }
    offset = ctx->head->parent_offset + field->offset;
    if (ctx->fmt_offset != offset) {
      PyErr_Format(PyExc_ValueError,
                   "Buffer dtype mismatch; next field is at offset %"PY_FORMAT_SIZE_T"d but %"PY_FORMAT_SIZE_T"d expected",
                   (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
      return -1;
    }
    ctx->fmt_offset += size;
    if (arraysize)
      ctx->fmt_offset += (arraysize - 1) * size;
    --ctx->enc_count; /* Consume from buffer string */
    while (1) {
      if (field == &ctx->root) {
        ctx->head = NULL;
        if (ctx->enc_count != 0) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return -1;
        }
        break; /* breaks both loops as ctx->enc_count == 0 */
      }
      ctx->head->field = ++field;
      if (field->type == NULL) {
        --ctx->head;
        field = ctx->head->field;
        continue;
      } else if (field->type->typegroup == 'S') {
        size_t parent_offset = ctx->head->parent_offset + field->offset;
        if (field->type->fields->type == NULL) continue; /* empty struct */
        field = field->type->fields;
        ++ctx->head;
        ctx->head->field = field;
        ctx->head->parent_offset = parent_offset;
        break;
      } else {
        break;
      }
    }
  } while (ctx->enc_count);
  ctx->enc_type = 0;
  ctx->is_complex = 0;
  return 0;
}
static CYTHON_INLINE PyObject *
__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
{
    const char *ts = *tsp;
    int i = 0, number;
    int ndim = ctx->head->field->type->ndim;
;
    ++ts;
    if (ctx->new_count != 1) {
        PyErr_SetString(PyExc_ValueError,
                        "Cannot handle repeated arrays in format string");
        return NULL;
    }
    if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
    while (*ts && *ts != ')') {
        if (isspace(*ts))
            continue;
        number = __Pyx_BufFmt_ExpectNumber(&ts);
        if (number == -1) return NULL;
        if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
            return PyErr_Format(PyExc_ValueError,
                        "Expected a dimension of size %zu, got %d",
                        ctx->head->field->type->arraysize[i], number);
        if (*ts != ',' && *ts != ')')
            return PyErr_Format(PyExc_ValueError,
                                "Expected a comma in format string, got '%c'", *ts);
        if (*ts == ',') ts++;
        i++;
    }
    if (i != ndim)
        return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
                            ctx->head->field->type->ndim, i);
    if (!*ts) {
        PyErr_SetString(PyExc_ValueError,
                        "Unexpected end of format string, expected ')'");
        return NULL;
    }
    ctx->is_valid_array = 1;
    ctx->new_count = 1;
    *tsp = ++ts;
    return Py_None;
}
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
  int got_Z = 0;
  while (1) {
    switch(*ts) {
      case 0:
        if (ctx->enc_type != 0 && ctx->head == NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        if (ctx->head != NULL) {
          __Pyx_BufFmt_RaiseExpected(ctx);
          return NULL;
        }
                return ts;
      case ' ':
      case 10:
      case 13:
        ++ts;
        break;
      case '<':
        if (!__Pyx_IsLittleEndian()) {
          PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '>':
      case '!':
        if (__Pyx_IsLittleEndian()) {
          PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
          return NULL;
        }
        ctx->new_packmode = '=';
        ++ts;
        break;
      case '=':
      case '@':
      case '^':
        ctx->new_packmode = *ts++;
        break;
      case 'T': /* substruct */
        {
          const char* ts_after_sub;
          size_t i, struct_count = ctx->new_count;
          size_t struct_alignment = ctx->struct_alignment;
          ctx->new_count = 1;
          ++ts;
          if (*ts != '{') {
            PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
            return NULL;
          }
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0; /* Erase processed last struct element */
          ctx->enc_count = 0;
          ctx->struct_alignment = 0;
          ++ts;
          ts_after_sub = ts;
          for (i = 0; i != struct_count; ++i) {
            ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
            if (!ts_after_sub) return NULL;
          }
          ts = ts_after_sub;
          if (struct_alignment) ctx->struct_alignment = struct_alignment;
        }
        break;
      case '}': /* end of substruct; either repeat or move on */
        {
          size_t alignment = ctx->struct_alignment;
          ++ts;
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_type = 0; /* Erase processed last struct element */
          if (alignment && ctx->fmt_offset % alignment) {
            ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
          }
        }
        return ts;
      case 'x':
        if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
        ctx->fmt_offset += ctx->new_count;
        ctx->new_count = 1;
        ctx->enc_count = 0;
        ctx->enc_type = 0;
        ctx->enc_packmode = ctx->new_packmode;
        ++ts;
        break;
      case 'Z':
        got_Z = 1;
        ++ts;
        if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
          __Pyx_BufFmt_RaiseUnexpectedChar('Z');
          return NULL;
        }        /* fall through */
      case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
      case 'l': case 'L': case 'q': case 'Q':
      case 'f': case 'd': case 'g':
      case 'O': case 's': case 'p':
        if (ctx->enc_type == *ts && got_Z == ctx->is_complex &&
            ctx->enc_packmode == ctx->new_packmode) {
          ctx->enc_count += ctx->new_count;
        } else {
          if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
          ctx->enc_count = ctx->new_count;
          ctx->enc_packmode = ctx->new_packmode;
          ctx->enc_type = *ts;
          ctx->is_complex = got_Z;
        }
        ++ts;
        ctx->new_count = 1;
        got_Z = 0;
        break;
      case ':':
        ++ts;
        while(*ts != ':') ++ts;
        ++ts;
        break;
      case '(':
        if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
        break;
      default:
        {
          int number = __Pyx_BufFmt_ExpectNumber(&ts);
          if (number == -1) return NULL;
          ctx->new_count = (size_t)number;
        }
    }
  }
}
static CYTHON_INLINE void __Pyx_ZeroBuffer(Py_buffer* buf) {
  buf->buf = NULL;
  buf->obj = NULL;
  buf->strides = __Pyx_zeros;
  buf->shape = __Pyx_zeros;
  buf->suboffsets = __Pyx_minusones;
}
static CYTHON_INLINE int __Pyx_GetBufferAndValidate(
        Py_buffer* buf, PyObject* obj,  __Pyx_TypeInfo* dtype, int flags,
        int nd, int cast, __Pyx_BufFmt_StackElem* stack)
{
  if (obj == Py_None || obj == NULL) {
    __Pyx_ZeroBuffer(buf);
    return 0;
  }
  buf->buf = NULL;
  if (__Pyx_GetBuffer(obj, buf, flags) == -1) goto fail;
  if (buf->ndim != nd) {
    PyErr_Format(PyExc_ValueError,
                 "Buffer has wrong number of dimensions (expected %d, got %d)",
                 nd, buf->ndim);
    goto fail;
  }
  if (!cast) {
    __Pyx_BufFmt_Context ctx;
    __Pyx_BufFmt_Init(&ctx, stack, dtype);
    if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
  }
  if ((unsigned)buf->itemsize != dtype->size) {
    PyErr_Format(PyExc_ValueError,
      "Item size of buffer (%"PY_FORMAT_SIZE_T"d byte%s) does not match size of '%s' (%"PY_FORMAT_SIZE_T"d byte%s)",
      buf->itemsize, (buf->itemsize > 1) ? "s" : "",
      dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
    goto fail;
  }
  if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;
  return 0;
fail:;
  __Pyx_ZeroBuffer(buf);
  return -1;
}
static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
  if (info->buf == NULL) return;
  if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
  __Pyx_ReleaseBuffer(info);
}

static void __Pyx_RaiseBufferFallbackError(void) {
  PyErr_Format(PyExc_ValueError,
     "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!");
}

static void __Pyx_RaiseBufferIndexError(int axis) {
  PyErr_Format(PyExc_IndexError,
     "Out of bounds on buffer access (axis %d)", axis);
}

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %"PY_FORMAT_SIZE_T"d value%s to unpack",
                 index, (index == 1) ? "" : "s");
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %"PY_FORMAT_SIZE_T"d)", expected);
}

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else if (PyErr_Occurred()) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
}

static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is unsubscriptable");
}



static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *local_type, *local_value, *local_tb;
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
    if (unlikely(tstate->curexc_type))
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
        goto bad;
    #endif
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
    Py_INCREF(local_type);
    Py_INCREF(local_value);
    Py_INCREF(local_tb);
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    /* Make sure tstate is in a consistent state when we XDECREF
       these objects (XDECREF may run arbitrary code). */
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

static CYTHON_INLINE long __Pyx_mod_long(long a, long b) {
    long r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
    long q = a / b;
    long r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
    Py_ssize_t q = a / b;
    Py_ssize_t r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

static CYTHON_INLINE Py_ssize_t __Pyx_mod_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
    Py_ssize_t r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = PyObject_GetAttr(o, n);
    if (!r) {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
            goto bad;
        PyErr_Clear();
        r = d;
        Py_INCREF(d);
    }
    return r;
bad:
    return NULL;
}

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #else
        if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key)))
        #endif
            goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    return 0;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    PyObject* float_value;
    if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) {
        return PyFloat_AsDouble(obj);
    } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
#if PY_MAJOR_VERSION >= 3
        float_value = PyFloat_FromString(obj);
#else
        float_value = PyFloat_FromString(obj, 0);
#endif
    } else {
        PyObject* args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        PyTuple_SET_ITEM(args, 0, obj);
        float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
        PyTuple_SET_ITEM(args, 0, 0);
        Py_DECREF(args);
    }
    if (likely(float_value)) {
        double value = PyFloat_AS_DOUBLE(float_value);
        Py_DECREF(float_value);
        return value;
    }
bad:
    return (double)-1;
}

static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}


#if PY_MAJOR_VERSION < 3
static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
  #if PY_VERSION_HEX >= 0x02060000
  if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
  #endif
  if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags);
        else {
          PyErr_Format(PyExc_TypeError, "'%100s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
  return -1;
    }
       }

static void __Pyx_ReleaseBuffer(Py_buffer *view) {
  PyObject* obj = view->obj;
  if (obj) {
    #if PY_VERSION_HEX >= 0x02060000
    if (PyObject_CheckBuffer(obj)) {PyBuffer_Release(view); return;}
    #endif
if (PyObject_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view);
    
    Py_DECREF(obj);
    view->obj = NULL;
  }
}

#endif
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
    PyObject *py_import = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
    if (!py_import)
        goto bad;
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    #if PY_VERSION_HEX >= 0x02050000
    {
        PyObject *py_level = PyInt_FromLong(level);
        if (!py_level)
            goto bad;
        module = PyObject_CallFunctionObjArgs(py_import,
            name, global_dict, empty_dict, list, py_level, NULL);
        Py_DECREF(py_level);
    }
    #else
    if (level>0) {
        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
        goto bad;
    }
    module = PyObject_CallFunctionObjArgs(py_import,
        name, global_dict, empty_dict, list, NULL);
    #endif
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(py_import);
    Py_XDECREF(empty_dict);
    return module;
}

static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) {
#if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_ImportError, "cannot import name %.230s",
                 PyString_AsString(name));
#else
    PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
#endif
}

static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
{
    if (op->func_doc == NULL && op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
        op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
#else
        op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
#endif
    }
    if (op->func_doc == 0) {
        Py_INCREF(Py_None);
        return Py_None;
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp = op->func_doc;
    if (value == NULL)
        op->func_doc = Py_None; /* Mark as deleted */
    else
        op->func_doc = value;
    Py_INCREF(op->func_doc);
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
{
    if (op->func_name == NULL) {
#if PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
#endif
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (value == NULL || !PyUnicode_Check(value)) {
#else
    if (value == NULL || !PyString_Check(value)) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = op->func_name;
    Py_INCREF(value);
    op->func_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
{
    PyObject *self;
    self = m->func_closure;
    if (self == NULL)
        self = Py_None;
    Py_INCREF(self);
    return self;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
{
    if (op->func_dict == NULL) {
        op->func_dict = PyDict_New();
        if (op->func_dict == NULL)
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
{
    PyObject *tmp;
    if (value == NULL) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (!PyDict_Check(value)) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    tmp = op->func_dict;
    Py_INCREF(value);
    op->func_dict = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    PyObject* dict = PyModule_GetDict(__pyx_m);
    Py_XINCREF(dict);
    return dict;
}
static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
{
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    Py_INCREF(result);
    return result;
}
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {0, 0, 0, 0, 0}
};
#ifndef PY_WRITE_RESTRICTED /* < Py2.5 */
#define PY_WRITE_RESTRICTED WRITE_RESTRICTED
#endif
static PyMemberDef __pyx_CyFunction_members[] = {
    {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0},
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromString(m->func.m_ml->ml_name);
#else
    return PyString_FromString(m->func.m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags,
                                      PyObject *closure, PyObject *module, PyObject* code) {
    __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
    if (op == NULL)
        return NULL;
    op->flags = flags;
    op->func_weakreflist = NULL;
    op->func.m_ml = ml;
    op->func.m_self = (PyObject *) op;
    Py_XINCREF(closure);
    op->func_closure = closure;
    Py_XINCREF(module);
    op->func.m_module = module;
    op->func_dict = NULL;
    op->func_name = NULL;
    op->func_doc = NULL;
    op->func_classobj = NULL;
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults = NULL;
    PyObject_GC_Track(op);
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
    Py_CLEAR(m->func.m_module);
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_code);
    Py_CLEAR(m->func_classobj);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyMem_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    if (m->func_weakreflist != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    PyObject_GC_Del(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
    Py_VISIT(m->func.m_module);
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_code);
    Py_VISIT(m->func_classobj);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
        Py_INCREF(func);
        return func;
    }
    if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
        if (type == NULL)
            type = (PyObject *)(Py_TYPE(obj));
        return PyMethod_New(func,
                            type, (PyObject *)(Py_TYPE(type)));
    }
    if (obj == Py_None)
        obj = NULL;
    return PyMethod_New(func, obj, type);
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
    PyObject *func_name = __Pyx_CyFunction_get_name(op);
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                               func_name, op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(func_name), op);
#endif
}
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __Pyx_NAMESTR("cython_function_or_method"), /*tp_name*/
    sizeof(__pyx_CyFunctionObject),   /*tp_basicsize*/
    0,                                  /*tp_itemsize*/
    (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/
    0,                                  /*tp_print*/
    0,                                  /*tp_getattr*/
    0,                                  /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
    0,                                  /*tp_compare*/
#else
    0,                                  /*reserved*/
#endif
    (reprfunc) __Pyx_CyFunction_repr,   /*tp_repr*/
    0,                                  /*tp_as_number*/
    0,                                  /*tp_as_sequence*/
    0,                                  /*tp_as_mapping*/
    0,                                  /*tp_hash*/
    PyCFunction_Call,                   /*tp_call*/
    0,                                  /*tp_str*/
    0,                                  /*tp_getattro*/
    0,                                  /*tp_setattro*/
    0,                                  /*tp_as_buffer*/
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/
    0,                                  /*tp_doc*/
    (traverseproc) __Pyx_CyFunction_traverse,   /*tp_traverse*/
    (inquiry) __Pyx_CyFunction_clear,   /*tp_clear*/
    0,                                  /*tp_richcompare*/
    offsetof(__pyx_CyFunctionObject, func_weakreflist), /* tp_weaklistoffse */
    0,                                  /*tp_iter*/
    0,                                  /*tp_iternext*/
    __pyx_CyFunction_methods,           /*tp_methods*/
    __pyx_CyFunction_members,           /*tp_members*/
    __pyx_CyFunction_getsets,           /*tp_getset*/
    0,                                  /*tp_base*/
    0,                                  /*tp_dict*/
    __Pyx_CyFunction_descr_get,         /*tp_descr_get*/
    0,                                  /*tp_descr_set*/
    offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/
    0,                                  /*tp_init*/
    0,                                  /*tp_alloc*/
    0,                                  /*tp_new*/
    0,                                  /*tp_free*/
    0,                                  /*tp_is_gc*/
    0,                                  /*tp_bases*/
    0,                                  /*tp_mro*/
    0,                                  /*tp_cache*/
    0,                                  /*tp_subclasses*/
    0,                                  /*tp_weaklist*/
    0,                                  /*tp_del*/
#if PY_VERSION_HEX >= 0x02060000
    0,                                  /*tp_version_tag*/
#endif
};
static int __Pyx_CyFunction_init(void)
{
    if (PyType_Ready(&__pyx_CyFunctionType_type) < 0)
        return -1;
    __pyx_CyFunctionType = &__pyx_CyFunctionType_type;
    return 0;
}
void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects)
{
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyMem_Malloc(size);
    if (!m->defaults)
        return PyErr_NoMemory();
    memset(m->defaults, 0, sizeof(size));
    m->defaults_pyobjects = pyobjects;
    return m->defaults;
}

static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) {
    PyObject *metaclass;
    /* Default metaclass */
#if PY_MAJOR_VERSION < 3
    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
        PyObject *base = PyTuple_GET_ITEM(bases, 0);
        metaclass = PyObject_GetAttrString(base, (char *)"__class__");
        if (!metaclass) {
            PyErr_Clear();
            metaclass = (PyObject*) Py_TYPE(base);
        }
    } else {
        metaclass = (PyObject *) &PyClass_Type;
    }
#else
    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
        PyObject *base = PyTuple_GET_ITEM(bases, 0);
        metaclass = (PyObject*) Py_TYPE(base);
    } else {
        metaclass = (PyObject *) &PyType_Type;
    }
#endif
    Py_INCREF(metaclass);
    return metaclass;
}

static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
                                   PyObject *modname) {
    PyObject *result;
    PyObject *metaclass;
    if (PyDict_SetItemString(dict, "__module__", modname) < 0)
        return NULL;
    /* Python2 __metaclass__ */
    metaclass = PyDict_GetItemString(dict, "__metaclass__");
    if (metaclass) {
        Py_INCREF(metaclass);
    } else {
        metaclass = __Pyx_FindPy2Metaclass(bases);
    }
    result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL);
    Py_DECREF(metaclass);
    return result;
}

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int64(npy_int64 val) {
    const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0;
    const int is_unsigned = const_zero < neg_one;
    if ((sizeof(npy_int64) == sizeof(char))  ||
        (sizeof(npy_int64) == sizeof(short))) {
        return PyInt_FromLong((long)val);
    } else if ((sizeof(npy_int64) == sizeof(int)) ||
               (sizeof(npy_int64) == sizeof(long))) {
        if (is_unsigned)
            return PyLong_FromUnsignedLong((unsigned long)val);
        else
            return PyInt_FromLong((long)val);
    } else if (sizeof(npy_int64) == sizeof(PY_LONG_LONG)) {
        if (is_unsigned)
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
        else
            return PyLong_FromLongLong((PY_LONG_LONG)val);
    } else {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        return _PyLong_FromByteArray(bytes, sizeof(npy_int64),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_int32(npy_int32 val) {
    const npy_int32 neg_one = (npy_int32)-1, const_zero = (npy_int32)0;
    const int is_unsigned = const_zero < neg_one;
    if ((sizeof(npy_int32) == sizeof(char))  ||
        (sizeof(npy_int32) == sizeof(short))) {
        return PyInt_FromLong((long)val);
    } else if ((sizeof(npy_int32) == sizeof(int)) ||
               (sizeof(npy_int32) == sizeof(long))) {
        if (is_unsigned)
            return PyLong_FromUnsignedLong((unsigned long)val);
        else
            return PyInt_FromLong((long)val);
    } else if (sizeof(npy_int32) == sizeof(PY_LONG_LONG)) {
        if (is_unsigned)
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
        else
            return PyLong_FromLongLong((PY_LONG_LONG)val);
    } else {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        return _PyLong_FromByteArray(bytes, sizeof(npy_int32),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE npy_int32 __Pyx_PyInt_from_py_npy_int32(PyObject* x) {
    const npy_int32 neg_one = (npy_int32)-1, const_zero = (npy_int32)0;
    const int is_unsigned = const_zero < neg_one;
    if (sizeof(npy_int32) == sizeof(char)) {
        if (is_unsigned)
            return (npy_int32)__Pyx_PyInt_AsUnsignedChar(x);
        else
            return (npy_int32)__Pyx_PyInt_AsSignedChar(x);
    } else if (sizeof(npy_int32) == sizeof(short)) {
        if (is_unsigned)
            return (npy_int32)__Pyx_PyInt_AsUnsignedShort(x);
        else
            return (npy_int32)__Pyx_PyInt_AsSignedShort(x);
    } else if (sizeof(npy_int32) == sizeof(int)) {
        if (is_unsigned)
            return (npy_int32)__Pyx_PyInt_AsUnsignedInt(x);
        else
            return (npy_int32)__Pyx_PyInt_AsSignedInt(x);
    } else if (sizeof(npy_int32) == sizeof(long)) {
        if (is_unsigned)
            return (npy_int32)__Pyx_PyInt_AsUnsignedLong(x);
        else
            return (npy_int32)__Pyx_PyInt_AsSignedLong(x);
    } else if (sizeof(npy_int32) == sizeof(PY_LONG_LONG)) {
        if (is_unsigned)
            return (npy_int32)__Pyx_PyInt_AsUnsignedLongLong(x);
        else
            return (npy_int32)__Pyx_PyInt_AsSignedLongLong(x);
    }  else {
        npy_int32 val;
        PyObject *v = __Pyx_PyNumber_Int(x);
        #if PY_VERSION_HEX < 0x03000000
        if (likely(v) && !PyLong_Check(v)) {
            PyObject *tmp = v;
            v = PyNumber_Long(tmp);
            Py_DECREF(tmp);
        }
        #endif
        if (likely(v)) {
            int one = 1; int is_little = (int)*(unsigned char *)&one;
            unsigned char *bytes = (unsigned char *)&val;
            int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                          bytes, sizeof(val),
                                          is_little, !is_unsigned);
            Py_DECREF(v);
            if (likely(!ret))
                return val;
        }
        return (npy_int32)-1;
    }
}

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_uint8(npy_uint8 val) {
    const npy_uint8 neg_one = (npy_uint8)-1, const_zero = (npy_uint8)0;
    const int is_unsigned = const_zero < neg_one;
    if ((sizeof(npy_uint8) == sizeof(char))  ||
        (sizeof(npy_uint8) == sizeof(short))) {
        return PyInt_FromLong((long)val);
    } else if ((sizeof(npy_uint8) == sizeof(int)) ||
               (sizeof(npy_uint8) == sizeof(long))) {
        if (is_unsigned)
            return PyLong_FromUnsignedLong((unsigned long)val);
        else
            return PyInt_FromLong((long)val);
    } else if (sizeof(npy_uint8) == sizeof(PY_LONG_LONG)) {
        if (is_unsigned)
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
        else
            return PyLong_FromLongLong((PY_LONG_LONG)val);
    } else {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        return _PyLong_FromByteArray(bytes, sizeof(npy_uint8),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE npy_int64 __Pyx_PyInt_from_py_npy_int64(PyObject* x) {
    const npy_int64 neg_one = (npy_int64)-1, const_zero = (npy_int64)0;
    const int is_unsigned = const_zero < neg_one;
    if (sizeof(npy_int64) == sizeof(char)) {
        if (is_unsigned)
            return (npy_int64)__Pyx_PyInt_AsUnsignedChar(x);
        else
            return (npy_int64)__Pyx_PyInt_AsSignedChar(x);
    } else if (sizeof(npy_int64) == sizeof(short)) {
        if (is_unsigned)
            return (npy_int64)__Pyx_PyInt_AsUnsignedShort(x);
        else
            return (npy_int64)__Pyx_PyInt_AsSignedShort(x);
    } else if (sizeof(npy_int64) == sizeof(int)) {
        if (is_unsigned)
            return (npy_int64)__Pyx_PyInt_AsUnsignedInt(x);
        else
            return (npy_int64)__Pyx_PyInt_AsSignedInt(x);
    } else if (sizeof(npy_int64) == sizeof(long)) {
        if (is_unsigned)
            return (npy_int64)__Pyx_PyInt_AsUnsignedLong(x);
        else
            return (npy_int64)__Pyx_PyInt_AsSignedLong(x);
    } else if (sizeof(npy_int64) == sizeof(PY_LONG_LONG)) {
        if (is_unsigned)
            return (npy_int64)__Pyx_PyInt_AsUnsignedLongLong(x);
        else
            return (npy_int64)__Pyx_PyInt_AsSignedLongLong(x);
    }  else {
        npy_int64 val;
        PyObject *v = __Pyx_PyNumber_Int(x);
        #if PY_VERSION_HEX < 0x03000000
        if (likely(v) && !PyLong_Check(v)) {
            PyObject *tmp = v;
            v = PyNumber_Long(tmp);
            Py_DECREF(tmp);
        }
        #endif
        if (likely(v)) {
            int one = 1; int is_little = (int)*(unsigned char *)&one;
            unsigned char *bytes = (unsigned char *)&val;
            int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                          bytes, sizeof(val),
                                          is_little, !is_unsigned);
            Py_DECREF(v);
            if (likely(!ret))
                return val;
        }
        return (npy_int64)-1;
    }
}

static CYTHON_INLINE npy_uint8 __Pyx_PyInt_from_py_npy_uint8(PyObject* x) {
    const npy_uint8 neg_one = (npy_uint8)-1, const_zero = (npy_uint8)0;
    const int is_unsigned = const_zero < neg_one;
    if (sizeof(npy_uint8) == sizeof(char)) {
        if (is_unsigned)
            return (npy_uint8)__Pyx_PyInt_AsUnsignedChar(x);
        else
            return (npy_uint8)__Pyx_PyInt_AsSignedChar(x);
    } else if (sizeof(npy_uint8) == sizeof(short)) {
        if (is_unsigned)
            return (npy_uint8)__Pyx_PyInt_AsUnsignedShort(x);
        else
            return (npy_uint8)__Pyx_PyInt_AsSignedShort(x);
    } else if (sizeof(npy_uint8) == sizeof(int)) {
        if (is_unsigned)
            return (npy_uint8)__Pyx_PyInt_AsUnsignedInt(x);
        else
            return (npy_uint8)__Pyx_PyInt_AsSignedInt(x);
    } else if (sizeof(npy_uint8) == sizeof(long)) {
        if (is_unsigned)
            return (npy_uint8)__Pyx_PyInt_AsUnsignedLong(x);
        else
            return (npy_uint8)__Pyx_PyInt_AsSignedLong(x);
    } else if (sizeof(npy_uint8) == sizeof(PY_LONG_LONG)) {
        if (is_unsigned)
            return (npy_uint8)__Pyx_PyInt_AsUnsignedLongLong(x);
        else
            return (npy_uint8)__Pyx_PyInt_AsSignedLongLong(x);
    }  else {
        npy_uint8 val;
        PyObject *v = __Pyx_PyNumber_Int(x);
        #if PY_VERSION_HEX < 0x03000000
        if (likely(v) && !PyLong_Check(v)) {
            PyObject *tmp = v;
            v = PyNumber_Long(tmp);
            Py_DECREF(tmp);
        }
        #endif
        if (likely(v)) {
            int one = 1; int is_little = (int)*(unsigned char *)&one;
            unsigned char *bytes = (unsigned char *)&val;
            int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                          bytes, sizeof(val),
                                          is_little, !is_unsigned);
            Py_DECREF(v);
            if (likely(!ret))
                return val;
        }
        return (npy_uint8)-1;
    }
}

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        if (PyBytes_GET_SIZE(s1) != PyBytes_GET_SIZE(s2)) {
            return (equals == Py_NE);
        } else if (PyBytes_GET_SIZE(s1) == 1) {
            if (equals == Py_EQ)
                return (PyBytes_AS_STRING(s1)[0] == PyBytes_AS_STRING(s2)[0]);
            else
                return (PyBytes_AS_STRING(s1)[0] != PyBytes_AS_STRING(s2)[0]);
        } else {
            int result = memcmp(PyBytes_AS_STRING(s1), PyBytes_AS_STRING(s2), (size_t)PyBytes_GET_SIZE(s1));
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
}

static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyUnicode_CheckExact(s1) & PyUnicode_CheckExact(s2)) {
        #ifdef CYTHON_PEP393_ENABLED
        if ((PyUnicode_READY(s1) < 0) || (PyUnicode_READY(s2) < 0))
            return -1;
        if (PyUnicode_GET_LENGTH(s1) != PyUnicode_GET_LENGTH(s2)) {
            return (equals == Py_NE);
        } else if (PyUnicode_GET_LENGTH(s1) == 1) {
            Py_UCS4 ch1 = PyUnicode_READ_CHAR(s1, 0);
            Py_UCS4 ch2 = PyUnicode_READ_CHAR(s2, 0);
            return (equals == Py_EQ) ? (ch1 == ch2) : (ch1 != ch2);
        #else
        if (PyUnicode_GET_SIZE(s1) != PyUnicode_GET_SIZE(s2)) {
            return (equals == Py_NE);
        } else if (PyUnicode_GET_SIZE(s1) == 1) {
            Py_UNICODE ch1 = PyUnicode_AS_UNICODE(s1)[0];
            Py_UNICODE ch2 = PyUnicode_AS_UNICODE(s2)[0];
            return (equals == Py_EQ) ? (ch1 == ch2) : (ch1 != ch2);
        #endif
        } else {
            int result = PyUnicode_Compare(s1, s2);
            if ((result == -1) && unlikely(PyErr_Occurred()))
                return -1;
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyUnicode_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyUnicode_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
}

static CYTHON_INLINE npy_uint32 __Pyx_PyInt_from_py_npy_uint32(PyObject* x) {
    const npy_uint32 neg_one = (npy_uint32)-1, const_zero = (npy_uint32)0;
    const int is_unsigned = const_zero < neg_one;
    if (sizeof(npy_uint32) == sizeof(char)) {
        if (is_unsigned)
            return (npy_uint32)__Pyx_PyInt_AsUnsignedChar(x);
        else
            return (npy_uint32)__Pyx_PyInt_AsSignedChar(x);
    } else if (sizeof(npy_uint32) == sizeof(short)) {
        if (is_unsigned)
            return (npy_uint32)__Pyx_PyInt_AsUnsignedShort(x);
        else
            return (npy_uint32)__Pyx_PyInt_AsSignedShort(x);
    } else if (sizeof(npy_uint32) == sizeof(int)) {
        if (is_unsigned)
            return (npy_uint32)__Pyx_PyInt_AsUnsignedInt(x);
        else
            return (npy_uint32)__Pyx_PyInt_AsSignedInt(x);
    } else if (sizeof(npy_uint32) == sizeof(long)) {
        if (is_unsigned)
            return (npy_uint32)__Pyx_PyInt_AsUnsignedLong(x);
        else
            return (npy_uint32)__Pyx_PyInt_AsSignedLong(x);
    } else if (sizeof(npy_uint32) == sizeof(PY_LONG_LONG)) {
        if (is_unsigned)
            return (npy_uint32)__Pyx_PyInt_AsUnsignedLongLong(x);
        else
            return (npy_uint32)__Pyx_PyInt_AsSignedLongLong(x);
    }  else {
        npy_uint32 val;
        PyObject *v = __Pyx_PyNumber_Int(x);
        #if PY_VERSION_HEX < 0x03000000
        if (likely(v) && !PyLong_Check(v)) {
            PyObject *tmp = v;
            v = PyNumber_Long(tmp);
            Py_DECREF(tmp);
        }
        #endif
        if (likely(v)) {
            int one = 1; int is_little = (int)*(unsigned char *)&one;
            unsigned char *bytes = (unsigned char *)&val;
            int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                          bytes, sizeof(val),
                                          is_little, !is_unsigned);
            Py_DECREF(v);
            if (likely(!ret))
                return val;
        }
        return (npy_uint32)-1;
    }
}

static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_npy_uint32(npy_uint32 val) {
    const npy_uint32 neg_one = (npy_uint32)-1, const_zero = (npy_uint32)0;
    const int is_unsigned = const_zero < neg_one;
    if ((sizeof(npy_uint32) == sizeof(char))  ||
        (sizeof(npy_uint32) == sizeof(short))) {
        return PyInt_FromLong((long)val);
    } else if ((sizeof(npy_uint32) == sizeof(int)) ||
               (sizeof(npy_uint32) == sizeof(long))) {
        if (is_unsigned)
            return PyLong_FromUnsignedLong((unsigned long)val);
        else
            return PyInt_FromLong((long)val);
    } else if (sizeof(npy_uint32) == sizeof(PY_LONG_LONG)) {
        if (is_unsigned)
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
        else
            return PyLong_FromLongLong((PY_LONG_LONG)val);
    } else {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        return _PyLong_FromByteArray(bytes, sizeof(npy_uint32),
                                     little, !is_unsigned);
    }
}

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return ::std::complex< float >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      return x + y*(__pyx_t_float_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
      __pyx_t_float_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

#if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eqf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sumf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_difff(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prodf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quotf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
        __pyx_t_float_complex z;
        float denom = b.real * b.real + b.imag * b.imag;
        z.real = (a.real * b.real + a.imag * b.imag) / denom;
        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
        return z;
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_negf(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zerof(__pyx_t_float_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conjf(__pyx_t_float_complex a) {
        __pyx_t_float_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE float __Pyx_c_absf(__pyx_t_float_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrtf(z.real*z.real + z.imag*z.imag);
          #else
            return hypotf(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_powf(__pyx_t_float_complex a, __pyx_t_float_complex b) {
            __pyx_t_float_complex z;
            float r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    float denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        z = __Pyx_c_prodf(a, a);
                        return __Pyx_c_prodf(a, a);
                    case 3:
                        z = __Pyx_c_prodf(a, a);
                        return __Pyx_c_prodf(z, a);
                    case 4:
                        z = __Pyx_c_prodf(a, a);
                        return __Pyx_c_prodf(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                }
                r = a.real;
                theta = 0;
            } else {
                r = __Pyx_c_absf(a);
                theta = atan2f(a.imag, a.real);
            }
            lnr = logf(r);
            z_r = expf(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cosf(z_theta);
            z.imag = z_r * sinf(z_theta);
            return z;
        }
    #endif
#endif

#if CYTHON_CCOMPLEX
  #ifdef __cplusplus
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return ::std::complex< double >(x, y);
    }
  #else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      return x + y*(__pyx_t_double_complex)_Complex_I;
    }
  #endif
#else
    static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
      __pyx_t_double_complex z;
      z.real = x;
      z.imag = y;
      return z;
    }
#endif

#if CYTHON_CCOMPLEX
#else
    static CYTHON_INLINE int __Pyx_c_eq(__pyx_t_double_complex a, __pyx_t_double_complex b) {
       return (a.real == b.real) && (a.imag == b.imag);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real + b.real;
        z.imag = a.imag + b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real - b.real;
        z.imag = a.imag - b.imag;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        z.real = a.real * b.real - a.imag * b.imag;
        z.imag = a.real * b.imag + a.imag * b.real;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot(__pyx_t_double_complex a, __pyx_t_double_complex b) {
        __pyx_t_double_complex z;
        double denom = b.real * b.real + b.imag * b.imag;
        z.real = (a.real * b.real + a.imag * b.imag) / denom;
        z.imag = (a.imag * b.real - a.real * b.imag) / denom;
        return z;
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real = -a.real;
        z.imag = -a.imag;
        return z;
    }
    static CYTHON_INLINE int __Pyx_c_is_zero(__pyx_t_double_complex a) {
       return (a.real == 0) && (a.imag == 0);
    }
    static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj(__pyx_t_double_complex a) {
        __pyx_t_double_complex z;
        z.real =  a.real;
        z.imag = -a.imag;
        return z;
    }
    #if 1
        static CYTHON_INLINE double __Pyx_c_abs(__pyx_t_double_complex z) {
          #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
            return sqrt(z.real*z.real + z.imag*z.imag);
          #else
            return hypot(z.real, z.imag);
          #endif
        }
        static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow(__pyx_t_double_complex a, __pyx_t_double_complex b) {
            __pyx_t_double_complex z;
            double r, lnr, theta, z_r, z_theta;
            if (b.imag == 0 && b.real == (int)b.real) {
                if (b.real < 0) {
                    double denom = a.real * a.real + a.imag * a.imag;
                    a.real = a.real / denom;
                    a.imag = -a.imag / denom;
                    b.real = -b.real;
                }
                switch ((int)b.real) {
                    case 0:
                        z.real = 1;
                        z.imag = 0;
                        return z;
                    case 1:
                        return a;
                    case 2:
                        z = __Pyx_c_prod(a, a);
                        return __Pyx_c_prod(a, a);
                    case 3:
                        z = __Pyx_c_prod(a, a);
                        return __Pyx_c_prod(z, a);
                    case 4:
                        z = __Pyx_c_prod(a, a);
                        return __Pyx_c_prod(z, z);
                }
            }
            if (a.imag == 0) {
                if (a.real == 0) {
                    return a;
                }
                r = a.real;
                theta = 0;
            } else {
                r = __Pyx_c_abs(a);
                theta = atan2(a.imag, a.real);
            }
            lnr = log(r);
            z_r = exp(lnr * b.real - theta * b.imag);
            z_theta = theta * b.real + lnr * b.imag;
            z.real = z_r * cos(z_theta);
            z.imag = z_r * sin(z_theta);
            return z;
        }
    #endif
#endif

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned char" :
                    "value too large to convert to unsigned char");
            }
            return (unsigned char)-1;
        }
        return (unsigned char)val;
    }
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned short" :
                    "value too large to convert to unsigned short");
            }
            return (unsigned short)-1;
        }
        return (unsigned short)val;
    }
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned int" :
                    "value too large to convert to unsigned int");
            }
            return (unsigned int)-1;
        }
        return (unsigned int)val;
    }
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
    const char neg_one = (char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to char" :
                    "value too large to convert to char");
            }
            return (char)-1;
        }
        return (char)val;
    }
    return (char)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
    const short neg_one = (short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to short" :
                    "value too large to convert to short");
            }
            return (short)-1;
        }
        return (short)val;
    }
    return (short)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
    const signed char neg_one = (signed char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed char" :
                    "value too large to convert to signed char");
            }
            return (signed char)-1;
        }
        return (signed char)val;
    }
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
    const signed short neg_one = (signed short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed short" :
                    "value too large to convert to signed short");
            }
            return (signed short)-1;
        }
        return (signed short)val;
    }
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
    const signed int neg_one = (signed int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed int" :
                    "value too large to convert to signed int");
            }
            return (signed int)-1;
        }
        return (signed int)val;
    }
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned long");
            return (unsigned long)-1;
        }
        return (unsigned long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned long");
                return (unsigned long)-1;
            }
            return (unsigned long)PyLong_AsUnsignedLong(x);
        } else {
            return (unsigned long)PyLong_AsLong(x);
        }
    } else {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned long)-1;
        val = __Pyx_PyInt_AsUnsignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned PY_LONG_LONG");
            return (unsigned PY_LONG_LONG)-1;
        }
        return (unsigned PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned PY_LONG_LONG");
                return (unsigned PY_LONG_LONG)-1;
            }
            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
    const long neg_one = (long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to long");
            return (long)-1;
        }
        return (long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long)-1;
            }
            return (long)PyLong_AsUnsignedLong(x);
        } else {
            return (long)PyLong_AsLong(x);
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long)-1;
        val = __Pyx_PyInt_AsLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to PY_LONG_LONG");
            return (PY_LONG_LONG)-1;
        }
        return (PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to PY_LONG_LONG");
                return (PY_LONG_LONG)-1;
            }
            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
    const signed long neg_one = (signed long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed long");
            return (signed long)-1;
        }
        return (signed long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed long");
                return (signed long)-1;
            }
            return (signed long)PyLong_AsUnsignedLong(x);
        } else {
            return (signed long)PyLong_AsLong(x);
        }
    } else {
        signed long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed long)-1;
        val = __Pyx_PyInt_AsSignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed PY_LONG_LONG");
            return (signed PY_LONG_LONG)-1;
        }
        return (signed PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed PY_LONG_LONG");
                return (signed PY_LONG_LONG)-1;
            }
            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        signed PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsSignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
}

static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        #if PY_VERSION_HEX < 0x02050000
        return PyErr_Warn(NULL, message);
        #else
        return PyErr_WarnEx(NULL, message, 1);
        #endif
    }
    return 0;
}

#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    size_t size, int strict)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;
    char warning[200];
    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    py_name = __Pyx_PyIdentifier_FromString(class_name);
    if (!py_name)
        goto bad;
    result = PyObject_GetAttr(py_module, py_name);
    Py_DECREF(py_name);
    py_name = 0;
    Py_DECREF(py_module);
    py_module = 0;
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%s.%s is not a type object",
            module_name, class_name);
        goto bad;
    }
    if (!strict && ((PyTypeObject *)result)->tp_basicsize > (Py_ssize_t)size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility",
            module_name, class_name);
        #if PY_VERSION_HEX < 0x02050000
        if (PyErr_Warn(NULL, warning) < 0) goto bad;
        #else
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
        #endif
    }
    else if (((PyTypeObject *)result)->tp_basicsize != (Py_ssize_t)size) {
        PyErr_Format(PyExc_ValueError,
            "%s.%s has the wrong size, try recompiling",
            module_name, class_name);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return NULL;
}
#endif

#ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;
    py_name = __Pyx_PyIdentifier_FromString(name);
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static void __Pyx_AddTraceback(const char *funcname, int __pyx_clineno,
                               int __pyx_lineno, const char *__pyx_filename) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyObject *py_globals = 0;
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(__pyx_filename);
    #else
    py_srcfile = PyUnicode_FromString(__pyx_filename);
    #endif
    if (!py_srcfile) goto bad;
    if (__pyx_clineno) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    py_code = __Pyx_PyCode_New(
        0,            /*int argcount,*/
        0,            /*int kwonlyargcount,*/
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple,  /*PyObject *consts,*/
        __pyx_empty_tuple,  /*PyObject *names,*/
        __pyx_empty_tuple,  /*PyObject *varnames,*/
        __pyx_empty_tuple,  /*PyObject *freevars,*/
        __pyx_empty_tuple,  /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        __pyx_lineno,   /*int firstlineno,*/
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    if (!py_code) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = __pyx_lineno;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else  /* Python 3+ has unicode identifiers */
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}


/* Type Conversion Functions */

static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}

static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return Py_INCREF(x), x;
  m = Py_TYPE(x)->tp_as_number;
#if PY_VERSION_HEX < 0x03000000
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_VERSION_HEX < 0x03000000
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%s__ returned non-%s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject* x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}

static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
#if PY_VERSION_HEX < 0x02050000
   if (ival <= LONG_MAX)
       return PyInt_FromLong((long)ival);
   else {
       unsigned char *bytes = (unsigned char *) &ival;
       int one = 1; int little = (int)*(unsigned char*)&one;
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
   }
#else
   return PyInt_FromSize_t(ival);
#endif
}

static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
       return (size_t)-1;
   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
       PyErr_SetString(PyExc_OverflowError,
                       "value too large to convert to size_t");
       return (size_t)-1;
   }
   return (size_t)val;
}


#endif /* Py_PYTHON_H */
